Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??


I've seen more spaghetti code in my lifetime than I'd care to admit to. Mostly out of embarrasment for the authors who left it behind for me to find and in a couple of cases (I'll confess) out of embarrasment for finding some that I wrote years after I wrote it.

The obligatory anecdotes

One fellow, whose name will not be mentioned to protect a friend, whom I owe a great debt of gratitude for pushing me in the right direction when I was a newbie to the world of *nix and helped learn when I was starting in that brave new world, also bequeathed to me a project that he was working on that was a prime example of spaghetti code at its best.

He wrote this wonderful application that consisted of Pascal code that called shell scripts (!) that were strung together via pipes invoking a mix of C language programs and Fortran programs with some bc thrown in for good measure. Some munging of text was also done by awk in between and a wide assortment of temporary files littering the disc, some of which were never cleaned up after.

Did I mention I was a newbie at this point in my career?</p.

After he left the company that he and I worked at together, "Luke", our boss at the time (well, mine now, not his) walked into my cubicle and announced to me that I now had to work on the project my mentor left behind.

From those humble beginnings I went from barely being able to compile a "hello world" C program on Unix (HPUX 1.0 if you want to know) to now learning the myriad world of programming in a Unix environment including sorting out the several dozen make files that made up this wonderful project and figuring on what pieces to keep and what to re-write. It was one hell of a learning experience

Fast forward a bunch of years and I am an adjunct professor at a college in NYC. I give out programming assignments to my students and some of the results I get back are nice clean code and others, you guessed it, resemble a plate of pasta.

It must be noted that I did notice a correlation between the students who wrote nice crisp code and had wonderfully organized notes and took an organized approach to problem solving and those who wrote spaghetti code and were more random in their general style of doing things.

Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

In reply to Re: Spaghetti code... by blue_cowdawg
in thread Spaghetti code... by davido

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others pondering the Monastery: (7)
    As of 2020-09-29 07:34 GMT
    Find Nodes?
      Voting Booth?
      If at first I donít succeed, I Ö

      Results (146 votes). Check out past polls.