RSS

The Perfect Program

Long ago, when I was an undergraduate at RPI, the computer center newsletter included an amusing poem, “The Perfect Program.” I still have the now-yellowed page and have since learned how telling the poem is.

The newsletter cited the author as Low Ellen Davis of California State University (Long Beach) but I found several versions with various attributions on the web.1, 2, 3, 4. I’ve taken the liberty of combining what I judge to be the best of several versions and ironing out some of the problems with the meter.  With apologies to Ms. Davis, my version is below. (Rick DeNatale offers some footnotes explaining some of the arcane terminology to modern computer users.)

But that begs the question, is there a perfect program?  More generally, is anything perfect?  Setting aside issues of alleged spontaneous acceleration, is there a perfect car? I’d argue there is not. A smart car is not a good match for a large family going to school and soccer games and grandma’s house, but neither is a van a good choice for a solo commuter.  Similarly, software programs — while imperfect — may be perfectly suited to their intended task, making the imperfections irrelevant.

After hours every weekday, my computer gathers some data on my team’s work that day and e-mails me a report.  We designed and tested the program that does this reporting and it provides valuable information. However, on days when no one on the team does any work (such as holidays that fall during the week), the subject line of the e-mail is missing the date.  The report is also empty and there is no data to analyze, but I don’t care, I just delete those reports.  I could spend time fixing the report to include the date even if there is no other data or fixing the scheduling so it didn’t run on holidays, but better is the enemy of good enough and it is not worth the effort.

On the other hand, we recently discovered that the program failed to summarize some data so our reports were sometimes inaccurate.  With a reproducible case of an inaccurate report, we were quickly able to fix it and now have higher confidence that our reports going forward will be more accurate than in the past…though still “wrong” on holidays.

Let’s return to the misbehaving car.  Cars — like so many things these days — are full of programs.  If the software in the car audio system fails, perhaps you can’t turn on the radio or turn the volume down.  No big deal.  But if a program in the systems that control the motion of the vehicle fails, you might not be able to stop, start, or steer as you expect.  That’s a very big deal.  The analysis, design, and testing for the control systems must be held to a much higher standard than ancillary systems like entertainment.  MISRA has very strict standards for writing such code and a professional software engineer will follow such standards to ensure the quality of the code in critical systems.

There is no perfect program, but a professional software engineer applies an appropriate level of rigor to designing programs so that they suit their intended purpose and, where necessary, ensure public safety.


The Perfect Program

“No program’s that perfect,” they said with a shrug.
“The customer’s happy. What’s one little bug?”

But he was determined, as others went home,
to dig out the flowchart and go it alone.

The night became morning, the room became cluttered
with memory dumps, punch cards. “I’m close,” he muttered.

The mumbling got louder. “Simple deduction.”
“I’ve got it!” he cried. “Just change one instruction!”

Then change two, then three more, as day followed night.
There was a solution; he would get it right!

It still wasn’t perfect, as year followed year,
and strangers would comment, “Is that guy still here?”

He died at the console of hunger and thirst.
Next day he was buried, face down, nine edge first.

His wife, through her tears, accepted his fate,
Said “He’s not really gone; he’s just working late.”

And the last bug in sight, an ant passing by,
Saluted his tombstone and whispered, “Nice try.”

 

Leave a Reply