Why I don’t consider myself a programmer anymore

I wrote a plugin for WordPress several months ago. It generates a lot file (a text file) with some statistical information on you, my readers. Nothing sinister – just what pages are being viewed, did someone leave a comment, etc.

I thought I was doing a pretty good job – it tells me what I need (wanted) to know, I had error checking code in there to make sure the file existed, that it was write-able, etc.

But I forgot about file size. I didn’t pay any attention to that – and today it bit me in the butt. The file had grown so large that it slowed my blog down to a crawl (and yes, Scoble’s link last night did significantly affect my traffic – but I’ve had higher traffic days without the problems I saw today).

It appears my code put something like a 4 seconds delay in every database query. That doesn’t sound like much if you are just stopping by to see three or four pages. But when you get a lot of people trying to serve up pages, and every database request has a HUGE (4 seconds IS huge in query times!!) delay, things just s-l-o-w w-a-y d-o-w-n.

The problem was made even worse because I didn’t put any debug code anywhere, didn’t comment anything, and because of that I had no idea what to look for.

To save an hour of coding time I spend three hours debugging everything from MySQL to WordPress to every plug-in I have installed.

And that’s why I haven’t made a living off of programming in over ten years. I’m a hacker, not a professional developer.