Go Easy on the Maintenance Programmer

Maintenance Programmer“: This common, and underappreciated species of programmer is often heard muttering and cursing under their breath. Sometimes bald from tearing their hair out in frustration.

From time to time we all have to do it: simple changes and maintenance to code - often other people’s code. And the truth is that most code spends far more time in maintenance mode than it did in design, coding, or initial debugging. Yet maintenance programming is notoriously difficult (even if it does tend to get assigned to the most junior developers on a team). I will identify the main reason I think maintenance is difficult, and suggest one specific programming practices that can make your code easier to maintain. [More...]

A random selection algorithm

Suppose you want to select k things randomly from a list of n items, with no duplicates. [More...]

Two more uses for a Secure Hash

In a previous article I talked about using salt with a secure hash, but all of the examples assumed that the secure hash would be used to validate passwords. Secure hashes can be used for many other purposes, and I’ll illustrate that by describing two other possible uses. [More...]

Why User Stories?

Any software project needs a Business Requirements Document (BRD)—a document which describes what the deliverable is supposed to do once it’s been built. The traditional (waterfall) way is to write it in paragraph form, but several agile development techniques recommend writing it in the form of a collection of “User Stories”. [More...]

Always use Salt

I’m not a very good cook. One reasons is that I’ve never mastered the art of tasting the food as I go along and seasoning it properly. When cooking, I never seem to add the right amount of salt. As a programmer, though, I always use salt. [More...]

The Butterfly Bug

Edward Lorenz died this past Thursday at age 90. This is as good an excuse as I will ever have to recount the story of his discovery (which I first learned from the book Chaos by James Gleick). It is a tale of math and the proper use of computers. [More...]

How to email blog posts from Outlook

Suppose (just for the sake of discussion) you wanted to share some blog postings with a group of people at work - and the company email system uses Outlook 2003. Sending HTML email with the blog posting seems like it would be a nice way to do it. But getting Outlook to send properly-crafted HTML emails is surprisingly difficult [More...]

Units of Work

When I was a physics student one of the things that I learned to do was “unit analysis”. That’s where you simply consider what units an answer has: is it in meters, or meters squared? Surprisingly, there is an enormous amount that can be learned just by doing unit analysis. Recently, I applied unit analysis our scrum backlog (the process by which my company chooses what tasks to work on) and I learned something surprising. [More...]

How to talk about Data Structures

FizzBuzz.scalaI’ve been interviewing lately for “senior programmer” positions. I find it outright astonishing how many applicants for these positions lack what I would consider the most fundamental of programming skills. Some people have suggested using FizzBuzz (a trivial programming exercise) as a filter; what I use is a discussion of data structures. [More...]

A Creaky Old Man’s Defense of Creaky old Code

I’m beginning to wonder whether I’m turning into an “old fogey” of a computer programmer. You know, the elderly fellow who has an office near the server room; the one who always objects to the use of any new technology and goes on at length about “the good old days” — you know, back when Real Programmers punched their cards out by hand. [More...]