php|architect Test Pattern
March 21st, 2006The March issue of php|architect came out yesterday. I’m excited to see this issue finally out. I’ve taken over writing the monthly Test Pattern column from Marcus Baker and this issue contains my first column.
Writing doesn’t come easy to me. Writing this blog for the past two years has helped me improve. However, I have to admit that I was quite worried just before the column was due. I just re-read it for the first time since turning it in and I am happy with the result. This is due in no small part to some great advise and encouragement from Marcus.
This month’s column takes on the topic of organizing code. I wanted to convey some of the fundamental principles underlying the object oriented paradigm, but in a way that goes beyond objects. In the mid 90’s, I had what I consider a major professional epiphany when I finally understood object oriented programming. This month’s column is my best attempt to concisely explain the heart of that epiphany.
I’m proud of this month’s column. I hope you’ll check it out.
Chris Shiflett has some thoughts about the security corner column in the same issue.
March 22nd, 2006 at 3:55 am
In short - really liked it. This point needs making more often;
And the analogy to how we organise our homes was brilliant.
On the process of writing, actually think it’s not so far removed from the process of coding. Kind of in the sense of your column, think people tend to get hung up on writing “great prose”, the process of writing being somehow “holy”, when perhaps writing “accessibly” is a better target to be aiming for. Also I know people who say “I wish I could write” - like coding the best way to progress is to actually do something - dive in the deep end and try to swim.
Anyway - not that I’m a great writer or that you need advice but here’s a rough “dump” of the approach I use, for interest. Not that this in any way formal and better ideas appreciated;
- Identify the general structure of the text (the main events in the plot if you like), including the start and the end. Practically that might be putting some major headings in a text file, although most of this is offline (in my head). And keeping it most of it offline helps get me absorbed in the topic.
- Splurge text. Within the outline provided by the headings - throw in anything and everything relevant. I don’t care too much about prose, although if I find some nice sentences, work a little on getting them right first time. Main point is allowing the brain to be free to wander the subject, and bring is any many details and relevant points as possible. At the same time, if I find myself getting hung up on a particular section (e.g. the intro), I leave it and get back to splurging as much as possible. The main thing here is once done, I’ve removed the pressure of any deadlines etc. - I know I’ve got the volume done and the rest is fine tuning. Also find emphasizing velocity at this stage allows my “subconscious” to have more input - allows for a more lateral way of thinking and some of the most interesting ideas fall out of this I feel.
- Refactoring. With the volume done it’s then clean up time; working out what to throw out, making it readable etc. Haven’t got a well developed approach here but perhaps performing multiple “passes” of the text with a particular (seperate) objective in mind on each pass is the way to go e.g. this pass is the “read it like a reader” pass - trying to take a step back and see it with fresh eyes. Another pass might be to analyse the rhetoric - are the different paragraphs and headings fitting into a coherent argument. The intro and conclusion tend to get written last - typically find these the hardest.
It’s actually interesting to analyze the techniques used by writers for decent magazines and newspapers from this pespective - particularily editorials / columns where “patterns” tend to manifest themselves but also in straight news pieces, one “pattern” that’s become popular is something like the “let the reader identify” pattern, where the journalist begins and ends a piece in the first person, while a more traditional style of journalistic writing is packed in the middle, once you’ve got the readers attention. Like coders, journalists have to meet deadlines, and think what they’re doing is much more according to formula and strategy than “raw creative talent”
March 22nd, 2006 at 7:17 am
Thanks Harry. I definitely agree with you that the intro and conclusion are the hardest part. “Writing Patterns” is an interesting concept. Also, the best way to learn is to do it.
April 2nd, 2006 at 1:50 pm
Hi Jeff.
I don’t find writing comes easily, either. By taking over the column, you’ve done wonders for my free time ;).
Check out “Story” by Robert McKee. I wish I’d read it while I was writing the columns.
yours, Marcus