Pragmatism in the real world

Dynamic JavaScript Tabs

This is some code that I wrote to create dynamic tabs. I use it for forms where I have a lot of fields and a good percentage are "advanced" or otherwise not important enough to have visible immediately. The CSS is based on ideas from Silverorange Labs and the JS code is mine. The code is released under the MIT license which basically means you can do what you like with it as long as… continue reading.

Version Control

Apart from my day-job, I also do a very small amount of freelance work, mainly for my old company. The weirdest thing about this work is that they don't use any version control system for their websites. So far, I've fixed one particular bug 4 times… It's got to the point where I keep their sites in my version control system so that I can find out which bits of my code they have broken… continue reading.

Runtime Variable Inspection

The most common way to debug is to stick echo statements into your code at strategic places. If you are feeling clever, you might even output a variable's value too: echo "<p>here: $myvar = $myvar";</p> I call this runtime variable inspection and as PHP is a script language, it's a very fast way to debug a script. You stick the echo statement at strategic points and with a few page refreshes in the browser, you… continue reading.

Additional Content Blocks

I hacked together support for additional content blocks in CMS Made Simple over the last few days. This constitutes the first time I've hacked the main code and I'm pretty damn proud of myself! In the end the feature wasn't as difficult to write as it might have been. This is due to some rather clever design in the back end. First off, the database already separated out storage of the main text and header… continue reading.

ADOdb Data Dictionary

Notes on using ADOdb's data dictionary to create and manipulate database tables independantly of the underlying database server.

Is this thing on?

DevNotes is where I intend to write about my development life. In general this means that I'll be talking about PHP coding as that's what I do most of my development in at the moment. I currently work for Campbell Shaw and also do a little bit of freelance work for my old company to help them out maintaining code that I wrote for them. In my spare time, I am (slowly!) writing some plugins… continue reading.