<?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>Damian Brady's Blog &#187; Design</title>
	<atom:link href="http://blog.damianbrady.com.au/category/technology/design/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.damianbrady.com.au</link>
	<description>ramblings of a late 20s IT nerd / volleyball junkie / semi-professional drinker</description>
	<lastBuildDate>Wed, 14 Jul 2010 06:49:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Getting into ASP.NET MVC</title>
		<link>http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/</link>
		<comments>http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 14:05:33 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Tech.Ed]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/?p=142</guid>
		<description><![CDATA[It all started when I decided that I&#8217;d rewrite a partially-aborted PHP web app of mine in .Net. The PHP version was relatively functional, but PHP is not my strongest skill, so updating and improving it was hard. Combined with a lack of good quality free time, it meant that I didn&#8217;t have the inclination [...]]]></description>
			<content:encoded><![CDATA[<p>It all started when I decided that I&#8217;d rewrite a partially-aborted PHP web app of mine in .Net.  The PHP version was relatively functional, but PHP is not my strongest skill, so updating and improving it was hard.  Combined with a lack of good quality free time, it meant that I didn&#8217;t have the inclination to update it much.</p>
<p>Much of the design work is already done.  The database schema is solid and it isn&#8217;t trivial &#8211; it took me a number of iterations to get right.  The UI flow has been decided, and at this point, I&#8217;m happy to reuse most of the layout, css and images.</p>
<p>At <a href="http://www.msteched.com/australia/Public/default.aspx">Tech.Ed</a> this year, I heard a lot of great things about <a title="ASP.NET MVC" href="http://www.asp.net/mVC/">ASP.NET MVC</a>.  The Hands-On-Lab I did gave me just enough of it to get me interested, so when I decided I was going to rewrite this thing in .Net, MVC seemed like the way to go.</p>
<p>So I&#8217;m now attempting to learn how it all works, and it&#8217;s going really well.  The secret?  The <a title="NerdDinner Tutorial" href="http://nerddinnerbook.s3.amazonaws.com/Intro.htm">NerdDinner tutorial</a> courtesy of Rob Conery, Scott Guthrie, Scott Hanselman, and Phil Haack (actually I get the impression that <a title="Scott Guthrie's Blog" href="http://weblogs.asp.net/scottgu/">Scott Guthrie</a> wrote the tutorial, but the originating book is authored by all of them).</p>
<p>Seriously, if you&#8217;re looking at playing with ASP.NET MVC, run through this tutorial from start to finish.  I guarantee by the end of it you&#8217;ll be all over the basics, and loving the way ASP.NET MVC is put together.</p>
<p>I&#8217;m looking forward to getting into some real development with this project.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Getting+into+ASP.NET+MVC+-+http://tinyurl.com/yfypc7f&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/&amp;t=Getting+into+ASP.NET+MVC" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/&amp;title=Getting+into+ASP.NET+MVC" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/&amp;title=Getting+into+ASP.NET+MVC" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-gmail">
			<a href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=Getting+into+ASP.NET+MVC&amp;body=Link: http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A It%20all%20started%20when%20I%20decided%20that%20I%27d%20rewrite%20a%20partially-aborted%20PHP%20web%20app%20of%20mine%20in%20.Net.%20%20The%20PHP%20version%20was%20relatively%20functional%2C%20but%20PHP%20is%20not%20my%20strongest%20skill%2C%20so%20updating%20and%20improving%20it%20was%20hard.%20%20Combined%20with%20a%20lack%20of%20good%20quality%20free%20time%2C%20it%20meant%20that%20I%20didn%27t%20have%20the%20incli" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/&amp;title=Getting+into+ASP.NET+MVC" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/&amp;title=Getting+into+ASP.NET+MVC&amp;summary=It%20all%20started%20when%20I%20decided%20that%20I%27d%20rewrite%20a%20partially-aborted%20PHP%20web%20app%20of%20mine%20in%20.Net.%20%20The%20PHP%20version%20was%20relatively%20functional%2C%20but%20PHP%20is%20not%20my%20strongest%20skill%2C%20so%20updating%20and%20improving%20it%20was%20hard.%20%20Combined%20with%20a%20lack%20of%20good%20quality%20free%20time%2C%20it%20meant%20that%20I%20didn%27t%20have%20the%20incli&amp;source=Damian Brady's Blog" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/&amp;title=Getting+into+ASP.NET+MVC" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lessons Learned from Entity Framework</title>
		<link>http://blog.damianbrady.com.au/2009/10/15/lessons-learned-from-entity-framework/</link>
		<comments>http://blog.damianbrady.com.au/2009/10/15/lessons-learned-from-entity-framework/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 04:20:38 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/?p=132</guid>
		<description><![CDATA[So I&#8217;m starting a new project, and we&#8217;ve made the decision to use the ADO.NET Entity Framework for talking to the database. I actually found it quite difficult to get started. Examples on the web seemed to assume that I already had everything installed and ready to go. Step one was invariably &#8220;Add a new [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;m starting a new project, and we&#8217;ve made the decision to use the <a href="http://msdn.microsoft.com/en-us/library/bb399572.aspx">ADO.NET Entity Framework</a> for talking to the database.</p>
<p>I actually found it quite difficult to get started.  Examples on the web seemed to assume that I already had everything installed and ready to go.  Step one was invariably &#8220;Add a new ADO.NET Entity Data Model&#8221;.  That wasn&#8217;t available in my &#8220;Add New Item&#8221; dialog, so I set out to discover how to add the bits I was clearly missing.</p>
<p>After hunting for a while for a download, I found a <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=7fd7164e-9e73-43f7-90ab-5b2bf2577ac9&amp;displaylang=en">CTP Preview 1 built on .Net 4.0</a> (I&#8217;m running 3.5), and some <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=09a36081-5ed1-4648-b995-6239d0b77cb5">Entity Framework tools</a> released as a CTP in 2007.</p>
<p><strong>Lesson 1:  Everything you need comes with the <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=ab99342f-5d1a-413d-8319-81da479ab0d7">Microsoft .NET Framework 3.5 Service Pack 1</a>.</strong></p>
<p>Of course, when I try to find the misleading links now, I find the real one straight away.  Hopefully your google-fu won&#8217;t fail you as mine obviously did.</p>
<p>I had a quick play with it and found that creating classes and relationships between them was mindblowingly easy.  Build up your pretty diagrams or get the designer to build them from a database and suddenly your code can create objects, run LINQ queries against them, bind them to UI controls and keep track of changes as you go.  Brilliant!</p>
<p>So I got to work building up a sample object tree for our new application.  When I was done, I looked for the option to persist the changes to the database.</p>
<p><strong>Lesson 2: You can update your models based on database changes, but not the other way around (<a href="http://www.infoq.com/news/2009/05/Entity-Framework-4">it&#8217;s coming in 4.0 though</a>).</strong></p>
<p>Damn, database first.  Back to the start.</p>
<p>No problem, I abandoned my design and started with the database.  Once the tables were built, generating EF data models was a piece of cake.</p>
<p>Next step &#8211; dependency injection for testing.  I don&#8217;t want to be bound to the database, particularly for testing.  I want to be able to inject fake objects for my tests.</p>
<p><strong>Lesson 3:  EF creates concrete model classes and database contexts.  Dependency Injection is not easy.</strong></p>
<p>Honestly, we were prepared for this one based on some presentations we saw at Tech.Ed.  We have come up with a solution for this, too.  It looks good on paper and everything seems to compile and run ok, but we&#8217;re yet to see whether this holds true as we dig deeper.</p>
<p>Basically, we&#8217;re leaving the concrete models as they are, but we&#8217;re extracting an interface for the ObjectContext class that&#8217;s generated.  Our proxy will provide a fake ObjectContext which doesn&#8217;t talk to the database, but it will mock out real model instances.  If you have any better ideas for this problem though, let me know.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2009/10/15/lessons-learned-from-entity-framework/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Lessons+Learned+from+Entity+Framework+-+http://tinyurl.com/yl88exk&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://blog.damianbrady.com.au/2009/10/15/lessons-learned-from-entity-framework/&amp;t=Lessons+Learned+from+Entity+Framework" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://blog.damianbrady.com.au/2009/10/15/lessons-learned-from-entity-framework/&amp;title=Lessons+Learned+from+Entity+Framework" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://blog.damianbrady.com.au/2009/10/15/lessons-learned-from-entity-framework/&amp;title=Lessons+Learned+from+Entity+Framework" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://blog.damianbrady.com.au/2009/10/15/lessons-learned-from-entity-framework/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-gmail">
			<a href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=Lessons+Learned+from+Entity+Framework&amp;body=Link: http://blog.damianbrady.com.au/2009/10/15/lessons-learned-from-entity-framework/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A So%20I%27m%20starting%20a%20new%20project%2C%20and%20we%27ve%20made%20the%20decision%20to%20use%20the%20ADO.NET%20Entity%20Framework%20for%20talking%20to%20the%20database.%0D%0A%0D%0AI%20actually%20found%20it%20quite%20difficult%20to%20get%20started.%20%20Examples%20on%20the%20web%20seemed%20to%20assume%20that%20I%20already%20had%20everything%20installed%20and%20ready%20to%20go.%20%20Step%20one%20was%20invariably%20%22" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://blog.damianbrady.com.au/2009/10/15/lessons-learned-from-entity-framework/&amp;title=Lessons+Learned+from+Entity+Framework" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://blog.damianbrady.com.au/2009/10/15/lessons-learned-from-entity-framework/&amp;title=Lessons+Learned+from+Entity+Framework&amp;summary=So%20I%27m%20starting%20a%20new%20project%2C%20and%20we%27ve%20made%20the%20decision%20to%20use%20the%20ADO.NET%20Entity%20Framework%20for%20talking%20to%20the%20database.%0D%0A%0D%0AI%20actually%20found%20it%20quite%20difficult%20to%20get%20started.%20%20Examples%20on%20the%20web%20seemed%20to%20assume%20that%20I%20already%20had%20everything%20installed%20and%20ready%20to%20go.%20%20Step%20one%20was%20invariably%20%22&amp;source=Damian Brady's Blog" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://blog.damianbrady.com.au/2009/10/15/lessons-learned-from-entity-framework/&amp;title=Lessons+Learned+from+Entity+Framework" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://blog.damianbrady.com.au/2009/10/15/lessons-learned-from-entity-framework/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2009/10/15/lessons-learned-from-entity-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pride in bad solutions</title>
		<link>http://blog.damianbrady.com.au/2009/06/15/pride-in-bad-solutions/</link>
		<comments>http://blog.damianbrady.com.au/2009/06/15/pride-in-bad-solutions/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 08:05:42 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/?p=109</guid>
		<description><![CDATA[I solved a problem the other day.  It was a terrible solution. It works, but it&#8217;s difficult to be proud of how I solved it. The problem was with MSMQ, but let me describe the problem with a needlessly overwrought metaphor. Every week for the last 5 years, you&#8217;ve been sending a bill to one [...]]]></description>
			<content:encoded><![CDATA[<p><strong>I solved a problem the other day.  It was a terrible solution.</strong> It works, but it&#8217;s difficult to be proud of how I solved it.</p>
<p>The problem was with MSMQ, but <strong>let me describe the problem with a needlessly overwrought metaphor</strong>.</p>
<p><strong>Every week for the last 5 years</strong>, you&#8217;ve been sending a bill to one of your clients.  You have an infinite supply of envelopes and when Friday comes around, <strong>you print out an invoice, seal it in an envelope, send it by courier to your client, and a couple of days later, you get paid</strong>.  With me so far?</p>
<p>One day, <strong>you decide to start using a different invoice management software package</strong> &#8211; it&#8217;s much prettier and more stable than the old one.  You know, however, that the client doesn&#8217;t want anything in that invoice to change.  You&#8217;re not sure how they process it, but one time your printer smudged an invoice slightly and you didn&#8217;t get paid.  So <strong>everything in that invoice has to be exact</strong>.  Luckly, the new software is capable of printing a pixel-perfect version of the old invoice layout.  So far so good.</p>
<p><strong>You also think you should start using a different courier</strong>.  Your existing courier company (<em>COM+</em>) is fine, but frankly they&#8217;re a bit behind the times.  The delivery drivers are about 80 and they&#8217;re driving some vans that are generations old.  So <strong>you set up a deal with a new company called </strong><em><strong>C-Sharp 3.5</strong></em><strong> to do the delivery for you</strong>.</p>
<p>Still with me?  I told you it was overwrought.</p>
<p>So anyway, <strong>you give your new system a try</strong>.  You print out the invoice, compare it to the old one (spot-on, 100% the same), put it in an envelope, and send it off using the new courier company.</p>
<p><strong>You don&#8217;t get paid.</strong></p>
<p>You contact the customer but they don&#8217;t say much.  Just that <strong>they didn&#8217;t receive a valid invoice</strong>.  The new courier company swears they delivered it to the correct address and they provide proof.</p>
<p><strong>You decide to try again next week and do some investigating</strong>.</p>
<p>The next week, you print out the invoice, compare it to the old ones (still the same), put it in an envelope, and organise for the new courier to pick it up.  <strong>This time though, you follow him</strong>.</p>
<p><strong>He takes your letter, gets in his van, and drives to the client&#8217;s address.  He gets out, puts your letter in the mailbox and drives of</strong>f.  Nothing wrong so far, as far as you can tell, so you wait to see what happens.</p>
<p>Soon, <strong>a guy comes out of the house (which by the way looks exactly like a big black box), opens the mailbox, picks the letter up, and takes it inside</strong>.</p>
<p>You go home, satisfied that the letter made its journey this time.  It must have been a once off.  <strong>But you still don&#8217;t get paid</strong>.</p>
<p>Again, you contact the client and all they&#8217;ll tell you is that they didn&#8217;t get a valid invoice.  You protest, telling them that you saw them pick it up but to no avail.</p>
<p>Over the next few weeks, <strong>you try everything you can think of to get this new system to work</strong>.  You try looking at the message again after it&#8217;s put in the letterbox and you try sending an invoice created by your old program.  Every time, the seemingly perfect letter gets picked up my the man in the black box, and nothing happens.</p>
<p>No matter how hard you try to work out what&#8217;s going on, nothing helps.  So, like any sensible person,  <strong>you give up and call the old courier company.  They turn up, pick up your invoice, and two days later, you get paid</strong>.  Despite the fact that they&#8217;re apparently doing exactly the same as the new guys, their deliveries get you paid, and the other deliveries don&#8217;t.  <strong>You resign yourself to using the old couriers until they or their vans all die</strong>.  It&#8217;s just a matter of time&#8230;</p>
<p><strong>Fun story, huh?</strong></p>
<p>So in case you&#8217;re a bit slow and didn&#8217;t work out what it was all about, I replaced an app that put a message in a Windows message queue for another (black box) program to pick up.  <strong>The old app was VB6 using a COM MSMQ library, and the new one was C# using the native .Net MSMQ library in the 3.5 version of the .Net Framework</strong>.</p>
<p><strong>No matter how hard I looked, I couldn&#8217;t find ANYTHING different between the messages and where they got put</strong>.  I even dug up a copy of the black-box code and stepped it through a debugger.  When it got to the line saying Queue.Receive(), the message disappeared from the queue, and nothing came back.  <strong>There was no exception thrown!  I watched the message get picked up!  I did a binary comparison of the message contents from the old program and the new program!  No difference at all!  Inexplicable!</strong></p>
<p>The fact that I was putting the message into the Windows Message Queue using a .Net library and picking it up using COM+ seemed to be all it took to break the thing.</p>
<p>This is the first time I can remember being absolutely, 100% stumped by what was going on.  I&#8217;d analysed what was going on as deeply as was practical and had come up with nothing.</p>
<p><strong>So I did the logical thing and referenced the COM+ dll from my new app.  When I used this library to send the message, it all worked perfectly.</strong></p>
<p><strong>I really don&#8217;t like this fix.</strong> Despite the fact that everything works perfectly now, it&#8217;s still a failure in my eyes.  It&#8217;s like a brand new Merc with duct tape holding the wheels on.</p>
<p>However, given that I&#8217;d spent way too long already on something that really shouldn&#8217;t have been a problem, it was probably the right thing to do.  <strong>Cut my losses and take the easy way out.  I&#8217;m not proud.</strong></p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2009/06/15/pride-in-bad-solutions/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Pride+in+bad+solutions+-+http://tinyurl.com/kvyu7p&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://blog.damianbrady.com.au/2009/06/15/pride-in-bad-solutions/&amp;t=Pride+in+bad+solutions" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://blog.damianbrady.com.au/2009/06/15/pride-in-bad-solutions/&amp;title=Pride+in+bad+solutions" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://blog.damianbrady.com.au/2009/06/15/pride-in-bad-solutions/&amp;title=Pride+in+bad+solutions" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://blog.damianbrady.com.au/2009/06/15/pride-in-bad-solutions/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-gmail">
			<a href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=Pride+in+bad+solutions&amp;body=Link: http://blog.damianbrady.com.au/2009/06/15/pride-in-bad-solutions/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A I%20solved%20a%20problem%20the%20other%20day.%20%C2%A0It%20was%20a%20terrible%20solution.%20It%20works%2C%20but%20it%27s%20difficult%20to%20be%20proud%20of%20how%20I%20solved%20it.%0D%0A%0D%0AThe%20problem%20was%20with%20MSMQ%2C%20but%20let%20me%20describe%20the%20problem%20with%20a%20needlessly%20overwrought%20metaphor.%0D%0A%0D%0AEvery%20week%20for%20the%20last%205%20years%2C%20you%27ve%20been%20sending%20a%20bill%20to%20one%20of%20" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://blog.damianbrady.com.au/2009/06/15/pride-in-bad-solutions/&amp;title=Pride+in+bad+solutions" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://blog.damianbrady.com.au/2009/06/15/pride-in-bad-solutions/&amp;title=Pride+in+bad+solutions&amp;summary=I%20solved%20a%20problem%20the%20other%20day.%20%C2%A0It%20was%20a%20terrible%20solution.%20It%20works%2C%20but%20it%27s%20difficult%20to%20be%20proud%20of%20how%20I%20solved%20it.%0D%0A%0D%0AThe%20problem%20was%20with%20MSMQ%2C%20but%20let%20me%20describe%20the%20problem%20with%20a%20needlessly%20overwrought%20metaphor.%0D%0A%0D%0AEvery%20week%20for%20the%20last%205%20years%2C%20you%27ve%20been%20sending%20a%20bill%20to%20one%20of%20&amp;source=Damian Brady's Blog" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://blog.damianbrady.com.au/2009/06/15/pride-in-bad-solutions/&amp;title=Pride+in+bad+solutions" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://blog.damianbrady.com.au/2009/06/15/pride-in-bad-solutions/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2009/06/15/pride-in-bad-solutions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone and the small things</title>
		<link>http://blog.damianbrady.com.au/2009/05/06/iphone-and-the-small-things/</link>
		<comments>http://blog.damianbrady.com.au/2009/05/06/iphone-and-the-small-things/#comments</comments>
		<pubDate>Wed, 06 May 2009 06:05:52 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/?p=103</guid>
		<description><![CDATA[So I finally joined the dark side and I got myself an iPhone. Now, if you&#8217;ve been following this blog for a while, you&#8217;ll know that often it&#8217;s the little things that interest me.  Small bits of functionality and the tiniest ideas sometimes make the biggest impression. With that in mind, here are the top [...]]]></description>
			<content:encoded><![CDATA[<p><strong>So I finally joined the dark side and I got myself an iPhone</strong>.</p>
<p>Now, if you&#8217;ve been following this blog for a while, you&#8217;ll know that <strong>often it&#8217;s the little things that interest me</strong>.  Small bits of functionality and the tiniest ideas sometimes make the biggest impression.</p>
<p>With that in mind, here are the top things that have impressed me about the iPhone.</p>
<p><strong>1. UI during phone calls</strong></p>
<p>When I&#8217;m on a call and I&#8217;m holding the phone up to my ear, there&#8217;s no need for the screen to be on&#8230; so it&#8217;s not.  If I take the phone away from my ear, the accelerometers in the phone notice this and I get a useable display again.</p>
<p>A tiny thing, but it shows that Apple is thinking.</p>
<p><strong>2. Music in my car</strong></p>
<p>I connect the iPhone to my car stereo using a standard 3.5mm headphone plug.  Great sound. It works perfectly. Not that impressive.</p>
<p>However when I get out of my car, I pull the cable out.  The music stops.  It could quite easily continue &#8211; there are speakers on the phone after all, but it&#8217;s smart enough to assume that having unplugged th speakers/headphones/whatever, I probably don&#8217;t want to listen to the music any more.</p>
<p>Again, it&#8217;s simple but intelligent.</p>
<p><strong>3. Silent switch</strong></p>
<p>My old phone was a Nokia E71 and I loved it.  It did everything I wanted it to, but I&#8217;m a sucker for stuff that&#8217;s nice to use (usually) so of course I wanted an iPhone.</p>
<p>One very slight annoyance I&#8217;ve had with every phone thus far (including the E71) is that to turn the phone to silent, it takes a few steps.  On the E71, you have to unlock it, press the power button at the top, scroll down to Silent, press the OK button, and lock the phone again.</p>
<p>On the iPhone, you flip the switch on the side.</p>
<p><strong>4. Network connection switching</strong></p>
<p>I&#8217;ve set up my iPhone with the details of my home wireless network and the network at my parents&#8217; house.  I did each setup a grand total of once.</p>
<p>Now, whenever I&#8217;m at home or at Mum and Dad&#8217;s, any browsing I do uses those networks.  The phone never asks me, never checks to see whether I might actually want to pay for access, no.  It assumes I&#8217;ll want the fastest (and cheapest) connection available.</p>
<p><strong>5. Application Installation</strong></p>
<p>Hands down the cleanest installation for any software I&#8217;ve experienced.</p>
<p>Go to the app store and find something you want, touch the price button and then install, and you&#8217;re done.  There could be a couple of extra touches here and there and you might have to put a password in so your account gets charged too, but it&#8217;s incredibly easy.</p>
<p>It downloads in the background, there are no restarts, and you can immediately see it in your list of apps (&#8220;springboard&#8221; apparently).  Brilliant.</p>
<p><strong>So that&#8217;s it</strong> &#8211; probably not the same list as anyone else, but like I said, <strong>it&#8217;s the small attention to detail that impresses me</strong>.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2009/05/06/iphone-and-the-small-things/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=iPhone+and+the+small+things+-+http://tinyurl.com/qu4rfq&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://blog.damianbrady.com.au/2009/05/06/iphone-and-the-small-things/&amp;t=iPhone+and+the+small+things" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://blog.damianbrady.com.au/2009/05/06/iphone-and-the-small-things/&amp;title=iPhone+and+the+small+things" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://blog.damianbrady.com.au/2009/05/06/iphone-and-the-small-things/&amp;title=iPhone+and+the+small+things" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://blog.damianbrady.com.au/2009/05/06/iphone-and-the-small-things/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-gmail">
			<a href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=iPhone+and+the+small+things&amp;body=Link: http://blog.damianbrady.com.au/2009/05/06/iphone-and-the-small-things/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A So%20I%20finally%20joined%20the%20dark%20side%20and%20I%20got%20myself%20an%20iPhone.%0D%0A%0D%0ANow%2C%20if%20you%27ve%20been%20following%20this%20blog%20for%20a%20while%2C%20you%27ll%20know%20that%20often%20it%27s%20the%20little%20things%20that%20interest%20me.%20%C2%A0Small%20bits%20of%20functionality%20and%20the%20tiniest%20ideas%20sometimes%20make%20the%20biggest%20impression.%0D%0A%0D%0AWith%20that%20in%20mind%2C%20here%20" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://blog.damianbrady.com.au/2009/05/06/iphone-and-the-small-things/&amp;title=iPhone+and+the+small+things" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://blog.damianbrady.com.au/2009/05/06/iphone-and-the-small-things/&amp;title=iPhone+and+the+small+things&amp;summary=So%20I%20finally%20joined%20the%20dark%20side%20and%20I%20got%20myself%20an%20iPhone.%0D%0A%0D%0ANow%2C%20if%20you%27ve%20been%20following%20this%20blog%20for%20a%20while%2C%20you%27ll%20know%20that%20often%20it%27s%20the%20little%20things%20that%20interest%20me.%20%C2%A0Small%20bits%20of%20functionality%20and%20the%20tiniest%20ideas%20sometimes%20make%20the%20biggest%20impression.%0D%0A%0D%0AWith%20that%20in%20mind%2C%20here%20&amp;source=Damian Brady's Blog" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://blog.damianbrady.com.au/2009/05/06/iphone-and-the-small-things/&amp;title=iPhone+and+the+small+things" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://blog.damianbrady.com.au/2009/05/06/iphone-and-the-small-things/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2009/05/06/iphone-and-the-small-things/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>On Keyboards</title>
		<link>http://blog.damianbrady.com.au/2009/04/06/on-keyboards/</link>
		<comments>http://blog.damianbrady.com.au/2009/04/06/on-keyboards/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 05:55:33 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/?p=100</guid>
		<description><![CDATA[So my keyboard at work just broke.  Doesn&#8217;t happen often, but one of the keys just stopped y&#8217;know&#8230; putting it&#8217;s letter on the screen. So I got given a replacement from somewhere. Here&#8217;s the thing &#8211; the layout is different.  Any programmer or techie or otherwise-nerd will know what I mean when I say that [...]]]></description>
			<content:encoded><![CDATA[<p>So my keyboard at work just broke.  Doesn&#8217;t happen often, but one of the keys just stopped y&#8217;know&#8230; putting it&#8217;s letter on the screen.</p>
<p>So I got given a replacement from somewhere.</p>
<p>Here&#8217;s the thing &#8211; the layout is different.  Any programmer or techie or otherwise-nerd will know what I mean when I say that it&#8217;s <strong>FREAKING ANNOYING!!</strong></p>
<p><strong></strong>Now, there aren&#8217;t any big changes really.  I mean, all the letters are in the same place, and the F-keys are still above the keyboard and the number pad is the same, but there are enough differences to frustrate someone like me.</p>
<p><strong>The Home-End-PgUp-PgDown-etc. chunk of keys is different.</strong></p>
<p>This is what I used to have:</p>
<p><a href="http://blog.damianbrady.com.au/wp-content/uploads/2009/04/smartkeyboard1.jpg" rel="lightbox[100]" title="Normal Keyboard"><img class="aligncenter size-medium wp-image-101" title="Normal Keyboard" src="http://blog.damianbrady.com.au/wp-content/uploads/2009/04/smartkeyboard1-300x194.jpg" alt="" width="300" height="194" /></a></p>
<p>Here&#8217;s what I have now:</p>
<p><a href="http://blog.damianbrady.com.au/wp-content/uploads/2009/04/microsoft-wireless-keyboard-layout.jpg" rel="lightbox[100]" title="Annoying Keyboard"><img class="aligncenter size-medium wp-image-102" title="Annoying Keyboard" src="http://blog.damianbrady.com.au/wp-content/uploads/2009/04/microsoft-wireless-keyboard-layout.jpg" alt="" width="146" height="300" /></a></p>
<p>What that means is that I keep hitting Delete instead of End.  Because it&#8217;s right below Home now.</p>
<p><strong>I only have one Windows key</strong></p>
<p>And it&#8217;s on the left &#8211; the one I <em>don&#8217;t</em> go for when I&#8217;m locking my computer with Win-L as I stand up to go somewhere.</p>
<p><strong>The F-keys are grouped in threes</strong></p>
<p>Seriously, in threes?  F5 is by far the most common F-key I hit, and now it&#8217;s in the middle of a cluster instead of on the left.  I have to look at my keyboard now to hit it.</p>
<p><strong>My right Ctrl key is slightly to the left of where it was</strong></p>
<p>Not a big deal you&#8217;d think?  Well truthfully it doesn&#8217;t affect me much &#8211; I still usually hit it first go, but it&#8217;s been moved left to make way for the arrow keys.  So when I don&#8217;t hit Ctrl, I hit the left arrow key.  That&#8217;s confusing.</p>
<p>So you&#8217;re probably thinking, &#8220;Oh, you poor little baby! Would you like some <strong>cries</strong> with your <strong>waa-burger</strong>?&#8221;  And yes, yes I would.</p>
<p>Seriously, it&#8217;s frustrating.  I know it&#8217;s only temporary &#8211; I&#8217;ll get a new one soon with a normal key layout.  But my keyboard is by far the most frequently-used tool in my arsenal.  Small things like this slow me down.</p>
<p>Ok, I&#8217;m finished complaining now.  You can proceed with your day.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2009/04/06/on-keyboards/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=On+Keyboards+-+http://tinyurl.com/raesqn&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://blog.damianbrady.com.au/2009/04/06/on-keyboards/&amp;t=On+Keyboards" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://blog.damianbrady.com.au/2009/04/06/on-keyboards/&amp;title=On+Keyboards" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://blog.damianbrady.com.au/2009/04/06/on-keyboards/&amp;title=On+Keyboards" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://blog.damianbrady.com.au/2009/04/06/on-keyboards/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-gmail">
			<a href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=On+Keyboards&amp;body=Link: http://blog.damianbrady.com.au/2009/04/06/on-keyboards/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A So%20my%20keyboard%20at%20work%20just%20broke.%20%C2%A0Doesn%27t%20happen%20often%2C%20but%20one%20of%20the%20keys%20just%20stopped%20y%27know...%20putting%20it%27s%20letter%20on%20the%20screen.%0D%0A%0D%0ASo%20I%20got%20given%20a%20replacement%20from%20somewhere.%0D%0A%0D%0AHere%27s%20the%20thing%20-%20the%20layout%20is%20different.%20%C2%A0Any%20programmer%20or%20techie%20or%20otherwise-nerd%20will%20know%20what%20I%20mean%20w" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://blog.damianbrady.com.au/2009/04/06/on-keyboards/&amp;title=On+Keyboards" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://blog.damianbrady.com.au/2009/04/06/on-keyboards/&amp;title=On+Keyboards&amp;summary=So%20my%20keyboard%20at%20work%20just%20broke.%20%C2%A0Doesn%27t%20happen%20often%2C%20but%20one%20of%20the%20keys%20just%20stopped%20y%27know...%20putting%20it%27s%20letter%20on%20the%20screen.%0D%0A%0D%0ASo%20I%20got%20given%20a%20replacement%20from%20somewhere.%0D%0A%0D%0AHere%27s%20the%20thing%20-%20the%20layout%20is%20different.%20%C2%A0Any%20programmer%20or%20techie%20or%20otherwise-nerd%20will%20know%20what%20I%20mean%20w&amp;source=Damian Brady's Blog" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://blog.damianbrady.com.au/2009/04/06/on-keyboards/&amp;title=On+Keyboards" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://blog.damianbrady.com.au/2009/04/06/on-keyboards/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2009/04/06/on-keyboards/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting Somewhere</title>
		<link>http://blog.damianbrady.com.au/2009/02/12/getting-somewhere/</link>
		<comments>http://blog.damianbrady.com.au/2009/02/12/getting-somewhere/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 01:03:44 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/?p=98</guid>
		<description><![CDATA[My last post talked about how I wasn&#8217;t getting anywhere with my project.  Well now I am. I might have mentioned that I&#8217;m using php and while it&#8217;s pretty easy to do stuff, I sometimes feel uncomfortable with the looseness of it all.  If you&#8217;ve used php in addition to a &#8220;real&#8221; OO language, you&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p><strong>My <a title="Time or Motivation Poor" href="http://blog.damianbrady.com.au/2009/01/20/time-or-motivation-poor/">last post</a></strong><strong> talked about how I wasn&#8217;t getting anywhere with my project.  Well now I am.</strong></p>
<p>I might have mentioned that I&#8217;m using php and while it&#8217;s pretty easy to do stuff, <strong>I sometimes feel uncomfortable with the looseness of it all</strong>.  If you&#8217;ve used php in addition to a &#8220;real&#8221; OO language, you&#8217;ll know what I mean.  Lots and lots of globally-accessible functions with no namespaces, duck-typing, all that sort of stuff.</p>
<p><strong>So I&#8217;m following some better practice</strong>s (as suggested by Jon in his comment on the last post).  Nothing is very groundbreaking and I&#8217;m sure most newer php projects use the same kind of things.  Anyway, here&#8217;s what I&#8217;m doing:</p>
<p><strong>I&#8217;m using an ORM library</strong> to get from my database to my code and vice versa.  <strong>Specifically </strong><a title="Doctrine Project" href="http://www.doctrine-project.org/" target="_blank"><strong>Doctrine</strong></a>.  I&#8217;m reasonably familiar how these things work having used <a title="NHibernate" href="http://www.hibernate.org/343.html" target="_blank">NHibernate</a> for .Net (a port of Java&#8217;s <a title="Hibernate" href="http://www.hibernate.org" target="_blank">Hibernate</a>), but I&#8217;ve been impressed with how easy it&#8217;s been this time.  I got Doctrine working beautifully for my spider-web of a MySql database inside an evening with no experience.  I&#8217;ll let you know how it works out in the long run.  And yes, MySql is the database right now but Doctrine allows it to change very easily as expected.</p>
<p><strong>I&#8217;m using an MVC pattern</strong> so my code doesn&#8217;t get too mixed in with my UI.  Now I&#8217;m sure there are plenty of libraries and frameworks out there that would help me with this, but <strong>I&#8217;m rolling my own&#8230; if you can call it that</strong>.  I&#8217;m used to .Net&#8217;s code-behind method so I&#8217;m really just copying that to an extent.  Each php page will have an include at the top that references the code-behind.  The &#8220;code-behind&#8221; php file will set up all the data and will provide functions that can be called by the front one.  Simple, but it should be effective.</p>
<p><strong>Finally, I&#8217;m using </strong><a title="JQuery" href="http://www.jquery.com" target="_blank"><strong>JQuery</strong></a><strong> for UI prettiness</strong>.  I had a serious look at a lot of javascript libraries and JQuery came out on top for what I needed.</p>
<p>So that&#8217;s it.  That&#8217;s what I&#8217;m doing.  So far it&#8217;s all fitting together quite nicely, but I&#8217;ll be sure to post updates if I want to rave about something or if something sends me into a fit of frustration.</p>
<p>As always, comments are welcome.</p>
<p>Damian</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2009/02/12/getting-somewhere/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Getting+Somewhere+-+http://tinyurl.com/pnd6xt&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://blog.damianbrady.com.au/2009/02/12/getting-somewhere/&amp;t=Getting+Somewhere" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://blog.damianbrady.com.au/2009/02/12/getting-somewhere/&amp;title=Getting+Somewhere" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://blog.damianbrady.com.au/2009/02/12/getting-somewhere/&amp;title=Getting+Somewhere" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://blog.damianbrady.com.au/2009/02/12/getting-somewhere/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-gmail">
			<a href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=Getting+Somewhere&amp;body=Link: http://blog.damianbrady.com.au/2009/02/12/getting-somewhere/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A My%20last%20post%20talked%20about%20how%20I%20wasn%27t%20getting%20anywhere%20with%20my%20project.%20%C2%A0Well%20now%20I%20am.%0D%0A%0D%0AI%20might%20have%20mentioned%20that%20I%27m%20using%20php%20and%20while%20it%27s%20pretty%20easy%20to%20do%20stuff%2C%20I%20sometimes%20feel%20uncomfortable%20with%20the%20looseness%20of%20it%20all.%20%C2%A0If%20you%27ve%20used%20php%20in%20addition%20to%20a%20%22real%22%20OO%20language%2C%20you%27ll" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://blog.damianbrady.com.au/2009/02/12/getting-somewhere/&amp;title=Getting+Somewhere" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://blog.damianbrady.com.au/2009/02/12/getting-somewhere/&amp;title=Getting+Somewhere&amp;summary=My%20last%20post%20talked%20about%20how%20I%20wasn%27t%20getting%20anywhere%20with%20my%20project.%20%C2%A0Well%20now%20I%20am.%0D%0A%0D%0AI%20might%20have%20mentioned%20that%20I%27m%20using%20php%20and%20while%20it%27s%20pretty%20easy%20to%20do%20stuff%2C%20I%20sometimes%20feel%20uncomfortable%20with%20the%20looseness%20of%20it%20all.%20%C2%A0If%20you%27ve%20used%20php%20in%20addition%20to%20a%20%22real%22%20OO%20language%2C%20you%27ll&amp;source=Damian Brady's Blog" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://blog.damianbrady.com.au/2009/02/12/getting-somewhere/&amp;title=Getting+Somewhere" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://blog.damianbrady.com.au/2009/02/12/getting-somewhere/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2009/02/12/getting-somewhere/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Long-term Drafts</title>
		<link>http://blog.damianbrady.com.au/2008/12/10/long-term-drafts/</link>
		<comments>http://blog.damianbrady.com.au/2008/12/10/long-term-drafts/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 06:23:17 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/?p=94</guid>
		<description><![CDATA[So when I wrote that post yesterday, to my surprise I found three other draft posts of varying ages.  I know myself well enough to know that I probably won&#8217;t go back and revisit them, so here&#8217;s what they were about: Salling Clicker That&#8217;s all that was in this one &#8211; just the title.  I know what [...]]]></description>
			<content:encoded><![CDATA[<p>So when I wrote <a title="Free Electricity" href="http://blog.damianbrady.com.au/2008/12/09/free-electricity/" target="_self">that post</a> yesterday, to my surprise I found three other draft posts of varying ages.  I know myself well enough to know that I probably won&#8217;t go back and revisit them, so here&#8217;s what they were about:</p>
<p><strong>Salling Clicker</strong></p>
<p>That&#8217;s all that was in this one &#8211; just the title.  I know what I was going to say though.  I was going to heap praise on <a title="Salling Clicker" href="http://www.salling.com/clicker/windows/" target="_blank">this tiny but personally very useful app</a>.</p>
<p>I have a beautiful (expensive) Sony LCD TV in my living room with a very handy VGA port.  My computer is right nearby so it&#8217;s permanently connected.  What Salling Clicker does is provide a way to control my computer from my mobile phone via Bluetooth or Wifi.  This is amazingly useful when watching movies from the couch.</p>
<p>The interface is solid and deployment is very easy.  Best of all, it&#8217;s cheap.</p>
<p><strong>Understanding threading is more important than ever</strong></p>
<p>This was a post I was going to write about a now old <a title="Ars Technica - The future of processors" href="http://arstechnica.com/news.ars/post/20080702-intel-an-expensive-many-core-future-is-ahead-of-us.html" target="_blank">Ars Technica article</a>.  The article was about the future of processors according to Intel where they suggested there&#8217;d be many many cores, not just two or four.  I didn&#8217;t get too far on my post:</p>
<blockquote><p>We were taught threading in the very first programming subject I took at uni.  Initially, it can be difficult to get your head around.  Eventually I got there.  I was convinced though that plenty of people passed that course without any firm idea of how threading worked.</p>
<p>With the announcement from Intel that they&#8217;re heading down the track of many, many CPU cores, understanding threading is more important than ever for a budding software developer.</p></blockquote>
<p>What I was going to get to was that developers will have to start thinking about parallel processing.  If we&#8217;re stuck on 3GHz per core and you want to do some crazy-complex stuff, it better be able to be spread across the cores or it will be S.L.O.W.</p>
<p>Will the compiler/OS/processor be able to handle this for you?  Well, yeah, possibly to an extent, but writing your software to take advantage of new processor capabilities will be a necessity for performance.</p>
<p>At the very least, you&#8217;ll have to have a detailed knowledge of how threading works.  It&#8217;s the future, man.</p>
<p><strong>Religious Coding</strong></p>
<p>The oldest draft of the lot was also the closest to being finished.  Here&#8217;s what I wrote, minus the half-written final sentence (seriously, I stopped halfway through a sentence):</p>
<div>
<blockquote><p>I stumbled across this article called &#8220;<a title="The Narcissism of Small Code Differences" href="http://weblog.raganwald.com/2008/05/narcissism-of-small-code-differences.html" target="_blank">The Narcissism of Small Code Differences</a>&#8221; via Reddit.  Basically, it presents an allegorical scenario where programmers with different ideologies replace each other&#8217;s code with their version of how it should be done.</p>
<p>The point is that these hypothetical programmers &#8211; each idealists in their own particular way &#8211; are more concerned with the &#8220;best&#8221; way of doing something than they are with the intended purpose.</p>
<p>Firstly, let me say that I think the story is slightly flawed &#8211; a suggestion backed up by many of the comments below the article.  This is mainly because the &#8220;good&#8221; agnostic programmer who wrote the original working code doesn&#8217;t seem to have included any inline comments that would have prevented the errors that were introduced later.</p>
<p>That said, I definitely agree with the tacit suggestion that sometimes it&#8217;s not necessary to work out the most pure way to write some code.  This is particularly true when the behaviour of the component or method you&#8217;re writing has a very limited and well-defined scope such as the one in the example.</p>
<p>I&#8217;ve got to admit that my immediate thought when I read the snippet of code at the top was that it wasn&#8217;t particularly elegant and that it could probably be done in a more concise way (a la the Librarian in the code).</p></blockquote>
<p>I think what I was going to get to was a comment about comments.  Who cares how the code is written (within reason) as long as it does what&#8217;s intended.  The problem was that the intention was never documented in the code.</p>
<p>Now, for such a simple method, the thinking is that you don&#8217;t really need comments &#8211; it&#8217;s pretty plain what it does &#8211; it pads a number with zeros to make it five digits long.  The problem is that nowhere is it written that a two-digit input is invalid, and that&#8217;s where the my-code-is-better-than-your-code comes in.</p>
<p>I&#8217;m sure I&#8217;ve said this before, <a title="Coding Horror - Code Tells You How, Comments Tell You Why" href="http://www.codinghorror.com/blog/archives/000749.html" target="_blank">and so have others</a>, but comments should be used to explain <em>why </em>you&#8217;re doing something, not <em>how</em>.  Other programmers can see how you&#8217;ve done it, but they don&#8217;t know what you were thinking.</p>
<p>Anyway, that&#8217;s it &#8211; drafts cleaned up.  Feel free to leave comments about any of them!</p>
</div>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2008/12/10/long-term-drafts/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Long-term+Drafts+-+http://tinyurl.com/p9u73m&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://blog.damianbrady.com.au/2008/12/10/long-term-drafts/&amp;t=Long-term+Drafts" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://blog.damianbrady.com.au/2008/12/10/long-term-drafts/&amp;title=Long-term+Drafts" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://blog.damianbrady.com.au/2008/12/10/long-term-drafts/&amp;title=Long-term+Drafts" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://blog.damianbrady.com.au/2008/12/10/long-term-drafts/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-gmail">
			<a href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=Long-term+Drafts&amp;body=Link: http://blog.damianbrady.com.au/2008/12/10/long-term-drafts/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A So%20when%20I%20wrote%20that%20post%20yesterday%2C%20to%20my%20surprise%20I%20found%20three%20other%C2%A0draft%C2%A0posts%20of%20varying%20ages.%20%C2%A0I%20know%20myself%20well%20enough%20to%20know%20that%20I%20probably%20won%27t%20go%20back%20and%20revisit%20them%2C%20so%20here%27s%20what%20they%20were%20about%3A%0D%0A%0D%0ASalling%20Clicker%0D%0A%0D%0AThat%27s%20all%20that%20was%20in%20this%20one%20-%20just%20the%20title.%20%C2%A0I%20know%20" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://blog.damianbrady.com.au/2008/12/10/long-term-drafts/&amp;title=Long-term+Drafts" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://blog.damianbrady.com.au/2008/12/10/long-term-drafts/&amp;title=Long-term+Drafts&amp;summary=So%20when%20I%20wrote%20that%20post%20yesterday%2C%20to%20my%20surprise%20I%20found%20three%20other%C2%A0draft%C2%A0posts%20of%20varying%20ages.%20%C2%A0I%20know%20myself%20well%20enough%20to%20know%20that%20I%20probably%20won%27t%20go%20back%20and%20revisit%20them%2C%20so%20here%27s%20what%20they%20were%20about%3A%0D%0A%0D%0ASalling%20Clicker%0D%0A%0D%0AThat%27s%20all%20that%20was%20in%20this%20one%20-%20just%20the%20title.%20%C2%A0I%20know%20&amp;source=Damian Brady's Blog" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://blog.damianbrady.com.au/2008/12/10/long-term-drafts/&amp;title=Long-term+Drafts" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://blog.damianbrady.com.au/2008/12/10/long-term-drafts/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2008/12/10/long-term-drafts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free Electricity</title>
		<link>http://blog.damianbrady.com.au/2008/12/09/free-electricity/</link>
		<comments>http://blog.damianbrady.com.au/2008/12/09/free-electricity/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 06:48:15 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/?p=93</guid>
		<description><![CDATA[I stumbled across this Slashdot post the other day which talks about the potential for mobile phones to generate enough power to run by using piezoelectric materials.  In short, the vibrations you and those around you make when you talk could generate enough electricity to keep your phone going. Now here&#8217;s the point in this [...]]]></description>
			<content:encoded><![CDATA[<p>I stumbled across this <a href="http://hardware.slashdot.org/article.pl?sid=08/12/03/2320200">Slashdot post</a> the other day which talks about the potential for mobile phones to generate enough power to run by using piezoelectric materials.  In short, the vibrations you and those around you make when you talk could generate enough electricity to keep your phone going.</p>
<p>Now here&#8217;s the point in this post where I really wish I could remember the word I want to use.  You know when you hear about something for the first time in your life, then amazingly you hear about it several times in the next short while?  You wonder how you&#8217;re suddenly being bombarded with this new concept when you only just found out about it?  Yeah, there&#8217;s a word for that and I&#8217;ve forgotten what it is.  That word goes here.</p>
<p>I picked up a Popular Science magazine a few days before I found this Slashdot post and amazingly, there was a whole section in it about &#8220;free&#8221; energy.  Awesome concept.</p>
<p>There&#8217;s a whole host of low-powered devices in common use today, and there&#8217;s superfluous energy being expended everywhere.  Surely this energy can be used to power these low-powered devices?</p>
<p>The simplest example in the Popsci magazine was the humble light switch.  When you wire up a house, you have wire for power going to the actual light, as well as wire for control going from the light to the light switch.  When you flick the switch to turn the light on, you&#8217;re expending energy.  Not much, granted, put apparently enough to send a wireless signal to the light (or a controller next to it) to tell it to turn on.  With a setup like this, there&#8217;s no need for wire to run down the walls to the switches.  Yeah, it&#8217;s not much of a power saving and it&#8217;s probably not worth the extra initial cost right now, but in the future it could, and combining a few dozen simple ideas like this in every house could surely save some energy.</p>
<p>The fact is, we expend a lot of energy when we do anything.  There&#8217;s also ambient energy all over the place &#8211; the obvious ones like wind and light, but also vibrations and body heat.  If we could capture a fraction of that energy and put it to use, we&#8217;d have much less need for power plants.</p>
<p>There are thousands of options out there.  If you go for a walk, chuck your mobile phone in the little holster on your belt, and as you walk, the up-down motion of your steps can charge it.  Or maybe the energy absorbed when rain lands on your car roof could be enough to power your windscreen wipers.</p>
<p>Perhaps after a time, when it becomes cheap enough, device manufacturers may get into the habit of building these &#8220;free&#8221; power sources into their devices.  A mobile you didn&#8217;t have to plug into a wall or a sound-powered LED light you could just stick onto a ceiling would certainly have a market.</p>
<p>Clearly this stuff interests me.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2008/12/09/free-electricity/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Free+Electricity+-+http://tinyurl.com/qqe6cc&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://blog.damianbrady.com.au/2008/12/09/free-electricity/&amp;t=Free+Electricity" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://blog.damianbrady.com.au/2008/12/09/free-electricity/&amp;title=Free+Electricity" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://blog.damianbrady.com.au/2008/12/09/free-electricity/&amp;title=Free+Electricity" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://blog.damianbrady.com.au/2008/12/09/free-electricity/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-gmail">
			<a href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=Free+Electricity&amp;body=Link: http://blog.damianbrady.com.au/2008/12/09/free-electricity/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A I%20stumbled%20across%20this%20Slashdot%20post%20the%20other%20day%20which%20talks%20about%20the%20potential%20for%20mobile%20phones%20to%20generate%20enough%20power%20to%20run%20by%20using%20piezoelectric%20materials.%20%C2%A0In%20short%2C%20the%20vibrations%20you%20and%20those%20around%20you%20make%20when%20you%20talk%20could%20generate%20enough%20electricity%20to%20keep%20your%20phone%20going.%0D%0A%0D" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://blog.damianbrady.com.au/2008/12/09/free-electricity/&amp;title=Free+Electricity" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://blog.damianbrady.com.au/2008/12/09/free-electricity/&amp;title=Free+Electricity&amp;summary=I%20stumbled%20across%20this%20Slashdot%20post%20the%20other%20day%20which%20talks%20about%20the%20potential%20for%20mobile%20phones%20to%20generate%20enough%20power%20to%20run%20by%20using%20piezoelectric%20materials.%20%C2%A0In%20short%2C%20the%20vibrations%20you%20and%20those%20around%20you%20make%20when%20you%20talk%20could%20generate%20enough%20electricity%20to%20keep%20your%20phone%20going.%0D%0A%0D&amp;source=Damian Brady's Blog" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://blog.damianbrady.com.au/2008/12/09/free-electricity/&amp;title=Free+Electricity" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://blog.damianbrady.com.au/2008/12/09/free-electricity/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2008/12/09/free-electricity/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Write for Yourself</title>
		<link>http://blog.damianbrady.com.au/2008/08/28/write-for-yourself/</link>
		<comments>http://blog.damianbrady.com.au/2008/08/28/write-for-yourself/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 01:07:48 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/?p=89</guid>
		<description><![CDATA[So I haven&#8217;t written a post in a while, but no, that&#8217;s not the reason for the title.  I&#8217;ve just been concentrating on other things and haven&#8217;t felt sufficiently motivated to write about anything. But then I read this post from Steve Yegge on Stevey&#8217;s Blog Rants.  His title was &#8220;Business Requirements are Bullshit&#8221; which, [...]]]></description>
			<content:encoded><![CDATA[<p>So I haven&#8217;t written a post in a while, but no, that&#8217;s not the reason for the title.  I&#8217;ve just been concentrating on other things and haven&#8217;t felt sufficiently motivated to write about anything.</p>
<p>But then I read <a title="Stevey's Blog Rants: Business Requirements are Bullshit" href="http://steve-yegge.blogspot.com/2008/08/business-requirements-are-bullshit.html" target="_blank">this post from Steve Yegge on Stevey&#8217;s Blog Rants</a>.  His title was &#8220;<strong>Business Requirements are Bullshit</strong>&#8221; which, while clearly designed to catch the eye, doesn&#8217;t entirely represent what it was about.</p>
<p><strong>Steve&#8217;s post was aimed at people developing a new (or better) product to take to market</strong>.  He wasn&#8217;t talking to consultants or employees who are producing something to meet a specific company&#8217;s business needs, but someone who was creating something new to fill a perceived hole in the market.</p>
<p>His point (adapted from Warren Buffet) was that <strong>you should build something you already know about</strong>; something that actually meets your needs.  <strong>If you&#8217;re doing that, then you already know what you want</strong>.  You know what compromises you can make and what the unspoken and tacit deal-breakers are.  If you&#8217;re trying to gather business requirements from a group of people who may or may not want the product while trying to understand what it is you&#8217;re actually making, then you&#8217;re probably going to fail.</p>
<p>It sounds like great advice, but right now, <strong>I&#8217;m not in the category of people building something new to take to market</strong>.  I&#8217;m in the other group.  The stuff I build and maintain  (and now I&#8217;m going to slip back into software) is supposed to meet an immediate business need for a specific client.  <strong>It more than likely won&#8217;t be used by me, but I have to build it anyway</strong>.</p>
<p><strong>So can Steve&#8217;s advice be applied to my situation?  Sure it can, to an extent</strong>.</p>
<p>Steve&#8217;s main point was that if you&#8217;re not investing in something you understand, then you&#8217;re walking into very dangerous territory.  As an end-to-end software developer, I&#8217;m aware that <strong>it&#8217;s difficult to know <em>exactly</em></strong> <strong>what the customer wants</strong>.  Sure, you can grill every potential user for days, you can write a comprehensive list of requirements, you&#8217;ll check it and recheck it over and over again to make sure you know single possible piece of functionality that they want and need.  But when it comes to the crunch, <strong>no matter how much work you&#8217;ve done, you&#8217;ll start getting negative feedback about some specific things that you hadn&#8217;t thought of and the customer hadn&#8217;t mentioned.</strong></p>
<p>That complex report you were asked to include, the one with all the tables and forecasts and things?  It turns out that 10 different people print that 20 times a day.  So even though it&#8217;s perfect, it takes 15 minutes to run each time, and they can&#8217;t wait that long each time.</p>
<p><strong>So how do you avoid this?</strong> In my experience, if you want to write truly useful software, you need to understand why each piece of functionality is being written.  <strong>Spend a lot of time with the clients and find out what it&#8217;s like to be in their shoes</strong>.  If you see how they operate day-to-day you&#8217;ll start to get an idea of <strong>what they actually want, not what&#8217;s written in the requirements doc</strong>.</p>
<p>Steve&#8217;s advice was that you shouldn&#8217;t invest in what you don&#8217;t understand.  So <strong>if you have to produce something you don&#8217;t understand, make a genuine effort to understand it first</strong>.  You might not be as enthusiastic about or deeply involved in the business your client is in.  But by honestly trying to see what they&#8217;re trying to achieve, <strong>you&#8217;ll learn what they really want your software to do for them; over and above the list of required functions</strong>.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2008/08/28/write-for-yourself/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Write+for+Yourself+-+http://tinyurl.com/q8okpp&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://blog.damianbrady.com.au/2008/08/28/write-for-yourself/&amp;t=Write+for+Yourself" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://blog.damianbrady.com.au/2008/08/28/write-for-yourself/&amp;title=Write+for+Yourself" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://blog.damianbrady.com.au/2008/08/28/write-for-yourself/&amp;title=Write+for+Yourself" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://blog.damianbrady.com.au/2008/08/28/write-for-yourself/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-gmail">
			<a href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=Write+for+Yourself&amp;body=Link: http://blog.damianbrady.com.au/2008/08/28/write-for-yourself/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A So%20I%20haven%27t%20written%20a%20post%20in%20a%20while%2C%20but%20no%2C%20that%27s%20not%20the%20reason%20for%20the%20title.%C2%A0%20I%27ve%20just%20been%20concentrating%20on%20other%20things%20and%20haven%27t%20felt%20sufficiently%20motivated%20to%20write%20about%20anything.%0D%0A%0D%0ABut%20then%20I%20read%20this%20post%20from%20Steve%20Yegge%20on%20Stevey%27s%20Blog%20Rants.%C2%A0%20His%20title%20was%20%22Business%20Require" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://blog.damianbrady.com.au/2008/08/28/write-for-yourself/&amp;title=Write+for+Yourself" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://blog.damianbrady.com.au/2008/08/28/write-for-yourself/&amp;title=Write+for+Yourself&amp;summary=So%20I%20haven%27t%20written%20a%20post%20in%20a%20while%2C%20but%20no%2C%20that%27s%20not%20the%20reason%20for%20the%20title.%C2%A0%20I%27ve%20just%20been%20concentrating%20on%20other%20things%20and%20haven%27t%20felt%20sufficiently%20motivated%20to%20write%20about%20anything.%0D%0A%0D%0ABut%20then%20I%20read%20this%20post%20from%20Steve%20Yegge%20on%20Stevey%27s%20Blog%20Rants.%C2%A0%20His%20title%20was%20%22Business%20Require&amp;source=Damian Brady's Blog" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://blog.damianbrady.com.au/2008/08/28/write-for-yourself/&amp;title=Write+for+Yourself" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://blog.damianbrady.com.au/2008/08/28/write-for-yourself/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2008/08/28/write-for-yourself/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Guiding Principles for Data Capturing</title>
		<link>http://blog.damianbrady.com.au/2008/07/23/guiding-principles-for-data-capturing/</link>
		<comments>http://blog.damianbrady.com.au/2008/07/23/guiding-principles-for-data-capturing/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 22:05:19 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/?p=86</guid>
		<description><![CDATA[On several occasions recently I&#8217;ve had to work with data in legacy applications.  It&#8217;s never fun, and it got me thinking about the origins of the problem.  It&#8217;s fairly obvious that difficulties encountered when working with legacy data are a result of decisions made when the system was originally written. New systems are not immune, [...]]]></description>
			<content:encoded><![CDATA[<p>On several occasions <strong>recently I&#8217;ve had to work with data in legacy applications</strong>.  It&#8217;s never fun, and it got me thinking about the origins of the problem.  It&#8217;s fairly obvious that <strong>difficulties encountered when working with legacy data are a result of decisions made when the system was originally written</strong>.</p>
<p><strong>New systems are not immune</strong>, however.  The same difficulties are bound to crop up for someone trying to work with your data at a later date <strong>unless you think about it now</strong>.  There&#8217;s obviously no definite way of knowing how your data will be used in the future, and <strong>the tendency is often to focus only on current requirements</strong>.  With a little care though, you can make it easier for a future person to work with.</p>
<p>Thus, I present my <strong>guiding principles for data capturing</strong>.</p>
<p>By way of disclaimer, I should mention that these principles are based on business applications where users, be they staff or clients, enter information manually.  That&#8217;s not to say that they can&#8217;t apply in other scenarios, but keep in mind that I was looking at it from a business application angle.</p>
<p>So here they are:</p>
<ol>
<li><strong>Am I capturing everything I need?</strong></li>
<li><strong>Am I capturing information in a way that allows it to actually be used later?</strong></li>
<li><strong>Am I restricting myself &#8211; can I capture more (or different) information later if it&#8217;s needed?</strong></li>
</ol>
<h3>1. Am I capturing everything I need?</h3>
<p><strong>If you&#8217;re not sure, capture it anyway</strong>.  For example, if you&#8217;re not sure whether the sex of a client is required, put it in anyway.  Obviously there are legal restrictions on collecting some information, but remember that these restrictions can change.  Allow for that.</p>
<p>More to the point, <strong>capture information with as much detail as you can</strong>.  Don&#8217;t hide behind a usability excuse &#8211; if you think hard enough, you can get around that.  Just because you store information in a particular way doesn&#8217;t mean the user has to enter it that way or even enter it at all &#8211; some information can be assumed.  Of course there&#8217;s always some trade-off with usability, but <strong>it&#8217;s worth thinking about how you can get around the usability problem rather than leaving a potentially important piece of information out</strong>.</p>
<p>For example, timestamps on file comments <em>probably </em>don&#8217;t need to be accurate right down to the tick, but what&#8217;s the harm if they are?  Let&#8217;s face it, <strong>storage space is cheap</strong>.  In terms of hiding behind usability, your user shouldn&#8217;t have to enter a time to that detail (or probably at all), but it doesn&#8217;t mean an automatic process you write at a later date isn&#8217;t able to.</p>
<h3>2. Am I capturing information in a way that allows it to actually be used later?</h3>
<p>This seems obvious but is often overlooked.  <strong>Don&#8217;t store dates (or any other numeric information) as strings, don&#8217;t store information in binary fields, and use a database not a file to store information</strong>.  If your system takes a piece of information from somewhere, be it a person or another system, it should store that information in a way that can be used easily later.  <strong>There&#8217;s no point retaining information if it can&#8217;t be used</strong>.</p>
<p>Let&#8217;s say the business wants you to store a whole lot of information about a client&#8217;s car.  The designer might give the user fields to fill in the licence plate, the colour, make, model, VIN, age, etc.  The easiest way to store most of these pieces of information is in string fields.  Sure, this will allow users to look at the data, probably interpret it, and use it to glean information, but what if you need to analyse it in bulk later?  <strong>You&#8217;ll have a lot of work to do to group all the &#8220;White&#8221;, &#8220;white&#8221;, &#8220;wite&#8221;, and even &#8220;wh9ite&#8221; cars.  It&#8217;s hard to work out that cars that are &#8220;12mths&#8221;, &#8220;12 months&#8221;, &#8220;1Y&#8221;, and &#8220;one yr&#8221; old are all the same age</strong>.  Don&#8217;t do it to yourself.</p>
<p><strong>Typically, the designer might ask of the business, &#8220;Are you ever going to search on this data?&#8221;</strong> That&#8217;s a mistake.  <strong>Don&#8217;t even ask.  They will say no</strong>.  However, some years down the track, they might actually want to know whether there&#8217;s any correlation between having a new car, and being a good client.  <strong>It may seem far-fetched now, but by allowing for it, you don&#8217;t take it off the table</strong>.  <strong>The business should never hear, &#8220;I can&#8217;t give you that information&#8221; when they know for a fact their staff have been filling it out every time.</strong></p>
<p>It all comes down to working out <strong>what the information actually is and what it means, then storing it the same way</strong>.  If it&#8217;s a length of time, work out how to store it as a timespan.  If it&#8217;s a colour, try working out how to actually store it as a colour, not someone&#8217;s misspelt description of a colour.<strong> Do the research</strong> and find out how a VIN or a licence plate is structured so you can validate it.  If it&#8217;s really not possible to validate, at least process it as much as you can.  Remove spaces or capitalize all letters if it doesn&#8217;t matter to <strong>make it as easy as possible to work with at a later date</strong>.</p>
<h3>3.  Am I restricting myself &#8211; can I capture more (or different) information later if it&#8217;s needed?</h3>
<p><strong>Don&#8217;t save space in fields when it could come back to bite you. </strong>Don&#8217;t use a 4-bit integer to save space because you <em>know</em> you&#8217;ll never have more than 16 different payment methods or vehicle makes.  Even though you&#8217;re only operating in Australia, use string encoding that allows Chinese characters.  What are you saving by skimping, really?  Again, storage is cheap.  <strong>Don&#8217;t restrict yourself from the start</strong>.</p>
<p><strong>If you have to use your judgement to determine the size of a field, then overestimate significantly.  Like, really a lot</strong>.  Can&#8217;t imagine someone having a surname longer than 30 characters?  Me neither, but I&#8217;ll allow 100 or more.  I&#8217;m not having some client with a four-way-hyphenated-surname break my application.</p>
<h3>Summary</h3>
<p><strong>Don&#8217;t take the easy way out</strong>.  I know if you&#8217;re stressed for time and under the pump, adding a new Bank Name field as an non-validated string is going to be a lot easier than trying to match it to a list of known banks (with the option to add a new one).  Fight the urge to make it easy now and potentially very hard later.</p>
<p>Remember that <strong>your design decision is usually a one-way street</strong>.  It&#8217;s not often that you can do it the easy way now and fix it up later.  Even if you can, will you?  Really?  You&#8217;re too busy to deal with it now, what makes you think you&#8217;ll have plenty of spare time to do it later?  It&#8217;s worth the extra time to do it properly.  You&#8217;ll thank yourself later.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2008/07/23/guiding-principles-for-data-capturing/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Guiding+Principles+for+Data+Capturing+-+http://tinyurl.com/q6mr9m&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://blog.damianbrady.com.au/2008/07/23/guiding-principles-for-data-capturing/&amp;t=Guiding+Principles+for+Data+Capturing" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://blog.damianbrady.com.au/2008/07/23/guiding-principles-for-data-capturing/&amp;title=Guiding+Principles+for+Data+Capturing" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://blog.damianbrady.com.au/2008/07/23/guiding-principles-for-data-capturing/&amp;title=Guiding+Principles+for+Data+Capturing" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://blog.damianbrady.com.au/2008/07/23/guiding-principles-for-data-capturing/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-gmail">
			<a href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=Guiding+Principles+for+Data+Capturing&amp;body=Link: http://blog.damianbrady.com.au/2008/07/23/guiding-principles-for-data-capturing/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A On%20several%20occasions%20recently%20I%27ve%20had%20to%20work%20with%20data%20in%20legacy%20applications.%C2%A0%20It%27s%20never%20fun%2C%20and%20it%20got%20me%20thinking%20about%20the%20origins%20of%20the%20problem.%C2%A0%20It%27s%20fairly%20obvious%20that%20difficulties%20encountered%20when%20working%20with%20legacy%20data%20are%20a%20result%20of%20decisions%20made%20when%20the%20system%20was%20originally%20" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://blog.damianbrady.com.au/2008/07/23/guiding-principles-for-data-capturing/&amp;title=Guiding+Principles+for+Data+Capturing" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://blog.damianbrady.com.au/2008/07/23/guiding-principles-for-data-capturing/&amp;title=Guiding+Principles+for+Data+Capturing&amp;summary=On%20several%20occasions%20recently%20I%27ve%20had%20to%20work%20with%20data%20in%20legacy%20applications.%C2%A0%20It%27s%20never%20fun%2C%20and%20it%20got%20me%20thinking%20about%20the%20origins%20of%20the%20problem.%C2%A0%20It%27s%20fairly%20obvious%20that%20difficulties%20encountered%20when%20working%20with%20legacy%20data%20are%20a%20result%20of%20decisions%20made%20when%20the%20system%20was%20originally%20&amp;source=Damian Brady's Blog" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://blog.damianbrady.com.au/2008/07/23/guiding-principles-for-data-capturing/&amp;title=Guiding+Principles+for+Data+Capturing" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://blog.damianbrady.com.au/2008/07/23/guiding-principles-for-data-capturing/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2008/07/23/guiding-principles-for-data-capturing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
