|
Unless otherwise noted, all code authored by "xphase_work" on perlmonks.org is free software which you can redistribute and/or modify under the same terms as Perl itself.
Everyone has different info on their home nodes, so I'm going to devote mine to music and nasty legacy code.
Here is a list of CD's that are with me at work right now:
Current Music List:
- The Apples in Stereo -- Tone Soul Evolution
- VA -- Gatecrasher: Global Sound System
- Tori Amos -- Professional Widow(single)
- Future Sound of London -- Lifeforms
- Morrissey -- Vauxhall and I
- VA -- Humate's Progression
- Pet Shop Boys -- Nightlife
- VA -- Trance Nation 2
- VA -- Logical Progression
I work at a large DoD contractor, writing perl scripts that modify Ada95 code. Modifying comments, processing SLOC counts, and working with the world's worst IDE: Rational Apex.
Rational Apex is an Ada IDE with a compiler, editor, and CMVC system. It is a horrible program, but I deal with it. I also maintain legacy perl and shell scripts.
Worst Legacy Code of the Week:
Varible names changed to protect the innocent.
From a csh script:
and, in the same file:<snipped.. due to legal and space issues> grep $ss ~$userid/this_path/has/been/changed >&! /dev/null if ($status == 0) then goto next_part endif next_part:
Both of the goto statements are the last case in if statements where, if the code reached that statement, the goto is redundant, as the code would behave that way anyway. Hrm...<snipped.. due to legal and space issues> else goto finish endif finish: endif end endif
Goodie, this is a gem from a perl script. It's purpost is to prepare a command to run with system, enjoy:
I added the numbers to prove a point. Line number 2 is used at least 5 times in similar statements, and lines 3,4, and 5 are also used in the same grouping. If this were me I would set line 1 as a var, lines 3 .. 5 as a var, then either run both vars through system(), or set a third var to equal the other 2, but that's me.1.@update_things_cmd = qw( 2. /prog/dir/arch/bin/accept_changes 3. -expand_configurations 4. -identical 5. -source); 6.$update_things_cmd = join($",@update_views_cmd);
Woo, another example from this script:
Notice that little closing brace there inbetween all the comments? What does he close? An if statement over 100 lines earlier. None of the code after the if statement is indented, and the closing brace is hidden inbetween two comments unrelated to the if statement. Fun :-)########################################## # CHANGE SWITCHES FOR INTEGRATION THINGS ########################################## ###&fix_switches(@int_things); } ########################################## # BUILD INTEGRATION THINGS ##########################################
--xPhase
<A HREF="http://www.pennine.com/cgi/cheesering.cgi?start=xphase_work&go=previous">previous</A> - <A HREF="http://www.pennine.com/cgi/cheesering.cgi?start=xphase_work&go=next">next</A> - <A HREF="http://www.pennine.com/cgi/cheesering.cgi?start=xphase_work&go=random">random</A> - <A HREF="http://www.pennine.com/cgi/cheesering.cgi?start=xphase_work&go=list">list</A> - <A HREF="http://www.pennine.com/cgi/cheesering.cgi?start=xphase_work&go=next5">next5</A> - <A HREF="http://www.pennine.com/cgi/cheesering.cgi?start=xphase_work&go=prev5">prev5</A> - <A HREF="http://www.pennine.com/cgi/cheesering.cgi?start=xphase_work&go=first">first</A> - <A HREF="http://www.pennine.com/cgi/cheesering.cgi?start=xphase_work&go=last">last</A>
don't blame me for this idea, it's ar0n's fault!