I agree 100% with this piece from Jimmy Nilsson’s blog.
“I’ll bet you that from ten feet away I can tell if a program is bad. I might not guarantee that it is good, but if it looks bad from ten feet, I can guarantee you that it wasn’t written with care. And if it wasn’t written with care, it’s probably not beautiful in the logical sense.”
Charles Simonyi
The quote is from an interview with Charles Simonyi; via Joel’s discussion forum.
Those of you who are interested in the Warren Smith Saas Fee ski training sessions you might like to take a look at Warren’s latest DVD, Warren Smith Ski Academy Lesson 2. The first two sections, carving and steeps, were filmed during our course in September 2003. As you can see, the snow was pretty good and, as I said at the time, he had us doing some pretty interesting stuff.
I’m reviewing a large body of code for a client at present. It’s a general review of the design, coding style, code correctness and testability of a project. I started off by making notes on some of the general design changes that I’d recommend and eventually got down to a detailed review of the code. There’s a lot to say about the code and, as with all code, sometimes it’s hard to figure out the reason behind the use of a particular construct.
Interesting thread over on Joel today about using const, or not.
The original poster asked how many people bothered to mark function parameters that they don’t modify as const and whether there was any performance or readability advantages in doing so.
Ignore any performance issues, making your code const correct has massive readability and comprehension advantages. I’d go so far as to say it’s one of the most important coding standard issues there is…
The test certificates that shipped along with the OpenSSL server demo that I posted here have expired. I’ll post some new ones shortly.
I’ve seen a lot of blog postings recently that pour scorn on the ideas behind TDD. Ah well, if you don’t like it, don’t do it. I’m more than happy if our competitors decide that TDD isn’t for them. In fact, testing is bad, don’t do it, move along now, don’t read any of the testing articles here…
The jarring of the “real world” work we’re doing is made worse by work we’re doing for another client at the moment.
I’m currently working with a corporate client. The plan is that I’ll help them refactor a key component in their system and make it more robust and increase performance. Right now they’re in the middle of a release and are in ‘slip mode’. I find myself feeling some sympathy for Cypher from The Matrix; there I was, safe in my green-tinted world of TDD, then suddenly I find myself in “The real world” and it’s nasty and messy and there aren’t any tests.
I’m a great fan of wrapping stuff up with thin layers that make the wrapped code easier to use in a given circumstance, or to provide a more appropriate interface. Obviously there are other reasons to wrap APIs but I’m continually amazed at how often the wrapping fails to add much value.
Take the humble Win32 Event API. It’s a fairly standard C API that uses an opaque handle to allow you to manipulate an event object.
Craig Andera talks about TDD. I couldn’t have said it better myself.