01.02.09

More web development

Posted in Development, Uncategorized, re-factoring at 2:45 am by Twm

I spent a few evenings in December updating a charity’s web site to use a CMS system based on Wordpress. The bulk of the work involved mirroring the original site design as a Wordpress PHP+CSS template. Unfortunately, the original site was auto generated by a tool on the Mac and the mess it generated was pretty impenetrable and full of unused styles. I used Firefox’s defacto debugger FireBug to inspect the CSS of the final rendered document and created a minimal CSS which incorporated only the relevant style information.

That worked pretty well until I came to test the page on Internet explorer (still the most popular browser on the net).
IE support doubled the development time, and worst of all (as an engineer): The solution was a set of fairly arbitrary changes to the CSS (following this guide) and I don’t fully understand why the changes worked. Adding a “position:relative” magically fixed a number of problems with margins – most unsatisfying.

Sneeky Plug-ins
One of my favourite FireFox plugins is Scrapbook. Scrapbook provides a simple way of organising ’scraps’ of content from web pages, allowing you to annotate, highlight and save within a folder structure – all while retaining a link to the original.

One day Scrapbook stopped working. The plug-in failed to show in the UI (despite being activated) and I re-installed to no avail. Through a process of elimination found that it clashed with Add-on called “Microsoft .NET Framework assistant”:

Ok, so having found the culprit, I then wonder how such a plug-in got on my machine. It is installed without option as part of the .NET Framework 3.5 SP1 and assists in the deployment of .NET “ClickOnce” applications. It also alters the user agent of the browser to report the version of .NET supported on the PC.

The MS add-on can be disabled, which cures the scrapbook clash, but not removed*.
As I’ve mentioned before, open systems and stability are in direct conflict. There is a balance between the two which can be achieved through vetting, testing, user feedback and frequent updates – most of which falls apart with clandestine plug-ins.
Full inter op testing with all available plugins is combinatorially impossible, so s/w must make it easy to allow users to attribute blame and quickly roll back. However, the frequent updates pushed over the net (acrobat, itunes, firefox, windows) make this much more difficult than a few years ago.

For 2009, I want to spend less time debugging and more time creating.

*Instructions for removing using REGEDIT here.

02.18.08

OCD – Obessessive coding disorder

Posted in Development, maintenance, re-factoring at 1:59 am by Twm

Care
note: Just to ensure that this posting dates quickly. I’ve adopted the word “Yo” as a gender neutral pronoun (as used by kids in Baltimore).

I had an interesting case this week. A guy working on maintenance of telephony code asked for some advice. Now maintenance is one of the trickiest things to do if you are not the person who wrote the original code. You have to get into the head of the developer, try to figure out yo’s skill level, how much time was given to the design and what level of testing the module has received.

When a developer changes a bit of code, and alters its fundamental behaviour, then the safety net of test code which protects the module should trip up, politely announcing that the clean re-factored design is full of holes.
Back in the real world, a developer at some point in yo’s career can expect to inherit some spaghetti code with minimal to zero test code.
This is where the same clean re-factored design emerges as above, but now a whole lot of code paths will be missing from testing since the main focus will be on the feature which is being added or the defect being rectified.
Read the rest of this entry »