Archive for the 'Raves' Category

How To Run A National Blood Service

Thursday, 3 July 2008

Rightly or wrongly, the National Health Service in Britain receives a lot of criticism. My own family’s experiences of state provided healthcare have been mixed, to say the least. However, in my experience one area that we have got right is the National Blood Service.

A picture of a blood bag

I give blood every four months and today two units came to the car park at work and I gave blood again, making my tenth time. I have always found the nurses to be helpful, professional and courteous and generally the whole process has always gone smoothly and with the minimum of fuss. The biscuits are nice too! I’m sure there are times when it doesn’t go quite to plan, but if that were to happen to me I’d have every confidence in the ability of the Blood Service staff to deal with the situation.

Another aspect that impresses me about the whole operation is the efforts they undertake to make you feel valued and to thank you for your C738H1166N812O203S2Fe contributions. For example, as today was my tenth time, I received a certificate and a nice pin badge. I will also receive a new colour-coded “credit card” that has my donor number and blood group printed on it.

However, it’s not all Rhesus Positive news. What saddened me today was that there were appointments still available for people to give blood. The unfortunate reality is that more donors are always needed to keep blood supplies replenished. According to the Blood Service website, there’s just under nine day’s stock remaining of my own blood group (B positive). That’s not a lot when you think about it. If you haven’t given blood before, why not consider it? I think that half an hour of your time and about a second of very minor discomfort is a small price to pay if you can help save someone’s life!

Blood Bag photo credit: Spike55151.

Happy Birthday LEGO!

Monday, 28 January 2008

Today marks the fiftieth anniversary of the invention of the humble LEGO brick. Apparently there are 2,400 different LEGO brick shapes and did you know that LEGO are the world’s largest manufacturer of tyres? LEGO was definitely one of my favourite toys as a child, particularly LEGO Technic. Who can forget playing with LEGO whilst kneeling down on the carpet wearing shorts, then standing up to find the imprints of eight studs in your kneecap where you’d knelt on a brick? At this point I feel obliged to point out to any American readers that the plural of LEGO is LEGO or LEGO bricks, not LEGOs! With that out of the way, let me share some of my memories of LEGO.

I loved getting LEGO sets for Christmas or birthdays. I think the first Technic set I owned was the 948 Go Kart, probably in 1979 or 1980. This was a cool set because it had a one cylinder piston engine at the back, the piston moving up and down as you pushed the go kart along! It also had working steering. No doubt this is tame stuff for today’s children who are used to Xbox 360s or PS3s, but at the time it was enough to spark my imagination and fuel my curiosity for how things work. I’m not sure the same can be said of console games where you’re led down a set path, however elaborate or flashy.

I remember being extremely envious of one of my friends when I was growing up because his elder brother had the 8860 Car Chassis. This set had a huge number of pieces and included amazing real world features such as a four cylinder engine mated to a two speed gearbox, adjustable seats and working rear suspension. My friend told me that this set was too complicated for people our age to be able to build, so it was with great pride that I proved him wrong when I eventually got the set for myself! This set was the first time I’d come across a differential gear and I can recall having a conversion with my Grandad—who was an engineer—about why it was needed.

A picture of the LEGO Technic 8860 Car Chassis set

At some point I got the new LEGO Technic excavator (set 8851) complete with pneumatics. This led me to retrofit height-adjustable pneumatic rear suspension to my Car Chassis, just like on a Citroën. A great thing about LEGO was that the build instructions leaflet always included instructions for at least one alternative model. In the case of the Car Chassis set this was an awesome drag bike. For the Go Kart it was a vulcanizer, although I had no idea what one of those was and I’m still not entirely sure.

As well as my numerous Technic sets, I also really liked the Space sets. To my eternal regret I missed out on owning the mega 928 Galaxy Explorer. My Dad took me to a toy shop and was going to buy it for me, when stupidly I made the impulse decision that I’d rather have a Corgi model of a dust cart instead! I wouldn’t have been as upset about my bad choice if I’d have known that decades later there’d be this thing called eBay where you could get all this stuff (apparently!)

Another thing I remember about LEGO was that you could get some nice little accessory sets, such as a set containing only cogs, gears and axles or sets that enabled you to motorise or add lighting to your creations. Some of the modern sets are incredibly sophisticated with fibre optics and programmable robotics. Somehow the blockiness of models made with LEGO didn’t seem to matter. I guess my childhood imagination must have smoothed things out. Probably the greatest thing about LEGO is that if you can imagine it then you can build it, provided you have the right bricks of course! I’m ashamed to admit for the very first time that I once stole a red 4 x 4 base plate whilst at a friend’s house because I needed it to complete a particular model I was making. Sorry Lisa!

Eventually I reached that age most of us reach where I had to give up playing with LEGO. I still enjoy building things, although now I make things out of blocks of software rather than blocks of ABS plastic. Unfortunately getting bits of software to play well is still nowhere near as easy as playing with LEGO was. In a feat of backwards compatibility that would make any software company envious, LEGO bricks from today still fit bricks made in 1958. So here’s to the next fifty years of LEGO!

Happy iPhone Day

Friday, 29 June 2007

After nearly six months of waiting, the day is finally here. All across the United States people are getting ready to put down at least five hundred Dollars in an Apple or AT&T store for the privilege of owning an Apple iPhone. Some of those people are so eager to get one that they’ve been waiting in lines since Monday. Are they mad? Quite probably. Are there more important things in the world than a new mobile phone, even if it is the first one Designed by Apple in California? Definitely. However, to dismiss the iPhone phenomenon as calculated and viral hyperbole is to miss the opportunity to revel in its glorious design and detailing. The iPhone is the finest expression yet of Steve Jobs’ great taste and Apple’s talented team of industrial designers led by Jonathan Ive.

People are excited by this phone. I’m excited by this phone dammit, even though mobile phones are one of the few gadgets that usually leave me cold, and even though I can’t even buy one in the continent where I live! The level of interest that’s been shown towards the iPhone just shows how inspired people get when someone finally goes to the trouble of doing things properly. The hardware and software fit together beautifully in a way that’s definitely not been seen before on a mobile phone.

Over the past few weeks, those of us who have been watching have learned more and more about the iPhone. Delicious little details have been revealed through adverts and informational videos posted on Apple’s website. Earlier this week, the first reviews came in and have more or less confirmed that the facts Apple have presented to us about the iPhone are all true. Undoubtedly AT&T’s EDGE network is hopeless for data transfer and everyone seems to be agreed that this is the most serious shortcoming of the iPhone. Hey, I never said it was perfect! It seems inconceivable that Apple won’t bring out a future version of the phone with 3G and that they won’t address the other shortcomings that have been widely mentioned, such as the lack of a proper SDK. Remember, this is version one of an entirely new product in an entirely new market for Apple, one that’s been years in development. They had to stop work and get it out of the door at some point.

I recently bought a Motorola RAZR which is a fine phone in many ways, deservedly popular and undoubtedly the best out of the three mobile phones that I’ve ever owned. I love the slimness of it and the one-piece keyboard that looks like it’s been machined out of metal. The battery goes on and on and on. The phone’s software is where it falls down though. It’s not terrible, I’ve found my way around it easily enough and can do everything I need to do. There are lots of little quirks though and features that I just don’t really understand. That means that I don’t feel entirely in control of it, which is not good for something I’ve paid money to own.

Let me give you an example of one of these quirks. When I’m sending a text message I press the soft key under Send To and get a list of my contacts. So far so good. Next, I scroll to the contact I want and press the same soft key which now represents Send. Only it doesn’t work because I first have to click the button in the centre of the cursor keys to select the contact before I can send them my message. In other words, the user interface for sending text messages is optimised for the send to multiple contacts use case. It works great for this, only that’s something I never do. In fact, I can’t think of a single occasion when I’ve sent a text message to more than one person at the same time.

There are some features on my RAZR whereby I haven’t a clue what they are, or if I do have an idea then I don’t know how to use them, and that means I’m afraid to find out in case I can’t undo whatever it is I just did. I’ve even looked in the instruction booklet, but that just gives you the steps needed to access the feature without telling you what it actually is. Here’s a brief list of bafflers:

  • Show ID/Hide ID - whose ID?
  • Add Digits - what digits am I adding and to what?
  • Talk then Fax - how?
  • Notepad - something to do with phone numbers
  • Info Services
  • Cleanup Messages - how does it choose which messages to clean up?
  • DTMF: Long

—It’s enough to turn even the most ardent technophile into a technophobe! The difference with the iPhone is that if I were to somehow find one lying about then I know that I could pick it up and use all of its features straight away. Based on watching Apple’s videos, there’s not a single aspect to the phone that looks awkward or difficult to use. Everything seems obvious and natural and as it should be.

As I said before, there are no dark crevices. You get to this happy position by obsessing over the details again and again and again until they’re right and until they make sense. Sadly, only Apple seem to be doing that at the moment. They’ve even thought about the experience of buying the iPhone. You pick one up, pay for it, take it home and then activate it on your computer through iTunes. What you don’t have to do is spend twenty minutes sat with some dodgy acne-ridden youth who was the first to accost you as you stepped over the threshold and into the store. Sat bored whilst he takes you through the phone’s features and sets it up, all whilst smearing your new purchase with his sweaty fingerprints! Seriously, everyone has to earn a living but it’s great that Apple have eliminated another completely unnecessary part of the mobile phone experience along with crap usability.

Happy iPhone Day everyone. The Mobile Phone for the Rest of Us is here. Regardless of whether you’ve been queuing for days to be amongst the first to buy one, or if you’ve vowed never to go anywhere near one, its impact will be felt across the industry. Now we can all look forward to better mobile phones.

So True

Monday, 21 May 2007

I absolutely love this spoof commercial from the Rails Envy guys, so I make no apologies for embedding it here in case you haven’t seen it yet!

Great Flickr Feature

Monday, 21 May 2007

I just noticed something that Flickr got exactly right—you don’t have to give photos a title. My process for using Flickr is usually:

  1. Upload a batch of photos to my account, marked as private
  2. Use the Organizr (did they drop that name?) to add the photos to a new set, or an existing one
  3. Go through the new photos adding any individual tags as appropriate
  4. Make the photos that aren’t really bad public and try to come up with a title

It’s that very last step that I find really increases the cognitive load; so much so that I often just give lots of photos the same title. I can’t quite bring myself to have public photos with titles like IMG_0970.JPG. I got to thinking that I never had to give physical photographs a title when I put them in an album, so why should Flickr make me do so? Then I tried it, found out that I don’t have to and smiled. Expect to see lots of anonymous photos in my Flickr photostream in future.

Deal Of The Century

Monday, 5 March 2007

That got your attention, didn’t it? Maybe not deal of the century, but if you’re a UK-based Rails developer then you owe it to yourself to check out the PeepCode subscription packs. Given the current weak state of the dollar it would be rude not to. I’ve just bought a ten-pack which cost the princely sum of £36.69. That’s over ten hours of properly produced video with Geoffrey Grosenbach teaching you Ruby on Rails. It’s a little known fact that over 85% of the Web is now comprised of Rails sites that Geoffrey has developed.† This boy knows his beans!

To put it into perspective, £36.69 is about the price of a decent dinner for two at ASK/Zizzi/Pizza Express/Strada/your favourite authentic Italian restaurant chain. That’s shockingly good value for money. Don’t you think it’s time you put down that Fettucine and did some Test-Driven Development?

The PeepCode videos are also available for video iPods, so whilst all the losers on the bus are filling their empty heads with County & Western songs about a man named Clint whose dog left him for another woman, you can be sitting pretty on the back seat learning all the Rails ninja moves like REST, Capistrano and RJS. If that doesn’t get you the girls then you’re on your own, squire. Please note that I’m not affiliated with PeepCode in any way, I just call it how it is.

Best Of Breed Web 2.0 App

Wednesday, 12 July 2006

I dislike using the term “Web 2.0″ because no-one really knows what it means, but nonetheless it has come to represent a certain type of Web application. Anyway, Wufoo caught my eye because it’s a brilliant idea, brilliantly executed but with a shockingly bad name.

Going On The Rails

Thursday, 8 June 2006

Regular readers of my blog may be aware that I started out programming using Borland Delphi. Actually, that’s not really true—I started out programming on the PC using Delphi. I first programmed a computer back in the early–to–mid 1980s on a Sinclair ZX Spectrum, but that was a long time ago and my “programming” mainly consisted of laboriously entering listings from magazines, which usually didn’t work because of misprints. The best one that did work was a Pac-Man game, which was gratifying after all that typing.

The first version of Delphi that I used was the 16-bit Delphi 1.0 and shortly afterwards I moved to the 32-bit Delphi 2.0 that had just come out. My guide was the brilliant “Delphi Programming For Dummies” by Neil Rubenking of PC Magazine. Don’t laugh, I really was a dummy back then and didn’t even know what an API was. Besides, it was a very well written book and the example programs were great.

The reason that I absolutely adored Delphi was that it let me easily create Windows applications that looked like proper grown-up applications. I could just drag and drop controls onto a form and concentrate on producing a great UI. Now Delphi wasn’t the first to market with this idea, but I soon learned that its implementation was superior to Visual Basic’s.

Gradually my programming abilities improved and I was soon getting acquainted with the peculiarities of the Windows API on a regular basis. I was churning out simple desktop utility programs at an amazing rate, although I only finished a few of them, because the tool I was using made it so easy to be fickle and to start something new as soon as an idea was hatched. I loved the instant gratification Delphi gave me.

The high point of this period was probably when a friend and I ended up in a sort of competition to see who would be the first to work out how to put an icon in the notification area near the Windows clock, as Windows 95 had just come out and this was a hot new feature. Some people have never got over it, judging by the number of apps that put crap down there. Although my friend was the better programmer, I got there first by getting to grips with the Shell_NotifyIcon API.

My confidence bolstered, I set about trying to learn more and more about how Windows and Delphi worked. I remember starting a new Delphi project once and just compiling the default form into an EXE and marvelling at how Windows and Delphi’s Visual Component Library (VCL) combined to give you a window with associated behaviour—all for free. I was fascinated by just how much stuff was in Windows and how the more you learned about it, the more there was to learn. It was a good job Raymond Chen wasn’t blogging back then.

I brought Danny Thorpe’s seminal “Delphi Component Design” book and was blown away by the elegance of Delphi’s VCL. In fact, just writing this makes me want to dig the book out again and take another look and wallow in nostalgia, but sadly I don’t have it here. One of the revelations in the book was a discussion that explained that when you place a Delphi component on a form, you’re not dropping some static design-time representation of the component, but rather a real live instance that just happens to be working in a different mode than from run-time.

I learned more and more and graduated to writing my own simple components, and different versions of Delphi came and went. At the same time, I didn’t really understand the direction Delphi was heading in. It seemed to be moving further and further away from developers like me who just wanted to write cool Windows apps. Borland kept adding things to make it easier to develop Web applications, something that I didn’t know anything about or couldn’t really see the point of.

Sometime around Delphi 5.0 or 6.0, I finally got a job as a programmer and had to learn Visual Basic 6.0. I went into the challenge open-minded, knowing that Delphi was totally superior and that VB was a steaming pile of crap, but thanks to some great training courses from a very good teacher, I learned that actually it was rather neat, particularly when it came to doing things with COM. Then my employer got Java religion and I had to learn J2EE.

I was initially enthusiastic about the prospect of practising enterprise Java. I felt like I’d arrived because I was going to be using proper enterprise tools. This was going to be software engineering using the UML and RUP, none of this chucking buttons on a form malarkey. I wanted to learn what these EJB things were that people spoke about in reverential tones. From hanging around with contractors I picked up that Entity Beans are rubbish, although at the time I didn’t know why.

I learned about JDBC and Servlets and JSPs and I lovingly crafted every Javadoc comment for my getters and setters. Or accessors and mutators as I liked to call them. Then I learned Struts and thought it was quite neat, and then I taught myself Ant, and before I had time to pause for breath the Spring Framework was getting a lot of hype so I started to look into that. Then I started to notice that boy, just getting anything done with J2EE is an awful lot of work and I kind of missed the fun of writing some code and instantly seeing if it worked. Or not!

Like so many, I’d become disillusioned with the complexity and over-engineering of J2EE. I was spending most of my time editing arcane XML configuration files and I started to question whether all this up-front indirection and flexibility was worth the trade-off in terms of how long it took to get anything up and running. The whole J2EE way of working made me feel like I should be barking instructions to someone else to do the typing because I was too tightly coupled to the keyboard!

I quite like the idea of J2EE containers which are Java programs for running other Java programs, as ever since I started to learn about how Windows worked under the covers I’ve been fascinated by virtual machine technology. However, I didn’t want to spend the rest of my days waiting to deploy my application to the container before I could see if the one line of code I’d changed had worked.

Fortunately I discovered Ruby on Rails just in time. I can’t remember how I first came across it and at first I thought “what is this?”, but the more I learned about it, the more it just seemed to make sense to me. The tipping point was when I bought the Agile Web Development with Rails book last summer. Learning about ActiveRecord in particular recalled in my mind the experience of reading about something not only well thought-out, but beautiful, that I got when I read Danny Thorpe’s Delphi book.

Rails seemed to make everything easier, with its Convention Over Configuration and Don’t Repeat Yourself principles. Why should I have to specify the properties of an object multiple times as I have to in Java? Let’s see, I do it once in a SQL script for the database schema, then again in a Data Transfer Object which probably has a tautological name like UserDTO. Also there’s probably a Data Access Object that knows all about the Data Transfer Object and there may well be a specific DTO for the user interface layer, because the other DTO was written by another team and doesn’t do quite what the UI needs. It’s madness, and that’s before you start to consider the mess of supporting configuration files that you need just to stitch it all together. With Rails I just create a model object and then write some Ruby code in its associated migration file to specify what its database table should be like. I don’t even have to write getters and setters because I’ve already specified the object’s properties in the migration.

I don’t need to waste time with a lot of up-front flexibility, because Rails makes it so easy to change things at any time. Lots of people have mistakenly inferred that Rails’ Convention Over Configuration principle means that there is no configuration available, but that’s simply not true. There’s plenty if you need it. It’s just that the creators of Rails have refactored the configuration/convention equation so that the default case covers what you probably want to do most of the time. The upshot is that I no longer spend my time editing XML files and can be productive again.

I’ve saved the best part about Rails until last. I’ve found that Rails has brought the fun back into programming. Ten years later and with Web applications instead of desktop applications, this framework makes me feel like I did when I used Delphi. It gives me instant gratification. It makes me want to try things and generally seems to reward me when I do. With J2EE I find that sometimes I don’t feel like programming, simply because it takes so long to get results. Enterprise Java may have a lot of heavyweight architect types and industry thought leaders behind it, but that doesn’t motivate me to create code. Anything that does get me programming and gives me quicker feedback on how I did is good in my book. Delphi ticked those boxes and so does Ruby on Rails.