« October 2006 December 2006 »
blog header image
# Somtum Thai

I just had a great lunch with Kris at a new place downtown called Somtum Thai.

I had the #7: chicken and vegetables with garlic and red pepper. If you like garlic, you'll love that one. The spring rolls were great too.

The decor was nicer than most of the Thai places I've been to in Ottawa and the prices were reasonable -- check it out!

Somtum Thai
260 Nepean Street (map)
Ottawa, Ontario K1R 5G3

posted at November 09, 2006 at 01:37 PM EST
last updated November 2-, 2006 at 03: 2 AM EST

»» permalink | comments (4)

# Why PHP vs Rails?

Tim Bray's report of the Zend/PHP Conference & Expo is revealing for a few reasons:

  1. He quotes Andi Gutmans: “the right way to think about PHP is as Visual Basic for the Web.”
  2. He mentions the PHP crowd worries about performance a lot
  3. He quoted someone about ActiveRecord for PHP: "We’re not convinced that’s an appropriate direction"
  4. He quoted someone saying: “Ruby is appropriate for computer-science-loving people who have a puristic [sic] attitude”

I'll just go on the record as saying that during my Software Engineering undergrad degree I saw computer science classes as a kind of necessary evil. I didn't love 'em. The pure CS classes were like math classes. That's not to say the information isn't useful to me now, it was just dry and seemingly impractical at the time.

During school I was more interested in where the rubber hit the road: the software engineering of it. To me, Ruby on Rails is directed more towards pragmatic and software-engineering-loving people than computer-science-loving people.

I actually don't have a problem with the things that Tim observes about the PHP crowd. Why? Well without trying to sound too "snotty" myself, I think Rails should be used by people that buy into the Rails ideology: The Rails Way. Otherwise you're just dooming yourself to failure, loathing and ignorance. Learning Rails is not just about learning the technology, it's about changing your practises and process too. Some of those practises aren't ingrained in the PHP community like they are in the Rails community.

Engineering is all about using the right tool for the job. Sometimes that's a language like PHP, sometimes it's a framework like Rails. That's what it's all about. The fact that the PHP crowd doesn't see ActiveRecord as useful is a great indicator of their priorities ... and there are many, many people who share these priorities. Rails certainly isn't going to solve all of your web application problems. In fact, it's best for small part of the web application problem set right now.

Bottom line: If Rails remains a niche framework that's alright with me, so long as the ideology doesn't change. I don't think DHH will ever allow that, so I'm happy.

...and what of Rails performance? Yes, Ruby is an intepreted language. So is PHP. PHP is probably faster. Yes, the Rails framework is young, changing often and unoptimized but it is changing rapidly. It is agile. This is simply a reflection of the different priorities of the PHP crowd and the Rails crowd.

One of those priorities is that man hours are more important than extreme performance optimization. It seems to me like Rails is optimizing itself to save man hours at the expense of performance and it's something I agree with. Rails can be to PHP as Smalltalk is to Visual Basic or as Java is to C.

Update Monday 1:44pm

I know PHP and Ruby are programming languages (and libraries) and that Rails is a framework (and extends the Ruby libraries). So why compare apples to oranges? Because people are doing it and I get asked the question all of the time... so it's a question worth asking to my blog audience.

Like I mentioned in the comments, the question itself is revealing. People don't ask about PHP vs Ruby when making a web application because Ruby means Rails every single time. The Ruby crowd has unified around one framework, one ideology.

The PHP crowd is splintered into a bunch of frameworks, some of which are inspired by Rails or have similar features to Rails. But here's the real kicker...

Rail's framework conventions -- the naming conventions, the file layout -- allow developers to hop into a project and quickly understand it. If you're a PHP developer hopping into a project you could be dealing with any one of many (dozens?) of different frameworks ...or maybe even a completely custom framework.

This isn't just a PITA for the developers, it's also risky for the business that owns the code. When hiring new people, the company needs to find a PHP guy that knows framework X or is competent enough to understand the custom PHP framework.

If the same business built the product on Rails, any Rails guy could hop into it because every Rails project looks the same. IMO, it's a really underrated software engineering advantage.

As for Ruby vs PHP, I'll take object-oriented every single time. Yes, the new version(s?) of PHP are OO now -- but I want a language that was OO from the start, thanks. Not one that has OO bolted on after 10-odd years. Maybe that's just the "computer-science-loving" guy in me. Advantage: Ruby.

The PHP libraries are richer than Ruby/Rails because PHP has been around longer and has more developers. Both Ruby and Rails are closing the gap here. Ruby and PHP have shitty Unicode support, apparently. Advantage: PHP.

Web application development is going through a renaissance. It's being taken seriously again and for good reason: the languages and frameworks like PHP and Rails are getting good from a software engineering perspective. Really good.

posted at November 05, 2006 at 08:41 PM EST
last updated November 2-, 2006 at 03: 2 AM EST

»» permalink | comments (8)

# Canada, Pearson and Peacekeeping

According to CBC Newsworld this morning, today is the 50th aniversary of Lester B. Pearson (then Canada's external affairs minister) proposing a United Nations (emergency) peacekeeping force to help bring an end to the Suez Crisis.

He was later awarded the Nobel Peace Prize -- and thus began Canada's reputation as one of the world leaders in peacekeeping.

It makes me wonder how Pearson would react to Canada's role in Afghanistan. Maybe he would see our participation as a step in long term worldwide peace and security. Or maybe he would see Canada's transition to a more aggressive role -- and the deaths of Canadian soldiers -- as troubling. The debate gets interesting when we attempt to frame it in terms of these historic figures.

Related: Reporters from the Ottawa Sun have mock two-sided protests in six cities to see Canadians' reactions to the war.

posted at November 01, 2006 at 09:15 AM EST
last updated November 1-, 2006 at 03: 0 PM EST

»» permalink | comments (2)

Search scope: Web ryanlowe.ca