Pandora’s Hope, by Bruno Latour

After having been fairly impressed by Laboratory Life, another book by Bruno Latour, co-authored with Steve Woolgar, I picked up Latour’s Pandora’s Hope without much hesitation when I saw it in a used bookstore. This was at a time, I think during my undergrad at Concordia, when I was particularly interested in questions around the reality of scientific phenomena and constructivist versus realist epistemologies (a distinction that, after reading Pandora’s Hope, it is clear Latour would dislike).

While it was enjoyable, thought-provoking, admirable in its intentions and refreshing in its style, I felt it ultimately fell short of its goal, which was, as Latour puts it throughout and again in the conclusion, to walk away from the realist/constructivist debate and to show how actual scientists (and most actual people) do not operate within its fact/fetish binary. Continue reading “Pandora’s Hope, by Bruno Latour”

Using WordPress as a CMS – Part 2

A principle of good software design is to balance the demand for new features with the necessity to maintain a high level of usability, and one sign of good software is that the interface remains uncluttered and intuitive as new functionality is added. For an example of how to do this the wrong way, look no further than Microsoft Word, which with each new release becomes more bloated and crammed with features that most people not only will never use but could never find out about even if they wanted to use them.

For examples of how to do this the right way, you could point to the web apps done by 37signals (e.g. Backpack), or to WordPress. Over the years, WordPress has continued to grow and to integrate new features, but has done a fairly good job of not allowing them to clutter core functionality. Following good usability principles like progressive disclosure means newbie users can jump right in and do what they want, while you don’t alienate advanced users by babying them with an impoverished interface.

A quick Google search for the terms “wordpress cms” reveals a plethora results, and the WordPress developers are aware that many people are using WordPress for much more than out of the box blogging. With that in mind, they continue to roll out functionality that makes it easier to use the platform as a content management system that can accomplish most of what you would want from your CMS.

Some of these features that you will find useful if not crucial to using WordPress as a CMS include:

  • the option to set a static or fixed homepage
    Prior to WordPress 2.1, you had to either hack around and create and upload a new homepage, or use a WordPress plugin to accomplish the same thing in a slightly more graceful way. Now, setting up a static homepage is as simple as going to the Settings > Reading panel and making the choice there. For more information, see Creating a Static Front Page
  • custom fields
    custom fields allow you to associate information with a post that goes beyond the parameters given to you by WordPress. Suppose, for instance, that you’re creating a WordPress site in which certain products for sale will be entered into the database as posts. Well, you’re going to want to store a bunch of particular information that will be associated with each product/post, including cost, availability, shipping, sizes, and so on.
    Using custom fields, you would type in a new key (say, “availability”) and then under the value, you would enter either “available” or “sold”. Then, when editing say, single.php (the wordpress template for single posts) you would access the data like so, from within the Loop:<?php echo get_post_meta($post->ID, 'availability', true); ?>If you wanted to make this data available outside of the Loop (e.g., in your sidebar), you would just type <?php global $availability; $availability = get_post_meta($post->ID, 'availability', true); ?>And then in sidebar.php, you would include <?php global $availability; echo $availability; ?>
  • page order
    Wordpress has only recently added the ability to define the order of your page manually, rather than using the options WordPress provides for wp_list_pages(), which are to sort by alphabetical order, or to sort by id. Though the functionality is new (and still a bit “janky” according to WordPress), it’s nice to know you won’t have to rely on third party plugins for such standard CMS features

In the next installment, I’ll discuss a couple more essential pieces for using WordPress as a CMS, including page templates, and also go further into third party plugins.

Delicious brunch on Bloor

Went to the newly opened (1month.5 ago according to our server) Disgraceland, located at 965 Bloor W for some delicious brunch. I had their presumably-Elvis-inspired french toast that was stuffed with peanut butter and banana ($12), while my accomplice had the veggie eggs bennie ($10). Both were effing fantastic. The pancakes didn’t even need syrup and the the eggs bennie, which came on fried tomato, was also one of the best I’ve ever had. Service was great and, perhaps most importantly, the coffee didn’t suck. I so rarely have a coffee with breakfast that doesn’t suck and this was damn good coffee.

I thoroughly recommend the place, and disagree in the strongest terms possible with this NOW review.

Toronto cops bust sketchy bike shop

Various Toronto media outlets and blogs (I Bike TO and Living for the City) are reporting that infamous Queen Street West bike “shop” “owner” Igor Kenk was busted and is in custody after some plainclothes officers observed him allegedly directing another man (also in custody) to cut the lock on a bike and then go for another. Kenk has a reputation for dealing largely in illegally acquired bicycles, and it’s nice to see these well-founded rumours (apparently) confirmed.

While normally quite empathic and some might even say soft on crime, I can’t help but rejoice at this man’s misfortune. I’ve had various things stolen (including a car), but nothing boils my blood like bike theft. Bike thieves are scum. If the bicycle had been invented in the middle ages, Dante would have included a special circle of hell just for them.

Apparently you can go to Central Garage, 9 Hanna Avenue, on Saturday, July 19, 2008, and Sunday, July 20, 2008, from 10 a.m. to 6 p.m. (see Craigslist posting) to see if your bike is among the recovered bounty. See instructions from the Sun article mentioned above:

WHERE: 9 Hanna Ave. at Toronto Police Central Traffic garage near King and Dufferin Sts. WHEN: Today and tomorrow, 10-6. HOW: Bring receipts, ID, pictures of you and your bike. You can also call the 14 Division community response unit at Exhibition Place, 416-808-1500, to describe your bike and have police look for you. Crime Stoppers will also have a booth set up at the garage where you can register your bike.

Using WordPress as a CMS – Part 1

For those searching for a free, feature-rich and easily-extensible Content Management System (CMS), WordPress is not to be overlooked. Not only is there a growing “literature” of blog posts and tutorials on how to use WordPress as a CMS, but the core developers seem to recognize WordPress’s suitability for this role and are continually providing further enhancements that make it easier to use WordPress in this way. And if there is some CMS-like functionality you need from WordPress but can’t get it with a plain ol’ vanilla install, there is a wealth of well-coded and reliable plugins among which you are likely to find a solution.

One powerful reason to make wordpress your CMS of choice is its ease of use. While Joomla!, Drupal and the like are all excellent CMSs, none of them prioritize simplicity to the same degree that WordPress does. This isn’t as much of a criticism as it sounds like–there is an inevitable trade-off between the available features and power of a piece of software and its out-of-the-box, so-easy-your-dog-could-do-it usability. WordPress is a platform for the unwashed blogging masses, while Joomla! and Drupal are fully-fledged CMSs that compare favourably with any enterprise-level solution you’d pay thousands of dollars for. Each understands its user-base and its niche and guides software development accordingly.

But in addition to being suitable for the masses, WordPress is a great choice if you’re doing a website for a client who either is a) not as comfortable with new technology; or b) has little time and is someone for whom the need to learn how to navigate a complicated CMS admin panel will be a significant barrier to actually using it. You can easily teach someone the WordPress “basics and then some” in an hour, which means satisfaction both for the client and for you (imagine all the support email questions you *won’t* be getting!).

That’s it for the first part of this mini-series. In the next post, I’ll dig in to some more technical issues and look at how recent advancements in the WordPress platform are increasingly making it a viable CMS solution.

Choosing a PHP web application framework

Having dabbled in ruby on rails but eventually given up for no better reason than that my web hosting provider (site5) is particularly difficult to get recent version of rails up and running (issues with rubygems and rails edge are attested in numerous places on the site5 forums), I set my sights on choosing a PHP web application framework. There are several reasons this makes better sense for me than rails:

  • Learning more about PHP will probably better aid me in my other work than learning more about ruby, as the three most common content management systems (Joomla!, drupal, and wordpress) are all PHP
  • support for PHP is much better on site5 than support for rails; support for PHP is in general much more common than support for rails
  • PHP-based web app frameworks don’t require anywhere near the memory footprint required by rails apps, which leads to…
  • … scaling issues? Actually, this isn’t really a concern. Most people have way bigger concerns than scaling like, say, getting their app to be popular enough that they have to worry about scaling. And while the spectre of Twitter and its many services outages that have been attributed to rails may be somewhat worrying, rails’ purported scaling difficulties are not foremost in my mind. There was a great comment on slashdot a while ago (wish I could find it…) that discussed how scaling problems can be greatly compounded by algorithm design and that, with well-designed algorithms most serious scaling issues can be nipped in the bud

So on to the PHP web app frameworks… What was I looking for in a framework? (for a comparison chart, see here)

  • lack of bloat
  • decent documentation
  • significant developer/support community
  • MVC architecture (does that go without saying?)
  • decent templating system
  • caching preferably
  • ability to extend easily with other classes
  • AJAX integration
  • PHP 5 would be nice

To make a long story short, after a fair bit of comparison and review, I narrowed it down to cakePHP and CodeIgniter. Though both seem very strong, in the end I decided to go with cakePHP based mostly on this write-up by Chris Snook a respectable web developer and fellow Canadian.

As Chris writes, cakePHP does indeed make querying dead simple. And their philosophy of “convention over configuration” means that though it may take a little bit of getting used to (and some occasional forgetting of whether to camelCase or separate_by_underscores) the amount of file editing for configuration purposes is greatly reduced.

So far I’ve been very happy with cakePHP and have been able to get some fairly complicated apps up and running in under a day (cakePHP offers powerful scaffolding similar to rails), though I do have to agree that the documentation could still use some more work, and I find myself often having to compose obfuscated Google search queries for things that aren’t easily findable in the manual or API docs.

Some quick tips for those getting the hang of cakePHP (version 1.2):

  • If you’re using UTF-8 collation in your database tables and web pages, you can make the necessary changes by adding the following line to your database.php configuration file:
    'encoding' => 'UTF-8'
  • don’t forget that just because you’re working with a copy of, say, a single record from your Posts model as $post in your views, you still need to reference fields like this:
  • want to get rid of those SQL debug messages at the bottom of all your pages, and you tried changing the layout but they won’t go away? Edit /config/core.php and change the ‘debug’ from 2 to 0. You can also alter the debug level by controller method — see this post from the cakePHP Google group.
  • a stupid mistake you may make too: if you’re trying to use php variable in a cakePHP findAll() function (e.g. $this->Post->findAll('blog_id = $id AND language = "fr"'));) and are finding it doesn’t work, it’s because for variables to be parsed by PHP, they have to be enclosed in double quotes; otherwise, the above code will find all Posts that have blog_id equal to $id not whatever $id evaluates as. This may throw you off as all the examples in the cakePHP documentation make use of single quotes and no variables. So, in the above example, you would need
    $this->Post->findAll("blog_id = $id AND language = 'fr'"));, a small but important difference

For some more tips on cakePHP, see here.

Facebook Camp

Having just returned from FacebookCampToronto4, I have to say that the more I learn about Facebook, the more concerned I become.

First it was the Youtube video about how Facebook owns everything you put on it, and is (somewhat loosely) connected to all sort of people/agencies involved in various intelligence gathering initiatives and operations.

That aside, what was somewhat disturbing during the event today was the way no one seemed to have any qualms about Facebook’s gleeful blurring of the “advertisement / editorial” distinction that is sacred to reputable journalism (not to claim that Facebook is engaged in journalism, per se, but the analogy holds).

Facebook proudly promotes as a “best practice” that people using their ad system link up their ads to users’ social actions, so that when I see a news feed item that, for instance, shows my buddy has gone to some event, the event organizers who may have posted an ad for that same event can have their advertising content automatically incorporated into the news feed item, piggybacking their paid advertising onto legitimate news about what my friends are up to.

The other thing that bugged me…

was how the redesigned facebook profile page (due to come out next week, and currently viewable at, though it’s pretty buggy) was being touted as a way to enable more/better “self-expression.”

I think we need to wonder about the degree to which trivial and largely superficial changes to our Facebook profile constitute an enhanced venue for self-expression. It’s a form of 21st century dandyism; I’m sorry, but if the way you express your “self” is by resizing certain boxes on your Facebook profile, your self is in dire straits.

The last thing that bugged me…

was the way we talk about addiction today, and how the goal of a Facebook developer (or of the creator of a new cookie, a new song, whatever) is to create something addictive. And, in the case of Facebook, not just addictive, but simple and pared down enough that it doesn’t actually involve any serious engagement. The goal of the creator is to create something that people will feel uncontrollably pulled to use, but only for short, intermittent periods of time with no purpose other than continued, addictive use. Consciously setting out to create things that are addictive is fairly ethically questionable.

I will take off my curmudgeon hat now.

Simians are people too

First we have spear-fishing orangutans, then Spain passes legislation affirming that great apes are entitled to human rights, and now scientists have showed that monkeys can count.

I think it’s about time we retired the idea that humans possess some sort of special intellectual powers that are radically different from those of other animals. Hopefully events and discoveries such as these will continue to push us in that direction.