The Book of Common Prayer contains the confession … we have left undone those things which we ought to have done, and we have done those things which we ought not to have done. The things left undone are called…
The Book of Common Prayer contains the confession … we have left undone those things which we ought to have done, and we have done those things which we ought not to have done. The things left undone are called…
Here’s a puzzle I saw a long time ago that came to mind recently. You have a bag of 27 coins. One of these coins is counterfeit and the rest are genuine. The genuine coins all weigh exactly the same,…
Random number generators are challenging to test. The output is supposed to be unpredictable, so how do you know when the generator working correctly? Your tests will fail occasionally, but how do you decide whether they’re failing too often? What…
Here’s an interesting exercise. If you’re writing code in a language like C# or C++ that has catch statements, write a script to report all catch blocks. You might be surprised at what you find. Some questions to ask: Do…
In Coders at Work, Peter Norvig quotes NASA administrator Don Goldin saying We’ve got to do the better, faster, cheaper. These space missions cost too much. It’d be better to run more missions and some of them would fail but…
Every time your software displays an error message, you risk losing credibility with your users. If the message is grammatically incorrect, your credibility definitely goes down a notch. And if the message is unhelpful, your credibility goes down at least…
Beautiful Testing is available for pre-order at Amazon. Proceeds from the book will go to Nothing But Nets, a project to distribute anti-malaria bed nets. I contributed a chapter on how to test random number generators.
The broken windows theory says that cracking down on petty crime reduces more serious crime. The name comes from the explanation that if a building has a few broken windows, it invites vandals to break more windows and eventually burn…
Michael Feathers wrote one of my favorite books on unit testing: Working Effectively with Legacy Code. Some books on unit testing just give abstract platitudes. Feather’s book wrestles with the hard, messy problem of retrofitting unit tests to existing code.…
Daniel Lemire wrote a blog post this morning that ties together a couple themes previously discussed here. Most published math papers contain errors, and yet there have been surprisingly few “major screw-ups” as defined by Mark Dominus. Daniel Lemire’s post…
I’ve never written a line of Ruby, but I find Ruby on Rails fascinating. From all reports, the Rails framework lets you develop a web site much faster than you could using other tools, provided you can live with its…
In the interview with Charles Petzold I mentioned in my previous post, Petzold talks about the sharp decline in programming book sales. At one time, nearly every Windows programmer owned a copy of Petzold’s first book, especially in its earlier…
I had a conversation yesterday with someone who said he needed to hire a computer scientist. I replied that actually he needed to hire someone who could program, and that not all computer scientists could program. He disagreed, but I…
Modern operating systems are huge, and their size comes at a cost. When I worry out loud about the size of operating systems (or applications, or programming languages) I often get the response “What do you care? If you don’t…
Yesterday I added a blog to the ReproducibleResearch.org web site. You can visit the site here or subscribe via RSS. I’d like a couple people to join me in writing this blog, and I would greatly appreciate suggestions, guest posts, etc.…