Opinionated Software, The Podcast

A while back I was contacted by Cal Evans over at the Zend Developer Zone to contribute to a new podcast he was starting up called PHP Abstract. Very cool idea, a small 5 to 7 minute podcast by PHP developers where they talk about a topic of interest to them (and hoepfully to you). Well, being one to never miss out on an oppurtinity to promote myself I agreed to contribute what I could. I settled on a brief talk about opinionated software. Also known as “convention over configuration” by the Ruby on Rails crowd.

Go over and have a listen and don’t be shy in sharing your feedback via the comments there or here. Opionated software / convention over configuration / tools with rules is a powerful yet misunderstood programming practice.

Back from Vancouver PHP Conference 2007

Looks like I just missed a winter storm that is currently pounding the Greater Toronto Area (Milton is on the outskirts of the GTA) so I may actually be snowed in tomorrow. Good thing I can work from home when necessary.

I had a good time in Vancouver at the conference, although I really wished I could’ve stayed for the second day. I want to thank Shane, Audrey, Peter and all the other organizers for giving me first-class treatment (Audrey, I still owe you that drink). My talk was really well-attended (much to my surprise as I was up against Ilia and Derek) and I was far less nervous about it than I was when I gave this talk.

I have to thank some of the following speakers:

  • Andrei for putting up with me, trying to push me to eat that enormous plate of nachos, and for pointing me in the direction of the Xbox Media Center
  • Sean for straightening out some issues surrounding getting paid for a magazine article
  • Paul for being in good spirits despite being deathly ill (and being cool about me grabbing a menu from you like an idiot)

I’ll be seeing most of these same people in Chicago at php|tek, so that’s yet another reason to look forward to the middle of May. Anyhow, I managed to make a screencast of my talk and chopped it down to size for the blog. Hope you enjoy it!

Bips and Boops

This time next week I will be trying to flag down a taxi at the airport in Toronto, having come back from the Vancouver PHP Conference 2007. I’m looking forward to giving my “What Can PHP Learn From Ruby on Rails” talk because I’ll be doing a screencast of my talk. However, I’m struggling with trying to decide what to do with it.

If I give it away, then the people who see me in person are getting ripped off. If I charge for it, the question then becomes how much to charge? $5? $10. One model I’ve been thinking of trying is that if 20 people by the screencast I will give it away for free after that point. We shall see what ends up happening.

Over on the CakePHP mailing list, someone asked a question about how to build a model without accessing a database. I pointed out that it can be done, and that there were examples. Then, I got schooled by nate

I definitely wasn’t agreeing with you, but I wasn’t really making fun
of you either. I’ll give you a hint: there’s a reason why we have a
base DataSource class, which is extended by DboSource, which talks to
the database on behalf of a model. Felix’s Google Analytics model is
actually a pretty poor example. Not because Felix is a bad coder or
anything (quite the contrary), but because up till now, there are a
few things that people really haven’t clearly understood (or perhaps,
there are a few things we haven’t made clear for people). Basically
what I’m trying to say is that you should never have to extend Model
in that way. Models are designed to *model* data, not handle the
details of accessing it.

Ouch

But Nate did have a good point. I didn’t fully understand how the Model was built up in CakePHP because, well, I never really had to before. I think when I build my first CakePHP 1.2x site I’ll dig into the internals a little more.

Now, I’ve noticed a few blog postings about mysqlnd, a native MySQL driver for PHP 6 (for now) and beyond. As an aside, I should try installing PHP 6 somewhere just to see how they are progressing. Anyhow, back to mysqlnd. Why is this significant? There are, in my mind, two things why you should know about it.

Firstly, mysqlnd is designed to take advantage of PHP’s own infrastructure. I imagine this means that you can expect better performance from this library as opposed to the old libmysql or the newer libmysqli. I understand it’s aimed at PHP 6 for the time being, due to some of the work being done with Unicode in PHP 6. There is talk of backporting it to PHP 5, or even PHP 4 (something to do with streams meaning you could backport) but it’s aimed squarely at PHP 6 for now.

The second big reason is that it will provide a library for PHP to talk to MySQL databases that has a license that is more compatible with PHP. In fact, it will be released under the PHP license. MySQL has an exception for allowing libmysql to be integrated with FLOSS projects, of which PHP is one. Having a native driver that doesn’t require an exception to use can only be a good thing.

Komodo - not just a dragon

I’ve tried all sorts of editors in my time: emacs, vim, Eclipse, Zend Studio. After I got into Ruby on Rails, I bought a copy of TextMate to be my main editor. But that’s all it is, an editor. In the Rails world, lightweight tools are preferred. I’m a big believer in lightweight tools, because I *hate* when my system gets lagged down because of the number of apps I’m running at once. However, I’ve noticed that there really isn’t much out there in the way of a full IDE for Rails, with debugging tools, etc. I really like the TextMate + Cyberduck combo I’ve been using at work for my PHP work and using TextMate for all my Ruby work. But I feel like a debugger is something that is missing. Maybe that’s in the works or exists already, I just haven’t run into it.

For PHP I really liked Zend Studio, but it was pretty expensive for just one developer to buy…and my company seems reluctant to fork out the cash to buy me a copy. The other PHP developer at work is old skool, using vim. So, I’d been getting along just fine with TextMate…but was starting to feel the pinch of not having a debugger (and some integrated version control would be nice) for the PHP work. A step-through debugger would’ve been a HUGE help as I was building out my Sportsticker feed parser. I got so used to using var_dump and print statements at certain points to see what was going on, that I totally forgot about using debuggers and setting break points, and the joy that can come from putting your app through it’s paces via a step-through debugger. Work smarter Chris, not harder. :)

Now, one of the fine folks who is putting together the Vancouver PHP Conference 2007 is Shane Caraveo, who is a lead developer for ActiveState, the company that makes the Komodo IDE. While exchanging some emails with him (thanking him for the reimbursement cheque for my flight to Vancouver amongst other things) I sort of jokingly mentioned that I thought it would be a nice perk for giving the talk at the conference if I could get a copy of Komodo from them, because I felt that I would have to buy a copy of it with my own money if I wanted a copy. Next thing I new, I got an email from someone at ActiveState with a link to a downloadable copy of Komodo IDE 4.0 (the latest) and a license for it. Awesome!

One of the blogs I read is Jim Plush’s (I heard him on the sadly silent Pro-PHP podcast), and he was raving about Komodo because, like me, he uses a MacBook and there is no Intel version of Zend Studio Server. He even provided a nice link to someone else instructions on how to get the PHP debugger up and running.

Undaunted, I set things up and bingo! It works like a charm. Just as a test, I decided to try the step-through debugger on my reporting system I wrote in CakePHP and got a glimpse into the heart of CakePHP just to do a simple request. On Monday I’m going to configure PHP on my development server at work to have support for XDebug built into it so I can use the step-through debugger there as well. It will help me track down some stupid mistakes I made with the Sportsticker code that took me a long time to figure out.

Until you’ve used one of these debuggers for a while, you don’t understand how powerful they really are. Thanks again to Shane for hooking me up with a copy! I owe you a beer or two while in Vancouver…

Want to advertise on this blog? Send email to chartjes@littlehart.net
GTcars Canadian Car Audio TurboDodge Car For Sale Sign
Audi Forum Mustang Forum Dodge Intrepid Miata Turbo
GTscene Pontiac Bonneville


@TheKeyboard is Digg proof thanks to caching by WP Super Cache!