Paul Scrivens: The Hardest Part

“Paul Scrivens”:http://www.itnextgen.net/pseudo/ has a very good piece entitled “The Hardest Part”:http://www.itnextgen.net/pseudo/archives/programming/the_hardest_part.php, which sums up exactly where I get stuck on all my projects/ideas. Let me quote the part I resonated with most:

bq. I wish I could run through projects like everyone else seems like they do on the web. You read one blog where someone is implementing a CSS designed site and the next day another. Then someone else is reinventing a new syndication format and it makes me wonder how do they even get started.

bq. When I do something I want it to be perfect. I like to plan things out so that I waste less time actually doing the work and messing up.

The comments offer some useful tips on how to get around the problem, which I shall have to try and put into practice. It’s also heartening to see that I’m not the only person that struggles with this problem that makes me far less productive than many other people.

Many of the comments suggest writing test cases. I’ve never got into writing test cases, as I cannot see how to apply them to a web application - the case would have to mimic a human user. I guess where forms are involved you could automatically submit known values and check you get the result back, but is this what most people mean?

There’s also a comment suggesting the use of a Fusebox architecture. Anyone who’s had practical experience of it like to comment? To my mind it’s always seemed messy to stick the core in one file, but as I’ve realised that a lot of my applications duplicate at least 10 lines of code in each file this may be a better approach.

1 comment so far ↓

#1 Marcus Baker on 08.18.03 at 12:33 pm

Hi.

I am working on just the problem of testing web applications using a unit testing (i.e. developer) approach. Here is the kind of thing I am trying to achieve…

class MySiteTest extends WebTestCase {
$this->get(”http://mysite.com/login.php”);
$this->setField(”username”, “Fred”);
$this->expectCookie(”sessionid”);
$this->submit(”Log-in”);
$this->assertWantedPattern(”/Logged in as.*Fred/”);
}

It’s at an Alpha stage at the moment, but making progress.

yours, Marcus

p.s. Couldn’t understand the code formatting rules.

Leave a Comment