Ive been working on processing a particularly nasty log file. It's mainly due to the server logging things as soon as the events occur as opposed to at the end of a transaction. My previous attempt with an older rev of the software produced a 1200 line beast to process just that one file accurately. I still have auxillary functions, which are usefull and accurate, but the main functions need a total rewrite.
So now the codes been updated for the server, and its time to update the processing code.... and here I still am. Mainly due to the formating of the log, and the sheer size of it, I've hit stumbling blocks and slowly working back through them, but the log is definately winning the battle..
What do you do when you realize you've written unmaintainable code? I mean I take pride in the code I write, and it comes as a fairly substantial blow to my confidance. Its caused me took look over other lengthier code I've written, and that still looks clean/extendable.
I guess I'm looking for (support|war stories) from other perl junkies who've been where I'm at now.
print "Sorry\n" if ($post =~ /wrong forum/o);
/* And the Creator, against his better judgement, wrote man.c
*/
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.