29 August 2009

Beck: Thought on Design Cost

"Design isn't free. ... When you put more design in today, you increase the overhead of the system. There is more to test, more to understand, more to explain. So everyday ... you pay a little design tax."
- Kent Beck's Extreme Programming Explained.

With more experience this is becoming truer and truer. As the design gets more general and seems to be preparing for potential future needs then there is more to test, understand, and explain. And yes it is that simple. That is not even counting the cost of the thought and white board time ( meaning less coding time ) going into the extra design.

Is it often worth the cost?

I am beginning to think not necessarily. Maybe the YAGNI question needs to be applied more thoughtfully to design and design decisions.

Scott Meyers: Good Library Design

Some principles that make for better libraries:
  • Make classes and functions easy to use correctly, hard to use incorrectly.
  • Obey the principle of least astonishment.
  • Avoid gratuitous incompatibilities with the built-in types.
  • Use const whenever possible
  • Avoid duplicating code.
Scott commented that the first principle listed is a "Hallmark of a professionally designed library."

And the for the third principle listed, "When in doubt, do as the ints do."


This is from material and notes taken at the 2002 C++ Seminar in Boston during the session about Library Design and the C++ Standard Library by Scott Meyers.

These still seem like sensible principles to keep in mind as one develops code.

04 August 2009

VAX/VMS

Recently, I found another blast from my past. I used this VAX/VMS book to write many of my DEC Command Language (DCL) scripts back while at Texas Tech in the late 80's and early 90's. I really enjoyed VMS and DCL. Tech, like many universities back then, had DEC systems for mainframes and even the physics department had a MicroVax.




I liked DCL over Unix script languages since DCL used command and keywords that made sense. Unix which uses "grep" for a search command whereas DCL used "search." Tell me which one is intuitive to remember? Of course grep is probably more powerful.




Recently I was lamenting about the VAX/VMS and found out that the cancelled F-22 fighter used the VAX/VMS OS! This was pleasant surprise. Cool.