Recent Blog Posts
Blogs » Archive for January, 2006
Building a Forum with Bribes
Getting a forum off the ground more than nearly anything else is one of the most time consuming things for a content site publisher to do. In some cases it takes years to get enough posts for the forum to truly become active.
The issue is that if people have no threads to reply to then they are less likely to register, and if no one ever registers then there will be no threads to reply to. It is very much a catch-22 situation. You will get the occasional person who registered to ask a question, and after a significant amount of time you may have enough of those people to get the ball rolling. However in general forums need a critical mass of posts before they start getting active with daily repeat visitors. I estimate that mass to be at least 1000 posts.
If you don’t wish to wait though there are tricks, you can manufacturer posts automatically using public domain content. You can talk to yourself, literally, with multiple usernames, you can beg your friends to visit and post, or you can pay people to post. The latter, paying for posts, is what I wish …
PHP’s “doggie” easter egg
(Via digg) An apparent easter egg in some versions of PHP will display a picture of a dog when any PHP script is loaded with a particular query string.
Try it here on SitePoint:
http://www.sitepoint.com/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
It appears that different PHP versions have different animals embedded in them:
http://diggnation.com/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
http://nadnerb.org/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
Apparently the doggie also appears on the page generated by phpinfo() on April 1st every year.
This has been around awhile, but it’s news to me.
Some other query strings to try:
http://www.sitepoint.com/?=PHPE9568F34-D428-11d2-A769-00AA001ACF42
http://www.sitepoint.com/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
http://www.sitepoint.com/?=PHPE9568F35-D428-11d2-A769-00AA001ACF42
http://www.sitepoint.com/?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000
If you’re concerned about the security implications of revealing your PHP version to the masses, be sure to disable the expose_php option in your php.ini file, which also makes this easter egg go away.
YourKit Java Profiler: 75% Off!
YourKit Java Profiler is an excellent tool for tracking down and fixing performance issues and memory leaks in Java applications, from desktop apps to Web applications.
Much like a debugger, a profiler lets you connect to a running Java application, allow it to run for a little while, and then pause it to analyze its state at any given time. It lets you take “snapshots” of the hierarchy of Java objects that exist in memory, and compare snapshots taken at different times to identify memory leaks. It also analyzes the time your application spends running the different parts of your application’s code, so you can target areas that have a large impact on performance for optimization.
After playing with several options in this area, YourKit Java Profiler is certainly my pick of the bunch. It’s got really pleasant interface to work with, with facilities for analyzing just about any kind of Java program. It’s also better than the competition at analyzing programs in tricky conditions (e.g. an applet running in a Java 1.3-era browser plug-in). It will also integrate with all the major IDEs (Eclipse, NetBeans, IDEA, JBuilder and JDeveloper), to fit into your normal workflow.
Until January 15th, YourKit is selling …
a simple wiki with web.py
Ran into web.py here, while it was still unreleased and got hooked by the API design and the comment Aaron made here
The third principle is that web.py should, by default, do the right thing by the Web. This means distinguishing between GET and POST properly. It means simple, canonical URLs which synonyms redirect to. It means readable HTML with the proper HTTP headers.
Since then web.py has been released with an initial reaction here - agree with those remarks so don’t need to repeat.
More interesting was hacking something together with it - a very simple wiki which took about 2 hours to get to where it is (below), while reading the docs and tutorial. Note this isn’t pretty code - the HTML in embedded directly, violating Aaron’s principle (didn’t want to have to mess with Cheetah as well), plus my Python skills are not the greatest but perhaps it makes a useful beginners example.
To install and run (Linux) to a file like wiki.py then do the following;
$ wget http://webpy.org/web.py
$ wget http://webpy.org/markdown.py
$ mkdir pages
$ chmod +x wiki.py
$ ./wiki.py
Then point your browser at http://localhost:8080/page/somepage to get started
The code;
#!/usr/bin/python
import web
from markdown import Markdown
import os, time, re, …
Google’s ‘bigdaddy’ datacenter
Matt Cutt’s, Google’s infamous Blogger, has written about “bigdaddy“, Google’s new datacenter which will become the default in the next 1-2 months:
Q: What’s new and different in Bigdaddy?
A: It has some new infrastructure, not just better algorithms or different data. Most of the changes are under the hood, enough so that an average user might not even notice any difference in this iteration.
At the moment, Google is requesting feedback on the quality of search results at “bigdaddy”. Specifically, they want feedback about canonicalization, redirects, duplicate urls, www vs. non-www, spam and similar issues.
Check out 66.249.93.104 to preview how your Website might rank in Google in the near future.
PHP Conference UK - 10th Feb 2006
In London in February? Check out the PHP Conference UK 2006, taking place at the Keyworth Centre right next to Waterloo station and Southbank University.
Organisation is thanks to Marcus and members of the PHP London User Group. The price (**cough** unlike most conferences **cough**) is something you can actually afford - 50.00 GBP [~ $90] if you register early - which you’ll need to as there’s only so much space at the venue.
It’s a one day event and the speakers are Derick Rethans, Pavel Kovsloski, Christopher
Kunz, Matt Zandstra (author of PHP 5 Objects, Patterns, and Practice) and, err.., well me in fact.
Help needed…
Here’s an inside track - so far I’ve been stressing Marcus by failing to deliver a talk summary on time (sorry Marcus). Part of the delay has been fatherhood for the second time (it’s a boy). The other part of the problem is I’m still in two minds about which talk to give and need some help deciding.
The talk I was thinking of doing would have a title something like “Parsing with PHP”; some basic theory, difference parsing strategies that have worked in PHP and reference to …
Rules of thumb are often wrong
Be careful about rules of thumb and conventional wisdom in your marketing. While some rules hold up time and time again, some don’t.
For instance: Noboby buys anything between Christmas and New Year’s Eve. Not true. I sold more than an average amount of books and services that week.
For instance: A guarantee increases response on websites. Well, this one is tricky. A good guarantee makes it easier for people to buy, because you take away their risk. But with the Internet (vs. traditional direct mail), you really need to test. Maybe 5 people in 3 years and thousands of customers have asked for a refund on my books, where I do offer a rock solid guarantee. But a much higher percentage ask for refunds on some of my other sites (ones that are less about me). There are lots of tire kickers on the Internet, and it is easy to get a free look at something, get your refund, and move on. So I’m testing no guarantee on some sites, and so far, paid response (net returns) is the same and I save myself the trouble of having to issue refunds.
What are other rules of thumb your own marketing has …
Web 2.0 Connectedness
The following is republished from the Tech Times #129.
The holiday break gave me a chance to get into some new products and services that had been on my "try that" list for awhile. Although I’m excited about them all, I’m frustrated by how separate they are.
With "Web 2.0" on everyone’s lips, it seems like every bright mind on the Web is focused on building the next killer app. Small and focused seems to be the flavour of the month: Gmail is great at email, Flickr nails photos, and CalendarHub and its ilk have got calendars just about licked. But as we embrace each of these disparate services, we further segment the data we rely on day-to-day, making it more difficult to use them together when we need to.
If you believe the pundits (yours truly included), openness and standards compliance are two of the characteristics that should define any true member of the Web 2.0 stable. Any data you put into a Web application should be available to pull out again in a portable format, and should be accessible to other applications through well-documented APIs.
In the wild, the open API thing seems to be happening, at least. …
Web Developer Toolbar 1.0 released
Happy New Year! If you haven’t checked your Firefox Extensions window for available updates lately, now’s the time. Version 1.0 of the Web Developer extension for Firefox, Mozilla and Flock was released on December 31st, with a huge list of mostly minor updates.
One of the new features that I really love is the ability to open the DOM Inspector and JavaScript console as Firefox sidebars.
Three cheers for Chris Pederick!
Canvas for IE with VML
Updated to clarify the relationship between <canvas> and SVG in Firefox.
Apple’s Safari browser, followed by Firefox 1.5 and the upcoming Opera 9, have all implemented support for the <canvas> tag, described by the Web Applications 1.0 draft specification (a.k.a. HTML 5). This tag lets you create an area for painting 2D graphics using JavaScript code.
Though filled with potential, <canvas> has not seen much use in mainstream Web development as yet, due mainly to the fact that it remains completely unsupported by Internet Explorer.
Where <canvas> has been used has been in implementing support for Also getting attention in the Web vector graphics arena is Scalable Vector Graphics (SVG) in Firefox 1.5. SVG is a W3C standard for 2D graphics similar in scope to <canvas>, but with the ability to access previously-drawn graphics and modify them using JavaScript. Firefox 1.5’s support for SVG is built atop the same graphics subsystem as its support for <canvas>.
It turns out a similar trick can be used to bring support for <canvas> (and perhaps, one day, SVG) to Internet Explorer. With a bit of experimentation over the course of a few evenings, Emil Eklund has been able to use Vector Markup …
Sponsored Links
SitePoint Marketplace
Buy and sell Websites, templates, domain names, hosting, graphics and more.
Download sample chapters of any of our popular books.




