<?xml version="1.0"?>
<!-- RSS generated by Radio UserLand v8.0.8 on Sun, 02 Mar 2003 22:49:06 GMT -->
<rss version="2.0">
	<channel>
		<title>Tom Pierce: Misc Code</title>
		<link>http://radio.weblogs.com/0116883/categories/miscCode/</link>
		<description>Miscellaneous code that I write</description>
		<language>en</language>
		<copyright>Copyright 2003 Tom Pierce</copyright>
		<lastBuildDate>Sun, 02 Mar 2003 22:49:06 GMT</lastBuildDate>
		<docs>http://backend.userland.com/rss</docs>
		<generator>Radio UserLand v8.0.8</generator>
		<managingEditor>tpierce@navigatorsystems.com</managingEditor>
		<webMaster>tpierce@navigatorsystems.com</webMaster>
		<category domain="http://www.weblogs.com/rssUpdates/changes.xml">rssUpdates</category> 
		<skipHours>
			<hour>0</hour>
			<hour>1</hour>
			<hour>2</hour>
			<hour>3</hour>
			<hour>23</hour>
			<hour>4</hour>
			<hour>5</hour>
			<hour>21</hour>
			</skipHours>
		<cloud domain="radio.xmlstoragesystem.com" port="80" path="/RPC2" registerProcedure="xmlStorageSystem.rssPleaseNotify" protocol="xml-rpc"/>
		<ttl>60</ttl>
		<item>
			<link>http://radio.weblogs.com/0116883/categories/miscCode/2003/03/02.html#a326</link>
			<description>&lt;A href=&quot;http://lemonodor.com/archives/000347.html&quot;&gt;Lisp and XP Success&lt;/A&gt;. 
&lt;P&gt;Kenneth Dickey on a &lt;A href=&quot;http://home.earthlink.net/~kend0/ExtremeSuccess.html&quot;&gt;successful software project&lt;/A&gt; [via &lt;A href=&quot;http://www.cliki.net/success%20stories&quot;&gt;CLiki&lt;/A&gt;]: &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Imagine this. You need to build a complex, highly reliable software product that works at high speed on multiple networked server platforms and integrates with many kinds of server environments and databases. You have a working prototype but no production code and want product install CD-ROMs in under a year. The product is not totally defined, but you know that your business will change and you will have to feature evolve very fast in a highly competitive market. You are selling to Fortune 1000 companies, which demand 24/7 reliability. &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;And they did it in lisp. &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;This was the best code quality and the lowest development cost I have seen in 20 years of commercial software development. &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Well, alright! &lt;/P&gt;
&lt;P&gt;[&lt;A href=&quot;http://lemonodor.com/&quot;&gt;lemonodor&lt;/A&gt;]&lt;/P&gt;
&lt;P&gt;This is a great story and well worth the read if you are interested in eXtreme Programming, Lisp, or neither.&amp;nbsp; It&apos;s just good to read about a well run project enjoying a huge success and how they pulled it off.&lt;/P&gt;</description>
			<guid>http://radio.weblogs.com/0116883/categories/miscCode/2003/03/02.html#a326</guid>
			<pubDate>Sun, 02 Mar 2003 22:48:29 GMT</pubDate>
			<source url="http://lemonodor.com/rss10-full.xml">lemonodor</source>
			</item>
		<item>
			<title>How not to name your source files</title>
			<link>http://radio.weblogs.com/0116883/categories/miscCode/2003/02/24.html#a302</link>
			<description>&lt;P&gt;Ever wonder what an extremely bad naming convention for your source files (.java, .jsp, etc.) would be?&amp;nbsp; Well here&apos;s one.&amp;nbsp; Name them after the use case (or step of the use case) whose functionality that the source is designed to represent.&amp;nbsp; (ex.&amp;nbsp; UC10_02.java)&amp;nbsp; You might think it&apos;s clever or it might save you from having to be clever with naming your files, but it&apos;s a bad idea.&lt;/P&gt;
&lt;P&gt;Why is this so bad?&amp;nbsp; Well, just imagine the maintenance nightmare that you are creating.&amp;nbsp; In this scenario the names of the source files do not give the code maintainer a hint about what they do without the list of use cases.&amp;nbsp; So, there can be no educated guessing as to where the problem the maintainer is trying to fix might be lurking.&amp;nbsp; She will have to cross-reference the list of use cases with the file names to try to figure out what every source file is doing.&amp;nbsp; BAD!&amp;nbsp; Imagine having to do that yourself.&lt;/P&gt;
&lt;P&gt;A second reason this is bad is because it implies that every file only incorporates functionality from a single use case.&amp;nbsp; I&apos;m sure I&apos;m getting ready to tread on someone&apos;s holy ground here, but I think this is BAD!&amp;nbsp; It is not uncommon for more than one&amp;nbsp;use case to be represented in a single class.&amp;nbsp; Consider the use cases of &quot;log in&quot; and &quot;log out&quot;.&amp;nbsp; I believe that the functionality in both of those use cases could be represented in a single servlet and that it may make sense to.&lt;/P&gt;
&lt;P&gt;I have actually witnessed an application that has followed the naming convention above.&amp;nbsp; I cringe when I think of having to maintain it.&amp;nbsp; Fortunately I don&apos;t have to.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this still sounds like a good idea to you, please see &lt;A href=&quot;http://mindprod.com/unmain.html&quot;&gt;How to Write Unmaintainable Code&lt;/A&gt;.&amp;nbsp; Roedy Green has compiled several&amp;nbsp;tips that you can follow to further obfuscate your source code.&lt;/P&gt;</description>
			<guid>http://radio.weblogs.com/0116883/categories/miscCode/2003/02/24.html#a302</guid>
			<pubDate>Mon, 24 Feb 2003 23:48:38 GMT</pubDate>
			</item>
		<item>
			<link>http://radio.weblogs.com/0116883/categories/miscCode/2003/01/16.html#a168</link>
			<description>A colleague of mine just sent me a link to a great article called &lt;A href=&quot;http://www.boxesandarrows.com/archives/printing_the_web.php&quot;&gt;Printing the Web&lt;/A&gt;.&amp;nbsp; It offers good arugments for making printer-friendly views of your web pages, and presents suggestions for presentation.</description>
			<guid>http://radio.weblogs.com/0116883/categories/miscCode/2003/01/16.html#a168</guid>
			<pubDate>Thu, 16 Jan 2003 19:24:10 GMT</pubDate>
			</item>
		<item>
			<title>Bash Script: md5dir.sh</title>
			<link>http://radio.weblogs.com/0116883/categories/miscCode/2003/01/06.html#a86</link>
			<description>&lt;P&gt;Here&apos;s a bash script that I wrote to calculate the MD5 hash of all files in the specified directory and below.&amp;nbsp; It&apos;s quick and dirty, but I&apos;ve found it useful to compare files in 2 directories to see if anything has changed.&amp;nbsp; I can pipe the results out to a file for each directory and then diff them.&amp;nbsp; OR, even better, you can compare them with md5sum itself by:&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;cd &amp;lt;dir-to-compare&amp;gt;&lt;BR&gt;md5sum -c &amp;lt;file-contatining-sums&amp;gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;Here&apos;s the script:&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;#!/bin/bash&lt;BR&gt;# Script that calculates an MD5 hash for each file in the specified directory&lt;BR&gt;# and all directories below that.&lt;BR&gt;#&lt;BR&gt;# Author: Tom Pierce&lt;BR&gt;# Date: 10/31/02&lt;BR&gt;&lt;BR&gt;export IFS=$&apos;t\n&apos;&lt;BR&gt;&lt;BR&gt;# a quick check to see if any files were given&lt;BR&gt;# if none then its better not to do anything than rename some non-existent&lt;BR&gt;# files!!&lt;BR&gt;if [ &quot;$1&quot; == &quot;&quot; ]&lt;BR&gt;then&lt;BR&gt;echo &quot;Usage: md5dir &lt;DIRECTORY&gt;&quot;&lt;BR&gt;exit 0&lt;BR&gt;fi&lt;BR&gt;&lt;BR&gt;# For each file in the specified directory, get the md5&lt;BR&gt;for file in $(find $1 -type f)&lt;BR&gt;do&lt;BR&gt;md5sum &quot;$file&quot;&lt;BR&gt;done&lt;BR&gt;&lt;/CODE&gt;&lt;/P&gt;</description>
			<guid>http://radio.weblogs.com/0116883/categories/miscCode/2003/01/06.html#a86</guid>
			<pubDate>Mon, 06 Jan 2003 16:34:31 GMT</pubDate>
			</item>
		</channel>
	</rss>

