Anti-static

Three things that I discovered this week that I love:

1. The Google guide to software: This guide makes so much sense and illustrates beautifully how a well intentioned software developer can sleep walk into a world of hurt. Mind you, I would also point out that I feel that static functions and singletons do have genuine uses (see the section on “Brittle Global State & Singletons”).

2. StackOverflow.com: You know the drill, you’ve come across a software conundrum, but can’t be bothered to consult that shelf full of dusty reference books (that only that one guy in your office ever touches). You do what any sensible person would do. Google it. Someone must have faced this problem before, surely? The first search result seems to be exactly what you are after. Excited, you click on through to the website, only to be greeted by some overly aggressive JavaScript that blocks your view of the solution and then attempts to extort some cash from you. Cock. You jump back to Google and follow the second link, discovering a multitude of suggested solutions, but without anyone actually confirming that any of them work. Well, stackoverflow.com is like Wikipedia for software developers. How did nobody think of this before!!!

3. This article by Joel Spolsky, particularly the last paragraph and the bit about managers being there to take care of all the extraneous stuff (I believe Joel uses the phrase “clearing the decks”) so that the people they employ can get on with doing the work that they were employed to do!

10 thoughts on “Anti-static

  1. 1. Very good article. Even though it’s heavily biased towards Java, it makes perfect sense for other languages too. And before you ask, yes, even I will admit that we got it horribly wrong for the TOMs. Still, you live and learn. We have a set of development guidelines at igence now, and ‘Spurn Singletons’ is somewhere towards the top of the list!

    2. Already signed up :-) I’m a ‘Teacher’ with only 12 points so far, so I can’t vote yet.

    3. Have you seen the pics of his new building?!

  2. @Steve:

    1. There is a difference between a set of rules and a guide; rules tell you what you must (or must not) do, whereas a guide is more flexible. My point is that I don’t subscribe to the *rule* that statics/singletons have no place in software design at all, but I am *guided* by the fact that the presence of multiple singletons and/or statics in a code base is a good indicator of “brittle global state”, I believe it is also referred to as code smell. And yes, the TOM stinks.

    2. I haven’t signed up yet, I’m just leeching knowledge.

    3. One day Dave will get you a building like that.

  3. 1. No comment, I have bloody good people who are much better qualified than me to comment.

    2. ditto.

    3a. All I can say that in all the years I have been reading Joel’s articles this is the first time I have seen a bad one. Parts of it are utterly wrong (IMHO).

    3b. No, Dave won’t get a building like that one day. First we will own the lot instead of one floor and second it will be much, much better (it won’t be in the middle of a bloody great city for a start).

  4. No, I cannot resist at least this…

    3a. Where the hell does he get the idea that using his CFO to hang blinds is a good idea? What will he say to his “smart and get things done people” when he makes them all redundant because he missed out on securing their future by stopping the CFO from “increasing their bank balance substantially, and it won’t cost us one extra cent”?

    Show real leadership and call the damn handyman Joel.

  5. “Show real leadership and call the damn handyman Joel”, said the man who hung up the kitchen cupboards, repaired the lock, fitted the security light…

  6. 1. @Steve: if you want to hold a seminar where we can discuss how the TOM should have been, I would be interested in attending. I think it would be a useful way to uncover more of the lessons we should learn.

    2. I’ve noticed recently that StackOverflow (free) is starting to appear higher in Google searches than the ubiquitous ExpertsExchange (not free). No bad thing.

    3. Did Joel’s employees question his Leadership because he chose to hang blinds that day? I doubt it: having nurtured a small but successful and well-known business (and blog), that can afford to splash $250,000 refurb’ing a office, he has earned enough respect that he can do what he likes and he knows it! He has provided the right espresso machine and grinder (the same as mine), so naturally has my respect also (even if he did work for Microsoft).

  7. @Chris: Re-reading my comment it came across a bit strong, and looked like I was insulting your work (and everyone else who worked on it, including me!). That certainly wasn’t my intention. What I was trying to get across was generally ‘isn’t hindsight a great thing’. Without your efforts, we certainly wouldn’t be where we are today. But we’re always learning, new tools, new techniques. The ‘horrible’-ness was referring to (as I have since learned) how singletons can get in the way of good unit testing.

    We certainly had plenty of discussions about areas we would have liked to refactor. Anyway, it can’t be that bad, the LU TOM and RT have been live for 6 years, and the NRTOM for about 4 years. And nobody has been asked to replace us. I’d say that was a successful job.

    As for a seminar – well, this is a subject that has been brought up recently. External courses are all very well to learn C++ or learn UML. But, to learn how to do things the company way, can only be done by the company. It my intention to look at some way to get these ideas across. It almost definitely will involve looking back at past projects. You will be more than welcome to join us.

  8. Don’t worry, I’m not insulted. My only regret is that I failed to get more refactoring done when it was obviously needed. As Technical Director, it was my decision to make, but I was as scared as everyone else that we didn’t have time to go back and fix things properly. I also didn’t have the confidence to quosh the accusations that my design criticisms were just the musings of a techno-purist-perfectionist, irrelevant to real-life projects. These are the sorts of lessons I’m talking about.

    It’s true that the software works well, but it must be becoming ever more expensive and time consuming to maintain and retest to the point where the customer may not believe/accept the full cost and that’s not good for business! You also know there’s a problem when only certain team members can reasonably work on certain areas of code, and no team members want to.

    A seminar could be very insightful, e.g. what’s worse: a company with a Technical Director who hangs blinds, or one with no Technical Director at all?

  9. @Chris: We are in need of technical direction. And between Charles and myself, I think we have that ability, albeit with no official “Technical Director”. Now we just have to see who can shout the loudest – technical or commercial!

Leave a Reply

Your email address will not be published. Required fields are marked *