• WordPress Development, Cons & Pros

    About a month and a half ago The Big Webshow featured WordPress creator Matt Mullenweg, listening to the interview it became really clear that WP is trying to position itself as a website “operating system.” While there are probably other platforms much more capable of the task, WordPress’ ubiquity is sort of pushing it in that direction regardless. Since that interview I’ve been meaning to take a closer look at WordPress.

    Over the weekend I finally had a chance to dive in to theme and plugin development.
    Overall, I found WordPress to be very easy to work with, I didn’t find myself running into any dead-ends like I have with other platforms and CMSes. I thought I’d share my impressions in the form of a pros v cons list.

    Cons

    • WP is not model-view-controller framework, as far as I can tell from first brush there’s nothing MVC about it. I’ll admit, I’m not really sure how this would improve theme/plugin development or the application as as a whole. I do think that the WordPress codebase has a lack of structure and organization; MVC is a great way to organize a project.
    • WP is not object oriented. With the exception of the database wrapper, I didn’t come across any objects. Poking around WordPress themes and plugins reveals a bunch of global wordpress functions, things like ‘add_filter() ,’ ‘wp_enqueue_script().’ Everything you’d need to do in wordpress is a function. Exposing everything as a global function leads to the potential problem of of introducing a bug by creating a function with the same name an existing wordpress function (minor annoyance) and again, leads to code that’s hard to follow and disorganized. Function names aren’t always clear, some functions accept a call back, other return a value, etc.
    • WP does not use a template engine, all template variables, functions and statements are included as inline PHP tags. Inline PHP is impossible to read, hard to follow, leads to spaghetti and generates even uglier HTML. Additionally, template engines such as Smarty add useful features like robust caching options. I did find a plugin to add smarty support, may be worth investigating.
    • I really feel like these first three issues are pretty close to PHP’s worst practices. The overall lack of structure tends to generate sloppy, hard to read, amateur-looking code; the sort of thing that RoR snobs like to make fun of.
    • Finally, I suspect WordPress might be highly inefficient (but I haven’t done the research). Specifically the way plugins are allowed to add handlers and filters to various points in the application workflow seems like a problem. If every plugin has to be scanned for on every page load…well that’s just not going to scale well. Each installed plugin (hypothetically) increases processing time.

    Pros

    • In spite of, or possibly because of issues I mentioned, extending WordPress is fairly simple and easy to pick up.
    • The documentation at wordpress.org is pretty great! On par with php.net‘s own documentation.
    • With such a large userbase, almost every plugin you could possibly want is already written for you.
    • It’s stable. It doesn’t go down randomly. It’s not buggy.

    Admittedly a lot of the shortcoming I found are based on a lot of assumptions and only a basic knowledge of WordPress. Also, I will concede that “your code is ugly” is a fairly superficial criticism that doesn’t inherently mean anything. So, in conclusion, I am not anti-wordpress. I like it as a very-extensible blogging platform, but I’m still a little skeptical about is pontential usefulness as a general-purpose CMS or some sort of website framework.

    If you’re a wordpress guru, I’d like to hear you input. Tell me why I’m wrong.


  • Facebook Now More Secure

    In a blog post today Facebook detailed some of their new security improvements:

    Starting today we’ll provide you with the ability to experience Facebook entirely over HTTPS. You should consider enabling this option if you frequently use Facebook from public Internet access points found at coffee shops, airports, libraries or schools. The option will exist as part of our advanced security features, which you can find in the “Account Security” section of the Account Settings page.

    Enabling this option will effectively prevent you against Firesheep and similar account hijacking methods. I think it’s fairly safe to assume this feature is a direct response to Firesheep, even if it seems to have taken them 4 months to roll out. Though, it could also be a response to Zuckerburg’s account hack yesterday.

    I’m going to go one step further than Facebook and say, you should absolutely enable this option as soon as it’s available to you.


  • Winnipeg Please Standardize Street Signs

    Driving around with a friend (who recently moved back to the city) the other day when he brought up a good point, city street signs are completely random. It’s impossible to know where to look for a street sign and sometimes you can’t find one at all, even at major intersections.

    In cities like Winnipeg, where traffic signals are hung from horizontal poles, the most visible place to mount a street sign is directly on the mounting pole, right above the roadway. I think that’s pretty straightforward common-sense.

    I’ve pulled some images of Portage Avenue from Google Streetview. Portage is one of the busiest roads in Winnipeg, it’s the start of the Yellowhead Trail (west to Edmonton) and part of the main Trans Canada Highway (to Calgary). According to the City of Winnipeg’s 2009 Traffic Flow study (pdf), Portage Avenue received an average weekday flow of 75,000 cars per day – the portions of road mentioned below see about 75% of that. Suffice it to say, it’s a busy road.

    Portage & Moray

    An example of good signage; every major intersection should be set up like this. You can clearly see a large sign marking the cross street above every traffic signal on all four intersecitons.

    Portage & Sturgeon

    A few kilometers west of Moray lies one of the worst examples of street signage in the city. The westbound lane (on the left) is fine, it’d be hard to miss that Sturgeon Rd sign. For no apparent reason eastbound lane is completely non-standard. The traffic signal is clearly missing a sign, you’ll probably have to squint to actually find the sign. I’ll give you a hint, it’s off to the right…on a “no stopping” sign. How completely random is that? It gets worse, the sign post is actually offset a couple of meters ahead of the intersection. So, if you’re stopped at the stop line, or anywhere in one of the left-hand lanes it’s actually physically impossible to see the sign.

    Obviously inconsistant street signage is far from the biggest problem facing Winnipeg, it’s not even the worst problem with the roads. It’s just one of those little things…