I’m building an application which I’ll talk more about later – but this one’s different from other applications I’ve built: this one’s for me. In the same way teaching your spouse/significant other how to do X is a major pain in the ass, building your own application makes you do dumb, silly things (I think Jeff Atwood might be able to back me up on this one…). This, friends, is a story of my pain to ease your Monday blues.
I’m building an application which I’ll talk more about later – but this one’s different from other applications I’ve built: this one’s for me. In the same way teaching your spouse/significant other how to do X is a major pain in the ass, building your own application makes you do dumb, silly things (I think Jeff Atwood might be able to back me up on this one…). This, friends, is a story of my pain to ease your Monday blues.
I had an idea, and the idea was good. So I decided to build an application around this idea and I got together the various tools and things that I thought I would need. I played with the idea of using Rails (for a change – why not), but then a curious thing happened: my inner Type 1 Ass-kicker decided to wake up:
This aint no disco butthead. Build using something you know, stop dicking around!
He’s a real dick – that inner Type 1 Ass-kicker (we’ll call him Bad Rob) and if I don’t listen to him – or at least make him *think* I’m listening to him, well things will just get ugly.
I ditched my Rails musings and plowed ahead with ASP.NET MVC. I grabbed my favorite
testing tools, updated jQuery with my favorite plugins, and I was off to the races. With one exception – I snuck in a last-minute substitution while Bad Rob wasn’t looking: DB4O. Here are the tools I went with:
I’ve written about using DB4O before – I love the thing. Persistence made easy! I kicked up VS and got ready to roll…
That’s when the fun started. See, Good Rob (the guy who likes to write tests *first*, the guy who tries to vet just WTF he’s going to do and why) would have sat down and cranked out some specs against some type of iteration and time plan. Then maybe tied everything to a nice build server (which is purring away at my webhost) and… yadda yadda yadda.
Whatever Nancy-boy, it’s not like you’re getting paid to dick around here and no one’s gonna see your code! This site needs to go LIVE so get ON IT. Yah testing is fun – test whatever you want – AFTER YOU’RE DONE.
And there it is: business vs. process. The best part is that this Fight Club dialog is taking place right inside my skull, and Bad Rob is playing on my fear of “getting something done” while Good Rob wants to do it right.
Yikes. Dueling success metrics (such a lovely corporate term): “results” vs. “quality”.
Yes, this kind of thing is common – in fact it’s expected – in every software project ever undertaken. It doesn’t matter the company and in fact it happened to me at Microsoft. I was working with a team right after I started and I was about a week into the work when we had a team meeting and I was asked to “give a demo”.
“I don’t really … umm… have anything to show… oh wait yah I do – take a look at my test results so far.”
And the room erupted into laughter. “Nice! We don’t have an app but we can show our users some great test results!”
Granted – they were teasing me. All the same I couldn’t help feel that the expectation was that I needed to Show Something. Next time I’m in that situation I’ll be smarter and bring some HTML mockups – either that or Balsamiq.
As always, time is short when doing these things. Bad Rob was continuously reminding me that I needed to get this thing done and out and I gave in to the pressure. It really sucks to give in like this, but Bad Rob can be awfully, awfully convincing.
So I appeased him – I wrote the app quickly and cranked out the initial spec, and the decided I would back everything up with a set of tests. I really, really like the BDD approach so I started with that, and I gave myself 3 hours to write as many tests (errrr specs) as I could.
And then all hell broke loose.
I wish I could surround the following paragraph in glitter and flashing lights, because it’s something that I had forgotten by being “out of the mix” for a few years. I was surprised at myself – so much so that Bad Rob started to panic and got really pissed off at Good Rob for writing “such crappy code”. Here’s what happened:
What was supposed to be a 3-hour fun session of writing tests turned into much more and ended with a shouting match between Good Rob and Bad Rob, with Good Rob threatening that he was “going to BLOG THIS” (looks like he went ahead and did that…).
I wasted hours and hours retro-fitting my little application and stuffing Bad Rob back into his id-box. As I say I knew better, but feel prey to the “we need it NOW” bomb that Bad Rob kept lighting off.
What I should have done was this:
What I ended up doing was:
For those of you who don’t think “qualitatively” – here’s the breakdown on lost time:
Overall I would have been 1/3 ahead had I “done things right” – or more appropriately I would have finished in 2/3 of the time. That’s a lot of time!
The only reason I got so derailed is because I have a major stake in this thing’s outcome. I can forgive myself – just this once – for getting carried away and I’m happy that the damage wasn’t too great.
Bad Rob is happy that the app works and it’s lighter and more nimble than before. Good Rob is happy because his assumptions are covered and he can see the light at the end of the tunnel.
http://www.hanselman.com/blog/FirstRuleOfSoftwareDevelopment.aspx
http://blog.wekeroad.com/blog/youre-not-your-data-access/
http://www.codinghorror.com/blog/archives/000586.html
What's going on here? Love it!
Maybe next time!
German
Sure I could use a shared host, but I want a "real" host that I have root access on. I've got a few implementation ideas that wouldn't fly in a shared environment.
Just my $0.02 (which I can spend since my software is free)
If i was to use free technologies i'm going to spend 1/3 longer developing the app.. That's about a years worth of IIS hosting etc..
Server costs are very small these days and should be considered but really don't leave a big hole in your budget..
If you just wanna mess around with different websites that aren't making any money (because it's a hobby) buy a box for home :D
just my $0.02 :D
A really kick ass post Rob! The more I read your blog, the more I look forward to your next posts.
I've read in the last 3 years a lot of good blogs (including one) which all told us how to do things or gotcha's or...
But very, very few tell us how to **NOT** do things. We need counter-examples too.
Thanks again,
Andrei.
The only bad thing is Ruby is making me start to question everything I thought was 'right' :)
I recently went through the same decision process...have an idea, need an app. Go with what I know (.Net stack) or give Rails a shot? I started out with, "I want this done well, I'll stick with what I know." But, a day or so later of setting up the "right" things in .Net and I scrapped it in favor of Rails. My procrastination aside, I've been pretty successful with the Rails so far. And it feels lighter than when I was starting up nHibernate, Structure Map, etc, etc. (To be fair, I was struggling with some of my "business rules" that won't be any easier in Rails...I'm a horrible client.)
That said, I do like the main point of your article, in that doing it right will win out in the end. I was at scna (http://scna.softwarecraftsmanship.com/) last week in Chicago, and that was Uncle Bob's message: When the pressure is on, stick to your principles MORE.
I'm glad Good Rob took the time to blog about this.
Still cheaper to have free forever, of course, but if you are starting a biz (SEE how I played off the name!! sorry. Lame I am, yes) then it is an alternative.
My personal reason for sticking with MS is that C# and .Net give me a real breadth of areas to play in using one general set of tools. MVC, Silverlight, WPF, WinMo (well, not so much WinMo any mo...), XNA, etc.
Eyeston, I totally agree that learning different technologies is great, but the problem is time. .Net gives me a lot of bang for my buck (time). FYI, I wasn't always a .Net guy. I was a Java guy until around '05 (and various other things before that).
http://msdn.microsoft.com/en-us/library/system.runtime.serialization.netdatacontractserializer.aspx
Of course, the price for the host system remains, but the rest can be managed with just around 2 cents also, using a complete MS environment with express editions.
I know you know the guy, but I think "Bad Bob" has a nice ring to it?