Building what’s in front of you

Recently while working on an application I found myself asking a number of architectural questions. These were questions about things that I might consider “fundamental” – elements of the application, how many methods each class might receive, and how to put it all together into something cohesive.

You might have asked yourself some of the same questions.

Continue reading

Installing The Latest PHP on Ubuntu

In the past I’ve written up installing various versions of PHP on new releases of Ubuntu, or for new releases of PHP. In those posts I’ve often recommended compiling PHP from scratch. However, compiling PHP from scratch is a serious chore, and keeping it up to date is even more of a serious responsibility. There are better ways.

The PPA’s by Ondřej Surý

Continue reading

It depends

When I was younger, I had strong opinions about many subjects. I felt I was right about a great many things, and anyone who disagreed with me was wrong. In my mind there was a right or a wrong, a black and a white, with little room for grey. Others were certainly entitled to their own opinion, but that didn’t make them any less wrong if their opinion differed from my own.

As I’ve gotten older, I’ve begun to realize in programming, and in life, so often things rely on a two word phrase that makes all the difference: it depends.

Continue reading

User Experience Matters

User experience matters.

Nowhere is this clearer than in the case of the accidental missile launch warning that was sent to all of Hawaii.

Here’s a copy of the the actual screen that was used by technicians to send out alerts of various types:

Continue reading

Don’t write useless unit tests

The other day I came across the following code in a project:

class Users
{
    public function __construct(PDO $pdo)
    {
        $this->pdo = $pdo;
    }

    public function getAllUsers()
    {
        $stmt = $this->pdo->prepare('SELECT * FROM users');
        return $stmt->fetchAll();
    }
}

Continue reading