Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

xphase_work

by xphase_work (Pilgrim)
on May 04, 2001 at 20:28 UTC ( [id://78015]=user: print w/replies, xml ) Need Help??

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
Note: VA stands for various artists

I work at a large DoD contractor, writing perl s‎crip‎ts 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 s‎crip‎ts.

Worst Legacy Code of the Week:

Varible names changed to protect the innocent.

From a csh s‎crip‎t:

<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:
and, in the same file:
<snipped.. due to legal and space issues> else goto finish endif finish: endif end endif
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...

Goodie, this is a gem from a perl s‎crip‎t. It's purpost is to prepare a command to run with system, enjoy:

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);
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.

Woo, another example from this s‎crip‎t:

########################################## # CHANGE SWITCHES FOR INTEGRATION THINGS ########################################## ###&fix_switches(@int_things); } ########################################## # BUILD INTEGRATION THINGS ##########################################
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 :-)

--xPhase

<IMG SRC="http://www.pilpre.com/briac/cheesering2.gif">

<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!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-12-13 23:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which IDE have you been most impressed by?













    Results (70 votes). Check out past polls.