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.

Filed Under

  • PHP

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.

9 Responses to “php|architect Test Pattern”

  1. Harry Fuecks says:
    3/22/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. Jeff says:
    3/22/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. Marcus Baker says:
    4/2/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

  4. cloud computing marketing says:
    11/10/2011 at 5:17 pm

    This is the best web blog I have read.

  5. Marcene Truiolo says:
    12/14/2011 at 4:14 pm

    I definitely like what you guys are often up too. This sort of clever function and reporting! Maintain up the astonishing works guys I’ve incorporated you guys to my own blogroll.

  6. Rosena Devot says:
    1/10/2012 at 5:09 am

    This is one awesome Questrade review mate! Thnx!

  7. Amal Trabazo says:
    1/11/2012 at 6:47 am

    I love using the google toolbar. It has great quality!

  8. Ross Douyette says:
    2/10/2012 at 8:20 pm

    Hi there, just became aware of your blog through Google, and found that it is really informative. I am going to watch out for brussels. I will appreciate if you continue this in future. Lots of people will be benefited from your writing. Cheers! It’s the best time to make some plans for the future and it’s time to be happy. I have read this post and if I could I want to suggest you some interesting things or advice. Maybe you could write next articles referring to this article. I want to read even more things about it! Nice post. I was checking constantly this blog and I’m impressed! Extremely useful info particularly the last part :) I care for such information a lot.

  9. Reverse Phone Lookup says:
    4/13/2012 at 10:22 pm

    Hey There. I found your blog using msn. This is a really well written article. I will make sure to bookmark it and return to read more of 301 Moved Permanently . Thanks for the post. I’ll certainly comeback.

Leave a Reply

Click here to cancel 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

    Subscribe Feed
    Share Subscribe to this blog…
    Share Bookmark or share this page…
  • About

    My name is Jeff Moore. I'm a PHP programmer living in San Francico and working for a startup.

    More about me…

  • Categories (Home)

    • Agile Methods (14)
    • Mac (14)
    • Misc (18)
    • Open Source (14)
    • PHP (99)
    • Software Design (29)
    • Usability (14)
    • Web Design (20)
  • Recent Comments

    • The Legality of Republishing RSS Feeds  28
      Tory Rennemeyer, eenicker, Reverse Phone Lookup [...]
    • Working with PHP 5 in Mac OS X 10.5 (Leopard)  258
      Tuan Lal, Lavagem de estofados, Edward L. Kind [...]
    • php | tek 2008  36
      how to mend ice machine, Akademija Debelih, Odbacena [...]
    • goto in PHP  59
      kasor, Thomas Valdivieso, Murray Ziadie [...]
    • Firefox Extensions for Web Developers  33
      kasor, Website Design Toronto, mobila bistrita [...]
    • Why PHP is easier to learn than Java  68
      kasor, Justina Calvery, Guy Lipton [...]
    • Meta Tag Refresh Faux Paux  43
      html email templates, E-Juice Reviews, image [...]
    • Improved Error Messages in PHP 5  49
      Carroll Tina, Przeprowadzka, Emery Harari [...]
    • Benchmarking PHP's Magic Methods  33
      kayu oyunlar?,dora,oyun,oyna, Benjamin Bejjani, paypal website [...]
    • Microbenchmarks of single and double qouting.  24
      kefir grains minneapolis, sexshop dildo, tuim688 [...]
  • Recent Posts

    • Richard Thomas
    • ZendCon: Writing Maintainable PHP Code
    • Looking Towards the Cloud
    • Holiday Tech Support
    • Closures are coming to PHP
    • php | tek Wrapup
    • php | tek 2008
    • Sarah Snow Stever
    • Benchmarking PHP’s Magic Methods
    • The Endpoints of the Scale of Stupidity on Video
  • Site

    • Archives
    • Log in
  • Search