Blog Archives

Maintenance costs

No engineered structure is designed to be built and then neglected or ignored. — Henry Petroski The quote above comes from Henry Petroski’s recent interview on Tech Nation. In the same interview, Petroski says that a common rule of thumb

Tagged with:
Posted in Business

Sleep debt and industrial accidents

From The Power of Full Engagement: … every one of the great industrial disasters of the past twenty years — Chernobyl, the Exxon Valdez, Bhopal, Three Mile Island — occurred in the middle of the night. For the most part,

Tagged with: ,
Posted in Uncategorized

Software sins of omission

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

Tagged with: ,
Posted in Software development

Counterfeit coins and rare diseases

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,

Tagged with: , ,
Posted in Math

How to test a random number generator

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

Tagged with: ,
Posted in Software development

Reviewing catch blocks

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

Tagged with: , ,
Posted in Software development

Maybe NASA could use some buggy software

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

Tagged with: ,
Posted in Software development

Finding embarrassing and unhelpful error messages

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

Tagged with: , , ,
Posted in PowerShell, Software development

Beautiful Testing

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.

Tagged with: ,
Posted in Software development

Broken windows theory and programming

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

Tagged with: ,
Posted in Software development

Michael Feathers on refactoring

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.

Tagged with: ,
Posted in Software development

Errors in math papers not a big deal?

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

Tagged with: ,
Posted in Math, Software development

Why 90% solutions may beat 100% solutions

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

Tagged with:
Posted in Software development

Programmers aren't reading programming books

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

Tagged with: , ,
Posted in Software development

Writes large correct programs

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

Tagged with: ,
Posted in Software development