<?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>SDK</title>
	<atom:link href="http://sdk.org.nz/feed/" rel="self" type="application/rss+xml" />
	<link>http://sdk.org.nz</link>
	<description>Software Developers (K)ollaborative</description>
	<lastBuildDate>Wed, 05 Jan 2011 23:22:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>A Developer&#8217;s view on iOS development&#8230;</title>
		<link>http://sdk.org.nz/2011/01/06/a-developers-view-on-ios-development/</link>
		<comments>http://sdk.org.nz/2011/01/06/a-developers-view-on-ios-development/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 23:22:17 +0000</pubDate>
		<dc:creator>Eben Bruyns</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://sdk.org.nz/?p=181</guid>
		<description><![CDATA[First a disclaimer: This is a personal view and opinion and should not be taken as hard facts, not everybody would have the same experience. I&#8217;m sharing this because I think it might be interesting to others. Some background first&#8230; I&#8217;ve been toying with Cocoa development since around 2003 and back then it was difficult [...]]]></description>
			<content:encoded><![CDATA[<p>First a disclaimer:</p>
<p>This is a personal view and opinion and should not be taken as hard facts, not everybody would have the same experience. I&#8217;m sharing this because I think it might be interesting to others.</p>
<p>Some background first&#8230;</p>
<p>I&#8217;ve been toying with Cocoa development since around 2003 and back then it was difficult getting any information on how to use the tools and it all came down to doing a LOT of reading and a LOT of pain to figure things out. Since then there&#8217;s been a lot of great resources that showed up on the scene and a lot of books has been written on the subject matter. Given that I am a sucker for punishment (hey I have to be; I&#8217;m a developer right!?) I ended up learning about a lot of the pitfalls and quick wins in the Apple development world. I&#8217;ve since trained other developers in the art of not shooting yourself in the foot etc etc&#8230;</p>
<p>Now for the bit you actually want to read&#8230;</p>
<p><span id="more-181"></span></p>
<p>When Apple announced the iPhoneOS 2.0 SDK I was registered and ready to go as soon as I was able to do so, living in New Zealand meant that at that point in time we did not have access to official iPhones that&#8217;s supported by Apple &#8211; and this made life interesting. I paid my subscription fees as soon as Apple would take my money because this was the next gold rush! With every new platform it&#8217;s normally a case of using it for a while to realise what is missing form it so you can develop the required software. Unfortunately it took me a while to realise what I&#8217;d like to have on it and low and behold there was nothing like that on the App store (at this point in time there was only around 500-1000 apps on the store so it wasn&#8217;t exactly hard). Being a consultant the thing that I&#8217;m the worst at and is the most important, is keeping track of my billable hours &#8211; this is also my least favourite thing to do but my life depends on it so to speak.</p>
<p>Time Tracker was born (if you&#8217;re that way inclined you can search for it on the app store) and it was meant to be the &#8220;be all and end all&#8221; of my time keeping woes. I designed and built it to function the way I do, and believe me when I tell you I function in strange ways. Given that I&#8217;m a unix geek at heart the application reflects this, it&#8217;s minimalistic does exactly what it needs to with the least amount of effort possible (get in and out quickly so you can carry on with the important stuff right!?). Of course as life would have it, during the development a few other applications showed up on the scene doing the same thing, and they were priced cheaper than what I intended on pricing Time Tracker (More on sales numbers later on). This almost made me give up and just buy one of those applications to help me keep my time and forget about Time Tracker.</p>
<p>So what kept me going, firstly I had a bit of down time in my consulting &#8211; it wasn&#8217;t enough for me to rush out and find more work so I figured I&#8217;d just wait it out till my regular client&#8217;s were ready to pass more work onto me. This was also the perfect excuse I needed to apply Cocoa in anger &#8211; as I&#8217;ve always wanted to. I must admit that it only took me around 60 hours of development to get a functioning version up and running, but it took about another 60 hours to deal with all the other supplementary requirements to have an app up on the iTunes App Store. Since it&#8217;s been on the app store I&#8217;ve not done too much to it but fix the occasional bug and breaking changes that Apple introduced with each new release of iOS. I&#8217;ve also spent a fair bit of time with customers having issues (and sometimes these are as a result of their device not Time Tracker &#8211; this could be hours wasted). To make life easy we can call it 250 hours spent on Time Tracker and these house are still counting.</p>
<p>Given these numbers I would have had to sell around 5500 units at an average of $4 per application just to break even, granted my pricing varied a little over the last 2.5 years but on average it would be about $4 per unit.</p>
<p>So the burning question is &#8220;How did the sales go?&#8221;.</p>
<p>To be honest I didn&#8217;t even recover half of my investment (I&#8217;m not complaining about this, I had fun doing it and it taught me a little bit more about Cocoa so I write it down to training). Next you&#8217;d probably ask me why I still have Time Tracker listed on the App store and that would be a fair question. I&#8217;m still getting a few payments from Apple once in a while for sales on the few small Apps I have on the store, it&#8217;s not much but it covers the fees I need to pay Apple every year to keep my subscription active, so it doesn&#8217;t appear to do any harm. This assumption is of course wrong because all it takes is one person to email me with a strange issue they are experiencing and I can waste 8 &#8211; 16 hours testing and debugging (sometimes there&#8217;s a real bug, but most of the time it&#8217;s not, as every good developer should; I always assume that I&#8217;m to blame and start looking at my creation to figure it out).</p>
<p>Another point of interest is that I created a Lite version of Time Tracker that I intended on giving away free. I quickly reversed that idea and have since been selling it mostly a the lowest price possible due to the other developers downloading it so they can give it a horrible rating and review (I&#8217;m not saying all the bad reviews are by the competition, Time Tracker is certainly not for everybody and I&#8217;m not ashamed to admit this either). I&#8217;ve also experimented with giving away the Apps for free for a few days to see if it would increase my user base, I&#8217;ve learnt that people will download anything just because it&#8217;s free but never use it. I could tell this from my upgrade statistics every time I&#8217;ve released and update.</p>
<p>Now it&#8217;s not all bad, I sometimes get emails from users who really get what Time Tracker is meant to be, here&#8217;s an snippet from one I received recently:</p>
<blockquote><p>I have evaluated like 3-4 Time Tracking application and I think your version is really the best. It&#8217;s the cleanest and simplest &#8211; quick and fun to use. All others had too much really unncessary buttons and stuff &#8211; with the cost of usability.</p></blockquote>
<p>I also get a lot of feature requests, but unfortunately it&#8217;s not possible to implement these as I&#8217;m already behind and spending more time on it is ultimately just stupid &#8211; new feature does not translate to more sales as it&#8217;s already a niche market.</p>
<p>So what have I learnt from this experience and what can you take away from all of this:</p>
<ul>
<li>The cost of product development is far more than building the product itself.</li>
<li>If you&#8217;re thinking of building any old random application for the App store and expect to make a lot of money out of it, you&#8217;re probably wrong (then again you may get lucky &#8211; it does happen).</li>
<li>Knowing how to build iOS software is actually valuable, as I briefly mentioned I train developers and I also build software for other companies (this is far more lucrative).</li>
<li>People like free, but that doesn&#8217;t mean they&#8217;ll use it.</li>
<li>People actually expect a lot for very little payment, some feature requests would take more than the 250 hours spent on Time Tracker alone.</li>
<li>I&#8217;m not the best use case designer for Time Keeping tools &#8211; it might make perfect sense to me, but not many others think so!</li>
</ul>
<p>So naturally you might ask if I&#8217;d do it all over again? The answer is Yes. The simple fact of having an App up on the App store has lead to a fair bit of other business. I&#8217;ve built some software on the iPad that will hopefully earn me a bit of money and make some people in the enterprise space very happy, it&#8217;s not up on the App store yet, but it will be and it will be free &#8211; the business model is completely different for this and I might even blog about it in the future. I&#8217;m also about to embark on another App store project with a team of great people and an idea that sounds like it&#8217;s got much better legs than Time Tracker &#8211; also this time I would not be designing and building for myself which will make a huge difference. I still think there&#8217;s a lot of untapped potential in the iOS space hopefully I can tap into some of this and do better in the future.</p>
<p>The bottom line is that even though I&#8217;ve just outlined a less than favourable experience, it&#8217;s not completely put me off the idea of building App Store Apps. It&#8217;s better to have tried something and failed than to never have tried at all.</p>
<p>If you&#8217;ve read this far and I&#8217;ve completely put you off building iOS applications, don&#8217;t be put off, build it regardless.</p>
<p>The absolute worst case scenario would be that you&#8217;ve learnt something new, this is never a bad thing!</p>
]]></content:encoded>
			<wfw:commentRss>http://sdk.org.nz/2011/01/06/a-developers-view-on-ios-development/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Breaking Away from &#8216;The Man&#8217;</title>
		<link>http://sdk.org.nz/2010/06/17/escape_the_man/</link>
		<comments>http://sdk.org.nz/2010/06/17/escape_the_man/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 21:38:44 +0000</pubDate>
		<dc:creator>Tom Leys</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://sdk.org.nz/?p=176</guid>
		<description><![CDATA[Tom @ GridSpy has recently gone Full-Time and now must learn how to juggle contracting and GridSpy development.]]></description>
			<content:encoded><![CDATA[<p><em>I&#8217;d like to share another entry from <a title="Power monitoring Development" href="http://blog.gridspy.co.nz/">my GridSpy Blog</a> about how it is harder than you think to transition to full-time.</em></p>
<p>Life got very interesting one and a half months ago. I had a meeting with my employer where he sat me down and asked me if GridSpy was ready to survive without my salary. Essentially he asked me if I was ready to leave and take GridSpy full-time. Being an VC funded entrepreneur himself he knew how hard it is to make that initial leap into full-time start-up and gave me a gentle nudge “out of the nest.”</p>
<p>After that meeting my mind was racing. My wife and I agreed that taking GridSpy full-time was absolutely exciting but equally frightening. We’ve been tightening our belts for some time to get ready for bootstrapping but even we don’t know how soon GridSpy will transition from a ‘sure thing’ to a trading business. I assured her that I could land on my feet with a contracting job should the money run out.</p>
<p>So with much trepidation I decided that it indeed was the time to leave.</p>
<p><span id="more-176"></span>With a month’s notice given, I served out the notice period with tense anticipation, mostly worrying about the money. It turned out that the money problem soon solved itself. A friend of the family runs a stealth start-up which now had need of a contract programmer, and it was suggested to him that I would fill the role..</p>
<p>So the plan was to serve out my notice and start the contract after a well deserved full-time month on GridSpy. It soon came to be that my new client had an urgent need for my services &#8211; arguably more urgent than our own start-up for at least a couple of weeks. As a founder, it was a real heart wrenching experience. With complete control over my time I have decided that cash in the hand now to build initial stock is worth delaying our product just that little bit longer. I’ve also had a nice little splurge, for instance getting the required noise cancelling headphones.</p>
<p>It has been four weeks now since my last day as a salaried employee and I’ve had a great time. For the first time in ages overtime has been optional, working conditions are in my control, and opportunities are endless. However, the opportunities being endless thing has taken me away a little, well a lot, from GridSpy. These last four weeks have been great for my client but not so great for GridSpy. I have really enjoyed the programming challenges of the contract work, but I really haven’t spent any more time on GridSpy than I would have before. I seem to have exchanged one full-time job for another. Again I appear to be working for ‘the man.’</p>
<p>However, my working conditions now are much better. I’m working from home on my favourite sort of problems with my four screens. After a 5 step commute from the kitchen table to my office in the morning I work solid until lunchtime. The afternoon starts late after lunch and a play with the kids and is occasionally interrupted by one of my gorgeous children demanding a cuddle. Dinner is at 5pm and since that tends to work out as a 6.5 hour day I often work an odd evening too. Even though it seems like a short day I have found my output is huge. I am really able to totally concentrate and complete tasks in a way I enjoy. I’m much happier and I’m spending much more time with my wife and kids &#8211; that’s great!</p>
<p>Back when I was a <a href="http://blog.gridspy.co.nz/2010/02/part-time-entrepreneur.html">Part time entrepreneur</a> I constantly dreamed of the day that I went full-time. How much easier it would be when I could work on GridSpy and not have to stop. When looking at schedules of when the next feature would be ready I could wistfully say “well, it will take a long time but only because I can’t work on it full-time.” Although it was true, it was also a very convenient excuse.</p>
<p>Now I have exactly the opposite problem. With complete control of my time comes an equal amount of guilt when progress on GridSpy doesn’t suddenly take off. Since late last year I have been eternally thinking that we are only two months away from a product that is worth selling, and today I would make the same claim. What we do have today is a fantastic product and a handful of very happy clients. Today our Minimum Viable Product is pretty refined. It is focusing all my energies into those two months, or what it takes to get GridSpy out there, I am now struggling with. This has been a surprise for me.</p>
<p>Each week I can choose how much to work &#8211; somewhere on the slider from “Instant Cash Today” to “Successful business tomorrow.” It doesn’t help that I love my contracting job. I had better set the slider back to “Successful Business” before we run out of time. To do that requires the ability to say “No.” No to fun contracting tasks, No to quick cash, No to partnerships that require a lot of time on our part, and No to distracting marketing. But how do I break away from ‘the man’ when I actually really enjoy the work (and the cash too.)</p>
<p>Reflecting on what I have written I can see that I need to reduce the contracting work to the point where it pays some bills only, and spend as much time as possible putting GridSpy as a finished product into the marketplace. Well, after this particular contracting task is over that is.</p>
<p><strong>Further reading:</strong></p>
<ul>
<li><a href="http://blog.gridspy.co.nz/2010/02/part-time-entrepreneur.html">Part time entrepreneur, Fulltime Employee</a></li>
<li><a href="http://blog.gridspy.co.nz/2010/02/a-pc-in-every-power-cabinet-aaahhhhno.html">How our devices have evolved</a></li>
</ul>
<p><strong>See Also:</strong></p>
<ul>
<li><a href="http://gridspy.co.nz">Gridspy Homepage</a></li>
<li><a href="http://your.gridspy.co.nz/powertech/">Live demo of GridSpy</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://sdk.org.nz/2010/06/17/escape_the_man/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Part time Entrepreneur, fulltime Employee</title>
		<link>http://sdk.org.nz/2010/02/10/part-time-entrepreneur-fulltime-employee/</link>
		<comments>http://sdk.org.nz/2010/02/10/part-time-entrepreneur-fulltime-employee/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 23:15:29 +0000</pubDate>
		<dc:creator>Tom Leys</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[gridspy]]></category>
		<category><![CDATA[startup]]></category>

		<guid isPermaLink="false">http://sdk.org.nz/?p=171</guid>
		<description><![CDATA[No matter how much I’d love to take the lean ramen noodle startup approach it’s simply not practical for me. I’m a father of two, a husband of one, and an employee.]]></description>
			<content:encoded><![CDATA[<p><em>I&#8217;ve recently uploaded an article on the <a title="Gridspy Development Blog" href="http://blog.gridspy.co.nz/">Gridspy blog</a> that I would like to share with you about the difficulties of founding a start-up part time.</em></p>
<p><strong><a title="Part time Entrepreneur, Full time employee" href="http://blog.gridspy.co.nz/2010/02/part-time-entrepreneur.html">Part Time Entrepreneur, Full-time Employee </a></strong></p>
<p>Most startups seem to embrace 60-80 hour weeks, you keep reading  about them and begin to believe that this is normal. After 12 hour  marathon coding sessions ‘typical entrepreneurs’ walk 10 metres from  desk to bed and collapse in their shared accommodations. Living in such  lean conditions makes those crucial first months of business far  cheaper. This work ethic and minimial living costs maximises the runway  before the seed money runs out.</p>
<p><span id="more-171"></span>Paul Graham is one of my favourite bloggers, and his essay entitled <a href="http://www.paulgraham.com/road.html">The Other Road Ahead</a> he  paints a clear picture of how lean a start-up can be, stating “You can  literally launch your product as three guys sitting in the living room  of an apartment, and a server collocated at an ISP. We did.”</p>
<p>No matter how much I’d love to take the lean ramen noodle approach  it’s simply not practical for me. I’m a father of two, a husband of one,  and an employee. I’ve got a beautiful family with young children, a  modest house with a mortgage, and a full-time job to pay the bills. In  short, I have a standard existence that I imagine many of my readers  share. Living off noodles in a cheap apartment with my co-founders is  not the only way that start-ups are built. I’ve taken an alternative  route that involves just as much hard graft (harder maybe?) and allows  me to remain employed full-time. The food sure is better!</p>
<p>I simply have to fit Gridspy into the gaps between the hours at work  outside of the home and the start-up and the time put into fatherhood  and being an available partner. It is a compromise position that I have  had to maintain for the last year until Gridspy was ready. Along with  the mandatory overtime, maintaining a full-time job limits my  flexibility. I cannot travel to meet potential clients as easily or pick  up the phone to talk to them. It markedly slows down progress. However,  without the job there would possibly be no Gridspy, or less so than  there is now, as there would be no base to develop from.</p>
<p>Despite my full-time commitments I still consistently work on  Gridspy. As I mentioned in <a href="http://blog.gridspy.co.nz/2009/12/selling-the-dream-putting-sales-before-software.html">Selling  the Dream</a> I spend four evenings a week working on Gridspy (3-4  hours each one) plus all of Sunday and manage to make a lot of progress.  Sometimes I spend my four hours on a blog entry, sometimes on some  firmware or a little bit of Django code. Lately I have been creating the  setup process for new users. There is a ton of documentation to do on  our website &#8211; it all takes so much time.</p>
<p>Since my baseline existence is ‘family-man’ and a full-time job, I  have had to pace myself with Gridspy. If I am not careful I will burn  myself or my loved ones out (and trust me, we’ve been close at times) so  I have to be the tortoise rather than the hare. At least doing a small  chunk every night gives me a lot of time to think through technology  decisions and plan my development.</p>
<p>Of course Gridspy is all that I want to work on and all that I can  think about. This creates constant tension/wishful thinking in wanting  to jump in both feet first and get everything up and running now,  yesterday! It doesn’t help that this fully dedicated full-time start-up  founder is also a <a href="http://www.bothsidesofthetable.com/2010/01/05/what-makes-an-entrepreneur-appetite-for-risk-711/">widely  published expectation</a>.</p>
<p>But there are no savings to live off, and even though the almost  three year old in my life would like to live on noodles for a bit, I  don’t think I could for long. Being employed isn’t as simple as just turning up to my ‘day job’ and  punching keys so I can pay the bills. I want, need, to be a ‘good  employee.’ It takes conscious effort to honour my commitment to my  employer. I remind myself everyday to focus on the work I do for them  and to leave Gridspy at home. I’m sure you can see how after a long day  at the office and after the chaos of the early evening with the kids, it  can take a while to get down to the business of Gridspy. Sometimes all I  want to do is grab a beer and turn on the TV.</p>
<p>I like my job, it has loads of benefits. Not least that I can afford  to buy beer and have nice dinners and provide my wife and children with  all the comforts of home. I have been given some great introductions to  potential business partners through my well connected colleagues. I’ve  had a group of fellow engineers to discuss my ideas with and sound out  my features. Plus I’ve had lots of free coffee and idle banter around  the water cooler to enjoy. The benefits of a stable routine and a  reliable injection of cash into our bank account each month are not to  be frittered away lightly.</p>
<p>But when it comes to developing my own gig, it is a chicken and egg  problem. The sooner I take the leap and go fulltime with Gridspy, the  sooner we can complete the features that are preventing us from doing a  large scale release. But the moment I take that leap, the clock (and the  bank account) starts ticking down. I have an extremely short runway and  I worry that I could scuttle this opportunity before it has had a  chance to take off.</p>
<p>Reading entrepreneurial blogs such as Paul Graham’s can make you  think that you have to go fulltime or give up. I am taking an  alternative route. By creating Gridspy part-time I have been able to  give it the time and breathing room required to succeed. I’m starting to  think that this path is the most courageous since it requires serious  commitment to devote all your free time to your startup. In the end, I  am sure that my compromises will pay off.</p>
<p>Further reading:</p>
<ul>
<li><a href="http://blog.gridspy.co.nz/2009/12/selling-the-dream-putting-sales-before-software.html">Selling  the Dream, putting Sales before Software</a></li>
<li><a href="http://blog.gridspy.co.nz/2009/09/introducing-the-nexus.html">Introducing  the Nexus</a></li>
</ul>
<p>I&#8217;d love to hear more about what you are all doing in your valuable free time and how it is going.</p>
<p>Thanks Eben for the chance to share this blog entry.</p>
]]></content:encoded>
			<wfw:commentRss>http://sdk.org.nz/2010/02/10/part-time-entrepreneur-fulltime-employee/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
		<item>
		<title>In The Beginning</title>
		<link>http://sdk.org.nz/2009/07/25/in-the-beginning/</link>
		<comments>http://sdk.org.nz/2009/07/25/in-the-beginning/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 14:05:28 +0000</pubDate>
		<dc:creator>Justin Kim</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://sdk.org.nz/?p=156</guid>
		<description><![CDATA[A: You know, I can’t deal with code that’s not correct. B: But what is correct code? Isn’t the correctness of the code defined by the usage? A: Yeah, that’s for sure, but you know, there’s still the ‘correctness’ in the code. I can’t leave a code behind that is not correct. Something that’s broken [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>A: You know, I can’t deal with code that’s not correct.<br />
B: But what is correct code? Isn’t the correctness of the code defined by the usage?<br />
A: Yeah, that’s for sure, but you know, there’s still the ‘correctness’ in the code. I can’t leave a code behind that is not correct. Something that’s <em>broken</em></p></blockquote>
<p>Who hasn’t had this conversation? Of those who haven&#8217;t, who hasn’t heard it from other people?</p>
<p>There are more than two kinds of programmers in the world. Today, though, I’d like to pretend that there are the two kinds. Those who are happy with the code when it’s good enough, and those for whom enough is never enough.</p>
<p>And no – this is not going to be one of the fit-for-purpose arguments. The whole notion is self explanatory, and to be completely honest, I find it slightly condescending. As professionals in this field, it’s not like we don’t understand the concept of boundaries, parameters, conditions, constraints, and other things that inherently limits us and our code.</p>
<p>What I’m interested in, is where we derive this notion of ‘correct code’ from. There are many books written, many more guide lines set and countless hours of code reviews done, all for the search of the correct code. All this, without really ever having a satisfying explanation – not to mention the definition – of the correctness of the code.</p>
<h3><span id="more-156"></span></h3>
<h3>In the beginning,</h3>
<p>there was, or as it seems; there was, the correct code. Shown to us earthly beings by the higher powers, revealed through the dreams of the highest, righteous ones such as Ada and Dijkstra. They, our forefathers and priests, were the bridge builders between the world of us – the programmers, and the realms of pure logic and computation.</p>
<p>The computation was <strong>platonic. </strong>Numbers were integers. Computers were ideas.</p>
<p>‘How might we add numbers?’ Asked a money lender.</p>
<p>‘You enter one number here, and the other number here, and turn this handle.’ The righteous ones answered.</p>
<p>The money lender did his calculations. There was much rejoicing.</p>
<p>Then an astronomer came along, and entered the distance between the sun and the earth, then the distance between the earth and the moon, and turned the handle.</p>
<p>The great computing machine, at once, started steaming, then crashed and burned. This event marked the birth of something known as the ‘representation’. The computation had fallen from the realms of pure and accurate integers.  Unsavoury things such as precision, FLOATING precision, <em>LOSS OF</em> <em>FUCKING</em> precision, and others, came forth from the mouth of the ‘representation’ in a torrent of vomit.</p>
<p>The numbers we meant was, if you will, the <strong>will</strong> of the computation. The numbers we entered and the numbers that came out, were the <strong>representation</strong>. This idea, naturally, was met with much disgust. Many people tried to pretend that this was merely a passing idea, and that once we get finer cogs and smaller gears and stronger handles, representation will get closer and closer to the will, and all will be good, and we’ll be able to enter the Garden of Eden once more.</p>
<p>This day, alas, never came. In the meantime, though, the duality of the computation became the norm. The representation was not going away, and even though it was still vomiting forth the torrent of unsavouriness, people had grown to accept them.</p>
<p>The will,<strong> </strong>or the<strong> requirement</strong>, was correct. Representation that faithfully conveyed the will, was a correct program. Requirements were <strong>romantic</strong>.</p>
<p>Then came the War, and everything changed. It was almost like a back pedalling by the community, almost as if they were gripped by a nightmare. The will was not enough. It was not correct enough, they said, because it’s not done in UML.</p>
<p>What is UML? Asked a few. Most of those who asked were sent to the Camps. Those who escaped – the lucky ones – were captured soon and promptly burnt at stakes. Lucky bastards.</p>
<p>The tyranny of FORM and DIAGRAM and ARCHITECTURE and PATTERNS and CAPITAL LETTERS swept across the world, sometimes like the Black Death, and sometimes like the Pneumonic Plague. Sometimes, less often, it was like Cholera.</p>
<p>For those who remembered the days of the good will and not-so-bad representation, it was a sad time. This dark, dark period, was referred to as the <strong>Modern</strong> period, because that’s when they started chronicling the changes, and of course it was Modern back then.</p>
<p>The madness hailed all things strict and formal. <strong>Sp</strong><strong>ecification</strong> was the new correctness.</p>
<p>But as we approached the turn of the century for the second time in the history of the Code, there came to be a new school of thought – one that said, the specification might as well exist, but it really doesn&#8217;t matter if it’s not going to RUN.  If they didn’t run, said these <strong>Post Modernists</strong>, they aren’t codes at all. Do they even exist? How do we measure the correctness of something that exists, against something that doesn’t? Isn’t that like a cruel trial where you&#8217;re not even told what you&#8217;re being accused of?</p>
<p>So these reckless, shitless pimple-faced kids, who were now in their late-20s, started making up their own ‘correct answers’, or also known as ‘<strong>tests</strong>’. Of course they weren’t really correct, but they were steadfast. They said it didn’t matter whether those correct answers were really correct or not. The correctness, they argued, could only be found in the constant interplay between the code and the test.</p>
<p>The pure and platonic logos of the computation was pushed back to the back room. The line between the code and the correct test, between the correct code and the wrong test, and vice versa, blurred. The line between art and trash, promiscuity and chastity, vice and virtue, high-tech and low-tech, hipsters and yuppies, phone and computers and cameras and TVs and portable navigation devices, blurred.</p>
<p>And we find ourselves in this blurry time. Are we any closer to finding out what the correct code is? Probably not.</p>
<p>Not all is lost, however – I take a great relief in thinking that the era of the Black Death, UML and other horrors is now over. The era of bad music, bland building and startlingly ugly furniture is finally over.</p>
<p>The quest of finding out what the correctness of code is, is probably a bit more arduous than the quest of writing the correct code. But only because it’s hard, it does not mean that we get to give up. The best we can do is to question. Keep questioning, whether the code we’re writing is correct, and whether how we judge the correctness of the code is correct.</p>
<p>And by the end of our times, or by next Tuesday, we might catch a glimpse of the next mighty ones.</p>
]]></content:encoded>
			<wfw:commentRss>http://sdk.org.nz/2009/07/25/in-the-beginning/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Burnt Out Programmer</title>
		<link>http://sdk.org.nz/2009/06/22/a-burnt-out-programmer/</link>
		<comments>http://sdk.org.nz/2009/06/22/a-burnt-out-programmer/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 10:50:15 +0000</pubDate>
		<dc:creator>Justin Kim</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://sdk.org.nz/?p=132</guid>
		<description><![CDATA[Well, here we go. I guess this is my story. If there were one thing worthwhile that was going to come out of this blogging thing, this would be it. So listen up. Also, disclaimer: chances are, if you&#8217;re reading this, you probably know at least a few people from this story. I do not [...]]]></description>
			<content:encoded><![CDATA[<p>Well, here we go. I guess this is my story. If there were one thing worthwhile that was going to come out of this blogging thing, this would be it. So listen up. Also, disclaimer: chances are, if you&#8217;re reading this, you probably know at least a few people from this story. I do not mean to insult or belittle or judge anyone in the story. It is purely as I perceived them, and how I felt AT THE TIME.</p>
<p>About three years ago, I was working for this company &#8216;A&#8217;. I had been working for this company for more than 4 years by then, which was also my first full-time employer.</p>
<p>At first, I really enjoyed it. Colleagues were good, the boss was really good, the work was interesting, and I got recognition for the work I did. Also, the money was good. I really had very little to complain about.</p>
<p>Then slowly but surely, I got sick of maintaining the same software month after month. Who wouldn&#8217;t? So I asked the boss-man that I be given something new to work on. He was most accommodating, and I was given a new product to develop and a whole new team (which I quickly populated with my close friends) to build something completely new, from scratch. I was ecstatic. It was tremendous amount of fun, while it lasted.</p>
<p><span id="more-132"></span></p>
<p>After a while, though, things started to go sour in the company &#8216;A&#8217;. We had a new CEO, whom I felt really didn&#8217;t fit into the company culture. We also relocated, and the new working environment did not allow my &#8216;team&#8217; to work effectively as we did previously. The upper management (the new CEO and the boss-man) felt that we were not delivering our product on time, we had marketing woes, and so on.</p>
<p>The new product lacked a clear direction, either technical or otherwise. No one in the company exactly knew what it did and whom we intended to sell it. The management changed direction whenever there was a potential customer. It went like this:</p>
<p>A potential customer would require a customised demo, but the suggested sample would cause some performance issues on our pre-alpha version. So we were told to improve the performance across the board, and we made some strange technical decisions to make it go fast. Then the next week, another potential customer would come along and tell us that they&#8217;d like to run it on .NET rather than Java, so we spent a week porting all of our code, like maniacs.</p>
<p>At this stage, it was impossible to keep the development team focused. We got frustrated. None of the customised demos were spectacular. We didn&#8217;t win any of those contracts, and the upper management got frustrated as well.</p>
<p>Feeling that our team was not performing, they ordered a feature-freeze on our product. The team was effectively disbanded, save about one and a half FTE (full time equivalent) for the maintenance and even more demo-building. I was taken off the product team, and put to something else.</p>
<p>That position is what I recall as the least fun time I had in the industry. I was not able to touch any of the code for our core products, I was on maintenance of a side project, and I spent my days answering calls from our clients. I felt that I was in tech-support.</p>
<p>Frustrations piled up, and so did the personal friction between various colleagues. My ex-team members left  the company almost all at the same time &#8211; within a window of a couple of months. I really couldn&#8217;t get along with the CEO. Although at the time I attributed all my problems to other people, now it&#8217;s clear to me that I was the morose bastard who was being difficult.</p>
<p>Then I got into a discussion with a friend, who also has been in the I.T. industry for a few years. She told me that she intended to leave the industry for once and for all, because it wasn&#8217;t right for her. She was going to pursue a whole new career, starting over. Encouraged by her actions, I decided to leave the industry as well. I didn&#8217;t set any concrete targets. I thought may be about three months before I started looking for a new job.</p>
<p>I went travelling. After about a month of not working, I stopped thinking about work completely. I stopped touching computers at ALL. I read books, climbed, cooked, ate, drank, played with friends, and so on. My perception of time became.. strangely real. I started counting time with the passage of the moon and the length of the day, instead of working weeks.</p>
<p>This state of mind lasted, more or less, for about eight months. I say again: for the eight months, I did not sit in front of a computer for more than an hour at a time. In a typical month, my computer-time would be around 30 minutes a week.</p>
<p>I stopped thinking in terms of problem solving, modelling, structuring, simulating, all the mental tools that I used for &#8216;work&#8217; went out the door. I got to the point where, when I was making a cup of tea, I was able to concentrate all my effort in making that one cup of tea, and drinking it.</p>
<p>I became single-minded. If I wished to do something, I did it with a complete focus. Mind you, I was not managing difficult problems. I was trying to get things done such as &#8216;eat something&#8217; and &#8216;drive to the next village, where I can eat something&#8217;. Occasionally I had to convert longitude-latitude into map grids, but that was a simple task with a calculator.</p>
<p>Then all of a sudden, when I was driving to the next village so I could eat something, in the expanse of the Mongolian desert, I had an epiphany. A part of my brain that was turned off eight months ago, spontaneously rebooted. Wherever I saw, I saw patterns. They arranged themselves into problems, which I&#8217;d try and solve. Mole-rat holes on the ground would become 8-Queens. Longitudes and latitudes were prime numbers &#8211; or were they?</p>
<p>And I liked it. It was like finding an old friend. Even though I loved the simple, clear thought process devoid of any background threads analysing everything, I realised, in the end, that I did those things for living because I Liked It. I went to a university to study it because I Liked It.</p>
<p>From there, returning to the industry was a brain-dead decision. I may have lost a year or so in my career, but I regained something that so few people in this industry seem to retain, especially when they become worldly and wise after a few years out of the university &#8211; the knowledge that I do what I do for no other reason than that I Like It.</p>
]]></content:encoded>
			<wfw:commentRss>http://sdk.org.nz/2009/06/22/a-burnt-out-programmer/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Musings on developing across time zones</title>
		<link>http://sdk.org.nz/2009/05/23/timezones/</link>
		<comments>http://sdk.org.nz/2009/05/23/timezones/#comments</comments>
		<pubDate>Fri, 22 May 2009 15:55:07 +0000</pubDate>
		<dc:creator>John Hanson</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://sdk.org.nz/?p=98</guid>
		<description><![CDATA[A few years ago, when I was a sheltered young programmer&#8230; I was approached by a reasonbably well known firm in Auckland to see if I wanted to be an offshore development manager. This came about through a rather long list of co-incidences. but the general upshot of which would be that I would have [...]]]></description>
			<content:encoded><![CDATA[<p>A few years ago, when I was a sheltered young programmer&#8230; I was approached by a reasonbably well known firm in Auckland to see if I wanted to be an offshore development manager. This came about through a rather long list of co-incidences. but the general upshot of which would be that I would have to got to live in a small South East Asian country and manage developers doing custom development for clients back home. I eventually declined the offer for a number of reasons and went back to my New Zealand code monkey duties.</p>
<p>I&#8217;m now a few years older, and a few years wiser; and I&#8217;ve found myself in a far off country trying to organise developments in a country 26 hours by plane away.</p>
<p>So, I thought I&#8217;d share some of the tips I&#8217;ve picked up from the experience so far. And for the sake of lazyness, I&#8217;ll write it as an &#8220;all time top 5&#8243; list, a-la High Fidelity.</p>
<p>5) It helps if the two ends are culturally similar. I don&#8217;t mean culturally similar with regards to race, relgion etc&#8230; rather it helps when the two organisations are similar in ethos. Do you both have a similar level of commitment to clients? Do you both work similar hours? Have similar expectations of what constitutes an acceptable level of testing/documentation/speed of development?</p>
<p>4) Try and get the ability to allow both sides to access source. This gives you the ability to check progress&#8230; fix bugs and give suggestions that you wouldn&#8217;t otherwise be able to early on in the development cycle.</p>
<p>3) You need to clearly define the responsabilities at each end.. which country is responsible for tracking the project state? code deficiencies? documentation etc&#8230; Preferably there needs to be one designated person at either end ultimately responsible for deliverables. Without such a person, deliverables have a habit of languishing in the bowels of the development shop without progress.</p>
<p>2) Personal relationships are a key factor to making things work. Having met the other person at the other end of the phone can make up for a lot of process deficiencies. Put some people on a plane to meet the folks at the other end&#8230; if you haven&#8217;t met the side, your business is likely to suffer. Try and foster relationships not just with the senior members of the other side,  as the developers will likely be more open to going the extra yard for you if they have a face to put the work to.</p>
<p>1) Communicate. Daily if possible. Emails good, IM is better, Phone calls are the best. Make sure each side is aware of what&#8217;s going on&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://sdk.org.nz/2009/05/23/timezones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random thoughts on Logging</title>
		<link>http://sdk.org.nz/2009/04/24/random-thoughts-on-logging/</link>
		<comments>http://sdk.org.nz/2009/04/24/random-thoughts-on-logging/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 04:46:07 +0000</pubDate>
		<dc:creator>Justin Kim</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://sdk.org.nz/?p=124</guid>
		<description><![CDATA[Tim writes Log[...] things that you [...] care about[...]. I couldn&#8217;t agree more. I&#8217;ve come across this guy, who wrote in this book that we should all stop commenting. Instead, if you needed to comment, log! What an interesting idea, I thought, so I started doing it for a little project. Of course, comments on [...]]]></description>
			<content:encoded><![CDATA[<p>Tim writes</p>
<blockquote><p>Log[...] things that you [...] care about[...].</p></blockquote>
<p>I couldn&#8217;t agree more.</p>
<p><span id="more-124"></span>I&#8217;ve come across this guy, who wrote in this book that we should all stop commenting. Instead, if you needed to comment, log!</p>
<p>What an interesting idea, I thought, so I started doing it for a little project. Of course, comments on classes and methods remained, but all in-line comments were converted into log messages.</p>
<p>A few things became very apparent very quickly:</p>
<ol>
<li>Logging messages were littered with obscenities.</li>
<li>The normal operation of the program generated a LOT of logging messages. This was OK, since the code was actually doing some complicated thing that I wasn&#8217;t fully used to.</li>
<li>All the &#8216;easy&#8217; part, that we don&#8217;t normally comment on, don&#8217;t get logged at all. This caused a few problems. Without those messages, though, the logging messages didn&#8217;t &#8216;flow&#8217;. That is, it would jump from one difficult part, without giving me any closure on what was happening, to another difficult part.</li>
<li><strong>If you include the working variables into your logging statements, you practically have effectively compiler-checked comments.</strong></li>
</ol>
<p>After a while, though, it became evident that this approach had its limitations and I relented, and my boss complained about the massive giganto logging file, but that&#8217;s a whole another story.</p>
<p>.J</p>
]]></content:encoded>
			<wfw:commentRss>http://sdk.org.nz/2009/04/24/random-thoughts-on-logging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s not done yet</title>
		<link>http://sdk.org.nz/2009/04/24/ind/</link>
		<comments>http://sdk.org.nz/2009/04/24/ind/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 22:59:35 +0000</pubDate>
		<dc:creator>Tim Sutherland</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://devtim.wordpress.com/?p=51</guid>
		<description><![CDATA[It&#8217;s good for software developers to experience joining projects that are at different stages of their development lifecycle. At the start, faced with an empty repository where you get to make important decisions every day, write a lot of code and functionality, and understand how everything fits together. In the middle, worrying about all those [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s good for software developers to experience joining projects that are at different stages of their development lifecycle. At the start, faced with an empty repository where you get to make important decisions every day, write a lot of code and functionality, and understand how everything fits together. In the middle, worrying about all those little details, dealing with testers raising defects, running into gotchas that obliterate fundamental assumptions, taking an application into production. And at the &#8216;end&#8217; when a project is already running in live, fixing bugs and adding new functionality to a codebase you don&#8217;t really understand, where writing one line of code that doesn&#8217;t cause breakage is an achievement. (Ok, so I&#8217;m talking about writing server-oriented &#8220;business&#8221; applications. If you&#8217;re working on different types of software or in different environments then your mileage may vary.)</p>
<p>At my current job I&#8217;ve been fortunate enough to work on three projects covering each of these cases and I&#8217;ve learnt a few things along the way.<br />
<span id="more-51"></span><br />
The first is that writing lots of code and making decisions is fun! But when you only work on that part it&#8217;s easy to look down on those who work on the project later. Ha! I wrote 90% of that in 4 weeks, now you&#8217;re spending months just adding trivial enhancements around the edges without really understanding what&#8217;s going on.</p>
<p>What you miss though, if you never have to take applications into live and beyond, is that there are a whole lot of things you can do that would make other people&#8217;s lives a whole lot easier if only you knew. You&#8217;ve got to see the issues that operations have to deal with in order to get the &#8220;yeah, there&#8217;s no way you could know that&#8221; empathy.</p>
<h2>Logging</h2>
<p>When you&#8217;re doing development, you don&#8217;t need to have very good logging. There&#8217;s a problem? Well, I&#8217;ll just read the code or step through a debugger. Once the application goes to testing it gets harder &#8211; um, I can&#8217;t reproduce that, can you give me more information? Production is worse still, with weird intermittent issues that operations need to detect and deal with even before talking to developers.</p>
<p>The first rule of logging is that when the application is running normally, the logs should be &#8220;clean&#8221;. Right from the beginning of development, we should keep an eye on what&#8217;s being logged. Do we get errors or warnings under normal operation? Fix them. You don&#8217;t want to be in a situation where you&#8217;re looking at a log full of errors and trying to figure out which ones are &#8220;normal&#8221; and which indicate a problem.</p>
<p>What do the logs contain when run at the level they&#8217;re going to be in production. We&#8217;re not running at DEBUG level &#8211; is there still enough information to see what&#8217;s going on. Are there lots of messages about trivial things and very little about other important parts of the system? Are there multiple lines of code that log the exact same message for different reasons?</p>
<p>Logging is one of those things that you need to care about right from the start. If you don&#8217;t keep an eye on it you&#8217;re never going to get it right. Functional (end-to-end) tests are useful here &#8211; check the output when they&#8217;re run.</p>
<h2>Environment issues</h2>
<p>I get really sick of dealing with P1 &#8220;defects&#8221; due to incorrectly set up test environments. The application fails with an error? What error&#8217;s that then. &#8220;table FOO doesn&#8217;t exist&#8221;. Or the reference data isn&#8217;t set up correctly &#8211; &#8220;just don&#8217;t do that&#8221; and everything will be ok.</p>
<p>What I do these days is keep a list of environment issues in a table on the wiki. Everytime someone screws up an environment because they forgot to apply a database patch, I add a row to the table with a query and expected output that you can use to verify that the error hasn&#8217;t occured again. You can bet that if a mistake is made setting up one environment that it&#8217;s pretty likely to happen again in others.</p>
<p>For reference data the application really needs to apply validation rules to the configuration at load time. It&#8217;s not good enough to say that &#8220;we don&#8217;t support configuring those things together&#8221; if the application could just as easily detect the situation and give an error.</p>
<p>One of my favourite head-smacking issues with testing is when multiple deployments of the application end up pointing at the same database. This is especially fun when they&#8217;re different versions, and you spend hours trying to figure out how on earth this behaviour is happening in version 2.5.2 when we fixed this back in 2.5.1. This happens during development as well when you &#8220;temporarily&#8221; tell a colleague to use your development database. One way to avoid this problem is to have the application post regular updates to a &#8216;heartbeat&#8217; table including a unique runtime identifier (e.g. random number generated at startup), last update timestamp and version information. Then you can run a query to find those identifiers that have updated in the last 5 minutes and see who&#8217;s really touching those tables.</p>
<h2>Requirements changes</h2>
<p>Requirements churn is a good thing. As we find out more about an application and how it&#8217;s used we will naturally want to change earlier decisions. The problem is that it becomes difficult for anyone to know how the system is supposed to behave &#8211; or actually behaves. The requirements have changed, but did we ever actually have a chance to implement those changes? How did we &#8220;interpret&#8221; those parts where there was hand-waving? Where did we intentionally deviate without telling anyone <img src='http://sdk.org.nz/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  What was that conversation where I spoke to a business analyst and they &#8220;clarified&#8221; some details of the requirements but never wrote it down?</p>
<p>On one of my projects back in NZ I was a bit laissez-faire about coming up with system behaviour that &#8220;made sense&#8221; without telling anyone. It wasn&#8217;t until we hit testing and I realised that testers had no better source of information than the original business requirements that I realised that although the software functioned well, there were a whole bunch of people who needed to understand how the application worked without reading the code.</p>
<p>What I do these days is to write up wiki pages whenever I&#8217;m implementing a major piece of functionality, describing precisely the behaviour I&#8217;ve actually implemented. If a requirement was ambiguous and I had a conversation with an analyst, I write down the conclusion in my document. Don&#8217;t leave it up to them to do it.</p>
<p>The great thing about this approach is that it gives you a safe way forward when presented with imperfect requirements. You can go ahead and get most of the work done and when it gets to testing and they interpret the requirements in a different way, go and mark it as &#8220;Functions as Specified&#8221; with a link to your document. I did that twice today and it makes life just that bit more pleasant. Quite often when there are multiple ways of designing some functionality it doesn&#8217;t matter all that much which one you pick, so long as people can easily find out which one that was. Even if it later turns out you mis-interpreted the requirements, presented with a clear description of the actual system behaviour the business may decide that the implementation is good enough, and that the requirements should be retrospectively changed to match. Won&#8217;t Fix!</p>
<h2>Bugs in live</h2>
<p>If you hit a bug outside of production, there&#8217;s not too much of a problem. We&#8217;ll just fix the code, re-run the test, sorted. When you hit a bug in live though, you have to recover from it.</p>
<p>Bugger.</p>
<p>This is the hard part of writing &#8220;business applications&#8221;. Making them reliable. Most of the time we just don&#8217;t bother and then there&#8217;s a major panic when anything goes wrong. You&#8217;ll have requirements that cover &#8216;negative flows&#8217; by saying &#8220;create an alert&#8221;. Great, so the live system has just logged an alert saying we&#8217;re fucked. Time to go on holiday. Otherwise you&#8217;re sitting in a room full of worried managers who want you to find a workaround and fast.</p>
<p>The best aproach I&#8217;ve found for creating reliable applications is to expect them to fail. Expect that there will be bugs. Expect that hardware will fail. Expect that exceptions will occur. Expect that we&#8217;re going to have to recover.</p>
<p>How do we do that?</p>
<p>There&#8217;s no such thing as a database table that just contains internal application state that no-one other than the developers needs to understand. In some cases operations are going to have to hack this data &#8211; the structure and contents need to be well documented and understood. Functional tests are useful here; although some people claim that these tests should only assert against external interfaces and not against the database, I argue that the database is a semi-public  interface. It&#8217;s not as formal and fixed as a web service, but developers, testers and operations all have a need to know how the database changes under processing.</p>
<p>Have hooks for inserting workarounds into live without deploying a new release (aka legitimate backdoors). For example, if the system applies validation rules to input messages, have some support for conditionally turning some of the rules off. One application I worked on was composed of dozens of little callable services with XML interfaces. The web interface included a developer-only page that had a textfield (service name) and textarea (xml) allowing you to send arbitrary internal messages to the live system. Dangerous but handy. Make sure you try your call in a test environment first! And don&#8217;t forget to secure it.</p>
<p>Expect that processing is going to fail, manual workarounds be applied, and we&#8217;ll then want the system to continue. The project with the callable services was at a Telco and integrated with billing systems and other monstrosities. Naturally some customers would have accounts that were &#8230; unusually set up, and would contradict any assumptions we could possibly make. To deal with this I turned the processing flow into a state diagram and then made it so that if an error occured at any state the system would set a &#8220;manual&#8221; flag on that customer&#8217;s record, generate an alert message, allow for any manual fixups and have a &#8220;reprocess&#8221; button to try again.</p>
<p>Taking that approach introduces some design contraints into the system that you simply can&#8217;t add as an afterthought. It&#8217;s easy and convenient to say, well at this processing stage we really need this piece of information, so instead of working it out again we&#8217;ll just persist it to the database at an earlier stage. That&#8217;s all well and good until the earlier stage didn&#8217;t actually go through automated processing &#8211; someone hacked it together by hand and then continued.</p>
<p>Whenever anyone pontificates about &#8220;loosely-coupled components&#8221; that&#8217;s what I think of. If Component A doesn&#8217;t actually run, will Component B still work, or does it depend on some of the internal behaviour of A?</p>
<p>Don&#8217;t try too hard to enumerate all the different things that can go wrong. Just assume that any component can fall over half way in some unexpected way, possibly leaving data in a corrupted state. If you can handle that you can handle anything. Data corruption is an interesting one, actually. Try to segment data to that if say the data related to one customer is corrupted, processing can still continue for other customers. This is similar to sharding that&#8217;s done for performance reasons.</p>
<h2>Functional Tests</h2>
<p>Ok, so I&#8217;ve talked about functional tests in a previous post. That&#8217;s because they&#8217;re great. When a problem occurs in live and you can in ten minutes write a test to replicate the problem and experiment with workarounds &#8211; I&#8217;ve done that many times. When a new developer joins the project and can actually understand and discover functionality and avoid breaking half the application &#8211; yup.</p>
<h2>The rest</h2>
<p>There are plenty of other issues to consider. How do we deal with upgrades &#8211; can we migrate old data? So you&#8217;re changing the database schema &#8211; are you aware that people have written systems that perform queries directly against your database? They&#8217;re going to break and you don&#8217;t even know it.</p>
<p>Reporting is a great one. It seems that &#8220;reports&#8221; are always something that get implemented at the last minute and are a nightmare because, surprise surprise, they want some information that, sorry, we just aren&#8217;t representing in our domain model. It gets even worse when you have performance challenges and you&#8217;d really like it if the application would&#8217;ve persisted certain intermediate statistics as it&#8217;s processing rather than us having to work everything out afterwards. Actually, I could do a whole &#8216;nother post on performance, and on system integrity checking (reconciliation), deployment (clustering) &#8230;.</p>
<p>I&#8217;d be interested in hearing any ideas or war stories other people have about dealing with live systems. Leave them in the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://sdk.org.nz/2009/04/24/ind/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DVORAK keyboard EPIC FAIL?</title>
		<link>http://sdk.org.nz/2009/04/17/dvorak-keyboard-epic-fail/</link>
		<comments>http://sdk.org.nz/2009/04/17/dvorak-keyboard-epic-fail/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 09:43:15 +0000</pubDate>
		<dc:creator>Eben Bruyns</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[dvorak]]></category>
		<category><![CDATA[keyboard]]></category>

		<guid isPermaLink="false">http://sdk.org.nz/?p=107</guid>
		<description><![CDATA[This is not the topic I wanted to blog about next, but I&#8217;m mad as hell and as pointed out by Justin today I&#8217;m probably on a bit of a crusade! A little background first&#8230; Today a rather strange thing happened to me, I typed one another dev&#8217;s DAS Keyboard so my mind switched into full [...]]]></description>
			<content:encoded><![CDATA[<p>This is not the topic I wanted to blog about next, but I&#8217;m mad as hell and as pointed out by <a title="Justin" href="http://sdk.org.nz/author/justin/">Justin</a> today I&#8217;m probably on a bit of a crusade! A little background first&#8230;</p>
<p>Today a rather strange thing happened to me, I typed one another dev&#8217;s DAS Keyboard so my mind switched into full on touch typing mode, this lasted about 20 seconds before I started typing DVORAK instead of QWERTY (I can touch type both layouts &#8211; ironically I&#8217;m typing this on QWERTY). I&#8217;ve also been trying since around 1999 or 2000 to switch to the DVORAK layout but I almost without fail revert to QWERTY after a few weeks. I don&#8217;t revert because DVORAK is simply too hard or too slow because I&#8217;ve actually managed to build up my DVORAK touch typing speed to something that is almost useable. </p>
<p><span id="more-107"></span>There are certain trends in the IT industry that just bugs me (and believe me that&#8217;s an understatement, ask anybody who&#8217;s had a similar conversation with me!) for instance the worst possible technology will be the industry standard! There are many examples of this, I&#8217;ll leave this as an &#8220;exercise&#8221; for you &#8220;the reader&#8221; to research. Back to the topic at hand, QWERT vs DVORAK is an excellent example &#8211; now I realise that some of you will claim that my statement is false and there is no scientific proof blah blah blah, I&#8217;m drawing on personal experience and in MY OPINION QWERTY sucks! Personally I like the way DVORAK feels while typing and that is why I believe that the worst layout is the standard. If you&#8217;ve read this far you might think that this is going to be another lecture on why you have to switch to DVORAK, let me assure you it is not!</p>
<p>So why am I mad as hell? There is a force that keeps me from my favorite keyboard layout and I wish I could eliminate it, unfortunately I do not think I&#8217;ll be able to. What&#8217;s my current options to get onto the DVORAK layout? I can use a soft switch by changing my keyboard layout on the OS layer, this might be fine for your average user that lives on a single machine or at worst case have a machine at home and a machine at work. In my case my home machine is also my work machine so theoretically I should have my cake and eat it? Another alternative is to buy a hardwired DVORAK keyboard, not only are these hard to find, some of them are just plain <a href="http://www.fentek-ind.com/dvorak.htm">silly looking</a>, <a href="http://www.typematrix.com/dvorak/">tacky</a> or <a href="http://www.kinesis-ergo.com/contoured_usb.htm">very expensive </a>. If there&#8217;s another one I&#8217;ve missed let me know in the comments I&#8217;d like to investigate it!</p>
<p>Interestingly neither of these actually solve my problem. I&#8217;m a laptop user, I&#8217;ve got a MacBook Pro to be exact, I&#8217;m also a Microsoft developer which means I spend a lot of my time using VMWare to run windows, not only that I work on many server environments via remote desktop and I even remote to some of my other Mac&#8217;s. The servers I use are shared machines which other developers use too and they are not DVORAK users either. So the first problem is that when I switch my Mac to the DVORAK layout it&#8217;s all fun and games until I move to windows VMWare will treat my keyoard as QWERTY regardless of what the Mac thinks it&#8217;s using, and right fully so the hardware is wired for QWERTY so it makes perfect sense, it&#8217;s virtualised and not dependent on any Mac settings. My real issue starts with the remote desktop connections, if Windows is set to use DVORAK remote desktop will blatantly ignore this and treat my keyboard as QWERTY &#8211; this does not make sense since it&#8217;s NOT virtualised and I&#8217;m merely sending the remote machine keystrokes! Suddenly I have to switch every machine I connect to to DVORAK when I only want my own machine to be switched and send the keystrokes as DVORAK instead of QWERTY to the machines I connect to. This works well when I&#8217;m using a terminal and ssh into a remote machine, why does this not work for other remote connections?</p>
<p>Another problem with the DVORAK layout is that short cut keys are usually chosen for their location on they keyboard or due to their relation to each other, undo, cut, copy and paste for example. DVORAK scatters these keys all over the keyboard so it makes no sense using them anymore and you loose all the benefits of using DVORAK instantly. There&#8217;s a partial solution to this with DVORAK layouts that switch to QWERTY when you hit the command key on the apple (I&#8217;ve not been able to find the windows equivalent yet, but it does not matter since windows produces too many other headaches besides this one). Don&#8217;t even get me started on trying to use EMACS or Vim (I use both I&#8217;m not religious!) on DVORAK keyboard, things go bad VERY quickly!</p>
<p>So my solution to this, and this is a theoretical solution I highly doubt I&#8217;d be able to find a practical implementation of it anywhere:</p>
<p>Change my laptop keyboard layout on a firmware (possibly even hardware, but I don&#8217;t believe it&#8217;s required) level, but I don&#8217;t want a standard DVORAK layout because of the short cut keys issue. Come to think of it if windows copied more of Mac OS X you might actually be able to globally remap all short cut keys to DVORAK equivalents. This might only get you part way there since there&#8217;s other issues on Mac OS X that will prevent you from doing this since Cocoa provides this magic and Carbon apps will give you the proverbial finger! The only way this solution will actually function properly will be when implemented on a lower level than the OS and even then it will be far from perfect.</p>
<p>So in conclusion DVORAK will ultimately be an EPIC fail, this sucks and gets my blood boiling, I really do like the DVORAK layout and in a perfect world there would be no QWERTY short cut keys would have been designed around DVORAK so all the counter arguments would also go away. Personally I feel DVORAK is better because on a subconscious level I automatically switch to it even though I spend 99.9% of my time typing on QWERTY. So if you&#8217;re thinking about switching to DVORAK I can honestly not recommend it unless you&#8217;re living on an isolated computer (which might be fine for most people).</p>
<p>DVORAK FAIL &lt;/ Rant&gt;</p>
<p>P.S. Please prove me wrong! I&#8217;d like nothing more!</p>
<p>P.P.S. You might have noticed that I did not mention Linux in this post, I&#8217;ve given up on Linux many years ago due to the amount of pain associated with it (I did try DVORAK on it though and it sucked back then), my linux pain argument could fill a book so I refuse to go into it!</p>
]]></content:encoded>
			<wfw:commentRss>http://sdk.org.nz/2009/04/17/dvorak-keyboard-epic-fail/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>On Abstraction and Encapsulation</title>
		<link>http://sdk.org.nz/2009/04/07/on-abstraction-and-encapsulation/</link>
		<comments>http://sdk.org.nz/2009/04/07/on-abstraction-and-encapsulation/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 21:57:39 +0000</pubDate>
		<dc:creator>Justin Kim</dc:creator>
				<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://justinmetatech.wordpress.com/?p=23</guid>
		<description><![CDATA[People don't think in terms of contracts. They think in terms of behaviours, hows and whys.]]></description>
			<content:encoded><![CDATA[<p style="text-align:right;"><em><br />
</em></p>
<p style="text-align:right;"><span><em> </em></span><em>&#8230; or &#8216;OO is hurting the industry because encapsulation&#8217;</em></p>
<p>The ability to abstract is a powerful one. I have seen my share of uni-freshers. There are a million different kinds of students and they all have their different ways of understanding. Obviously, some are better than others, and some are worse.</p>
<p>The worse kind of students are those who cannot abstract. Of course all human beings can abstract to some degree or other, otherwise no one would be able to drive a modern motor vehicle, or eat a pie. But some students insist on &#8216;knowing all the details&#8217; because &#8216;that&#8217;s how they understand things&#8217;.</p>
<p>To those students, the concept of an API is difficult to explain.</p>
<blockquote><p>&#8216;You call this method, and fun things happen.&#8217;<br />
&#8216;But how does it happen?&#8217;<br />
&#8216;You shouldn&#8217;t care.&#8217;<br />
&#8216;But I <em>need to know</em>!&#8217;</p></blockquote>
<p>And there are sighs. They most likely won&#8217;t pass 101, or if they do get through, they&#8217;ll be miserable for the rest of the course, unless you&#8217;re a hot chick and have a full set of 14 geeky Asian guys to help you out with the assignments.</p>
<p><span id="more-94"></span></p>
<p>There are a couple of explanations that can be offered for this. Most people, even some experienced developers, tend to side with one explanation: they are bad at abstraction. Without it, you won&#8217;t get far.</p>
<p>I beg to differ.</p>
<p>The reason why they won&#8217;t do well is that they are asking clearly the wrong person. They should not be asking lab demonstrators, who in all their infinite (well, 2 extra years&#8217; worth of) wisdom, <em>have no clue </em>about how that API works. They should be asking the professors, the writers of that API, internet forums, or read the documentation, whatever. The information is available, but not from the lab demonstrators who get paid 13 dollars an hour including tax.</p>
<p>Their weakness is lack of confidence that stops them from asking difficult questions to the proper authority, and laziness in their quest for information.</p>
<p>Look at the top students on the other hand. The chances are, they fully well know how their favourite APIs work underneath the covers. They probably know how the chips are manufactured, how gates are made, circuits are designed, machine code is executed, assembly code is written, compilers are architected, and so on, and so forth. All the way up, all the way down.</p>
<p>My point is this: abstraction is a powerful tool, but it&#8217;s only a tool and it&#8217;s only one of the tools.</p>
<p>To pretend that the students &#8216;shouldn&#8217;t care&#8217; about how an API works is at best ignorant and at worst, well, just ignorant. Of course they should fucking care, you know? Like Knuth or Dijkstra or someone rather really important once said in one of their immortal essays, although what we produce is computer code, we should never forget that what we&#8217;re really crafting is the behaviour of the machine. The runtime <em>matters</em>. It&#8217;s the thing that we&#8217;re trying to get the computer to do.</p>
<p>How else, other than finding out what your function call does, are you going to determine what the computer will do? Reading documentation is fine and dandy, but that guarantees neither the completeness nor the correctness.</p>
<p>You will never learn how to fix a car by reading the owner&#8217;s manual, or even the repair manual, or even the blueprints of the car straight from the manufacturer. You have to open it up. Take the wheels off. Lift the car from its axle. Pry open the diff. Feel how broken that bearing is. Shake it and see what sound it makes. That is how you learn how to fix something. That is how you learn _<em>anything</em>.</p>
<p>Furthering my point, I make this claim: Currently, the &#8216;abstraction&#8217; is severely overrated, especially in OO- and component-oriented programming circles.</p>
<p>What they write is this: the blue button makes it go. The red one makes it go faster. Do not press them at the same time. That&#8217;s the extent of the 90% of the API documentation there are.</p>
<p>And they expect us to work with it. What if you want to make it go slower? The trick is to press the two buttons at the same time, except for in the next minor version update, pressing the both buttons at the same time makes it blow up, and you&#8217;re punished for using an undocumented feature.</p>
<p>&#8216;We told you not to&#8217;, says the smug author. And we agree with him. All the OO people agree that this is the way it should happen. Don&#8217;t do things that you&#8217;re not told to.</p>
<p>But hang on a minute. Don&#8217;t you think that&#8217;s even slightly weird? Why such change in behaviour? Why did it make it go slower in the first version? What deficiency in the original design prompted the authors to make such changes? Wouldn&#8217;t you want to know? Wouldn&#8217;t you be curious?</p>
<p>Most of all, wouldn&#8217;t you be pissed off if it broke your app?</p>
<p>But no. We&#8217;re told it&#8217;s just like a contract between two entities. You keep to the words, and don&#8217;t do things that are not specified it in the contract, or there be consequences.</p>
<p>Bullshit, I say: in the real world, if pressing those two buttons made things go slower for more than 12 months, it would be in the de-facto go-slow-mode contract, which would be enforceable. The wordings of the contract itself be damned.</p>
<p>The proper way to make things would be to let people know why and how the things work. Abstract it, document it, that&#8217;s all fine, but do not hide how and why things happen. Craft every bit, every level of the application correctly, thoughtfully. Then let people see it. Let people see your fucking craftsmanship. If you ain&#8217;t got one, this is a very good time to get one.</p>
<p>This brings around me to the final point: although I started off this article by talking about abstraction, it&#8217;s not about abstraction as such. It&#8217;s about hiding behind it and thinking that kludge is OK as long as you stick to the contract, the API, the interface, whatever.</p>
<p>People don&#8217;t think in terms of contracts. They think in terms of behaviours, hows and whys. When you ring up your ISP, you don&#8217;t have the service contract in your mind. You want the internet to work, and you want them to keep quiet about your midget-porn download usage. Fuck the contract. Who gives a shit? Who even reads them? If they didn&#8217;t have the explicit midget-porn-secrecy clause in their contract, and if they spill the beans, you&#8217;d be furious, wouldn&#8217;t you?</p>
<p>So there. Be honest, write good code, let people see what&#8217;s going on. Do not hide behind the encapsulation. If you do, you&#8217;re a midget-porn lover.</p>
<p>.J</p>
]]></content:encoded>
			<wfw:commentRss>http://sdk.org.nz/2009/04/07/on-abstraction-and-encapsulation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

