<?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>42</title>
	<atom:link href="http://www.riaancornelius.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.riaancornelius.com</link>
	<description>The meaning of my universe</description>
	<lastBuildDate>Mon, 02 Aug 2010 17:59:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom:link rel='hub' href='http://www.riaancornelius.com/?pushpress=hub'/>
		<item>
		<title>Our midweek trip to Granada, Nicaragua (Photos)</title>
		<link>http://www.riaancornelius.com/travel/our-midweek-trip-to-granada-nicaragua-photos/</link>
		<comments>http://www.riaancornelius.com/travel/our-midweek-trip-to-granada-nicaragua-photos/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 16:50:15 +0000</pubDate>
		<dc:creator>Riaan</dc:creator>
				<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://www.riaancornelius.com/travel/our-midweek-trip-to-granada-nicaragua-photos/</guid>
		<description><![CDATA[The first thing you notice (Ok, other than the lake) is all the churches and cathedrals. Some looking like new (This first one is over 100 years old), And then there are some churches that look a lot older.








There are over 300 of these little islands, most owned by a rich people who built a [...]]]></description>
			<content:encoded><![CDATA[<div><span class="drop">T</span>he first thing you notice (Ok, other than the lake) is all the churches and cathedrals. Some looking like new (This first one is over 100 years old), And then there are some churches that look a lot older.</p>
<p><a href="http://posterous.com/getfile/files.posterous.com/temp-2010-07-26/niufjehupEDAHqhgnkoygzqsDliqhrqHuEiCCGiICBfcqfzlrrABdkksBJyk/From_Phone_272.png.scaled1000.png"><img class="alignnone" src="http://posterous.com/getfile/files.posterous.com/temp-2010-07-26/niufjehupEDAHqhgnkoygzqsDliqhrqHuEiCCGiICBfcqfzlrrABdkksBJyk/From_Phone_272.png.scaled500.png" alt="" width="500" height="375" /></a></p>
</div>
<div>
<p><a href="http://posterous.com/getfile/files.posterous.com/temp-2010-07-26/DuhGFjuAFyaupEEexvEIiGhrJjfHdCcDgJthFJvFjkjkbawfCaJGChqccJGe/From_Phone_273.png.scaled1000.png"><img class="alignnone" src="http://posterous.com/getfile/files.posterous.com/temp-2010-07-26/DuhGFjuAFyaupEEexvEIiGhrJjfHdCcDgJthFJvFjkjkbawfCaJGChqccJGe/From_Phone_273.png.scaled500.png" alt="" width="500" height="374" /></a></p>
</div>
<div>
<p><a href="http://posterous.com/getfile/files.posterous.com/temp-2010-07-26/kvbupGkDGsBCnuJboJCmqocDoobkJtuqcBownAheCAhcgiDcyiqzekoHpbcJ/From_Phone_279.png.scaled1000.png"><img class="alignnone" src="http://posterous.com/getfile/files.posterous.com/temp-2010-07-26/kvbupGkDGsBCnuJboJCmqocDoobkJtuqcBownAheCAhcgiDcyiqzekoHpbcJ/From_Phone_279.png.scaled500.png" alt="" width="500" height="374" /></a></p>
</div>
<div>There are over 300 of these little islands, most owned by a rich people who built a house or restaurant on it. The island with the monkeys was one of the few exceptions I saw.</p>
<p><a href="http://posterous.com/getfile/files.posterous.com/temp-2010-07-26/zmnkosxdrwkFqhCkIGtmibzmttuobBJIsAmJBmGrrEiwAsshbGrrAdhqfunj/From_Phone_285.png.scaled1000.png"><img class="alignnone" src="http://posterous.com/getfile/files.posterous.com/temp-2010-07-26/zmnkosxdrwkFqhCkIGtmibzmttuobBJIsAmJBmGrrEiwAsshbGrrAdhqfunj/From_Phone_285.png.scaled500.png" alt="" width="500" height="279" /></a></p>
</div>
<div>
<p><a href="http://posterous.com/getfile/files.posterous.com/temp-2010-07-26/qCzlAkfyuDJEiDgjgksCdnaEvaAbpxyhsnjIobAEqzjbHyeojobwwglBJqhy/From_Phone_283.png.scaled1000.png"><img class="alignnone" src="http://posterous.com/getfile/files.posterous.com/temp-2010-07-26/qCzlAkfyuDJEiDgjgksCdnaEvaAbpxyhsnjIobAEqzjbHyeojobwwglBJqhy/From_Phone_283.png.scaled500.png" alt="" width="500" height="375" /></a></p>
</div>
<div>
<p><a href="http://posterous.com/getfile/files.posterous.com/temp-2010-07-26/xdpuqdihHHJwCpbFpsqrknuhwocuJlomAiqmeruptyGJkBvoDjxCjwoCCtbz/From_Phone_286.png.scaled1000.png"><img class="alignnone" src="http://posterous.com/getfile/files.posterous.com/temp-2010-07-26/xdpuqdihHHJwCpbFpsqrknuhwocuJlomAiqmeruptyGJkBvoDjxCjwoCCtbz/From_Phone_286.png.scaled500.png" alt="" width="500" height="375" /></a></p>
</div>
<div>
<p><a href="http://posterous.com/getfile/files.posterous.com/temp-2010-07-26/jntgpBhixtyDjnorhaDgnvfeFfdyyfHEFkBEdbswntDnpyvJubvnbImxmDdj/From_Phone_289.png.scaled1000.png"><img class="alignnone" src="http://posterous.com/getfile/files.posterous.com/temp-2010-07-26/jntgpBhixtyDjnorhaDgnvfeFfdyyfHEFkBEdbswntDnpyvJubvnbImxmDdj/From_Phone_289.png.scaled500.png" alt="" width="500" height="374" /></a></p>
</div>
<div>
<p><a href="http://posterous.com/getfile/files.posterous.com/temp-2010-07-26/tgyGejxeoCrjkhCFDfBpdCyJCiIFGJqCBeDzhCcnGyiatbfmnoBkahGnmCcH/From_Phone_290.png.scaled1000.png"><img class="alignnone" src="http://posterous.com/getfile/files.posterous.com/temp-2010-07-26/tgyGejxeoCrjkhCFDfBpdCyJCiIFGJqCBeDzhCcnGyiatbfmnoBkahGnmCcH/From_Phone_290.png.scaled500.png" alt="" width="500" height="375" /></a></p>
</div>
<div><a href="http://posterous.com/getfile/files.posterous.com/temp-2010-07-26/HikblvxgbInFAIGmlImJErtjgfngbzeqnpImtoiktbaenkFIffmxkmfmdpHA/From_Phone_294.png.scaled1000.png"><img class="alignnone" src="http://posterous.com/getfile/files.posterous.com/temp-2010-07-26/HikblvxgbInFAIGmlImJErtjgfngbzeqnpImtoiktbaenkFIffmxkmfmdpHA/From_Phone_294.png.scaled500.png" alt="" width="500" height="375" /></a><br />
Volcano Mombachu (In the last picture) Is apparently quite active and always smoking and spitting.</div>
<div></div>
<div><a href="http://riaancornelius.posterous.com/our-midweek-trip-to-granada-nicaragua-photos">See and download the full gallery on posterous</a></div>
<p style="font-size: 10px;"><a href="http://posterous.com">Posted via email</a> from <a href="http://riaancornelius.posterous.com/our-midweek-trip-to-granada-nicaragua-photos">riaancornelius&#8217;s posterous</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.riaancornelius.com/travel/our-midweek-trip-to-granada-nicaragua-photos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding commented out code</title>
		<link>http://www.riaancornelius.com/software-development/finding-commented-out-code/</link>
		<comments>http://www.riaancornelius.com/software-development/finding-commented-out-code/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 20:46:20 +0000</pubDate>
		<dc:creator>Riaan</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Bad Code]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.riaancornelius.com/misc/finding-commented-out-code/</guid>
		<description><![CDATA[To find commented out code, the key is to remember that commented out code will usually contain semicolons.

If you keep that in mind, it is quite simple to come up with regular expressions to search for commented out code.]]></description>
			<content:encoded><![CDATA[<p><span class="drop">T</span>o find commented out code, the key is to remember that commented out code will usually contain semicolons.</p>
<p>If you keep that in mind, it is quite simple to come up with regular expressions to search for commented out code.</p>
<p>For single line comments:<br />
(?s://[^/]+;)</p>
<p>and for multiple line comments:<br />
(?s:/\*[^/]+;)</p>
<p>These regular expressions won&#8217;t necessarily find every line of commented out code, but they should find every block.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.riaancornelius.com/software-development/finding-commented-out-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redirecting the System.out and System.err streams to a Logger</title>
		<link>http://www.riaancornelius.com/software-development/java/redirecting-the-system-out-and-system-err-streams-to-a-logger/</link>
		<comments>http://www.riaancornelius.com/software-development/java/redirecting-the-system-out-and-system-err-streams-to-a-logger/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 20:30:34 +0000</pubDate>
		<dc:creator>Riaan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Bad Code]]></category>
		<category><![CDATA[Good Code]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.riaancornelius.com/?p=305</guid>
		<description><![CDATA[I'm working on a project where no logging was done, but a lot of information is printed out to System.out and System.err (Most exceptions print out their stack traces as well).

While this is not ideal, it is much better than nothing, and this is why: You can redirect the standard output streams to any java.io.OutputStream.]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } --></p>
<p style="margin-bottom: 0cm;"><span class="drop">I</span>&#8217;m working on a project where no logging was done, but a lot of information is printed out to System.out and System.err (Most exceptions print out their stack traces as well).</p>
<p style="margin-bottom: 0cm;">While this is not ideal, it is much better than nothing, and this is why: You can redirect the standard output streams to any java.io.OutputStream.</p>
<p style="margin-bottom: 0cm;">I found the following code in “Covert Java &#8211; Techniques For Decompiling, Patching, And Reverse Engineering” by Alex Kalinovsky. I would suggest that anybody serious about Java read this book.</p>
<pre class="brush: java;">
import java.io.IOException;
import java.io.PrintStream;
import java.util.logging.Logger;

public class LogOutputStream extends java.io.OutputStream {

    static Logger logger = Logger.getLogger(LogOutputStream.class.getName());
    private char lineSeparatorEnd = '\n';
    private String lineSeparator = System.getProperty(&quot;line.separator&quot;);
    private StringBuffer buffer = new StringBuffer();

    public void write(int b) throws IOException {
        char ch = (char) b;
        this.buffer.append(ch);
        if (ch == this.lineSeparatorEnd) {
            // Check on a char by char basis for speed
            String s = buffer.toString();
            if (s.indexOf(lineSeparator) != -1) {
                // The whole separator string is written
                logger.info(s.substring(0, s.length() - lineSeparator.length()));
                buffer.setLength(0);
            }
        }
    }

    public static void main(String[] args) {
        System.out.println(&quot;Installing the interceptor...&quot;);
        PrintStream out = new PrintStream(new LogOutputStream(), true);
        System.setOut(out);
        System.out.println(&quot;Hello, world&quot;);
        System.out.println(&quot;Done&quot;);
    }
}
</pre>
<p style="margin-bottom: 0cm;">The code is fairly standard. You extend OutputStream and implement the write(int) method. You define a static Logger to log the messages and then you can see that the System.out messages are logged as INFO-level messages by the Logger (Line 20).</p>
<p style="margin-bottom: 0cm;">The rest of the code in the write method is all just to detect line separators. Essentially it is somewhat more complicated than it could be for performance reasons.</p>
<p style="margin-bottom: 0cm;">Because the line separator is different on Unix and Windows system, the only way to get cross-platform code is to use the &#8220;line.separator&#8221; System property. But this property is a string, and substring searches are slower than character comparisons (Especially since you are already looping through characters in any case).</p>
<p style="margin-bottom: 0cm;">So, the  lineSeparatorEnd char is used to detect probable line-separators and then a substring search is used (with the actual line-separator) to confirm it and to print out the contents of the buffer.</p>
<p style="margin-bottom: 0cm;">The main method shows how you would redirect the System.out stream (Line 29). In my project, I also do a different OutputStream for System.err that logs errors.</p>
<p style="margin-bottom: 0cm;">You can see in this example, I use the built in Logger, but this is much more useful if you use Log4j and configure a file appender to log everything to file.</p>
<p style="margin-bottom: 0cm;">While this is not ideal, if you have to support existing code where debugging information or exception stack traces are printed out to the console, this is a good way to get some logging into your application without much effort.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.riaancornelius.com/software-development/java/redirecting-the-system-out-and-system-err-streams-to-a-logger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why would anybody want to live in the city?</title>
		<link>http://www.riaancornelius.com/misc/why-would-anybody-want-to-live-in-the-city/</link>
		<comments>http://www.riaancornelius.com/misc/why-would-anybody-want-to-live-in-the-city/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 22:56:43 +0000</pubDate>
		<dc:creator>Riaan</dc:creator>
				<category><![CDATA[Random Rantings]]></category>

		<guid isPermaLink="false">http://www.riaancornelius.com/misc/why-would-anybody-want-to-live-in-the-city/</guid>
		<description><![CDATA[
This is the view from my patio today. The house hidden behind the trees behind the horses is pretty much our only neighbour that we can see. The other 3 sides has fields and trees to look at. The second is the view of my patio. Butterflies, dragonflies and frogs love the ground cover with all it&#8217;s little yellow flowers.


Posted [...]]]></description>
			<content:encoded><![CDATA[<div class="posterous_autopost">
<p><span class="drop">T</span>his is the view from my patio today. The house hidden behind the trees behind the horses is pretty much our only neighbour that we can see. The other 3 sides has fields and trees to look at. The second is the view of my patio. Butterflies, dragonflies and frogs love the ground cover with all it&#8217;s little yellow flowers.</p>
<p><a href="http://posterous.com/getfile/files.posterous.com/temp-2010-06-25/ggiaimewEjmjkGFJmboawfcJDcojvAAljIDJDgtencoCfjplqDCHeeEnezan/View_from_my_patio.jpg.scaled1000.jpg"><img class="alignnone" src="http://posterous.com/getfile/files.posterous.com/temp-2010-06-25/ggiaimewEjmjkGFJmboawfcJDcojvAAljIDJDgtencoCfjplqDCHeeEnezan/View_from_my_patio.jpg.scaled500.jpg" alt="" width="400" height="300" /></a></p>
<p><a href="http://posterous.com/getfile/files.posterous.com/temp-2010-06-25/nAAfheHujqlsIepmrahFCyDFtEIBreaDGikjtrgqntCfzAFBeHutbtxltigo/View_of_my_patio.jpg.scaled1000.jpg"><img src="http://posterous.com/getfile/files.posterous.com/temp-2010-06-25/nAAfheHujqlsIepmrahFCyDFtEIBreaDGikjtrgqntCfzAFBeHutbtxltigo/View_of_my_patio.jpg.scaled500.jpg" alt="" width="400" height="300" /></a></p>
<p style="font-size: 10px;"><a href="http://posterous.com">Posted via email</a> from <a href="http://riaancornelius.posterous.com/why-would-anybody-want-to-live-in-the-city">riaancornelius&#8217;s posterous</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.riaancornelius.com/misc/why-would-anybody-want-to-live-in-the-city/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Should you throw away bad code?</title>
		<link>http://www.riaancornelius.com/software-development/should-you-throw-away-bad-code/</link>
		<comments>http://www.riaancornelius.com/software-development/should-you-throw-away-bad-code/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 17:03:11 +0000</pubDate>
		<dc:creator>Riaan</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Bad Code]]></category>
		<category><![CDATA[Good Code]]></category>

		<guid isPermaLink="false">http://www.riaancornelius.com/software-development/should-you-throw-away-bad-code/</guid>
		<description><![CDATA[In an ideal world, the answer would usually be a resounding yes. In an ideal world I would also get paid more to do less work - That isn't happening either.

It can be difficult to know when you should rewrite and when you should just leave it alone.]]></description>
			<content:encoded><![CDATA[<p><span class="drop">I</span>n an ideal world, the answer would usually be a resounding yes. In an ideal world I would also get paid more to do less work &#8211; That isn&#8217;t happening either.</p>
<p>It can be difficult to know when you should rewrite and when you should just leave it alone.</p>
<p>There are some very clearcut cases at the extremes. If it works and you don&#8217;t need to change anything, leave it alone, even if the code is terrible. On the other hand, if you are going to be making a lot of changes, it is likely to be faster to throw out the code that you will be rewriting in increments in any case.</p>
<p>Which brings us to the in-between cases. Basically, my measure for whether to throw out the code is to plan properly and try to decide upfront how much of the code I&#8217;m likely to rewrite in the process of making the changes. If I&#8217;m likely to end up rewriting a big percentage of the code, it is usually faster (and leads to better design), to just start with a blank screen.</p>
<p>In aproject I was recently involved with, a Java Enterprise system was outsourced to a developer. It turns out that he was completely incompetent. I only got involved 3 months into the project at which stage we replaced this developer and outsourced the development to a small company.</p>
<p>I argued that we should scrap the code and start over, but I was overruled (Because we had invested too much in the code already) and we continued with that code. The project should have taken 3 months to complete. It is now just over a year later and we are finally looking like we have solved the final performance issues. I was only involved in a desktop application that exchanges data with the online application, but I did get to see the early code for the web application, and it was not pretty.</p>
<p>Obviously, scrapping bad code costs money (The initial cost of development, plus the cost of redeveloping), but if the design is bad enough, not scrapping the code can cost a lot more.</p>
<p>On that note, I&#8217;ve just scrapped 50 000 lines of terrible code for some functionality that we want to change and extend, and the new design is so much more maintainable and flexible. If you can, throwingout really bad code can help a lot, but as with all things too much of a good thing can be really bad.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.riaancornelius.com/software-development/should-you-throw-away-bad-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How do you work with really bad code?</title>
		<link>http://www.riaancornelius.com/software-development/how-do-you-work-with-really-bad-code/</link>
		<comments>http://www.riaancornelius.com/software-development/how-do-you-work-with-really-bad-code/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 16:54:20 +0000</pubDate>
		<dc:creator>Riaan</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Bad Code]]></category>
		<category><![CDATA[Good Code]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.riaancornelius.com/software-development/how-do-you-work-with-really-bad-code/</guid>
		<description><![CDATA[Most programmers will at some point have to answer this question. We all like to think that it won&#39;t happen to us, but unless you are constantly thinking about how to keep your code good, it will go bad.&#160;
Good code doesn&#39;t just happen &#8211; You have to make it happen.&#160;
I&#39;m forced to think about this, [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop">M</span>ost programmers will at some point have to answer this question. We all like to think that it won&#39;t happen to us, but unless you are constantly thinking about how to keep your code good, it will go bad.&nbsp;</p>
<h2>Good code doesn&#39;t just happen &#8211; You have to make it happen.&nbsp;</h2>
<p>I&#39;m forced to think about this, because I&#39;m way behind deadline on some development because of the bad code in the rest of the system. This is after I tossed out about 50 000 lines of the worst code. I&#39;m still figuring some parts out, so this will be a series of posts on the relevant subjects as they come up.&nbsp;</p>
<p>I will also write a series on how to write good code at the same time as the ultimate&nbsp;goal is to replace the bad code with good code and make sure that this doesn&#39;t happen again.&nbsp;</p>
<p>The system I&#39;m working on is a Java application with over 600 000 lines of code and practically no unit tests, so the focus will be&nbsp;on how to make changes that will keep increasing the quality of the code base without making radical changes. &nbsp;While a lot of the code is not great, the system is stable and does work with very few known bugs. The main problem is just adding new features.</p>
<p>To start with, We&#39;ll look at what makes bad code and how it happens&nbsp;in this article. Then in future posts, I&#39;ll write about:</p>
<p></p>
</p>
<ul>
<li>When to throw away code.</li>
<li>Refactoring existing code.</li>
<li>Writing unit&nbsp;tests and doing test driven development.</li>
<li>Using design patterns.</li>
</ul>
<p></p>
<p>I&#39;ll link these once I write them and also add any other topics I think of in here.</p>
<h2>What is bad code?</h2>
<p>There are a lot of different measures for what makes good and bad code. For me, bad code is code that is unreadable, unmaintainable and untestable.&nbsp;</p>
<p>To make code that is maintainable and testable, your code should be well encapsulated and loosely coupled.&nbsp;</p>
<p>Encapsulation means&nbsp;that all the related code for a feature is together (For example,&nbsp;in the same&nbsp;package). Encapsulation is mostly important because it makes your code easier to understand.</p>
<p>Coupling is when code depends on other code. Loose coupling means that related code only depends on the obvious code in the same class or same package. Esentially, if you can compile a single class without compiling anything else, it is loosely coupled. If you need to compile another class, which compiles another class, which has to compile another class, that code is set to be tightly coupled. Tight coupling is bad because it means that a change to a class might affect a completely different class somewhere else in a seemingly unrelated part of the system. This makes it difficult to make any changes in the system.&nbsp;</p>
<p>Tight coupling also makes it difficult to write unit tests, since each method might depend on methods in a completely different part of the&nbsp;system.</p>
<p>Even if the code works fine, as programmers, we spend a lot more time reading code than writing code. As such, it makes sense that difficult to read&nbsp;code is bad. The biggest mistake is to over complicate things. Don&#39;t use more dificult code because it might perform better. Rather use simple code and if there are performance&nbsp;problems, just tune the worst bottlenecks and make sure that you put comments explaining why the more complicated code was used.</p>
<p>On the topic of comments, make sure that comments tell you why something was done, not what was done. The code should tell you what was done.</p>
<p></p>
<h2>So how does bad code happen?</h2>
<p>The worst time, where code usually&nbsp;goes&nbsp;bad, is after the initial version of your software has been released and you start getting requests for new features. Ad to that tight deadlines because of bug fixing that you didn&#39;t anticipate, and most programmers will cut where they can.</p>
<p>There really are&nbsp;only 4 factors that&nbsp;you can realistically change when you are under pressure:</p>
<p></p>
</p>
<ul>
<li>Move the deadline.</li>
<li>Cut features.</li>
<li>Add Resources.</li>
<li>Compromise on quality.</li>
</ul>
<p></p>
<p>Usually, management will not cut features or move the deadline, since they have already started marketing. Adding resources are unlikely to happen in any case, but even if it does, by the time people realise that they are in trouble, it is too late to add more people to a project.</p>
<p>This leaves the&nbsp;only option: Compromise on quality.</p>
<p>Most programmers hate doing this, and doesn&#39;t necessarily realise immediately that they are doing it, but that&#39;s what happens.&nbsp;</p>
<p>&#8220;Yes, I know this design isn&#39;t great, but we have to ship, so I&#39;ll just make it work and we can clean it up later.&#8221; Sounds familiar? How many times do you go back and clean it up?&nbsp;</p>
<p>That&#39;s called technical debt. And like any other debt, there&#39;s interest on it. The longer you leave it, the more it will cost to fix, until eventually you get to a point where everything is too broken to fix and the only solution is to rewrite from scratch. Of course, doing that just starts the process again and you eventually end up in the same position.</p>
<p>Esentially, the only way to keep code from going bad is to put in a <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Verdana,Helvetica,Arial; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="font-family: Arial,sans-serif; font-size: 12px;">conscious</span></span>&nbsp;effort to leave the code in a better condition than you found it every time you work on it. Even if you only put some meaningful comments, rename a few variables to make more sense or just write a couple of unit tests.</p>
<p>Always look at the code after you worked on it and ask if you made it better or worse.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.riaancornelius.com/software-development/how-do-you-work-with-really-bad-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Fabled Software Development Plan</title>
		<link>http://www.riaancornelius.com/software-development/the-fabled-software-development-plan/</link>
		<comments>http://www.riaancornelius.com/software-development/the-fabled-software-development-plan/#comments</comments>
		<pubDate>Sat, 15 May 2010 22:51:50 +0000</pubDate>
		<dc:creator>Riaan</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[Software Development Plan]]></category>

		<guid isPermaLink="false">http://www.riaancornelius.com/?p=268</guid>
		<description><![CDATA[Like I mentioned in my previous post, there are no generic software development plan templates. In the same way, there isn&#8217;t really some simple software development plan that you can just take and run with. Each company has different needs and each development team does things differently. In the long run, patterns will develop and [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-289" title="iterative development" src="http://www.riaancornelius.com/wp-content/uploads/2010/05/iterative-development-300x188.jpg" alt="iterative development" width="300" height="188" /><span class="drop">L</span>ike I mentioned in my previous post, there are no generic software development plan templates. In the same way, there isn&#8217;t really some simple software development plan that you can just take and run with. Each company has different needs and each development team does things differently. In the long run, patterns will develop and development methodologies will tend towards the same established methodologies, but they are always subtly different.<span id="more-268"></span></p>
<p>At the moment, I&#8217;m developing the processes for our team (I use team rather loosely since I&#8217;m the only member at the moment &#8211; I do at least 3 or 4 peoples work though, so  guess it still counts). We used to be a team of 4 people, and for a while, 3 of us stuck with the company while the 4th seat got taken by a new developer every 6 months or so. To make a long story short, everybody else left and I got to do all the work myself. Because we were in the middle of a project when the last guy left last year, we decided to finish that before employing more people.</p>
<p>Now we are finally at the point of employing new people and I find myself thinking about our processes and methodologies. We&#8217;ve always followed more agile processes, so we&#8217;re already well on our way there. Our main problem is that we don&#8217;t do enough planning upfront, so we tend to have lots of changing requirements towards the end of the project which leads to less than optimal code.</p>
<p>Any software development plan should minimally include the following items to some degree:</p>
<ul>
<li>Analysis &#8211; Basically gathering and refining requirements.</li>
<li>Planning &#8211; Figure out what resources you will need and how much time it will take to build.</li>
<li>Design &#8211; How are you going to put it together?</li>
<li>Coding &#8211; Build it.</li>
<li>Testing &#8211; Make sure it works.</li>
<li>Deployment &#8211; It&#8217;s a bit pointless if you can&#8217;t get it to the end user.</li>
<li>Documentation &#8211; Both for end users and the developers and technical support staff that need to maintain it.</li>
<li>Review &#8211; Ensure that it stays maintainable and high quality.</li>
</ul>
<p>Any successful development will do all of those. Not necessarily in that order (or even in separate steps), but it will always happen.</p>
<p>From our perspective, I&#8217;m thinking that we want to do most of the analysis, planning and design before we start (At the very least the broad concepts if not all the details).</p>
<p>For the actual development, we want to do the development in iterations (probably 3 week iterations with 1 or 2 shorter iterations at the start). Requirement changes should ideally be discussed at the start of iterations, and once development starts for an  iteration, requirements should be frozen (Unless something directly impacts what is being developed in the iteration). So, between iterations we will do more analysis, planning and design if refinements are required.</p>
<p>We want to do test driven development when we build it, so unit tests will be written as we build the system. This should lead to better designs and better maintainability. Unit tests are also to a large degree the best programmer documentation that you can do as it states very explicitly what the code is expected to do.</p>
<p>During the process, there will be short (less than 15 minutes) stand up meetings at the beginning of every day. The only things we want to know during these meetings are:</p>
<ul>
<li>What did you do yesterday</li>
<li>What will you do today</li>
<li>Do you have any problems you need help with</li>
</ul>
<p>By doing this, we can make sure that we immediately know when there are issues and if the schedule is slipping.</p>
<p>We will also do code reviews of any new code regularly (probably every 2-3 days) based on how much new code was checked in.</p>
<p>Any technical documentation should be created as the code is written, and user documentation will be done at the end of the development when functional testing is happening.</p>
<p>This only leaves deployment which is something we already do fairly well, but it is a manual process. We need to plan how we will automate this process to get to the goal of one button deployment.</p>
<p>To that end, I&#8217;ve been working on getting all our project dependencies into a local repository and I&#8217;ve been setting up a Hudson build server to do daily automated builds.</p>
<p>We&#8217;ll see how this plan evolves, but this is basically the process I&#8217;ve decided to adopt (in very broad terms).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.riaancornelius.com/software-development/the-fabled-software-development-plan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Mythical Software Development Plan Template</title>
		<link>http://www.riaancornelius.com/software-development/the-mythical-software-development-plan-template/</link>
		<comments>http://www.riaancornelius.com/software-development/the-mythical-software-development-plan-template/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 17:09:28 +0000</pubDate>
		<dc:creator>Riaan</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Software Development Plan Template]]></category>

		<guid isPermaLink="false">http://www.riaancornelius.com/?p=209</guid>
		<description><![CDATA[Most small development companies tend to go through the same chaos when they start out, and then eventually (If they survive this phase), they start managing their development properly.
I see it time and time again. In small development houses, the general approach is to have an idea, rush headlong into development, rush to get something [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-279" title="Software development plan template" src="http://www.riaancornelius.com/wp-content/uploads/2010/04/Software-development-plan-template-300x116.png" alt="Software development plan template" width="300" height="116" /><span class="drop">M</span>ost small development companies tend to go through the same chaos when they start out, and then eventually (If they survive this phase), they start managing their development properly.</p>
<p>I see it time and time again. In small development houses, the general approach is to have an idea, rush headlong into development, rush to get something done, and then step back to see what they end up with. During this process, they realize that they missed some killer feature, so the put it in. But while they&#8217;re working on this feature they figure out that they missed another feature, so they start working on that at the same time. Because of this the software is never done, and no thorough testing can happen.</p>
<p>Eventually, 2 years down the line, they realize that instead of their 1 week email notifier project, they now have a full fledged email client and Microsoft is their competition. They also realize that because they didn&#8217;t do any planning, the architecture is so shaky that they&#8217;ll need another six months to fix it before they can release.</p>
<p>At this point, it is time for the &#8220;Software development plan template&#8221;. They know they have to plan, but have no idea how to do it, so just ask Google for a template. This unfortunately does not work. Most templates you find will apply to a company bigger than yours.</p>
<h2>So what do you do?</h2>
<p>The problem is that the plan needs to be adapted to your needs and for your resources. These are the main points you need to consider:</p>
<ul>
<li>What&#8217;s the scope of the project? How much time and resources can you afford to allocate for this?</li>
<li>You need to plan and document the requirements. Decide upfront what features need to be in this release of the software and stick to it.</li>
<li>Design the software based on the requirements. You need to document this in a design spec. See <a href="http://www.joelonsoftware.com/articles/fog0000000036.html" target="_blank">Joel&#8217;s functional spec information</a> for a brilliant resource and example.</li>
<li>Now you need to spec the development and decide on estimates.</li>
<li>Review the estimates and see if you can finish the software on deadline. If not, you need to take out features, add more developers, or move the deadline.</li>
<li>Do the development. Note that this is only one step in the process. If you&#8217;ve done the preceding steps properly, this will be as painless as is possible.</li>
<li>Develop a test plan and do the testing. Unit tests should be written as you are developing the system.</li>
<li>Once you are happy with the software, develop training materials for the end user.</li>
<li>Develop any necessary user documentation. Help manual, installation guide, etc.</li>
<li>Beta test. Identify beta testers and deploy to them. Get feedback and decide what actions are necessary. If the software needs to change, go through the above steps again.</li>
<li>Plan maintenance and set up any necessary structures.</li>
<li>Deploy the product.</li>
<li>Review the product as well as the process. Document any lessons learned and adjust your software development plan as necessary so that you will do it even better the next time.</li>
</ul>
<p>As you can see, there are a lot to consider. Most small businesses focus on the development, but never consider the supporting functions. Even if they do get it right and develop a useful product, without planning for deployment or maintenance, they can become a victim of their own success.</p>
<p>You can get a Microsoft Project <a href="http://office.microsoft.com/en-us/templates/TC010184531033.aspx" target="_blank">software development plan template</a> at this site if you want a starting point for creating your own template.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.riaancornelius.com/software-development/the-mythical-software-development-plan-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I love this country living thing. Big lizard pics.</title>
		<link>http://www.riaancornelius.com/misc/i-love-this-country-living-thing-big-lizard-pics/</link>
		<comments>http://www.riaancornelius.com/misc/i-love-this-country-living-thing-big-lizard-pics/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 13:30:29 +0000</pubDate>
		<dc:creator>Riaan</dc:creator>
				<category><![CDATA[Random Rantings]]></category>

		<guid isPermaLink="false">http://www.riaancornelius.com/misc/i-love-this-country-living-thing-big-lizard-pics/</guid>
		<description><![CDATA[

See and download the full gallery on posterous
This guy was pretty much in my yard (You can see he is right up against the fence in the last 2 photos).
As far as I can tell it is the imaginatively named Green Iguana and grows up to 1.5m long. This one was probably about 70-80cm long.
A [...]]]></description>
			<content:encoded><![CDATA[<div class="posterous_autopost">
<p><a href="http://posterous.com/getfile/files.posterous.com/temp-2010-04-01/EImIhECDfvcEhvhkitmbiwAzaAiEfqtucHimxFdmEhqdnccAagxDveulJidl/P1080314_s.JPG.scaled1000.jpg"><img class="alignright" style="margin: 5px;" src="http://posterous.com/getfile/files.posterous.com/temp-2010-04-01/EImIhECDfvcEhvhkitmbiwAzaAiEfqtucHimxFdmEhqdnccAagxDveulJidl/P1080314_s.JPG.scaled500.jpg" alt="" width="196" height="111" /></a></p>
<div><a href="http://riaancornelius.posterous.com/i-love-this-country-living-thing-big-lizard-p"><span class="drop">S</span>ee and download the full gallery on posterous</a></div>
<p>This guy was pretty much in my yard (You can see he is right up against the fence in the last 2 photos).</p>
<p>As far as I can tell it is the imaginatively named Green Iguana and grows up to 1.5m long. This one was probably about 70-80cm long.</p>
<p>A while back one was in my back yard where we have fencing to keep the dogs in. It got stuck in the fence trying to get away from the puppies (Who obviously wanted to play with it). Luckily it got away while we locked the dogs in the house.</p>
<p>I wasn&#8217;t looking forward to trying to get it out of the fence. I got the distinct feeling that it wouldn&#8217;t care for the help&#8230;</p>
<p style="font-size: 10px;"><a href="http://posterous.com">Posted via web</a> from <a href="http://riaancornelius.posterous.com/i-love-this-country-living-thing-big-lizard-p">riaancornelius&#8217;s posterous</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.riaancornelius.com/misc/i-love-this-country-living-thing-big-lizard-pics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is Twitter and Facebook useful for business?</title>
		<link>http://www.riaancornelius.com/work/marketing/is-twitter-and-facebook-useful-for-business/</link>
		<comments>http://www.riaancornelius.com/work/marketing/is-twitter-and-facebook-useful-for-business/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 17:54:10 +0000</pubDate>
		<dc:creator>Riaan</dc:creator>
				<category><![CDATA[Marketing]]></category>

		<guid isPermaLink="false">http://www.riaancornelius.com/?p=122</guid>
		<description><![CDATA[There's a lot of hype about social media and using it for marketing. The two main platforms that are usually quoted would be Twitter and Facebook.

Facebook profiles is useless for marketing, but pages and PPC could be useful. Twitter however can give you huge  ROI if you can avoid being eaten alive by it.]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="Twitter" src="http://www.riaancornelius.com/wp-content/uploads/2010/03/Twitter-256.png" alt="Twitter" /> There&#8217;s a lot of hype about social media and using it for marketing. The two main platforms that are usually quoted would be Twitter and Facebook.</p>
<h2><span class="drop">F</span>acebook</h2>
<p>First, Facebook really can&#8217;t be lumped into the same category as most other social media (from a marketing perspective) &#8211; It was designed to help you stay in touch with FRIENDS&#8230; The whole design makes it virtually impossible to use facebook profiles for marketing. Facebook pages is a different story, and facebook PPC ads are unbeatable for markets that are tightly linked to a certain demographic (Where else can you target your ads at women between the ages of 20 and 30 that will be getting married fairly soon?)</p>
<h2>Twitter</h2>
<p>One potential problem with Twitter (And in fact any social media) is that there is a very thin line between Twitter working for you and Twitter turning into the beast that eats all your time and turns you into a useless procrastinating mass. However, given the right tools and a definite goal, the returns could be fabulous.</p>
<h2>Always have a goal</h2>
<p>The main goals in my mind is this:</p>
<ul>
<li> Networking &#8211; Especially with people that would never talk to you if you approached them using any other media.</li>
<li>Staying up to date with the latest news/gossip in your market</li>
<li>Building a relationship with your market</li>
</ul>
<p>I have found that Twitter will give you direct access to people who would never even have given your email a second glance (If they even read their own mail). This doesn&#8217;t only go for business, but also fun &#8211; Who here can have a chat with Neil Gaiman about any of his books? (Please tell me you know who he is..)</p>
<p>The general belief is that social services probably converts worse than PPC/Google traffic&#8230; In my experience this isn&#8217;t necessarily true. If you don&#8217;t have any kind of reputation and relationship with your market yet, then yes, it&#8217;s very true, but once you build that reputation, nothing will convert as well. The thing is that you have to keep it social,  you can&#8217;t jump in and start pitching. If you do, people will ignore you. Build a relationship first, and then start feeding in disguised promotions &#8211; Free content on your blog that requires email opt in for example.</p>
<p>Seth Godin mentioned that if you can create a tribe of  fans that really respect and like you, you have a sustainable business. Social media allows you to do this, but at a much lower startup cost and in a much smaller space of time than you could previously. Obviously this won&#8217;t work for every market&#8230; If your market doesn&#8217;t use twitter, there&#8217;s no point, but you have to go where your market is.</p>
<p>Do you know if your market is on twitter?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.riaancornelius.com/work/marketing/is-twitter-and-facebook-useful-for-business/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
