Slashdot Mirror


User: kclark@ctron.com

kclark@ctron.com's activity in the archive.

Stories
0
Comments
1
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1

  1. 100K on American Programmers are Slackers · · Score: 1

    Disbelieve this story at your own risk.

    One day a co-worker of mine came to me with an emergency. There were only two days left before the code freeze on the product that he was
    working on, and he hadn't yet gotten one large part of his project done.

    Basically, his product consisted of a UI and a database, and when the customer bought the program the database would already be filled with
    lots of useful entries. My co-worker had the UI part of his program done, and all of the hooks into the database were complete, but the
    database was empty.

    There were two ways in which he could populate the database. One was to use his program to add entries one at a time, and the other was to
    populate the database via a C++ API. The former method was totally out of the question, since this would have taken *decades* to accomplish. The latter method was complicated by the fact that the
    C++ API was somewhat convoluted, and even if this method was used a *lot* of code would need to be written. And my co-worker had less than two days to get this database populated.

    So my co-worker came to me and asked for help. He explained to me that this was an emergency, so I started hacking....

    I hacked, and I hacked, and I hacked...

    In around 6 hours I cobbled together a compiler (written in Perl) that converted the raw data that we had into the C++ code that would populate the database. I ran this compiler on the data and ended up with around 100 files consisting of ~375,000 lines of code.

    (interesting point: some of the functions in my generated code were ~8000 lines long -- all of the Unix C++ compilers that I had to compile this code with handled this code just fine, but Microsoft's
    VC++ blew up spectacularly and I had to spend almost another 4 hours restructuring the code so that the braindead VC++ compiler could
    handle the code)


    Do I deserve credit for the 375,000 lines of code? Well, that's debatable. Certainly there's going to be somebody out there who will claim that I only deserve credit for the code that comprised the compiler. However, I do have to point out that I started out in the morning with not-very-much at all (just some rudimentary tools that I had written) and by the end of the day I had 375000 lines of code. Sure, I cheated, but whoever said that cheating was wrong in this
    situation?

    I'm, err, a very *creative* person and I do this sort of thing kindof often...

    I never could have done any of this without the tools that I was using that day: a Unix box, Emacs, and most especially Perl, whose
    regular-expression features I beat to death that day.

    Just another Perl and compiler hacker,

    --kevin (kclark@cabletron.com)