Archive for the ‘Editorial’ Category

Dear Diary: Day 2 of Software Engineering for SaaS

Saturday, May 19th, 2012

Day 2 of the UCB SaaS course is gone and I’ve scarcely looked at the coursework. From my brief review of Week 1, I see that there are 2.5 hours of video to watch, a couple of chapters to read in the text book, and some interesting assignments that I’m looking forward to. Overall, the course is top-notch, and the instructors are world class.

I’m feeling totally comfortable with the Rails and Ruby part of this course. What I’m having trouble with is Father Time himself. I’ve spent the last couple of day getting three finals together for my CCSF course. What made it more time-consuming (yet more rewarding) was that I got a wild idea to write an automated testing suite to evaluate the functionality of the insanely complex HTML forms I’m having my students create (and validate) as part of the Final. The test suite is done with SimpleTest, the rather fabulous PHP Unit Testing library.

Check out the SaaS course here — Software Engineering for SaaS | Coursera. Maybe you can catch it the next time it comes around.

A Sad Day for Fans of ThinkPad Keyboards

Thursday, May 17th, 2012

I always liked two things about IBM ThinkPad laptops: the little red TrackPoint pointer, and the great keyboards that IBM used. My T42p and X61 are both still alive and kicking and have the greatest keyboards I’ve every laid hands on. So, when I read this news today, I got a little bummed out. It’s sad the see a good thing go extinct.

The Singleton Design Pattern in PHP

Thursday, May 3rd, 2012

The Singleton design pattern creates a class that can only have one instance. This is useful for tasks such as creating a globally available database connection for your script.

The prototype for the singleton class, in PHP, goes like this:

Singleton Pattern

class ClassName {
    static $instance = NULL;
    private function __construct() {}
    private function __clone() {}
    static function getInstance() {
        if(self::$instance === NULL) self::$instance = new ClassName();
        return self::$instance;
    }
}

$obj = ClassName::getInstance();

It’s All About Scope

PHP variables have scope restrictions that prevent them from being visible in all parts of your program. We often need these variables inside classes and functions. One way to provide globally accessible variables is to pass them into classes or functions as parameters. This method makes it clear that the function of class method is dependent on an external variable or object. Here’s an example:

(more…)

Hooray for the Average

Thursday, April 26th, 2012

Average Magazine

In a world of curated blogs, where every life is golden and reeking of the sweet smell of success, Average Magazine is a winner. It’s an annual magazine, so get your copy now. 2013 is a long way away.

A shiny magazine without the shine, Average celebrates ordinary moments & the minutia our lives are based on, without pretension & full of honesty. Articles include:

  • Softpants: characteristics, occasions & litmus tests
  • Sheet Cake: the building block of group celebration
  • Law & Order: a one-week analysis of the franchise
  • The Wire Coat Hanger: one man’s quest to have his coat remained unwrinkled
  • The Word Count: one thousand, one hundred & eighty words
  • Oblong Sandwiches: and the cities that claimed to have coined them
  • The Green Book: profoundly calm & unhurried
  • Snails: the life of a pair of clip on earrings
  • People: and how they like their toast among other things
  • Trees That Look Like Giant Vegetables
  • Reflections on Regression Towards the Mean
  • Your Grandmother Taught You To Steal To Survive A Depression
  • You Are What You Eat: a photo essay examining the interior of refrigerators in homes across Texas
  • Sky Chart: paintings & analysis of the sky over a three month period
  • On Swimming: a short story
  • Someone Named Joe: the first in a series of portraits
  • + a crossword puzzle

The Coffee Shop at the End of the World

Wednesday, April 11th, 2012

I’ve drunk a lot of coffee in a lot of Java joints and the best I’ve ever drunk was in a little dive out on the western edge of North America, Trouble Coffee Company, out on Judah Steet in San Francisco’s Sunset District, about 100 yards from the Pacific Ocean. If you’re ever in that forlorn, fog-bound neighborhood, drop in and get a cappuccino. You won’t regret it.