🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.folklore.computers
Article #4211

Stupid programming errors.

#4211
From: Gordon Edwards
Date: Fri, 17 Aug 1990 20:17
25 lines
1870 bytes
In light of the stupid user discussion, how about a discussion of stupid and
embarrassing programming errors.

A number of years ago, I was working my way through school at a small company
who performed physical inventories.  I was responsible for programming and any
other computer related work (having a DP staff of me).

I wrote an application for a particular client who wanted to download a list
of product identifiers so that data from the inventory could be validated.  I
received a test tape of these product IDs and proceeded to develop a sexy 
recursive function to insert the IDs into a linear list.  Everything
worked fine
on the test data.  I had a habit of showing up at the first inventory that was
using a new system, and so when the crew leader started up the application, and
it promptly blew up, I was there to fix it.  I looked at the error message and
found the dreaded "Stack overflow"; the test tape only had a SAMPLE of the real
data (about 1%) and the recursing had filled up the stack with function calls.
I quickly wrote a safe iterative function to build the list while the crew-
leader kept the store manager busy.

Needless to say, I never write production code with recursive functions 
anymore.

--
Gordon Edwards                                    Mead Data Central, Dayton OH
Technical Details
Message-ID: <1172@meaddata.mead.UUCP>
Path: mbox-mo1.pugleaf.net!gmdzi!unido!mcsun!uunet!samsung!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!uccba!mead!gordon

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!gmdzi!unido!mcsun!uunet!samsung!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!uccba!mead!gordon
From: gordon@mead.UUCP (Gordon Edwards)
Newsgroups: alt.folklore.computers
Subject: Stupid programming errors.
Message-ID: <1172@meaddata.mead.UUCP>
Date: 17 Aug 90 20:17:01 GMT
Sender: usenet@mead.UUCP
Reply-To: mead!gor...@uccba.uc.edu
Organization: Mead Data Central, Dayton OH
Lines: 25
Posted: Fri Aug 17 21:17:01 1990
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit