At last night's Toronto Perl Monger's meeting, Richard Dice talked about a gee-whiz piece of code that he cooked up using the three modules CGI::Application, Class::DBI and HTML::Template. But the reason for today's meditation is about something he mentioned during the presentation: his (somewhat irrational) pride at the code he'd written, to which he referred as Stupid Emotional Programmer Attachment.

As soon as he uttered those words, I understood what he was talking about .. when we as software developers rise above the mundane and create something really brilliant, don't we get attached to it?

My examples are not all Perl, but they include

  • A piece of C code that maneouvered robotic arms around so they didn't crash into each other. Because of the geometry involved, they had to swap roles (and I had to reverse the voltage) for some configurations. So amazing to watch the arms move.
  • A piece of C code that was the communications subsystem for a Point of Sale system: it ran under both DOS (as a Terminate and Stay Resident program) and PC-MOS (as a seperate task), and handled transactions either via 3201 (poll select) or dial modem, all from a single binary. A state machine, arrays of function pointers, object orientation, the works. Beautiful.
  • One of my first Perl scripts that translated memory model information into chunks of SQL, complete with checks that the foreign keys format matched the original table index, and checks that tables were declared only after the tables they referred to had been declared. Very, very cool.
Anyone else have favourite bits of code of which they're inordinately proud?

--t. alex
Life is short: get busy!

In reply to Stupid Emotional Programmer Attachment, anyone? by talexb

Title:
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, details, 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, summary, 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.