About

Andrew Culver, an inexperienced software engineer, vents opinions of questionable value on PHP and software development while inviting rebuke from strangers.

Archive for the 'Uncategorized' Category

Statements and Evaluations

Tuesday, March 11th, 2008

Introduction
How many evaluations take place on each of the following three statements?

class … {

 public function …() {

  // Statement one.

  $this->_name = $name;

 

  // Statement two.

  $accounts = $this->_accounts->get($return);

 

  // Statement three.

  $this->_replies = new Relationship_OneToMany(‘Email’,

   Finder_Factory::create(‘Email’)->findByParent($this),

   $this->_replies);

 }

}

If your answers for each statement were at least 3, 5, and 10, you are hereby dismissed for […]

Read the rest of this entry »

Basic Design Patterns

Sunday, March 9th, 2008

This sounds terrible, but I lent a copy of the “Zend PHP 5 Certification Study Guide” to my 15-year-old cousin Ben. What makes it terrible is that I myself had it on loan from my boss. I was searching among the titles available to me for a book that served as a good […]

Read the rest of this entry »

Syntax Highlighting

Thursday, March 6th, 2008

Please forgive me as I attempt to get syntax highlighting working to my liking.

 

<?php

/**

 * Some class

 * @author Andrew Culver <andrew.culver@gmail.com>

 */

class Some_Class

{

    protected function something()

    {

        return "Some result!";

    }

}

 

// Some comment.

$output = Some_Factory::create(‘Some_Class’)

    ->setSomeProperty(‘Some Value’)

    ->something();

echo "The result was ‘{$output}’.\n";

Wow. After a little tweaking, I’m really […]

Read the rest of this entry »

Inexperienced Software Engineer

Thursday, March 6th, 2008

I wonder if having a disclaiming “about” line like that will help me loosen up and publish something. Well, the title is “principles, patterns, and practices.” Perhaps we can talk about just that!

Read the rest of this entry »