<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sean Gates' Blog &#187; Python</title>
	<atom:link href="http://www.seangates.com/category/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.seangates.com</link>
	<description>By the looks of it {he thinks} he knows what he's doing.</description>
	<lastBuildDate>Sat, 10 Jul 2010 21:22:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Unmaintainable code = job security?</title>
		<link>http://www.seangates.com/2007/03/23/unmaintainable-code-job-security/</link>
		<comments>http://www.seangates.com/2007/03/23/unmaintainable-code-job-security/#comments</comments>
		<pubDate>Fri, 23 Mar 2007 18:22:56 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.seangates.com/?p=35</guid>
		<description><![CDATA[I don&#8217;t know about how everyone out there deals with maintaining code that a former person in your position created, but I feel like I could scream! I am currently working in a Python script that someone who used to work in my job position wrote, and they were able to write some very unmaintainable [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know about how everyone out there deals with maintaining code that a former person in your position created, but I feel like I could scream!  I am currently working in a Python script that someone who used to work in my job position wrote, and they were able to write some very unmaintainable code, IMHO.</p>
<p>My only guess for this type of coding is for job security.  The following are some of the traits of his code:</p>
<ol>
<li>Many similar variable names such as:<br />
XML_page_1a<br />
XML_page_1b<br />
XML_page_5<br />
XML_page_5c<br />
sql10<br />
sql15<br />
sql21</li>
<li>A &#8220;try&#8221; statement for each line of code</li>
<li>Creating queries with include variables such as:<br />
sql13 = &#8220;INSERT INTO %s(id,name,address,zip,telephone,email,is_married,is_driver,in_office,%s,col%i)<br />
VALUES (%i,&#8217;%s&#8217;,'%s&#8217;,'%s&#8217;,'%s&#8217;,'%s&#8217;,%i,%i,%i)&#8221; (table,varCol,colID,id,name,address,zip,telephone,email,is_married,is_driver,in_office)</li>
<li>Using mixed cased variables interchangeably:<br />
BASE<br />
rel_base<br />
source<br />
sourceFile<br />
source_file<br />
sourceDir<br />
source_dir<br />
proj_txt<br />
VPROJS</li>
<li>Overusing an improperly scoping a temporary variable: tmp.</li>
<li>Creating a file with 2600+ lines of code that could be wittled down to a couple hundred</li>
</ol>
<p>To correctly copy this type of programming, you need to be highly skilled.Ã‚Â  I remember <a href="http://www.freevbcode.com/ShowCode.Asp?ID=2547">reading an article</a> about it and I was very impressed at the detail and training it takes to do such programming.Ã‚Â  I think it may be in my best interest, and the interest of my family, to adopt these methods to continuously have a job.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seangates.com/2007/03/23/unmaintainable-code-job-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
