Good software advice

I listened to Java Posse while running at lunch today.  (And I can’t get that darned “Java!  Java!  Java, java, ding, ding, ding” song out of my head!)  This was podcast #132, an interview with Bill Pugh and Brian Goetz.  They made a couple of good points about software.  It struck me how universal these concepts are, no matter what language one programs in.  In fact, they even apply to the custom scripting language that we use for our equipment.

In regards to finding bugs in code:

  • You want to use a variety of bug-finding techniques.  Static checking, code reviews, and testing tend to find different types of bugs.
  • There is a point of diminishing returns with any of these techniques. 

They also talked about how it helps in the long-term to have a well-defined, planned, hammered out interface.  They said that if your definition is too loose, then you lose the ability to improve the code over time.  They brought up an example of an application library that didn’t raise an error on null inputs.  Later, they wanted to add null checking to help catch bugs, but they couldn’t because it could break existing code.  We have a similar situation in our custom scripting language. We intentionally created it to be very forgiving, and particularly to make assumptions about parameters if the programmer didn’t specify them properly.  But now we can not add stricter parameter checking to our code, which would catch mistakes that we see people make, because it could fail on existing machines.


Post a Comment

Required fields are marked *

%d bloggers like this: