It is with great pleasure that I’d like to announce the Member of the Month for February 2012: Michael Morris
Usually found hanging around in the PHP forums, Michael deserves this award for his helpfulness and his challenging threads about cutting-edge developments.
Please join me in congratulating Michael! And now, let’s dive into the interview!
1) Tell us a little about yourself—who are you and what makes you tick.
Well, a little bit of everything. I sing, act, and write in addition to coding, though programming is an easier field to find work in than performance arts. If I had my wish, I’d be in performance art though. I cut my computer programming teeth on the Commodore VIC-20, and moved up to the C=64 two years later. Whenever anyone complains about slow loads, my mind replays not so fond memories of the 1541 disk drive (slowest disk drive in history). I’d like to be more involved in the arts than I am now—but then again, most of the programming I have done has been for advertising and design firms. My resume bills me as a fine arts major who knows how to program.
2) You’ve been a member for a little over 4 years now. What first brought you to SP? What keeps you here?
I don’t honestly remember why I first showed up. I know I stick around because I like to teach and answer questions. It’s also a good way to continue learning—sometimes it’s just too easy to get caught up in habit to consider new ways of doing things. There’s a lot of people here that know more than I do which is a good thing to be around.
3) You write a lot of posts concerning cutting-edge PHP developments and practices. Is this purely out of interest, or do you use this knowledge in your daily work? Or in your personal projects?
I wish I could use theory more in practice than I can at work, but for the moment I’m doing mostly maintenance work in a code base where best practices are sorely needed but not implemented. I’m hoping one day to publish some of my personal work, but I don’t know. At the moment the work grind leaves my coding brain so addled I don’t want to look at code when I get home from work.
4) I read in a thread that you’re self-taught as far as web development is concerned. How did you get into this fair trade of ours to begin with?
I started with computer science at the University of Kentucky, met calculus and panicked when I failed it. I took a look at the time at what I was doing with computers—all of it art stuff—so decided to get into fine arts instead and then, eventually, theater. I still played with the web as a hobby, but didn’t do anything serious with it until I took on the technical advisor position at ENWorld about ten years ago. While doing that, I learned PHP from studying the code of vBulletin and consider the authors of that program to be my teachers. Eventually I got a consulting job with Wizards of the Coast to work on their forums, and decided that I could make a career of coding, so went back to school to study computer science once more—but this time with an emphasis in web design. One of the local firms here in Knoxville hired me after a year, and I left and haven’t looked back.
What this means is I’ve learned a lot of lessons the hard way, but on the whole it’s been a fun ride.
5) What music are you currently listening to?
Far more Pearl Jam than is healthy, along with a smattering of stuff I wrote myself. I spend a couple hours each week working on scores that are in various stages of completion.
6) What would you tell somebody to help them become a better developer?
Do your research. This goes beyond the code itself to getting an understanding of the tool you’re building. One painful example I have to work with daily at work is a block of code where the programmer didn’t do the research on a T-Ledger. His database has different columns for ‘credits’ and ‘debits’, and to further muddle the mixture, a column to label the transaction as a debit or a credit. The SQL must subtract one from the other depending on the entry in the field, which forces reports to include some truly gnarly case statements.
The problem, though, is if the original programmer had done his research he would have realized that a T-Ledger is an accountant’s convention to prevent accidentally mistaking a negative number for a positive number when balancing the books. Thus, you can safely distinguish credits from debits by storing the debits as a negative number. It is not legal on a T-Ledger to have a credit and a debit on the same line, nor is it ever legal to have a negative number in either field. As to whether the number represents a loss or gain for the company, neither the programmer nor the computer really needs to know this ahead of time; within a given account it’s sufficient to just store credits positively and debits negatively. At display time, you then put the positive numbers in the credits column and the absolute value of the negative numbers in the debits column. Calculating the final balance can be done with normal math, as long as all the transactions that are summed are from the same account or at least type of account. The polarity of the account as a whole doesn’t matter too much—because reports across accounts of different types are not normally run (and even if they were, this would be the rare edge case).
Another frightening example from the same code base and the same programmer was a class he’d written that emulates the native PHP assert statement. I have since removed this particular feature, but I can only imagine the time that could have been saved if he’d done some reading.
Second, don’t be afraid to ask questions.
Finally, don’t fall in love with your own intelligence. The simplest code block is almost always best: use the simplest solution whenever you possibly can in code. This will make the honestly complex code blocks easier to write when they do come up.
7) Now for something a little lighter than a T-Ledger : what’s the last movie you saw at the cinema?
Our Idiot Brother. The last play I watched was a number called “Deadstock”. One quirk of mine is I attend live performances more often than cinemas.
8) How’s Gazelle—your PHP development framework that many of us are anxiously awaiting—coming along?
It’s been sidelined by work for the moment. I want to get it back out before it gets too dusty. When I left off I was working on my own ORM approach and got stuck. Given how monstrously complex ORM is, this shouldn’t be too surprising—though in my defense, once I get this one up and running it will be my third one. I just haven’t had a good, uninterrupted week to sit down with it that I’d like, and I’ve also found myself very busy with other projects. Gazelle has been renamed, since there is a gazelle project out there. Right now, I’m using the acronym PNL for PHP Next Level, but the more I think about it, the more that feels too pretentious for my tastes. In any event, the goal of the framework has never been to compete with Zend or Symphony, but rather to bridge the world of ‘from scrap’ PHP website writing to the world of framework writing. The framework’s goal is to teach, and other considerations are secondary.
9) Any other interesting projects you’d like to tell us about? (i.e. a free self-promo pass )
The project drinking most of my free time is “Moments”—a two act, 80 minute play that is about 75% complete as far as its first draft goes. It follows a play I rewrote over Christmas titled “Five Against One”, which is a musical based on the music of Pearl Jam. I have contacted one of the band’s rights managers and am waiting to hear back from them, but that will be a long wait. Moments was started because I have unanswered questions with one of the characters in “Five Against One”, and also it is wholly independent—meaning that, in theory, it could see production some day. I’ve also begun drafting out another musical using my own songs, tenatively titled “In the Light of the Storm”, and I’m kicking around thoughts for yet a fourth play—“And Also With You.” I find writing for the stage a lot more relaxing than writing for computers—as human beings don’t (usually) suffer parse errors.
10) Lastly, why did the chicken cross the road?
I was born a mere 4 miles from the founding restaurant of the Kentucky Fried Chicken chain, so I know a few things about chickens crossing roads. It is a frequent local phenomenon. As far as I can tell, chickens cross the road to show the possums that it can be done.