13 August 2009 @ 12:38 am
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.
6 May 2009 @ 1:52 pm
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:
- Used the Microsoft installer to upgrade the regular IE7 to IE8.
- Installed IE7 Standalone to get IE7 working
- 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.
1 May 2009 @ 10:52 am
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
12 December 2008 @ 7:34 pm
Best Family Portraits ever

Happy birthday of dog
(more…)
9 December 2008 @ 8:00 pm
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 http://www.smartmessages.net/
“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 postmaster.msn.com). 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
7 December 2008 @ 5:50 pm
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' ,
'Volvo',
'BMW',
);
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' ,
,'Volvo'
,'BMW'
);
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 (
store_id
, user_accesslevel
, user_status
, user_number
, user_title
, user_firstname
, user_lastname
) values (
@store_id
, @user_accesslevel
, @user_status
, @user_number
, @user_title
, @user_firstname
, @user_lastname
)
20 February 2008 @ 5:44 pm
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.”
5 October 2007 @ 10:04 am
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
- Fewer HTTP requests
Combine disparate javascript files – guilty. Yes, I’ll do this
- 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.
- Use the Expires header
Okay, this needs to go in. Very helpful for people who’ve already got a primed cache.
- 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.
- Put stylesheets on the top
Slightly bemused – where else would I put them?
- 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.
- Avoid CSS expressions
Steve, I won’t dream of using css expressions
- Javascript and css should be in external files
Duh!
- Reduce DNS lookups
Okay, so if I’m downloading components from more than one server then DNS lookup for each separate server = delay!
- 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.
- 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.
- Remove duplicate scripts
DUH! But apparently this happens. And it’s not uncommon.
- 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
- 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.
21 September 2007 @ 2:06 pm
It’s Friday afternoon, and I have so much work I have to do. In honour of procrastination, here’s how some other people have spent their time. Andrew Lipson and Daniel Shiu have made a model of Escher’s “Ascending and Descending” in lego.


Shaenon K. Garrity has written and drawn a spot-on tribute to Edward Gorey. Visually and literally this is a wonderful take on Gorey. Of course, it’s also pretty spot-on for Star Trek.

3 September 2007 @ 10:25 pm
When you try to open a text file or a comma-separated variable (CSV) file in Excel, you may receive the following error message:
SYLK: File format is not valid
This problems occurs because the first two letters in the file are uppercase “I” and “D”
Yes, that’s right – if you output data to a comma-separated text file and if the first fieldname is “ID” then Bang! Crash! Kaboom! Unhelpful error message! Confused user!
MS knowledge base article about the problem http://support.microsoft.com/kb/323626 confirms that this is a problem with Excel 97, 2000, 2002, and 2003. Two possible fixes: you can change the uppercase “ID” to a lowercase “id” or you can put an apostrophe in front of the “ID”.
A few other things I have done this evening:
- Uploaded pdf files for a customer. (New to the job, got a website to look after, and it’s all rather daunting.)
- Set up example html pages to demonstrate how width of the browser window will affect the page design and layout.
For this site, the designer’s original concept filled the page, and it was liquid, so when you resized the browser the webpage changed to fit. This affects text and image placement in ways which people never understand when they’re looking at a jpg or if you’re trying to explain it to them over the telephone; they’ve got to see a real-life example. So I made one.I used my pictures of a knitted dalek instead of the standard stock images – oddly satisfying.
- Php Problem with one of my sites
Hosting company upgraded to latest version of PHP (5.2.4) over the weekend, and there’s a bug (http://bugs.php.net/bug.php?id=42523) which means that PHP_SELF isn’t giving the correct name for the executing script.
Result : none of the forms work properly.
- Email Problem
Some emails from site are not arriving. Tracked down to a smtp mail relay problem.
Note to self: Should have been picked up in testing last week. In future always test with mail to and from addresses which are outside my main domain.
- Maximum upload size in IIS 6
Trying to explain settings for AspMaxRequestEntityAllowed and MaxRequestEntityAllowed.
- Looking at configuration options for a suite of shopping carts, where we may (or may not) want to show prices, quantities, price + quantity (as a dropdown) or none of the above. It all depends. And it’s confusing.
- Deleted 309 spam comments from the blog moderation queue.
The usual porn, but there were a suprising number about cars and ringtones. Have downloaded and installed the TanTanNoodles Spam Filter
http://tantannoodles.com/toolkit/spam-filter/
And my mother is under the impression that I spend my time making websites.