/* */

Saturday, March 15, 2008

Everything old is new again

Just finished helping to write the first draft of a software developer certification study guide. It's intended audience is recent CS graduates and lightly-experienced (< 3 years) developers. The modules cover requirements, design, construction and testing. The difficulty with the writing was pulling information that is so second-nature up into my consciousness -- I mean, who needs to be told that using ASSERTs is a good programming practice? It felt like I was writing down the blindingly obvious, but my experiences in software design and development over the years, across many organizations reminds me that most developers don't know, or at least don't use, the blindingly obvious.

One of the content areas was about re-use. What can you say about re-use? "Re-use is good, do it a lot." The benefits are staggeringly clear, who needs them explained? My second paying job was programmer at a bank. The computer was an IBM 360/40 with 128K of main memory, we wrote everything in assembler and during the day ran a 64K foreground partition and two 32K background partitions for assembly and test. The disk system was flat files (no relational d/b technology yet). There was a flat file containing all the savings accounts sorted by account number, new accounts were added to a second 'new accounts file' that was appended to the main file every night and the main file re-sorted. (3rd shift operator at that bank was my first paying job).

Savings transactions were written to a second file. The main file had a pointer at the end of each savings account record that pointed to this Savings Overflow File, and each of the records in the SOF had a pointer to the next transaction for that account in the SOF. I got an assignment to write a program doing something (can't remember what) with savings accounts and I had to write a routine to find the account record in the main file and run the chain of transactions in the SOF. It occurred to me that this must be a common problem and I researched IBM's OS manuals and found that OS/360 offered a library function, where a pre-compiled binary could be stored and called from any program. I wrote my search routine in a form that could be stored in the library, called it from my program, and sent out a memo that from now on, no one needed to write a savings overflow trailer search, they could just call my routine and save a day or two of programming & debugging.

No one else in the shop used it. Ever.

A perfect example of re-use. Why wouldn't the other programmers use a tool that made their lives easier, that would make them more productive (looks good to the boss), that would eliminate complexity from their programs, and especially! reduce debugging effort? I was baffled and remain so to this day. For most of the programmers I've seen, re-use ends at copying some code that does something they need to do and pasting it into their own program. Why ignore such an obviously beneficial technique?

So the study guides were hard to write.

0 Comments:

Post a Comment

<< Home