Archive for February, 2007

WTF != Worse Than Failure

Tuesday, February 27th, 2007

One of the more interesting sites on the Internet has been The Daily WTF. This posts code and IT related stories that truly make you go WTF? One of the reasons the site has been interesting has been the name, as it perfectly describes the reaction to these stories.

Unfortunately Alex, the guy who runs the site has decided that WTF is an inappropriate name for the site and has now renamed it Worse Than Failure.

This is a very disappointing change. Part of the allure of the site was the name. I am not a person who appreciates swearing, however the acronym has meaning beyond its component words. It is almost a word in itself. It is embedded in the tech industry and has a recognised place there (along with RTFM for example).

The change in name makes it a place that is no longer dedicated to the tech industry, instead it has been changed to meet the approval of a wider audience, apparently including Alex’s grandmother.

Most comments on the change have not been positive.

Alex has a right to make the change, but it is not a good decision in my opinion. I feel strongly enough about it that I don’t think I will be visiting the site with its current name. I’ll be interested to see if the new name sticks and whether there is a drop in readership as a result.

Book: The inmates are running the Asylum (Chapter 4)

Tuesday, February 27th, 2007

Chapter 4

page 67

When a program does have a problem, it invariably dumps it in the user’s lap…

That is because the user is often the only one who can do anything about the problem.

Earlier in the chapter he gives an example where he gets an error: you are not connected to the internet. I get this error quite a bit from both my browser and mail client on my laptop. There are two reasons why I get this error. The first is I haven’t put the wireless card in the PCMCIA slot of the laptop. The other reason I get the error is when I am VPNed into a private network. In both of those cases the only person who can fix this problem is me, the user.

Now I know that non-sensical or invalid errors are returned by applications, but the reality is that many errors can only be resolved by the users.

Book: The inmates are running the Asylum (Chapter 3)

Thursday, February 22nd, 2007

Chapter 3

page 47

Despite appearances, programmers are completely in control of this bottom-up decision-making process… Programmers will - in self-defense - assign longer duration to the more nebulously defined items… All the analysis and careful thinking done by high-powered and high-priced executives is made moot by the unilateral cherry picking of a programmer…

So it is the fault of the programmer that an executive gives them a poorly defined item. Notice that we effectively go from programmers will provide longer estimates on poorly defined items to programmers will make whatever choices suit them, therefore programmers control the process.

The process actually works more like this. Executive hands programmer list of features. Programmer makes estimates on features. Poorly defined features get longer estimates because they do generally take longer. Executive takes list from programmer and decides which features are going to make it into the product. Note that the Executive is in control of the whole process except for estimation, where the programmer has expert knowledge.

page 52

Microsoft is apparently convinced that support of this magnitude is just an unavoidable cost of doing business. I’m not.

That’s because your grip on reality is tenuous.

page 52

Ask any person who has worked at any desktop-software company in technical support, and he will tell you that the one thing he spends most of his time and effort on is the file system. … users don’t understand the recursive heirarchy of the file system…

Ask any librarian the most common request they get. How do I find book x or information on y? How does the classification system work? A library is the closest real world counterpart of a file system. Both are difficult because they organise and store lots of information. This is hard for people whether it is on computer or not.

The value of a prototype is in the education it gives you, not in the code itself. Developer sage Frederick Brooks says, “Plan to throw one away”

Someone who has read some Brooks but hasn’t read enough Brooks. Brook’s later writings (The mythical man month after 20 years) recognises that the reason you need to throw one away is that the waterfall process of software development is flawed. Using an iterative model of software development you do not need to throw one away.

Fred Brooks:

The biggest mistake in the “Build one to throw away” concept is that implicitly assumes the classical sequential or waterfall model of software construction.

Book: The inmates are running the Asylum (Chapter 2)

Wednesday, February 21st, 2007

edit: fixed link

Chapter 2

page 32

Of course, virtually everyone in the computer industry, including allied industries that make products and services based on computers, falls firmly in the apologists camp.

Nice generalisation. You are saying that almost everyone who works in IT is tainted by their work. That there is an informal conspiracy to make bad software.

page 37

Apologists counter with the argument that you must have training and a license to drive a car, but they overlook the fact that a mistake with a car frequently kills people, but a mistake with software generally doesn’t.

“Frequently kills people”? A mistake with a car can kill people but it infrequently kills people. More broad generalisations.

That is rather beside the point. He clearly read my earlier comment. What he ignores is that most complicated or new products require training. You need to learn to use a bicycle. That fact that a mistake (or someone else’s mistake) may kill you is not the sole reason you need training. You need training to use a gun, even with its classic point and click interface. Hundreds of years ago people would have needed training to use a plough. Complicated and new machinary needs training.

1 Year anniversary

Sunday, February 11th, 2007

Today is our 1 year anniversary! The year has gone past so quickly.

Vic gave me some gorgeous hand-made origami, it must have taken her hours to make.

We went to Doyles for lunch and had a lovely meal, complimented by a fantastic Petaluma Riesling (2006). There was a lovely view from the restaurant, we were sitting right above the beach.

Of course nothing is ever completely normal when Vic and I go out. This time a bunch of water police turned up in rather impressive boats. Apparently they were there to “pick someone up” according to the water police officer I asked. Later on a convoy went past consisting of 5 or 6 government cars and 4 vans preceded by 4 motorcycle police and followed by another couple of motorcycle police and a police car. I guess that was the someone.

We also went for a walk out to the gap. That was made more interesting by a tourist deciding to go over the boundary fence. As the nice policeman was explaining to him when we went past, that automatically means 15 police get and a police helicopter called out. Nice.

At this point the storm was rolling in so we came home.

Book: The inmates are running the Asylum (continued…)

Saturday, February 10th, 2007

I’ve read some more of The Inmates are Running the Asylum and it does improve. Basically his major point is that usability, particularly user interaction, could improve. That usability is something that programmers often shoehorn in later. User interaction is a good way to describe this because this covers more than just display screens.

He makes some very good points about feature lists. Programmers tend to think of things in terms of feature lists and compare products by features. This does not take into account the usability of the product.

On a purely features based comparison the iPod sucks when compared to many of the other mp3 players. When it was released it was famously described as No wireless. Less space than a nomad. Lame.. However the iPod commands the bulk of the MP3 player market.

This is true with OSes too. Apple has made significant sales to hardcore Linux geeks because it so easy to use but still provides the power of unix under the hood. I’m a pretty technically literate guy but there are points where I decide something is just too complicated and chuck in the towel. It isn’t just the single situation (eg configuring a proxy server for a home network), it the cumulative effect. When trying to configure the proxy server, you still need to remember how your samba server is configured, how you configured apache, how you configured your tv/dvd player etc… Each has a different means of configuration and often one that is not intuitive. A lot of Apple’s stuff is popular because it “just works”, the configuration is intuitive.

That said there are some major issues with some of what he has to say. He writes in generalisations without providing data to back them up. What he does provide is lots of anecdotes which support his argument, however he generalises from these anecdotes to say they apply to the entire industry.

Chapter 1

page 11
Describes a user issue with software and continues with:

The obnoxious behaviour and obscure interaction that software-based products exhibit is institutionalizing what I call “software apartheid”: Otherwise-normal people are forbidden from entering the job market and participating in society because they cannot use computers effectively.

Hello? Most technological advances require some learning. Here let my rephrase the sentence for you:

The obnoxious behaviour and obscure interaction that cars exhibit is institutionalizing what I call “driving apartheid”: Otherwise-normal people are forbidden from driving cars and participating in society because they cannot use cars effectively.

There are other examples

From here on I’m going to post quotes and comments by chapter.

Book: The inmates are running the Asylum

Thursday, February 8th, 2007

Edit: Added page numbers for quotes.

I’ve been reading quite a few programming books lately including The Mythical Man-Month and Death March, both excellent books.

I’ve just started reading The Inmates are Running the Asylum. A work colleague read this before me and warned me that he found it annoying. He was right. I’m only about 20 pages in and I’m finding it extremely annoying. Some selected segments below.

page xx

Accountants call these “variable costs” because the expense varies directly with each product built. “Fixed Costs”, as you might expect, don’t vary directly… In the information age, there is little or no variable cost, whereas in the late industrial age, variable cost was the dominant factor. Indeed, the absence of variable cost is what makes this a new economy.

Effectively he is arguing that software has only fixed costs and “old” manufacturing is dominated by variable costs. Old manufacturing could be dominated by fixed costs: administration, building of the plant, digging mines. In addition software costs have variable costs. The more customers you have, the more features that will be requested before a new product is released. More customers also means more time on support for your product (and that is an integral part of shipping software). More customers means more requests for features in patches after the product has been released. You don’t think that Microsoft stopped work on XP after it shipped do you?

In addition, while I agree that software has more fixed costs than variable costs, Cooper talks as if this is a completely new thing to the business world. How about costs for making movies, CDs and Art? Those are almost totally fixed costs.

page xxiv-xxv

This model is copied directly from academia, where the act of creating software is entangled with the planning and engineering of that software. … Architecture … is typically deferred until construction has begun and is corrupted by intermingling with production code.

Hooray. Bring back the waterfall model of software development.

page 3

On the landing approach, the pilot of 757 needed to select the next radio navigation fix, named “ROZO”. The computer returned a list of these starting with “R”, and the pilot selected the first of these, whose latitude and longitude appeared to be correct. Unfortunately, instead of “ROZO” the pilot selected “ROMEO”. … the pilot began an easterly turn and slammed into a granite peak at 10,000 feet. …. One hundred and fifty-two passengers and all eight crew members perished.

I, think, he, uses, too, many, commas. On average one could be removed from every sentence. But I digress.

This crash is held as an example of bad software. However it isn’t enough to point the finger and say it was bad, you must say how it can be made better. Do you confirm the choice of beacon? If you do that all the time people ignore confirmations. Do you rename the beacons so there are none that start with the same letter? That assumes that there are only 26 beacons (unlikely). Do you get the pilot to map out which beacons they will hit on their flight path before the flight, ensuring that only beacons on that flight path appear in this beacon list? That doesn’t stop the pilot selecting the wrong beacon before the flight. Do you make the pilot type the full name in? That would just annoy the pilots further. In short it remains the pilot’s problem to ensure that the correct beacon is selected, which is what the National Transport Safety Board decided.

Nice example.

Excellent Applications (Part 2)

Wednesday, February 7th, 2007

Programmers spend a lot of time writing text, this leads to strong preferences in text editors. My personal favourite is Textpad. Textpad has been around for quite a while and has remained largely unchanged in a 5 years. A quick list of things that makes textpad cool for me:

  • The ability to define custom syntax definition files. These can include things like how to handle tabs.
  • Block select mode, where you can select a column of text rather than full lines
  • Sorting text, including the option to remove duplicates
  • A fast find in multiple files (*much* faster than say VS.Net)
  • Posix Regex search and replace
  • The ability to run command line apps inside the app, great if you are hacking out a perl script

Putting all this together in a real world recent example: I had a bunch of files with paths stored in a database I needed to move to another location. These files had paths had a common base path, but were stored a number of folders deep. I queried the database to get the list of files and dumped the result in textpad. I then:

  • Created a new file called move.bat
  • Created a regex that stripped off the file name at the end of the path, the common base path from the beginning and added “mkdir \” to the front
  • Used sort with remove duplicates to get a unique list
  • pasted the result into the move.bat file
  • Undid all the changes to get back the original list of files
  • Created another regex that added move to the beginning and added the new path for the file to the end
  • Copied and pasted the result into the bottom of move.bat

Voila, I had a batch file that did everything I wanted.

Windows, how I hate thee…

Tuesday, February 6th, 2007

I take a laptop from home to work most days. On my home network I run a dns server so that my domain points to the local IP address of the web server on my network. I do this because due to the way NAT works you cannot resolve to a public IP address.

So I bring my laptop home and what do you know, I try to hit our site (www.uberconcept.com) and of course it resolves to the public IP address.

Fortunately Windows offers the ipconfig /flushdns command. But wait. It doesn’t actually flush the DNS. You see if you call ipconfig /flushdns it kinda clears the dns and kinda doesn’t. Immediately after calling this, if you call nslookup www.uberconcept.com it resolves to the correct private ip address. However if you try to hit the site (after having closed all browsers etc) it still tries for the public ip address. My best guess is that windows still has the domain name cached.

Either way it is pretty annoying. Why include the /flushdns option if it doesn’t work?

People selling stuff

Monday, February 5th, 2007

I don’t like those people selling stuff at stations.

I walked through the barrier in the morning and one of them tried get me to stop. I normally look at little bit grim in the mornings but after 4 hours of sleep I was looking rather more grim than normal. I’m ~190cm tall so looking grim is generally quite effective. In addition at the time I was listening to the radio on my mobile. Are there any more ways I can make it clear I don’t want talk to you?

Wait I know: I can wave you off. Even that didn’t work. Can’t these people recognise that if I wave you off I don’t want to talk to you? If you do talk to me I consider it rude and am likely to get annoyed?