<?xml version="1.0" encoding="windows-1252"?>
<node id="78015" title="xphase_work" created="2001-05-04 16:28:05" updated="2004-01-04 06:12:09">
<type id="15">
user</type>
<author id="78015">
xphase_work</author>
<data>
<field name="doctext">
&lt;b&gt;Unless otherwise noted&lt;/b&gt;, all code authored by "xphase_work" on perlmonks.org is free software 
which you can redistribute and/or modify [http://www.cpan.org/misc/cpan-faq.html#How_is_Perl_licensed|under the same terms as Perl] itself. 
&lt;p&gt;
Everyone has different info on their home nodes, so I'm going
to devote mine to music and nasty legacy code.
&lt;p&gt;
Here is a list of CD's that are with me at work right now:
&lt;p&gt;
&lt;h2&gt;Current Music List:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The Apples in Stereo -- Tone Soul Evolution&lt;/li&gt;
&lt;li&gt;VA -- Gatecrasher: Global Sound System&lt;/li&gt;
&lt;li&gt;Tori Amos -- Professional Widow(single)&lt;/li&gt;
&lt;li&gt;Future Sound of London -- Lifeforms&lt;/li&gt;
&lt;li&gt;Morrissey -- Vauxhall and I&lt;/li&gt;
&lt;li&gt;VA -- Humate's Progression&lt;/li&gt;
&lt;li&gt;Pet Shop Boys -- Nightlife&lt;/li&gt;
&lt;li&gt;VA -- Trance Nation 2&lt;/li&gt;
&lt;li&gt;VA -- Logical Progression&lt;/li&gt;
&lt;/ul&gt;
&lt;em&gt;Note:&lt;/em&gt;  VA stands for various artists
&lt;p&gt;
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.&lt;p&gt;
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.
&lt;p&gt;
&lt;h2&gt;Worst Legacy Code of the Week:&lt;/h2&gt;
Varible names changed to protect the innocent.&lt;p&gt;
From a csh script:&lt;br&gt;
&lt;code&gt;
&lt;snipped.. due to legal and space issues&gt;
grep $ss ~$userid/this_path/has/been/changed &gt;&amp;! /dev/null
if ($status == 0) then
    goto next_part
endif

next_part:
&lt;/code&gt;
and, in the same file:
&lt;code&gt;
&lt;snipped.. due to legal and space issues&gt;
else
    goto finish
endif 
finish:                              
    endif
    end
endif
&lt;/code&gt;
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...&lt;p&gt;
Goodie, this is a gem from a perl script.  It's purpost is 
to prepare a command to run with system, enjoy:
&lt;code&gt;
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);
&lt;/code&gt;
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.&lt;p&gt;
Woo, another example from this script:
&lt;code&gt;
##########################################
# CHANGE SWITCHES FOR INTEGRATION THINGS
##########################################
###&amp;fix_switches(@int_things);
}
##########################################
# BUILD INTEGRATION THINGS
##########################################
&lt;/code&gt;
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 :-)
&lt;p&gt;
--xPhase
&lt;p&gt;&lt;p&gt;
&lt;DIV ALIGN="center"&gt;&lt;IMG SRC="http://www.pilpre.com/briac/cheesering2.gif"&gt; &lt;P&gt;&lt;SMALL&gt;&lt;TT&gt; [ &lt;A
HREF="http://www.pennine.com/cgi/cheesering.cgi?start=xphase_work&amp;go=previous"&gt;previous&lt;/A&gt; ] - [ &lt;A
HREF="http://www.pennine.com/cgi/cheesering.cgi?start=xphase_work&amp;go=next"&gt;next&lt;/A&gt; ] - [ &lt;A
HREF="http://www.pennine.com/cgi/cheesering.cgi?start=xphase_work&amp;go=random"&gt;random&lt;/A&gt; ] - [ &lt;A
HREF="http://www.pennine.com/cgi/cheesering.cgi?start=xphase_work&amp;go=list"&gt;list&lt;/A&gt; ] - [ &lt;A
HREF="http://www.pennine.com/cgi/cheesering.cgi?start=xphase_work&amp;go=next5"&gt;next5&lt;/A&gt; ] - [ &lt;A
HREF="http://www.pennine.com/cgi/cheesering.cgi?start=xphase_work&amp;go=prev5"&gt;prev5&lt;/A&gt; ] - [ &lt;A
HREF="http://www.pennine.com/cgi/cheesering.cgi?start=xphase_work&amp;go=first"&gt;first&lt;/A&gt; ] - [ &lt;A
HREF="http://www.pennine.com/cgi/cheesering.cgi?start=xphase_work&amp;go=last"&gt;last&lt;/A&gt; ]&lt;/TT&gt;&lt;/SMALL&gt;&lt;/P&gt; &lt;P&gt;&lt;SMALL&gt;don't
blame me for this idea, it's [ar0n]'s fault!&lt;/SMALL&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;!--location:latitude=40.50.17,longitude=-71.40.31--&gt;
&lt;!-- os:FreeBSD,BeOS,QNX,NeXT/OSX--&gt;
&lt;!-- birthday:1981/01/20 --&gt;</field>
<field name="lasttime">
2013-02-08 10:34:34</field>
<field name="experience">
694</field>
<field name="user_scratchpad">
363777</field>
<field name="imgsrc">
</field>
<field name="timeformat">
</field>
<field name="numwriteups">
55</field>
<field name="location">
Bedford, MA/Milford, NH</field>
<field name="timezone">
-4</field>
<field name="codewrapoff">
</field>
<field name="codewraplength">
</field>
<field name="codeautowrap">
</field>
<field name="codeprefix">
</field>
<field name="codebig">
</field>
</data>
</node>
