Monthly Archive for April, 2008

Dev Diligence: Don’t Invest in the Wrong Code

When I’m starting a project or thinking about adding functionality to an existing code base, I always consider using any existing code. Sometimes this is obvious – I’m not going to write my own RDBMS — but frequently, it is a more difficult decision than it should be. In making a decision, I look first at the questions that I can actually get answers to:

  • Am I getting more than I need? It pains me to add a multi megabyte DLL to a client download for a small amount of functionality.
  • Will I spend more time learning the interface than I would writing the functionality I need myself?
  • Is this an active project, and is there any documentation?
  • If scheduling isn’t an issue, how much fun would it be to write my own version?

Next comes a set of questions that are oftentimes harder to answer:
Continue reading ‘Dev Diligence: Don’t Invest in the Wrong Code’

Crashing When Something Feels Wrong

I’m sort of lazy, so I really like the idea of code that continually checks itself by using assertions. I even like running production services with assertions turned on. To be clear, I’m talking about assertions that check for actual bugs in your code – not assertions that socket() didn’t fail. Still, crashing production servers is a contentious issue, but sometimes (hopefully rarely) it is the best thing to do. For something like FolderShare, crashing a server as soon as there is any hint of an error is vastly safer than possibly deleting someone’s files due to a bug. Of course, this introduces the risk that you could have multiple servers fail in a short amount of time, but you need to design for that case anyway.

Continue reading ‘Crashing When Something Feels Wrong’

Housekeeping

I don’t plan on having many non-technical posts here, but I’m breaking my rule today for a good reason. I’ve got a kid now! My first child, Margot Lee Kleinpeter, was born about 10 days ago. Between a long, drawn out labor, a few nights on a hospital couch, and fatherhood in general, I’ve fallen a bit behind on publishing. Much to my surprise, Margot prefers clean diapers and songs to essays on startups and programming. But, I’ve got a new post for today and I’ll hopefully be back on a more normal schedule soon. In the meantime, enjoy this picture of her sleeping: