On the danger of doing things when you don’t understand why–No ‘Best Practices’.

I’m a firm believer in the idea that there are no best practices in software development. There are practices that are known to be good under certain circumstances. Sometimes those circumstances are near-universal (or at least you think they are), but context is king and when the context changes maybe that practice you were touting as ‘best’ doesn’t look so crash hot anymore. Rather than just spouting ‘best practice’ it is much more important to understand the pros and cons of a particular approach, and WHY it might be considered a good practice. When you do something without understanding the rationale for doing it you’re liable to look silly when circumstances change, or if you work in the medical field you’re likely to put someone’s life at risk. I was reminded recently of the importance of knowing WHY something is being done by a story I heard about a family friend.

asprin

This family friend is as tough as old boots. He’s a veteran of the Second World War. Now in his mid eighties his body is wearing down and he suffers from a number of health problems, the worst of which is (or was) intense crushing pain in his lower legs caused by peripheral arterial disease. He described the pain as like having your lower legs put in a vise. Although he underwent a number of treatments including Aspirin (commonly given to patients in low dosages to prevent heart attacks, strokes and formation of blood clots such as Deep Vein Thrombosis or DVT) the pain was so intense doctors decided to take the drastic measure of amputation. The operation was a success, but a short time later he suffered an unrelated injury – intestinal bleeding which forced him back to hospital. While in hospital the staff put him back on….Aspirin, because that is what he’d been previously prescribed for the pain in his lower legs. Never mind that he didn’t have any pain in his lower legs anymore, or any lower legs at all. And never mind that Aspirin is exactly the thing you don’t want to be taking if you’re suffering from internal bleeding because of its antiplatelet effect (in layman’s terms they prevent your blood clotting). He suffered more serious internal bleeding and nearly died.

For my family friend the context had changed – the Aspirin which had previously been a ‘best practice’ for treating peripheral arterial disease was now actively harmful. The hospital staff didn’t understand why Aspirin had been prescribed in the first place, and didn’t think through the consequences of resuming taking Aspirin again given the changed context. Next time you hear of a ‘best practice’ ask yourself what assumptions about the context are implied. Are these assumptions valid? What things would need to change for this practice to become dangerous or harmful instead of beneficial?

[Image of a pill courtesy of doug88888]

Increased Presentation Impact with BigNote

Leon Bambrick and I recently came up with an idea for a tool to use during presentations  – essentially a big floating textbox that takes up as much room as possible on the screen. We also gave it a name – BigNote. The idea with BigNote is that instead of switching between on-screen subject matter (like visual studio, a web site or whatever) into PowerPoint and back you just ‘live annotate’ what is going on screen. This is similar in spirit to other tools like ZoomIt, which allows you to draw shapes over the top of things on the screen, but with the focus on text rather than images. A tool like this obviously isn’t going to suit every presenter, or every style of presentation, but since it was a really simple idea I went ahead and built it. I built it in WPF, and the first version was about 5 lines of non-generated code. After a few refinements like a global keyboard hook (so you can bring focus back to BigNote) and an animating viewbox to animate the re-sizing of the text. Here is a video of BigNote in action.

BigNote In Action

You can install it from codeplex (or download the code and hack on it if you want – as you’d expect from such a simple app the codebase is very small). I expect there’ll be a jQuery plug-in to do this in the future, and look forward to seeing how things like system-wide keyboard hooks can be implemented in javascript.

First Check-in Comments from Popular Open-Source Projects

Some time ago a former colleague of mine tweeted ‘if your first check-in comment is something like “initial check-in” you’re doing it wrong’. To which my immediate reply was that I had been doing it wrong repeatedly since I personally have no problem with ‘initial check-in’ and had used it as a comment multiple times. I wish I could post you a link to the tweet but twitter’s search…sucks. This got me wondering what ‘good’ first check-in comments looks like. Thanks to the wonders of publicly hosted revision control systems I started looking at the initial check-in comments of some of what I considered the more well-known pieces of open-source software. Did they know they were destined for greatness from the outset?  Here’s the list I came up with, with some commentary where applicable. If there are any projects with first check-in comments that are worth adding (or there is a better source than the one I’ve cited) leave me a comment and I’ll fix it up. The ‘Go’ one is probably the most interesting.

first

Project Check-In Comment Notes
Knockout.js Initialising  
Ruby Initial Revision Looks like Ruby was migrated from CVS to SVN so I can't be sure if this is the 'original' commit message.
OMQ initial commit Judging by the # of files this might be from a different revision control system, or earlier branch.
Hibernate initial upload There are some earlier revisions starting here that look to have come from CVS.
Iron Python this is a test  
Postgres Postgres95 1.01 Distribution - Virgin Sources Obviously migrating from a previous codebase, with 868 files changed.
FreeBSD Initial import, 0.1 + pk 0.2.4-B1 According to their ‘history’ page FreeBSD was an outgrowth of 386BSD, and started in 1993, so this looks like the real deal.
node.js add dependencies  
Orchard Populating initial tree  
NuGet Initial commit  
TightVNC Initial revision Migrated from CVS
Go hello, world

This is a particularly weird one….according to the Go repo this is from 1972. The first couple of commits from this page seem to chronicle some of the steps in the evolution of C (presumably culminating in ‘Go’) with ‘commits’ in ‘74, and 1988. Either that or Brian Kernighan has a really good backup strategy.

Update - Jason Sirota tracked down this wikipedia entry that explains more of the history behind this check-in. Pretty much what we expected B -> C -> ANSI C -> GO

SQLite ? I really like SQLite, but their funky fossil revision control system only shows me the 20 most recent commits.
Apache initial check-in to set up Apache Commons This is the oldest commit in their SVN repository, but apache is ~8 years older than this, so presumably they didn't keep history when they ported.
Ruby on Rails Initial Always the minimalist, wasn’t he.
Mono Initial revision Wow,  mono is 10 years old.
jQuery Initial Import The history of jQuery goes back a little further than this early 2006 check-in, so presumably this was a migration from SVN.
Mercurial

Add back links from file revisions to changeset revisions
Add simple transaction support
Add hg verify
Improve caching in revlog
Fix a bunch of bugs
Self-hosting now that the metadata is close to finalized

Their first SELF HOSTED check-in
Python Initial revision From August 1990.
CoffeeScript Unfancy JavaScript  
GIMP

fixed compiler warnings, changed some gints to gbooleans
cleaned up namespace and documentation
updated libgimp documentation

GIMP is a little bit older than this check-in from 1997. This looks like around the time it moved to being a GNU project. Strangely almost a year later there is one labelled ‘initial revision

Image courtesy of sebastien.b

My host file is not in the south of France

Although Google seems to think it is.

searchResults

ComputerUnlocked.com–more firewall friendly

I re-wrote the script that computerunlocked.com generates from in JavaScript to make it harder to block by firewalls. Also clippy’s relatives the Microsoft Agents (specifically Merlin) make an appearance in the script (if they can) to remind your friend/co-worker of their chosen theme. The script also re-runs itself periodically in case your friend or co-worker accidentally loses the cool customizations you’ve set up for them.

computerunlocked.com–rapid customization resource

I just put the finishing touches on the CSS for my new site computerunlocked.com, a rapid customization resource for windows. I want to put some effort over the next couple of weeks into further refining the customizations that are available. Thanks to Rhys and Leon for testing this out for me, as well as a few co-workers who inadvertently tested it also. Also thanks to Craig for his vote of confidence, and helping fix some typos.

screen_shot

Test Post on EC2

Lets see if my new blog running on EC2 is working correctly?

Watch Me Fail to Install IE9

I recently tweeted about some problems I was having installing the IE9 beta, and the irrepressible @delic8genius and developer evangelist Michael Kordahi asked me for more info. Since an accurate description of what had transpired couldn’t fit in 140 characters I decided to screen-cast the whole episode from go to woe. Here is a rough transcript for those who think watching someone else using a computer for 7+ minutes and failing might be rather dull.

0:00 – IE9, HTML5, ECMAScript, CSS3, Cats & Dogs living together, Mass hysteria. I want in!!! Gimmie!

0:30 – Wow, I have the beta downloaded already. This is going to be epic.

0:38 – “Go Online”??? but I’m online now. What gives? Oh well – I’ll play along.

1:00 – OK, a list of hotfixes. I would have thought since the installer is running on my machine it would know what I have and don’t have, and could just give me a list.

3:10 – So out of all those hotfixes 2 were already installed, and one failed to install. Lets try and install IE again and see what happens.

3:30 – the IE9 beta installer still thinks I’m offline, when I’m not. I’m guessing get updates is going to take me right back to where I was. Lets try something else.

4:22 – Hmm..This file that the failed IE9 installer put on my desktop mentions a second install location that has all the files that are required to install IE9 if the computer is not connected to the internet. That sounds promising.

5:45 – Wireless is slow.

6:50 – the ‘nothing more to download’ installer seems to still be trying to download something and failing in the same way. I’ve seen this movie before.

Lets Try To Install IE9 Beta from Joseph Cooney on Vimeo.

So it looks like my inability to install KB2259539 is blocking me from installing IE9. Maybe the IE9 team have just made the best possible case for web apps, which circumvent all this crap? I, for one, welcome our new HTML5 overlords.

Re-watching the video I noticed I inadvertently skipped installing one of the pre-requisites listed on one of those pages (KB2120976). When I installed this it said it was already installed.

How Long Before Google Make a Web IDE?

google_ide_logo

Google make a lot of things for developers – GWT, App Engine, code hosting, APIs on top of many of their services and developer tools in Chrome, but (to the best of my knowledge) they don’t make an IDE for web development. Given the importance of open standards and HTML to their core business (search/advertising) and the rise of HTML5 as a platform for increasing rich web applications I’m surprised they haven’t made one already. How long will they continue to sit on the sidelines while Microsoft scrambles to re-target Blend as an HTML5 authoring tool (in addition to Visual Studio and frontpa…err…Expression Web), and Adobe continue to make noise and show the possibility of cross-compiling flash to HTML5 (as well as their continued improvements to Dreamweaver). Google are spending efforts evangelizing these open web standards – how long before they start selling or giving away the tools to build these apps? The only thing I’m wondering is will they build on Eclipse (as they have for Android development and GWT) or will they go for something in-browser like google docs? I’m guessing in-browser. Or am I overlooking something they already have that does this?

Remember, Remember–2010 Edition

The time here in eastern Australia is 10:01 AM which means it is now the 5th of November in London. As I have done since 2006 I plan to watch V for Vendetta tonight. This year I thought I’d do something a little different, so I’ve created a special ‘5th of November’ build of logEnvy which you can download now.

vforvendetta

England Prevails.

Recent Tweets

Twitter June 11, 05:13
@benpriebe that is not the usual meaning of the word 'won'

Twitter June 10, 21:56
Someone is going to have to give back their knight-hood http://t.co/gSk6R9uScQ

Twitter June 10, 21:53
I think android just won. Live coverage here: http://t.co/gFziiic1oy

Twitter June 7, 00:27
@TheColonial @rhysparry different strokes to move the world....or something like that. How does it screw your workflow OJ?

Twitter June 6, 15:26
Gmail update for android is awesome. Authentically digital done right.

@josephcooney

Latest Tool - logEnvy

logEnvy is the latest tool I've been working on for searching, sorting and filtering windows and IIS logs, and it's sexy! For more info check it out here.