Archive for January, 2009

Twitter Joins Me

I’ve watched Twitter from a distance for the past year or so,  sometimes making fun of it in blog comments,  but I never actually joined.

Last week I was looking at my web server log with the good old tail -f,  and found that several other bloggers had hotlinked the copy of the twitter fail whale that was in my old “What do you do if you catch an exception?” post.  It turns out that my copy of the whale currently ranks #1 in Google Image Search.  It’s not bringing in a vast amount of traffic,  but it seems to be really engaging people,  because Google blog search is finding a new reference to the image just about every day.

I’ve been spending a lot of time developing sites where that’s the whole idea:  to build virtuous circles where people find images,  put them on their sites,  link back to my site,  which attracts more visitors.  Sometimes you can succeed at this without trying,  but making a business out of it is a matter of being lucky consistently.

After that I broke down and joined twitter.  My username on twitter is paul_houle;  Right now it seems like a strange and lonely place,  but I can see some discipline in expressing oneself in 140 characters.  I’ve noticed quite a few characters already:  everything from the very corporate people who tweet in calculated sound bites to people that tweet like /dev/random.  Perhaps I can’t do anything about the “strange” bit,  but perhaps I can about the “lonely” part.  If you like the things that I blog about,  you’re certainly invited to follow me,  and I’m interested in following like minded people.

Manipulate HTML Forms With Silverlight 2

Remote Control


Lately I’ve been working on a web application based on Silverlight 2.  The application uses a traditional web login system based on a cryptographically signed cookie.  In early development,  users logged in on an HTML page,  which would load a Silverlight application on successful login.  Users who didn’t have Silverlight installed would be asked to install it after logging in,  rather than before.

Although it’s (sometimes) possible to determine what plug-ins a user has installed using Javascript,  the methods are dependent on the specific browser and the plug-ins.  We went for a simple and effective method:  make the login form a Silverlight application,  so that users would be prompted to install Silverlight before logging in.

Our solutionn  was to make the Silverlight application a drop-in replacement for the original HTML form.  The Silverlight application controls a hidden HTML form:  when a user hits the “Log In” buttonin the Silverlight application,  the application inserts the appropriate information into the HTML form and submits it.  This article describes the technique in detail. Continue Reading »

require(), require_once() and Dynamic Autoloading in PHP


I program in PHP a lot,  but I’ve avoided using autoloaders,  except when I’ve been working in frameworks,  such as symfony,   that include an autoloader.  Last month I started working on a system that’s designed to be part of a software product line:  many scripts,  for instance,  are going to need to deserialize objects that didn’t exist when the script was written:  autoloading went from a convenience to a necessity.

The majority of autoloaders use a fixed mapping between class names and PHP file names.  Although that’s fine if you obey a strict “one class,  one file” policy,  that’s a policy that I don’t follow 100% of the time.  An additional problem is that today’s PHP applications often reuse code from multiple frameworks and libraries that use different naming conventions:  often applications end up registering multiple autoloaders.  I was looking for an autoloader that “just works” with a minimum of convention and configuration — and I found that in a recent autoloader developed by A.J. Brown. Continue Reading »