Slashdot Mirror


Alan Cox on Writing Better Software

Andy Gimblett writes "Alan Cox recently gave a talk in which he discussed some current and emerging techniques for producing higher quality software. Some of these will be familiar to Slashdot readers, such as validation tools, type checking, etc, but others seem heavily influenced by his recent MBA. In particular, he has a lot to say about Quality Assurance in the software world, and the kinds of things we should be doing (and some people are doing) to make better software. Story and lots of quotes at Ping Wales, and video at IT Wales."

5 of 391 comments (clear)

  1. Unit testing? by JohnGrahamCumming · · Score: 4, Interesting

    It's quite surprising to me that there's no mention here of unit testing, or any sort of automated testing where the engineers who wrote the code actually write tests.

    It should, by now, be clear that "code that doesn't have tests, doesn't work", and that if XP has done anything for us, it's to focus on writing tests. I've seen this in action and it works.

    John.

  2. Testing and releasing software by plcurechax · · Score: 4, Interesting

    My employer produces a large-ish software package, with 10 years of history and a small, 2-3 people, development team. Since I joined we have made massive strides in automating the build process, include some unit tests, and a few smoke tests in an automated process.

    Well, the effort paid off. Before we supported one version of HP/UX, and one release of Linux, now we support HP/UX (still a pain), and 4 looking at going to 6 Linux version/distributions and it is less work to produce a release now than ever just a year ago.

    Tools like automake, autoconfig, libtool, cvstrac and of course cvs have made my life bearable.

  3. Re:Code review and pair programming by ZorbaTHut · · Score: 5, Interesting

    Funny, that. I recently started working at a company with mandatory code reviews. Here's a list of my recent experiences with it:

    1) Checked in code. Spent fifteen minutes justifying design decisions. No changes made.

    2) Checked in code. Code contained horrible horrible bug. Code reviewer didn't see it.

    3) Checked in code. Defended my design against several more computationally expensive suggestions that were also more complicated. No changes made.

    4) Listened to a friend gripe about having to spend a DAY AND A HALF repeating design reasons and fixing bugs introduced by his code reviewer "cleaning up" his code.

    5) Received company-wide email about a build that flat-out didn't compile - apparently someone hadn't bothered compiling a patch, and had sent it to a code reviewer, who likewise hadn't bothered compiling it before authorizing it.

    Now I'll admit that there are also a whole lot of "well, it only took five minutes, so it wasn't much of a waste" cases. But so far I haven't heard one person talking about how useful the mandatory code reviews are.

    Maybe it's just an artifact of the kind of programmers working at this company, or the kind of code being worked on, but so far code reviews have been a net loss in my experience. I've taken to doing major changes in my own personal branch of the repository (which doesn't enforce the code-review requirement) and in a month or two I'll have 3000 lines of code for someone to look at - but at least I won't have nickel-and-dimed them to death with 120 100-line code reviews, 3/4 of which I will inevitably end up deleting entirely.

    Note that I'm not saying "code reviews are bad" - what I am saying is that there's a time and a place for just about every technique, and there's also a time and a place where each technique is worse than useless. Pick your battles and pick your tools.

    --
    Breaking Into the Industry - A development log about starting a game studio.
  4. Code validation tools... by tcopeland · · Score: 4, Interesting

    ...are nifty. They can catch all sorts of stuff and produce lovely reports - or, well, at least functional reports. And running them nightly - or hourly - helps to ensure the code won't get out of sorts.

    PLUG: Need to check Java code? Try PMD!

  5. Re:Quality by fyngyrz · · Score: 4, Interesting
    Quality Assurance in 6 Easy Steps:

    1. Fire the managers
    2. Fire the beancounters
      (steps 1 and 2 may be reversed if required)
    3. Fire anyone who even mentions the word "committee"
    4. Keep labs open 24/365. Apply metered, but 100% flexible, work hour rules for programmers (ie, "You have to work 40 hours/week, but it doesn't matter which 40 hours.)
    5. Provide superb comfort and amenities to programmers
    6. Create significant bonus program tied directly to number of problems found in each programmer's code per release cycle. Zero problems, max bonus, more problems, less or no bonus. Stir to taste.

    Enjoy good results.

    --
    I've fallen off your lawn, and I can't get up.