<?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>phenorbital &#187; Choob</title>
	<atom:link href="http://blog.phenorbital.co.uk/tag/choob/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.phenorbital.co.uk</link>
	<description>Blog of a graduate working in banking IT in London.</description>
	<lastBuildDate>Sat, 28 Aug 2010 23:04:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Personal Projects Versus Work</title>
		<link>http://blog.phenorbital.co.uk/2010/02/08/personal-projects-versus-work/</link>
		<comments>http://blog.phenorbital.co.uk/2010/02/08/personal-projects-versus-work/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 20:00:52 +0000</pubDate>
		<dc:creator>Chris Hawley</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Choob]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[StateSim]]></category>

		<guid isPermaLink="false">http://phenorbital.co.uk/?p=169</guid>
		<description><![CDATA[Since I started work, I&#8217;ve found that I&#8217;ve done less and less work on any of the personal projects that I&#8217;ve picked up over time. As I write this, I can think of at least four different projects that I was going to do some work on when I next got an opportunity (such as [...]]]></description>
			<content:encoded><![CDATA[<p>Since I started work, I&#8217;ve found that I&#8217;ve done less and less work on any of the personal projects that I&#8217;ve picked up over time. As I write this, I can think of at least four different projects that I was going to do some work on when I next got an opportunity (such as today &#8211; as I&#8217;ve had the day off), but I&#8217;ve not touched in weeks at best. Of course, these opportunities don&#8217;t really come round all that often, as I don&#8217;t often have time after work (at least, not if I want to eat and get some sleep), and I always seem to end up otherwise engaged at weekends.</p>
<p>However, when I do have a day where I don&#8217;t really need to do anything and have the time to spare (like today) I inevitably end up wasting it through watching TV/films, playing on the XBox, or writing blogs like this. I&#8217;ve convinced myself that the main problem is that I spend 40+ hours a week in the office looking at one project or another there. This might involve writing actual code (as most of last week did), integrating various components to solve problems that way, performing analysis on what we need to do or any number of other activities, most of which are things I&#8217;d need to do on the personal projects. Given this, I guess I&#8217;ve been subconsciously avoiding doing anything on them as it seems too much like work.</p>
<p>Of course, by being apathetic in regard to these projects, they&#8217;re ever growing in number as I come up with an idea for something that I (or others) might find useful, and therefore add it to the list. A prime example is the <a href="http://trac.uwcs.co.uk/choob">Choob</a> functionality I mentioned in passing in my previous entry about <a href="http://phenorbital.co.uk/2010/01/18/code-style/">Code Style</a> last month (which was a lot of hot air, and no real action), but there are also a whole load of other things that I&#8217;ve been thinking about for a while and should probably do something about.</p>
<p>So, what do I do about this? Well, I guess it all comes down to forcing myself to sit down and write some code, rather than wandering off and parking myself in front of the TV for an entire day. With this in mind I&#8217;m going to try and set aside a couple of hours each week (be it at the weekend, or one evening), where I can get something written. This will mean that I need to actually think about what needs doing, and break it up into suitable chunks &#8211; but that&#8217;s something that would need doing anyway if the projects are to avoid spiralling out of control.</p>
<p>I guess if I can manage that, then I should also be able to keep this blog a bit more up to date, especially with progress, so I may even start updating this more often. Of course, it could all fail miserably, so I guess we&#8217;ll just have to see!</p>]]></content:encoded>
			<wfw:commentRss>http://blog.phenorbital.co.uk/2010/02/08/personal-projects-versus-work/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Code Style</title>
		<link>http://blog.phenorbital.co.uk/2010/01/18/code-style/</link>
		<comments>http://blog.phenorbital.co.uk/2010/01/18/code-style/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 19:00:02 +0000</pubDate>
		<dc:creator>Chris Hawley</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Choob]]></category>
		<category><![CDATA[code style]]></category>

		<guid isPermaLink="false">http://phenorbital.co.uk/?p=143</guid>
		<description><![CDATA[One of the biggest annoyances I have with dealing with other people&#8217;s code is when they don&#8217;t use a sensible style. Obviously there have been many arguments over time about certain aspects of code style (brace placement, indentation, etc.) &#8211; but this isn&#8217;t really a problem as far as I&#8217;m concerned. I couldn&#8217;t care less [...]]]></description>
			<content:encoded><![CDATA[<p>One of the biggest annoyances I have with dealing with other people&#8217;s code is when they don&#8217;t use a sensible style. Obviously there have been many arguments over time about certain aspects of code style (brace placement, indentation, etc.) &#8211; but this isn&#8217;t really a problem as far as I&#8217;m concerned. I couldn&#8217;t care less where a given project has the braces placed, or if spaces are used for indentation, as long as it&#8217;s clear and consistent. This is something that recently irked me when I came to do some changes on <a href="http://trac.uwcs.co.uk/choob" target="_blank">Choob</a> for the first time in what&#8217;s probably years.</p>
<p>From what I can tell (I wasn&#8217;t on the original team &#8211; so only have the code and documentation to go from) there was never a set of style guidelines drawn up when the project started. This, along with people like myself submitting code later through the project, has lead to a mix of code styles being used &#8211; and as a result the code is a bit of a mess in places. I&#8217;m pretty sure I&#8217;m to blame for some of this, so I&#8217;d love to fix it, but that&#8217;s a bigger problem than it first seems for a couple of reasons; the sheer number of lines of code it would touch, and getting everyone to use the new format going forward.</p>
<p>The first of these problems is less about the logistics of making the change than the problems posed afterwards. If I change the format of every class in the project, I&#8217;m going to have my name against pretty much every line of code when viewed in the source control system. Sure, my change was only superficial, but this doesn&#8217;t matter when it comes to running &#8220;svn blame&#8221; to work out who broke what. This is a tricky one, and one I&#8217;m not sure there&#8217;s a good solution to, other than to make sure that the commit with the format changes in <em>only</em> has those, such that people can then look at the previous revision, which hopefully has the name of the person responsible in it.</p>
<p>Looking at the second problem there&#8217;s a whole other set of challenges faced. Choob doesn&#8217;t have too many active developers, which I&#8217;m not sure would make it easier or more difficult. The numbers being small certainly makes it easier to get the word out, but because of the infrequency with which work is done &#8211; it&#8217;s entirely possible that they&#8217;ll forget that there is now a proper style and eventually the code base ends up back where it started. This can be made easier through IDEs with formatting features, and the ability to distribute a set of rules (I certainly plan to do this with Eclipse if I do reformat the code), but there&#8217;s no doubt at least one developer who doesn&#8217;t use an IDE, or uses one that hasn&#8217;t had the settings created for.</p>
<p>These are both great reasons why you not only should, but <em>need</em> to set out some code style rules at the start of the project. At work we&#8217;ve got projects that have strict rules as to how code should be laid out (with the Java ones having approved formatter settings ship with the internal build of Eclipse), and as a result the code base is consistent. Admittedly there are also measures in place, such as code reviews, that wouldn&#8217;t be practical in the case of something like Choob (where all the developers are working on it in their spare time around work/university), but having had an agreed style from the start is a huge bonus.</p>
<p>So, what makes a good code style? Well most languages have a set of conventions or even a set of &#8220;standards&#8221; specified by the creators of the language (for example Sun&#8217;s for Java), so in my opinion it makes sense to use these. This way it&#8217;s consistent with what developers are likely to find in other code bases (at least, I hope so) and therefore reduces the barrier to entry. There is obviously the problem of ending up with a lot of idiomatic code, but as long as it&#8217;s a widely known way of doing things &#8211; you should be able to get away with it (Perl&#8217;s returning undef for failure for example).</p>
<p>Unfortunately even with this there&#8217;s bound to be some argument that comes down to the braces &#8211; and I have to admit to there being one element about coding that frequently irritates me with them. Unlike the majority of arguments, however, it&#8217;s not about where to put them &#8211; but the lack of them when the language makes the optional. Sure for a one line if statement the additional braces can seem like a lot of wasted code, but what happens when a year or two down the line someone comes along and needs to add something? If they&#8217;re not careful they can very easily fall into the trap of not adding in the now required braces, and all of a sudden some of the block isn&#8217;t conditional. Equally the other side of the argument exists, where a conditional statement is followed by another that is expected to be run regardless, but is indented to the same level &#8211; making it impossible to spot at a cursory glance. Having seen both of these it&#8217;s never pretty, and for all its sins Perl manages this well be mandating braces in these very situations (obviously Python&#8217;s use of whitespace also avoids this problem).</p>
<p>Of course, part of that problem stems from indentation, and I&#8217;d hope that requiring sensible indentation goes without saying when discussing good code style. This, when combined with clear code and written in a consistent manner should make it easily maintainable &#8211; which is very important in any project that&#8217;s actually going to last.</p>
<p>With all of this in mind, I&#8217;m currently trying to find a sensible set of format guidelines that work well on the Choob project and can be automated within Eclipse, which I&#8217;m hoping I&#8217;ll be able to get into the code base and improve the experience for everyone. This is likely to be a bit of effort, and involve looking for the most common code style at the moment, but hopefully I&#8217;ll get something sorted this month (and then get nothing but complaints for the months afterwards!)</p>]]></content:encoded>
			<wfw:commentRss>http://blog.phenorbital.co.uk/2010/01/18/code-style/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

