Joys of working from home

1 Apr 2010


Recently I’ve been working on a project where I’ve had to commute to Birmingham Business Park and work in the client’s office.  Nice project, but it’s made me realise just how much I love working at home.

  1. I have a brilliant office.  Set of double monitors on an adjustable arm (I hate using visual studio on a laptop screen), desk and chair are at the right height, everything I need is to hand.  Also it’s just such a nice space.
  2. Great coffee.  I’m a coffee snob and I detest and despise instant coffee and vending machine coffee and starbucks coffee.
  3. No commute.  Every morning for the past few weeks I’ve been faced with the choice between roadworks and speed-cameras or the motorway.  At home my office is next door to bedroom and if I get dressed it’s because I want to, not because I have to.
  4. I’m the boss.  My hours.  My clients.  My projects.
  5. If I get bored I can just go and annoy the grumpy office cat.

My desk. There’s also a nice view from the window.
It’s obviously late ‘cos I’ve been drinking tea.

View from desk - rest of my office
And this is the rest of my office. The pictures on the wall are some really nice technical drawings of steam engine indicators, and a rivitting machine

And I’m just doing my end-of-year accounts (my company year ends in March) and I’ve realised that I’ve now been working for myself for four years. Unbelievable. I had to go check my old speadsheets to see if I’d counted the years right. But yep, first invoice sent March 2006.

Recursive humour

12 Mar 2010


If you google for recursion … you can google for recursion … you can google for recursion.  This is the kind of thigh-slapping belly-clutching joke which has them rolling in the aisles if you tell it right.

The equivalent entry in the hacker’s dictionary is:

Recursion: n. See recursion

Or, more programmers’ humour, PHP stands for “PHP: Hypertext Preprocessor”, which is a recursive acronym.  We’ve got to get our fun somewhere.

You can’t create a file called CON

13 Aug 2009


Okay, this drove me completely nuts for far too long.  Basically, the subversion repository had a file called con.jpg (and one called aon.jpg, bon.jpg, don.jpg but they weren’t an issue) and this caused massive fail when I tried to do a checkout.

Error message:

Can't open "images\alphabet\con.jpg.tmp": the system cannot find the file specified

I deleted files, folders, parent folders, did a fresh checkout and still no joy. And then I cursed subversion, kicked the cat, threw coffee cups out the window, contemplated throwing the laptop out the window, gnashed my teeth … spent some time googling things, spent more time googling with different keywords.

It appears that you cannot have a file or folders in windows called “con” or “con.jpg” or “con.txt” or basically con anything. This isn’t much advertised but it goes all the way back to early DOS days where con was a reserved system word (short for console) I’d mock microsoft, but then I look over my shoulder at certain historical applications which I’ve written and which are still running andI get embarrassed for myself.  Anyway, we renamed the con.jpg file in the subversion repository.  Everyone else in that team was using Mac/linux so it was just me having weird & wonderful problems.

Multiple IEs

6 May 2009

, ,

I’m trying to get IE8, IE7 and IE6 playing nicely on the same machine. Really really want this for testing – and I’m having a devil of a job with it.  I’ve:

  1. Used the Microsoft installer to upgrade the regular IE7 to IE8.
  2. Installed IE7 Standalone to get IE7 working
  3. Used the Multiple IE installer from Tredsoft to get IE6 setup.

I’m now having a problem with forms – basically it’s not possible to click into or set focus on any text field when I’m using IE7 or IE6.  This makes testing web applications surprisingly difficult.

In addition, when looking at pages with IE6, I get continual dialog popup which reads “An error has occurred in this dialog. Error:84 Unspecified error.”

Other people have reported the issue of form selects not dropping down, instead triggering the popup blocker notification but I haven’t had that problem (yet)

As well as the Tredsoft installer, I’ve used the Internet Explorer Collection (This last isn’t much referenced – I think it’s because it lacks any details about who/what/why and wherefore.) Easy neat install, but exactly the same problems with forms.

U.A. Fanthorpe – 22 July 1929 -28 April 2009 RIP

1 May 2009

There is a kind of love called maintenance,
Which stores the WD40 and knows when to use it;

Which checks the insurance, and doesn’t forget
The milkman; which remembers to plant bulbs;

Which answers letters; which knows the way
The money goes, which deals with dentists

And Road Fund Tax and meeting trains,
And postcards to the lonely; which upholds

The permanently rickety elaborate
Structures of living; which is Atlas.

And maintenance is the sensible side of love,
Which knows what time and weather are doing
To my brickwork; insulates my faulty wiring;
Laughs at my dryrotten jokes; remembers
My need for gloss and grouting; which keeps
My suspect edifice upright in the air,
As Atlas did the sky.

U.A. Fanthorpe

Akihiro Furuta

12 Dec 2008

Best Family Portraits ever

Happy birthday of dog

Read More

Email Newsletters

9 Dec 2008

, ,

Recently I’ve had a couple of clients ask me for advice on email marketing or how best to send newsletters out to all their subscribers, and there’s also been some discussion about this on the Php London mailing list.

Looking around, and talking to other people, we have the following shortlist of recommended packages:

Some clients are unhappy with the idea of paying a subscription to send emails, and would rather pay a larger one-off fee for unlimited use, or get their own software. Not a problem if we’re sending email to a relatively small number of subscribers (think hundreds, not thousands), but if your subscriber base is any larger then we’d want to start thinking very hard about spam controls and look at a hosted solution where the company in question is whitelisted (appears on list of acceptable or trusted sources, opposite of blacklisting known spammers)

And here’s a very helpful message from Marcus Bointon of

“The big downside of managing your own mailing system is establishing and maintaining a good sending reputation – it’s really hard to do, and takes a good 6 months to a year. For hotmail you need to be consistently sending them at least 1,000 messages per day to qualify for any kind of special treatment. That special treatment comes in the form of two services: The JMRP and SNDS services (both at Anyone can sign up for SNDS – it gives you stats on sending from one or more IPs to hotmail/winows live accounts. You get message and recipient counts, complaint count and rate, spamtrap counts, and an overall red/yellow/ green ‘quality’ rating for each IP. This doesn’t let you improve deliverability directly, but at least you get to see what is happening. The quality rating seems a bit vague – I’ve seen it green at 3% spam rate (very high), but red at 0.1% (about normal for clean lists).”

Read full message

Trailing Comma or Leading Comma

7 Dec 2008


We all know that Internet Explorer is a pain in the backside. But the particular pain I wanted to write about is its pickiness about commas in Javascript. For example:

var cars = new Array(
   'Saab' ,

If you’re used to programming in Php or Perl, that trailing comma is perfectly okay, and could even be considered good practice because it makes really easy to extend the array – just add a new line and leave another trailing comma. The only problem is – this trailing comma is not strictly legal in Javascript. However, just about every implementation out there will allow it except for (cue drum roll) Internet Explorer.

So I’ve taken to coding lists like this:

var cars = new Array(
   'Saab' ,

I’ve taken to using the same style pretty much everywhere I have a comma-separated list of things – it’s particularly helpful in SQL server stored procedures.

insert into t_users (
   , user_accesslevel
   , user_status
   , user_number
   , user_title
   , user_firstname
   , user_lastname
) values (
   , @user_accesslevel
   , @user_status
   , @user_number
   , @user_title
   , @user_firstname
   , @user_lastname

One moving picture is worth many many powerpoint slides

20 Feb 2008

This is a Digg Swarm

Digg is a website which allows its users to select (digg) things that they find interesting. Other users then read and rate these nuggets, and this determines how popular an item is; building a community of users who sieve online content and disgard the junk.

The Digg Swarm shows the process visually. Stories arrive as little circles, and the diggers “swarm” around them. As stories get more popular, they increase in size and as people dig more stories they also increase in size.
It’s a great representation of some complex data relationships; it’s also a really hypnotic display. Courtesy of Stamen Design who are doing lots of wonderful stuff – not just the pretty.

I love visual explanation’s of complex data. The classic of course is this 19th century chart drawn by Charles Joseph Minard. Beginning at the Polish-Russian border, it shows the size of Napolean’s army as the width of a line that shrinks from an initial size of 600,000 in June of 1812 to fewer than 10,000 by early December. As well as the number of troops remaining, the chart also shows geography, time, temperature and the course and direction of the army’s movement.

And here’s an article from the Economist (Dec ’07) which describes a couple of pioneering charts (one from that well-known statistician Florence Nightengale). But I particularly liked this:

And Playfair was already making a leap of abstraction that few of his contemporaries could follow. Using the horizontal and vertical axes to represent time and money was such a novelty that he had to explain it painstakingly in accompanying text. “This method has struck several persons as being fallacious”, he wrote, “because geometrical measurement has not any relation to money or to time; yet here it is made to represent both.”

Faster, Webpage, Faster

5 Oct 2007

, , ,

Steve Sounders gave one of the few developer “how-to” talks based on his book High Performance Web Sites

Basic premise: Performance-tune the front end, not the back end.

When users request a page, about 5-10% of the response time is spent building and delivering the html; the rest of the wait is for the associated content – images, css, javascript etc. So stop worrying about database optimization (just for a minute) and look at your front-end.

14 Rules for doing it better

  1. Fewer HTTP requests
    Combine disparate javascript files – guilty. Yes, I’ll do this
  2. Use a Content Delivery Network to store static files, so you can delivery content to users from the server which is closest to them
    Uh – pass. I’m sure it helps Yahoo and the BBC, but not me.
  3. Use the Expires header
    Okay, this needs to go in. Very helpful for people who’ve already got a primed cache.
  4. Gzip components such as css and javascript files.
    This goes along with number (10) – basically lets work on making those humongous javascript libraries download a little quicker.
  5. Put stylesheets on the top
    Slightly bemused – where else would I put them?
  6. And put javascript files at the bottom
    This is the one which staggered me – I’ve always always stuck all the javascript in the document header and now he’s telling me to move it.
    Two good reasons:

    • Downloading scripts blocks parallel downloading
      Everything else just sits there in the queue and waits patiently until our javascript files (our disperatejavascript files) have finally arrived.
    • Scripts block the page rendering
      The browser won’t render any content under the scripts until the scripts have finished downloading. So get the content down first – that way your users have something to look at while they wait. Um – with some sites this means we’ll get the flash effect – content shows and then it changes dramatically once the javascript kicks in.
  7. Avoid CSS expressions
    Steve, I won’t dream of using css expressions
  8. Javascript and css should be in external files
  9. Reduce DNS lookups
    Okay, so if I’m downloading components from more than one server then DNS lookup for each separate server = delay!
  10. Minify Javascript
    Make that (humongous) javascript file smaller by stripping out all comments, whitespace and newlines before uploading.I really like the Mootools downloader. You pick the components you need, select the compressor you want to use and then get ONE javascript file (fewer http requests!), compressed, minified, whateverified.
  11. Avoid redirects
    I tend to use redirects in code, can be very useful in avoiding that nice little message about “Do you want to resubmit your form” which tends to freak people out.
    But yes, I know that missing off the ‘/’ at the end of directory names means another round trip to the server. And many other lazinesses.
  12. Remove duplicate scripts
    DUH! But apparently this happens. And it’s not uncommon.
  13. Use ETags in your headers
    Entity tags are an http response header that browsers & servers use to determine whether the item in the cache is EXACTLY the same as the one on the server. Think I might pass on this one, but there’s a lot I want to learn about http response headers and apache config files
  14. Make sure the browser can cache Ajax – use the expires header

Things for me to do

  • Combine small javascript files
  • Minify/gzip the large javascript libraries
  • Make more use of the expires header
  • Put javascript at the bottom of the page, not the top
  • Play with yslow

All nicely explained in Best Practices for Speeding Up Your Web Site

And something I didn’t know – there’s a YSlow plugin for firefox which will analyse webpages and tell you where the bottlenecks are.