<?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>Relative Sanity &#187; development</title>
	<atom:link href="http://relativesanity.com/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://relativesanity.com</link>
	<description>Nerdery, curmudgeon, humanity and science</description>
	<lastBuildDate>Wed, 12 May 2010 07:59:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The year we make contact</title>
		<link>http://relativesanity.com/2010/01/05/the-year-we-make-contact/</link>
		<comments>http://relativesanity.com/2010/01/05/the-year-we-make-contact/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 12:58:01 +0000</pubDate>
		<dc:creator>relativesanity</dc:creator>
				<category><![CDATA[anecdotes]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[clients]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[philosophy]]></category>

		<guid isPermaLink="false">http://relativesanity.com/?p=163</guid>
		<description><![CDATA[I’m going to look back on 2009 with fondness.
More than any year since 2000, this has been a year of intense growth for me, both personally and professionally. Its end brings with it a shift in what I’m doing with my life, and 2010 brings with it two big steps that frankly scare the shit [...]]]></description>
			<content:encoded><![CDATA[<p>I’m going to look back on 2009 with fondness.</p>
<p>More than any year since 2000, this has been a year of intense growth for me, both personally and professionally. Its end brings with it a shift in what I’m doing with my life, and 2010 brings with it two big steps that frankly scare the shit out of me, but in the best possible way.</p>
<p>And we’re still only in the first week of January.</p>
<p>So, big things. Those things have names.</p>
<h2 id="fresh_monkey">Fresh Monkey</h2>
<p>I’m a web construction worker. As <a href="http://twitter.com/jough/status/7207995836">Jough Dempsey</a> said recently, “I make the Internet. Not all of it.” I’ve been doing that in various ways since 1998, and it’s still fun. I still can’t imagine doing anything else.</p>
<p>A lot of projects that I’m proud of made it out the door this year. Has 2009 been my most successful year? I don’t know how I’d measure that. Financially, the year ain’t over yet, and there’s still 4 or 5 projects that should ship within the month, so let’s reserve judgement on that for now.</p>
<p>For me, though, it’s the year I’m happiest with since my son was born, and that’s worth something.</p>
<p>A big contributing factor to that was managing to haul my lazy, self employed ass out of the dressing gown and into a proper office. Those of you who have visited us at <a href="http://twitter.com/cmdcentral">cmdcentral</a> may dispute the use of “proper”, but hey, it’s not a box room in my flat, which means I can leave work at work and “go home” at the end of the day.</p>
<p>Also helping along my mental health had been my move away from using a combination of <a href="http://www.blinksale.com/">Blinksale</a> and <a href="http://www.billingsapp.com/">Billings</a> for invoicing. <a href="http://freeagentcentral.com/">FreeAgent</a> hasn’t saved my life yet (more on that in a moment), but it certainly meant I stopped waking up in a cold sweat wondering when the money was going to run out, and that’s a good thing when you’re self employed.</p>
<p>So what’s next for <a href="http://freshmonkey.org/">Fresh Monkey</a>? Big things. We just went limited, and Anisa’s stepping in as project manager and co-director. Frankly, there’s too much work for just me any more, and I’d rather bring in more people than hand the work away to dreamweaver pilots, so watch this space. If you’re interested in knowing what I’ve got in mind, you should <a href="http://twitter.com/direct_messages/create/relativesanity">drop me a line</a>.</p>
<p>So that’s big. What else?</p>
<h2 id="freeagent">FreeAgent</h2>
<p>I’m not sure there are enough superlatives. Where else do you see support tickets like <a href="http://community.freeagentcentral.com/freeagentcentral/topics/incredible_application_well_done">this one</a>? Seriously, if you’re self employed, go and <a href="http://freeagentcentral.com/">check it out</a>. Even better, go and try it out using my <a href="http://www.freeagentcentral.com/?referrer=31048b5i">kickback code</a> and get yourself 10% off for life!</p>
<p>If you’re at all like me, you’re going to put off moving your accounts system over to them. You spent a long time setting up those spreadsheets, and they’re working just the way you like them. Why abandon that?</p>
<p>If rolling year-in-progress tax calculations, bank statement uploads and automatic invoice reconciliation, automated overdue reminders, recurring invoices, estimates and basic project management functionality doesn’t persuade you to at least try it out, how about this: I don’t know a single convert who has moved back.</p>
<p>Since day one, Ed, Roan and co have been obsessed with making an app that people like me want to use, and it shows.</p>
<p>Of course, there’s always room for improvement, and a quick glance at their <a href="http://community.freeagentcentral.com/freeagentcentral">Get Satisfaction community</a> shows there’s no shortage of suggestions and requests from their rabidly enthusiastic users. So what’s a growing company to do?</p>
<p>Keep growing, seems to be their answer. They’ve got a new developer starting tomorrow, someone who I’m sure is going to be as fanatical about building a fantastic app as they are already, and will hopefully let them expand at an ever increasing rate.</p>
<p>I’ve been pestering them to let me help out for ages, as it’s been clear they needed and wanted more hands on the wheel, but they were adamant that they wanted to make a permanent hire, to have a senior developer on board 9-5, someone who would be in a position to really make a difference.</p>
<p>So when they said they wanted that developer to be me, I did what all gibbering fanboys do: I cried, and asked when they wanted me to start.</p>
<p>They said “How about the 6th of January?”.</p>
<p>Then they said “Oh, and if you want to keep your Fresh Monkey stuff running too, we don’t have a problem with that. Just try and get some sleep once in a while”.</p>
<p>Then I cried some more. Me, a respectable salaryman. Who’d have thought?</p>
<h2 id="2010">2010</h2>
<p>So 2009 was awesome. Let’s look at the list for 2010:</p>
<ul>
<li>Working for a company I respect, on a product I love</li>
<li>Growing a business I’m passionate about, working with more people I’m in awe of</li>
</ul>
<p>And let’s not forget all the <a href="http://twitter.com/roanlavery/status/7400970468">shiny new toys</a>.</p>
<p>Welcome to 2010. It’s looking like a fun one.</p>
]]></content:encoded>
			<wfw:commentRss>http://relativesanity.com/2010/01/05/the-year-we-make-contact/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP is a ghetto</title>
		<link>http://relativesanity.com/2008/11/18/php-is-a-ghetto/</link>
		<comments>http://relativesanity.com/2008/11/18/php-is-a-ghetto/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 14:55:49 +0000</pubDate>
		<dc:creator>relativesanity</dc:creator>
				<category><![CDATA[curmudgeon]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://journal.relativesanity.com/?p=91</guid>
		<description><![CDATA[If you read my last article, I&#8217;m guessing you had one of two reactions. Either &#8220;Oh my science, that&#8217;s me!&#8221;, or &#8220;What an arrogant twat!&#8221;.
My second guess is that if you called me arrogant, your development language of choice for your killer CMS was PHP.
I know. I feel your pain. I&#8217;ve been there. There is [...]]]></description>
			<content:encoded><![CDATA[<p>If you read my <a href="http://journal.relativesanity.com/2008/11/17/how-not-to-build-an-in-house-cms/">last article</a>, I&#8217;m guessing you had one of two reactions. Either &#8220;<a href="http://ohmyscience.org/">Oh my science</a>, that&#8217;s me!&#8221;, or &#8220;What an arrogant twat!&#8221;.</p>
<p>My second guess is that if you called me arrogant, your development language of choice for your killer CMS was PHP.</p>
<p>I know. I feel your pain. I&#8217;ve been there. There is a better way.</p>
<h2>PHP was good enough for me father, so it&#8217;s good enough for me</h2>
<p>Okay, so now I&#8217;m going to hate on PHP for a bit? What next? Sugar in your gas tank?</p>
<p>Let&#8217;s get one thing straight. I have no problem with PHP as a language. Well, okay, I have a few problems, but in principle I think it&#8217;s a fine platform for developing, well, anything you want. The syntax is a bit flakey, and language consistency is practically non-existent, but it&#8217;s really as good as any other language geared to web development.</p>
<p>I also think there are some great apps written in PHP. In my last post, I mentioned three content management systems that I use regularly. They&#8217;re all PHP-based, and I recommend them all.</p>
<p>So what gives? PHP is a ghetto? How come?</p>
<h2>PHP is too easy</h2>
<p>While it will take me a little while to justify it, my conclusion is simple. PHP is far too easy to hack on and get fast results.</p>
<p>You know what else is too easy? HTML. Let&#8217;s take a little analogy trip back to the late 90s.</p>
<p>Back in the day, HTML was a horrendous tag soup. &#8220;Progress&#8221; was measured by browsers adding proprietary tags to a badly-enforced spec that nobody cared about. We all laid out in tables, we all used massive sliced images to get our message across. Our sites were inaccessible and unsearchable.</p>
<p>But who cared? It was <strong>easy</strong> to build a website. Fire up Front Page, hack about in Photoshop for an afternoon, and boom &#8211; one corporate intranet coming right up!</p>
<p>Of course, you could follow the standards if you wanted. You could create great sites without resorting to the nasty tables, but if you did so you were an one of <em>those guys</em> &#8211; what was the point?</p>
<p>The point, of course, was maintainability, with an added bonus of learning a whole load about how the web was supposed to work: semantics, presentation separation, scalability, inter-app communcability. These days the cool kids call it &#8220;Web 2.0&#8243;.</p>
<p>Thankfully, the sort of table-driven web design that we saw back then is dying a slow, lingering, but ultimately satisfying death. Designers who still think in terms of CSS being &#8220;that new thing that nobody really uses&#8221; aren&#8217;t occupying many high level positions any more, and it&#8217;s all a bit more disciplined a discipline.</p>
<h2>PHP is still amateur night</h2>
<p>Let&#8217;s haul our analogy back on track. What does this have to do with PHP? The problem is that while the folks running the show at <a href="http://www.php.net/">php.net</a> are desperately trying to enforce some standards, and generally discipline up their users, the users are having none of it. PHP4 just won&#8217;t die, and there are still a lot of professional PHP developers out there who haven&#8217;t moved beyond a few bits of PHP injected into flat files on their server.</p>
<p>PHP is great for quickly adding some functionality to a flat site. That&#8217;s how most of us got into building &#8220;PHP apps&#8221; in the first place. A file here, a login page there, some admin forms and suddenly we&#8217;ve got an app! It&#8217;s untestable, unmaintainable, but it&#8217;s small enough that we don&#8217;t care.</p>
<p>Except we then get adventurous and start hacking at some sort of &#8220;framework&#8221; idea that we have, without realising that we&#8217;ve crossed over to the point where we really need some computer science understanding here. Design patterns? What are they?</p>
<p>Suddenly we have hundreds of .php files in our public_html directory, each one slavishly copying the authentication header include to make sure the right users get to administer the site. Adding a new section? Fire up the FTP client, create a new directory, and make four copies of the &#8220;page&#8221; script.</p>
<p>We might even get creative and use .htaccess to start hacking up our URLs to look nice.</p>
<p>But we&#8217;re still just using glorified server-side includes to activate our pages.</p>
<h2>Go pro</h2>
<p>Most of the good, object oriented, application-thinking PHP developers I know only became that way because of one of two things in their careers:</p>
<ul>
<li>They came to PHP from a comp. sci. background</li>
<li>They left PHP to program in a different language, and came back enlightened</li>
</ul>
<p>This is one of the main reasons that I try to wean PHP developers off PHP as fast as possible when I meet them. I don&#8217;t care if you use Rails, Django, Zope, Erlang or frigging Perl (okay, maybe not Perl) &#8211; just get out of the PHP ghetto, and see how the big boys do it.</p>
<p>It&#8217;ll seem weird at first (&#8221;There&#8217;s only one file in the public_html directory!!&#8221;) and you won&#8217;t like it (&#8221;I could do this SO MUCH FASTER if I just wrote some inline PHP to process the form submission&#8221;), but gradually you&#8217;ll start to see all the wins you&#8217;re getting (&#8221;You mean I don&#8217;t have to instantiate the database connection?&#8221;) and the time you end up saving (&#8221;Wow, all my HTML is bundled in a neat package, and I can drop in a new template any time I like!&#8221;).</p>
<p>You&#8217;re then free to come back to PHP and start coding like a <a href="http://www.pbm.com/~lindahl/mel.html">real programmer</a>. You&#8217;ll have a much greater appreciation for how it all works, and that a little discipline saves a lot of time.</p>
<h2>Why the venom?</h2>
<p>The last couple of posts have been pretty vitriolic. They say we hate most in others the faults we see in ourselves, and I&#8217;ve recently been reminded of my &#8220;bad old days&#8221; a few years ago where PHP was my only language, and I loved Rails but didn&#8217;t want to learn Ruby.</p>
<p>I&#8217;ve been working recently on a legacy project from those days, and realise how far I&#8217;ve come. I hope this post and the last one might save someone else the pain.</p>
<p>PHP is bad shit, kids &#8211; just say no.</p>
]]></content:encoded>
			<wfw:commentRss>http://relativesanity.com/2008/11/18/php-is-a-ghetto/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How not to build an in-house CMS</title>
		<link>http://relativesanity.com/2008/11/17/how-not-to-build-an-in-house-cms/</link>
		<comments>http://relativesanity.com/2008/11/17/how-not-to-build-an-in-house-cms/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 13:32:02 +0000</pubDate>
		<dc:creator>relativesanity</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[curmudgeon]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://journal.relativesanity.com/?p=77</guid>
		<description><![CDATA[It&#8217;s so easy to create a content managed website these days that it&#8217;s often equally easy to be paralysed by choice. This journal runs on WordPress, and uses a modified version of a theme by MidMo Web Design. It took all of 20 minutes from download to test-posting into this theme.
Picking the engine itself, though, [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s so easy to create a content managed website these days that it&#8217;s often equally easy to be paralysed by choice. This journal runs on <a href="http://wordpress.org/">WordPress</a>, and uses a modified version of a theme by <a href="http://midmodesign.com/">MidMo Web Design</a>. It took all of 20 minutes from download to test-posting into this theme.</p>
<p>Picking the engine itself, though, has taken about 2 years, and was based on one thing: immediacy.</p>
<h2>Choices, choices</h2>
<p>Choice is good, right? Competition is even better. I&#8217;ve recently become jaded with my own erstwhile approach to site management systems. That approach could be boiled down to two simple statements:</p>
<ul>
<li>Content Management Systems are simple</li>
<li>Given enough projects, I can incrementally build my own while getting paid for it</li>
</ul>
<p>The implication being that &#8220;my own&#8221; will be inherently better than any of the off-the-shelf systems that are already out there, because I&#8217;ll understand it from the ground up.</p>
<p>What really happens can be summed up by these parallel statements:</p>
<ul>
<li>CMS is as &#8220;simple&#8221; as word processing: easy to describe, easy to prototype, hard to perfect</li>
<li>Clients are not software designers, and I&#8217;m a scorched-earth perfectionist</li>
</ul>
<p>All of which results in me, having idealised the first two statements, but followed the second two, writing this post two years later.</p>
<h2>Build it in increments -&gt; (step 2) -&gt; profit!</h2>
<p>If you are planning on building an in-house CMS, I&#8217;m assuming that you&#8217;ve already come up with all the rationalising arguments about why it will be &#8220;better&#8221; than off-the-shelf. It doesn&#8217;t matter whether you&#8217;ve convinced yourself that the client&#8217;s requirements are beyond the scope of any existing system, or whether you&#8217;re just full of &#8220;Not Invented Here&#8221; Kool-aid, the point is that you and your team are committed to delivering a CMS to fulfil your client&#8217;s spec.</p>
<p>Of course, what I&#8217;ve just described is a bespoke CMS for a single client. Everyone knows that&#8217;s not scalable to larger projects, so how do we get around that?</p>
<p>All together now:</p>
<blockquote><p>We write the core of the CMS for this client, and build it modularly so that we can just give them what they asked for, but <strong>reuse</strong> the core on the next project!</p></blockquote>
<p>Bingo. Sounds great, doesn&#8217;t it? You make a bit of a time loss on this project, but it&#8217;s an investment, because next time around you&#8217;ll be mainly writing modules for the next client&#8217;s functionality. If the next client has the same spec as this client, it&#8217;s <strong>instant profit</strong>! What can go wrong?</p>
<p>This is where reality creeps in. You build your CMS nice and modularly for the first two weeks. You then realise that you&#8217;re not quite finished the core yet, and you&#8217;ve only got two weeks left to implement the various bits of functionality as modules. You panic. You know what modules you need, so you start building the remainder of the core with those modules in mind. You maybe even start building some modules into the core, promising to refactor them out on the next project, because you finally remembered your <a href="http://www.pragprog.com/titles/tpp/the-pragmatic-programmer">Pragmatic Programmer</a>, and suddenly it&#8217;s all about &#8220;just get it working&#8221;.</p>
<p>You complete the project on time, and what do you have? A half-bespoke, half-modular monster that is going to require a serious refactoring job to make usable for the next project.</p>
<p>However, you&#8217;ve <strong>learned a lot</strong>. This is a key realisation, and often missed. You&#8217;ve learned a hell of a lot, and this is where the rot starts. You&#8217;ve learned so much that you convince yourself that, on the next project, it would be insanity to try to reuse any of what you&#8217;ve just coded. What you decide to do instead is to reuse the <strong>knowledge</strong>. Oh yeah, baby &#8211; we salvaged something after all!</p>
<p>So you start coding again from scratch. This time it will be better, you say, since you know how it all went wrong last time, and you&#8217;ve come up with five great new ways of modularising from the get-go. Then client number 2 rolls along.</p>
<h2>One of these kids is kinda different</h2>
<p>So with your newfound &#8220;I get it now!&#8221; knowledge, you start implementing The Plan again. Client 1 was a false start &#8211; client 2 is the real deal. Now you know how to make it modular, you&#8217;ll do it right this time.</p>
<p>Except the same thing happens. This time, because you&#8217;re having so much fun coding, and because you&#8217;ve convinced yourself that last time you caved and started coupling the core to the modules too early, you hold out to week three to produce the core CMS. But again, week three rolls around and you&#8217;re still not done. With only one week left to implement the functionality that took you two weeks last time, you start panicking and even more coupling happens. Worse, your project runs over time and is late.</p>
<p>So far, with two projects in the bag, you&#8217;ve overserviced both, pissed off one of the clients by being late, given each a rushed bespoke system (with all the attendant maintenance overheads), and have precisely zero reusable code. Not exactly the outcome you&#8217;d hoped for.</p>
<p>So what went wrong?</p>
<h2>Addiction is curable</h2>
<p>What went wrong is that you failed to notice that your stated goals were not really your goals. Worse, you actually got what you wanted all along.</p>
<p>Huh?</p>
<p>Your implicit goal in building an in-house CMS was to reduce the amount of work you do. You&#8217;ve noticed that servicing your clients is boring, because you&#8217;re constantly writing the same stuff. To fix that, you decide to consciously write that stuff in a way that you can reuse next time.</p>
<p>The logical next step of that is to write an entire <strong>system</strong> that you can reuse next time. This is where the logic breaks down, because there already <strong>are</strong> systems that you can reuse. Right now. You can download <a href="http://modxcms.com/">MODx</a> right now and be at precisely the point you say you want to be at in four weeks.</p>
<p>So why didn&#8217;t you? You didn&#8217;t because your goal isn&#8217;t to reduce the amount of work you do, it&#8217;s to increase it. What you secretly want to do is build a bespoke CMS for every one of your clients. You hope that maybe, one day, you might hit upon a pattern that you can reuse, but you don&#8217;t really care about that. You love coding, you love tweaking and refining and burning it down and starting again. You love it, and you got it.</p>
<h2>Step zero is realising you&#8217;re addicted</h2>
<p>So what are you addicted to? Coding? No &#8211; you&#8217;re addicted to the knowledge you&#8217;re learning, to the experience, to &#8220;figuring it out&#8221;. That&#8217;s why it&#8217;s so difficult to locate the source of the problem. When I said &#8220;you wanted to increase your workload&#8221;, you balked, because to you the work is becoming more and more painful.</p>
<p>The knowledge isn&#8217;t, though. You&#8217;re putting up with the pain for the rush of having refined your perfect plan for next time.</p>
<p>And the truth is that your CMS prototypes <em>are</em> getting better all the time. After 5 or 6 more clients, you might have a really solid platform.</p>
<p>Too bad for your first half-dozen alpha and beta testing clients, though.</p>
<h2>Where&#8217;s the exit?</h2>
<p>So how do you break this cycle? You decide which of these is more important to you right now. Do you want to:</p>
<ul>
<li>Build a CMS; or</li>
<li>Streamline your client servicing?</li>
</ul>
<p>You don&#8217;t get both, not right now. If you want to build an in-house CMS, you&#8217;re going to have to commit 6 to 9 months of development time to it, and the client has to be your company, not some real-world project you&#8217;re using to guinea-pig your sketches on. You need to take yourself (and perhaps another developer) off paid work and become software developers, with the attendant investment and payoff cycles that don&#8217;t exist in direct-to-client sales.</p>
<p>That&#8217;s the price. Once you have your CMS, you can start flogging it to people. At that point you can start to &#8220;Streamline your client servicing&#8221;.</p>
<p>Of course, by then, I&#8217;ll be in your sector, stealin&#8217; your clients, because I chose to &#8220;Streamline my client servicing&#8221; straight up using <a href="http://wordpress.org/">WordPress</a> and <a href="http://expressionengine.com/">Expression Engine</a>, with <a href="http://modxcms.com/">MODx</a> in there for the really tricky stuff, and have been having a whale of a time developing modules, plugins and extras for those mature platforms you&#8217;re only starting to catch up with.</p>
<p>Your CMS had better do something unique.</p>
]]></content:encoded>
			<wfw:commentRss>http://relativesanity.com/2008/11/17/how-not-to-build-an-in-house-cms/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
