I’m a notoriously compulsive hobbyist. I seem to have new pastimes every week, and today they happen to be gardening and writing short stories.
I bought a handbook that lays out the basics of short story writing (plot, character, dialogue, yadda yadda) but some pages into it, I decided, “Fuck it. This feels like work. Writers are supposed to chug wine in brasseries and let the drunk angst write itself, right? Nabokov and Kundera and Maupassant never wrote outlines and character sketches, silly!”
So I throw the book in the corner and get to it. I write five pages of rambling prose, hit save, and call it a night. This morning, I re-read it. I find that it’s lacking…plot, character, and dialogue. So I think and think and finally sigh and write an outline. A character sketch. Some dialogue. Then I go back to my original piece, ready to carve it up and make it play nice with all my new notes. I start laboring through it sentence by sentence, and then I realize: “Dear God… I’m refactoring!” I quickly close the thing and get back to work, which is the same goddamned thing except I get paid for it.
Anyway, the point is this. We’re used to seeing movies where writers are easy-going, substance-abusing geniuses who just get smacked in the head by a muse who writes their novels for them. Likewise, movies tell us that “hackers” plop down in front of a scrolling jumble of green ASCII and “crack” NSA servers in five minutes. You don’t see ‘em motionless before a screen, thinking… that’s lame!
But the reality, for both writers and programmers, is that a project should be 80% planning and 20% implementation. (Arbitrary statistics, but it’s something like that.) You should have a database schema, wireframes for your UI, and lists of models, controllers and functions before you write a line of code. Because if you just go with the flow and create a bunch of crap, trust me, it will be broken beyond belief and you’ll be better off re-writing it from scratch.
P.S. Maybe next week, if my plants are still alive, I’ll write something deep comparing coding and gardening.