Professional PHP

PHP Programming, Web Development, PHP Advocacy and PHP Best Practices.
« James Gosling on PHP
The Coding Apprentice »

php|architect Test Pattern

March 21st, 2006

The 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.

categories PHP
tags object-oriented-programming, oop, php-architect, phparch, test-pattern

Related Posts

  • Improved Error Messages in PHP 5
  • php testing and coverage
  • php | architect back issue bargains
  • Where do you get your Wi-Fi?
  • php|tek Slides
You can leave a response, or trackback from your own site.

3 Responses to “php|architect Test Pattern”

  1. #1 Harry Fuecks responds...
    March 22nd, 2006 at 3:55 am

    In short - really liked it. This point needs making more often;

    Don’t worry as much about the changes that might occur, but rather worry about the changes that are occurring.

    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”

  2. #2 Jeff responds...
    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.

  3. #3 Marcus Baker responds...
    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

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

code: use [code=php][/code].

Comment Preview

  • Search

  • Subscribe

    Subscribe All Posts
    Subscribe All Comments
    Subscribe All Bookmarks
    Subscribe with Bloglines Subscribe with My Yahoo Add to netvibes Subscribe in NewsGator Online Add to Google
  • Share This

  • Categories (Home)

    • Agile Methods (14)
    • Mac (14)
    • Misc (16)
    • Open Source (14)
    • PHP (95)
    • Software Design (28)
    • Usability (14)
    • WACT (7)
    • Web Design (20)
  • Recent Comments

    • How to Transfer Mac OS X Application Data between Computers  38
      help, please?, Toby, Secret Santa [...]
    • The Problem with Markup Languages  10
      Wayne Whitty, Aaron Saray, Jack Teese [...]
    • Firefox Extensions for Web Developers  16
      lawyers2, Markus, Mitch [...]
    • PHP 5.1 is out  6
      Pochka, Anal Master, Joey [...]
    • Why is PHP Popular?  24
      downgams.ru, naruzhkas.ru, cablingworks.ru [...]
    • Working with PHP 5 in Mac OS X 10.5 (Leopard)  104
      Iman, irisv, Massimo [...]
    • PHP Development From Java Architects Eye  10
      ebezutyzuba, Bobrila, FelhoBacsi [...]
    • The Legality of Republishing RSS Feeds  16
      Andrew, Matt, Mandi [...]
    • nofollow and comment spam  4
      Tanya, sss, Nataly Marshak [...]
    • The PHP scalability saga continues  6
      uswipyq, 网上购物, Harry Fuecks [...]
    • php | tek 2008  4
      , Saumava, NatureLimit [...]
  • Pages

    • Tags
  • Recent Posts

    • php | tek Wrapup
    • php | tek 2008
    • Sarah Snow Stever
    • Benchmarking PHP’s Magic Methods
    • The Endpoints of the Scale of Stupidity on Video
    • Working with PHP 5 in Mac OS X 10.5 (Leopard)
    • Keywords and Language Simplicity
    • Improved Error Messages in PHP 5
    • Michigan Taxes Graphic Design Services
    • Ruby versus PHP or There and Back Again
  • Archives

    • 2008: May
    • 2007: Jan Feb Mar Apr May Sep Oct Nov
    • 2006: Jan Feb Mar Apr May Jun Jul Oct Nov Dec
    • 2005: Jan Feb Mar Apr May Sep Oct Nov Dec
    • 2004: Apr May Jun Jul Aug Sep Oct Nov
  • Menu

    • Register
    • Log in