Standing on the shoulders of giants: getting over ‘not built here syndrome’

Published November 9th, 2005

I’ve been writing PHP, full-time, for something like four years now. Since day one, I’ve scrupulously avoided making use of anyone else’s code. When I see a new application or technique, my first reaction is not “ooh, I could use that”, but “hmm…how would I build that?”.

I think there are two reasons for this: first, and most important, is that I have long felt that if you just use someone else’s library, you learn nothing — except maybe how to use that library. By doing it yourself you get to know more about (in this case) PHP, knowledge that you can then use elsewhere. And this attitude has stood me in good stead so far: I’ve written reams of PHP code by now, for a huge variety of projects. In that time I’ve had to learn all sorts about the language, its strengths and weaknesses.

Secondly, I think there’s more than a little pride at stake: I’m not above thinking that anything that someone else can do, I can do as well or better. Sometimes I’m right, although I suspect that more often than not I’m kidding myself.

The most recent manifestation of this ‘not built here syndrome’ (ie. the belief all code must be written ‘in-house’) has been an ongoing effort to write my own development framework. I started out with some strong opinions about how it should work (the usual stuff: eg. separation of business and template logic, multiple template language support, abstracted database layer and so on) and have put in a considerable amount of work on it. And I’m really quite proud of some of it — I’ve even used it on one or two live projects, albeit in an unfinished form.

However about a week or so ago I finally came to a rather painful, but I think valuable, realisation. This framework was supposed to save me time in development of some ideas I’ve been mulling over for a while — years, in some cases — but I’m taking so long writing (and rewriting) it, that none of these projects has ever got past the planning stage. Every time I sit down and think “right, I’m going to start work on [such and such a project] today” I see something that’s wrong with the framework, and spend the rest of whatever time I have available fixing it. And the work that I’m doing isn’t really teaching me anything new any more — I’ve done most of this stuff before, so I’m not really getting anything out of it.

Please excuse me while I go and slap myself about the head.

The upshot of this epiphany/head slapping is that I’ve decided that perhaps it’s time to revise my standpoint on using third-party code. The advantages are pretty obvious: not writing the code myself saves me time that I can put into actually getting somewhere with all these ideas that have been hanging around in my head for so long. And of course if I find any bugs it’s not my responsibility to fix them — maintaining the codebase is someone else’s problem.

The main worry is that by relinquishing control over a core component of any project that I work on, I’m at the mercy of some other person (or group). They might change the API in such a way that requires significant work on my part, break or remove something that my code is reliant on, or simply ditch the project entirely leaving me with unsupported code to maintain myself (which is what I’m trying avoid).

So the challenge is to find a framework that offers the functionality that I’m looking for, that’s developed and maintained by a group of people that I think I can trust. It also needs to be licensed in a way that’s compatible with what I want to do with my code.

There’s certainly no shortage of PHP frameworks out there to choose from (and of course Zend has just announced plans for its own). In fact I already use one (which I won’t name) every day at work — I didn’t choose it and I’m not very happy with it for various reasons, so I won’t be using it for my own projects.

It’s not an easy choice to make. With so many to choose from, it would be impossibly time-consuming to evaluate each one individually. They all stake some claim to being the best approach, for one reason or another, to achieving much the same end. So I’ve basically trawled very quickly through those that I could find, using very broad and unscientific methods to pick out what will be the right framework for me.

At the moment, I’m looking most closely at two projects, both of which are in the early stages of development: Cake and Qcodo. Cake is getting a fair amount of coverage lately (usually referred to as an attempt to emulate Rails for PHP). I found Qcodo by accident just this evening, and I’m interested in the code generation (as opposed to metaprogramming) approach that its creator has chosen.

The jury is still out on which framework I’ll pick (comments and suggestions welcome). But I feel like I’ve taken the first step towards freeing myself from the self-imposed burden of having to write every last scrap of code myself. And now maybe, just maybe, I might actually get something done!

Get a Trackback link

1 Trackbacks/Pingbacks

  1. Pingback: StickBlog » Blog Archive » When Rapid Application Development is not rapid on November 12, 2005

6 Comments

  1. Phantom on November 9, 2005

    I agree that ‘standing on the shoulders…’ is something I hate. I find a lot of young (read still at school) coders will do just that.

    Its not using someone else’s knowledge to get you through, but the seeming un-willingness to gain the knowledge for themselves in the first place. Remember the old Were Here days of ‘can someone tell me how to do my school project?’?

    Undoubtedly, there are times when other’s knowledge and code is required, but I believe that if you are going to do that, then you owe it to yourself to understand WHY you are using the code as well as understanding how it works.

    Before I forget – will you write this code for me….?

  2. Stickman on November 10, 2005

    My god, you didn’t actually read all of that did you? Get back to work!

  3. Phantom on November 10, 2005

    You would be amazed what I read. ;)

    I am well trained being the only person who reads my own blog/forum thing, so I like to make you feel wanted :D

    P~

  4. Stickman on November 10, 2005

    You would be amazed what I read.

    Mate, “Big’n'Bouncy” doesn’t count as reading.

  5. Aristotle Pagaltzis on November 11, 2005

    You’ll probably be interested in Kevin Barnes’ Three reasons to reinvent the wheel and my When (not) to reinvent the wheel. More thoughts on the subject.

  6. Stickman on November 16, 2005

    You’ll probably be interested in Kevin Barnes’ Three reasons to reinvent the wheel and my When (not) to reinvent the wheel.

    Thanks for the links — interesting stuff.

Leave a comment

Comment Policy: First time comments are moderated. Please be patient.

OpenID

Anonymous