Thursday, March 8, 2007
Portability- Is it the Enemy?
It's possible that portability and configurability are the enemies of rapid software development.
Now, up to a point, I'm all for making software portable or configurable. For instance, if a piece of software can only run on my laptop, it's only useful to me. And if I have to change source code every time I change to a different computer or database or password, that's probably also bad.
But how bad?
And is that really ever a problem? I mean, really?
In reality, the opposite problem occurs more frequently. I start writing some code, and think to myself, "What if the person using this code doesn't have a database? What if they aren't using MySQL? What if they don't have anything but a stone tablet?" And I start moving from solving my own specific problems to solving a set of generic problems.
I think I mentioned in a previous post that I'm writing an irritable piece of software called Testy. Now, if you're writing a piece of software called "Testy," it damn well better have good tests. So that's where I started. I usually end up in the t/ directory pretty soon after starting a project anyhow, but this time I really did start there.
And I found myself doing what I always do- trying to make the (largely unwritten) software do things that I simply don't need.
So I stopped.
Paused.
Re-read some chapters of Getting Real.
And I wrote three sets of tests (for unit tests, plans, and tags) that do exactly what I want them to do, and nothing more. No extensibility, no configurability, no premature optimization.
Phew, this is fun! Someone had better hire me quick, or I could start to enjoy this a little too much.
Now, up to a point, I'm all for making software portable or configurable. For instance, if a piece of software can only run on my laptop, it's only useful to me. And if I have to change source code every time I change to a different computer or database or password, that's probably also bad.
But how bad?
And is that really ever a problem? I mean, really?
In reality, the opposite problem occurs more frequently. I start writing some code, and think to myself, "What if the person using this code doesn't have a database? What if they aren't using MySQL? What if they don't have anything but a stone tablet?" And I start moving from solving my own specific problems to solving a set of generic problems.
I think I mentioned in a previous post that I'm writing an irritable piece of software called Testy. Now, if you're writing a piece of software called "Testy," it damn well better have good tests. So that's where I started. I usually end up in the t/ directory pretty soon after starting a project anyhow, but this time I really did start there.
And I found myself doing what I always do- trying to make the (largely unwritten) software do things that I simply don't need.
So I stopped.
Paused.
Re-read some chapters of Getting Real.
And I wrote three sets of tests (for unit tests, plans, and tags) that do exactly what I want them to do, and nothing more. No extensibility, no configurability, no premature optimization.
Phew, this is fun! Someone had better hire me quick, or I could start to enjoy this a little too much.
Subscribe to Posts [Atom]