Google! DayPop! This is my blogchalk: English, Australia, Sydney, Newtown, Charles, Male, 26-30!


Updated: 2/8/02; 4:32:52 PM


The Desktop Fishbowl
tail -f /dev/mind > blog

Tuesday, 9 July 2002

The Register tells us Windows 2000 has nine months to live. This is a great pity - Win2k is the only decent OS Microsoft have ever produced, and given the user-hostile directions they're going with XP and Palladium, this situation is unlikely to change. So this means my current copy of Win2K is the last Microsoft OS I will ever purchase. That is, unless Palladium turns into a reality and locks us all firmly in the Microsoft trunk for all time, gasping our last breath in Bill Gates' leaky carbon monoxide.


6:49:26 PM    

After I'd posted Salami, boiled frogs and broken windows., I remembered there's also another name for this phenomenon that's a trifle less complimentary. It's the Slippery Slope Fallacy, and you learn about it in first-year Philosophy. It's also known as the Fallacy of the Beard, because the fallacy can be seen in the following examples:

If you pull a single hair out of somebody's beard, it's not going to make any difference at all. Therefore, since any individual hair-pulling isn't making a difference, you can keep doing it forever.

Or...

The act of pulling out a single hair could be the difference between having a beard, or not having a beard. Since we can't define the exact point at which the change occurs, we must say that any hair-pulling will destroy the beard.

We mustn't lose sight of the fact that the single slice of salami isn't thick, the slight change in temperature won't in itself kill the frog.


1:13:50 PM    

Mike Cannon-Brookes writes an essay on what he calls The Salami Effect, in essence the way small things can add up to be big things if you don't watch out.

In programming, I've seen this concept described in two forms, as the Boiled Frog effect, or as Broken Windows. Often the two are presented together, as they are in Andy Hunt and David Thomas' rather impressive book, The Pragmatic Programmer.

The Boiled Frog analogy comes from the (disputed) theory that if you place a Frog directly in boiling water it will jump out, whereas if you put it in cold water and then slowly raise the temperature, the frog will never notice it's getting too hot until too late. Result, one boiled frog.

The Broken Windows theory comes from an (also disputed) theory of public policy usually used to justify "zero-tolerance" crime policies. The theory is that a single broken window left unfixed in a neighbourhood is an attractant to further vandalism - it gives the impression that nobody cares about the neighbourhood, and thus the area is ripe for bad elements to move in.

What does this mean for programming? Well, it turns out that even though both theories have been discounted in their original forms, they make a lot of sense when coding, especially as part of a large project. Every time you choose to do something in your code that is inelegant, perhaps for the sake of hitting your deadline, the individual effect may be small, and you may be like the boiled frog and not notice how the rot is spreading through the whole codebase.

And likewise, if you leave something bad in your code, a co-worker will see it and say "Well, Charles did it like this, so it must be OK". One broken window becomes many, with the same result.

The solution? To refactor mercilessly. If you see a broken window? Fix it immediately. Keep a careful eye on the temperature of the water, because while it may not seem too hot now, and a few bits of ugly code may help you in the short term, overhauling a rotting code-base is never fun, and usually costs you far more time and effort than you'd have spent getting it right when it was just one cracked window.


12:47:03 PM    




July 2002
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Jun   Aug







Subscribe to "The Desktop Fishbowl" in Radio UserLand.

Click to see the XML version of this web page.

blogchalk: Charles/Male/26-30. Lives in Australia/Sydney/Newtown and speaks English.

Click here to send an email to the editor of this weblog.



Click here to visit the Radio UserLand website.


jenett.radio.console.v1.1
theme designed by
jenett.radio

Copyright 2002 © Charles Miller