Microsoft screw the pooch again

March 4, 2008 · Posted in Opinion, Tech · 1 Comment 

Oh dear. It looked for a while as though Microsoft was going to make the right decision on compatibility vs. standards compliance in IE8. But they’ve reversed their decision now. Why? The Microsoft Interoperability Principles.

I pointed out the reasons that their original approach was the right one a few weeks ago.

So, once again, a press release trumps common sense. Idiots.

The river of news is diverted

January 28, 2008 · Posted in Tech · Comment 

I made the difficult decision to change my RSS reader the other day from the lovely NewsFire to the newly free NetNewsWire. As it happens I actually have a licence for NNW from before it was made free but I didn’t like it enough and went back to NewsFire.

Today, I achieved the nirvana of a news reader with no unread items in it. I feel like I’ve had my house steam cleaned or something. I’m still not 100% sold on NNW, but, like NewsFire, its integration with my blog editor MarsEdit and my del.icio.us client Pukka is great and it has the killer feature of synchronising with Newsgator Online so that I can read feeds from my iPhone and keep the unread/read status consistent on my MacBook Pro and the phone.

I miss the beautiful interface and animations of NewsFire, but I fought the three-pane RSS reader for too long. I think I’ll be with NWW for a while. Maybe when David releases NewsFire 2 I’ll give it another look.

Microsoft finally gets the message on browser compatibility

January 22, 2008 · Posted in Opinion, Tech · Comment 

When Microsoft released Internet Explorer 7 they broke a huge number of sites. Why? They had tried to make IE7 standards-compatible, but had failed to understand how much work developers had had to go through to make their sites work in IE6 in the first place. There was a load of ‘best practice guidance’ guff around how to make your site work in IE7, but the upshot was what I called at the time ‘the browser tax’.

Finally, finally, finally, they seem to have understood the plight of the ordinary web developer. IE8 will work as IE7 unless explicitly told to behave with maximum standards compatibility.

This is what every web developer who understood the issues wanted them to do first time around. Chris Wilson describes it as a ‘painful and unexpected lesson’. Only because they weren’t listening properly.

In essence, Microsoft made this mess and they should let people decide when they’re ready to help them clean it up. It looks like that’s now going to be allowed to happen. About freaking time.

My iPhone – Week 1

January 4, 2008 · Posted in Tech · Comment 

We might as well get it out of the way early on: I adore my iPhone. Today my old number ported over (although with some weird side effects) and so I should be a one portable device man from now on.

As always with Apple it’s simple touches that make all the difference. The screen is really crisp and rendering in Safari is utterly brilliant – it’s even sharper than a MacBook Pro. The zoom in and out are just superb – you can’t keep the childlike smile off your face. The automatic orientation detection is lovely too.

There are, of course, some features that I want Apple to add. Top of the list is a to-do list app. Ideally, that would be OmniFocus when the SDK is available (any day now, hopefully). I’d like to be able to remove the idiotic Stocks widget from my home-screen. Even better, I’d like to rearrange the screen in any way I choose. For top marks, the list of widgets should sync between the phone and my MacBook Pro.

Next, I’d like an RSS reader – ideally NewsFire. Again, that should sync with my Mac. At a push I might be willing to swap to NetNewsWire if it synced properly.

Then, I’d like a mobile blogging app – ideally MarsEdit, which I’m using to write this post.

Syncing generally could be better – although it works very well when you have your iPod cable available, it should also work over .Mac so that I don’t ever need to physically connect it. That would take care of Calendars, Contacts, Mail Accounts, Bookmarks and Widgets.

The last thing that’s missing is Copy & Paste, although that’s rumoured to be included in the next software update.

But these are little gripes. The iPhone is the best device I’ve ever bought. Everyone should have one.

Windows Update

January 3, 2008 · Posted in Tech · Comment 

I just installed Windows 2003 Server into a Parallels virtual machine on my MacBook Pro. Windows Update has a mere 32 31 updates for me. Thanks Windows!

31 security updates

Lightweight vs Heavyweight

January 2, 2008 · Posted in Opinion, Tech · 3 Comments 

Nik Silver has a thought-provoking piece on Heavyweight vs Lightweight content management. As the (former) architect of what you might call a middleweight CMS, I find his argument almost totally wrong. As far as I can tell, it amounts to a false syllogism that goes like this:

  • WordPress is a lightweight CMS
  • The Guardian use a heavyweight CMS
  • WordPress cannot do everything needed for the the Guardian website
  • Therefore, a heavyweight CMS is better than a lightweight CMS

I think the argument he’s trying to make is that a well-designed system with a judicious amount of abstraction is better than one without the abstraction. But I don’t follow his argument that any changes to WordPress would necessarily result in unmaintainable code. In fact, there are numerous newspapers who use WordPress, and several very high traffic sites that use it too. His argument is basically a retread of the tired old-skool IT dirge “but this isn’t enterprise software”. I find this surprising given that Nik is an eloquent advocate of agile methodologies and should, in theory, be sceptical of the idea that software needs to be big to be effective.

He says:

Lightweight is often good, but it must have its tradeoffs, otherwise other technologies wouldn’t exist.

Really? He seems dangerously close to the ‘one true language’ trap here – an El Dorado of a language that would be perfect for every job and everyone would agree on. This is absurd. Heavyweight software will continue to exist for a long time in my view, mainly because of the vested interests of the corporations that sell it. And not all heavyweight software is bad of course.

Every single decision you make when designing a software system is about compromise – manageability vs performance, explicitness vs extensibility, productivity vs complexity and so on. Every system you ever use has tradeoffs: not every system needs to be extensible, and not every system needs to be optimised to the limit. I prefer the Pragmatic Programmers’ advice: “do the simplest thing that could possibly work.”

To suggest that WordPress is, out of the box, a viable alternative to an existing bespoke system is faintly silly. Is WordPress the cleanest abstraction possible for a CMS? No – it’s targeted pretty much exclusively at blogging. But to suggest that there’s something difficult about getting ads into a page is a bit weird – check out TechCrunch if you don’t believe me.

Lightweight languages and frameworks (for example, Ruby or Python) are all the rage because they make developers very productive. There are downsides, performance being the most often raised one. Many of these downsides are FUD though. Everything I see at the moment leads me to think that the days of Java and C# are numbered as the ‘enterprise way’. The productivity you can get out of things like Ruby on Rails is so great that people are going to be forced to re-evaluate the ‘heavyweight’ options. The (perceived) performance problems of scripting languages are sure to go away. Remember the days when people hand-wrote assembler because they didn’t trust the C compiler to optimise their code properly?

In 2007 I failed to learn a new programming language, although I dabbled with Objective-C and Cocoa. 2008 will be the year of Python (with a smattering of PHP) for me. There are many places to read more about extending your language knowledge, but I recommend Martin Fowler’s One Language and Improvement Ravine.

Getting WordPress, mod_rewrite and Leopard to work together

December 25, 2007 · Posted in Tech · 3 Comments 

I’ve been trying to get Leopard, Apache 2 and WordPress working together for a while now. I want to use the WordPress friendly URL feature, and this requires the Apache mod_rewrite module to work too. There are various places around the web that have partial solutions to these problems. Here’s the procedure I followed – YMMV

First off, WordPress is installed in /Users/jameshiggs/Sites/blog. Leopard comes with Apache 2.2 installed, but has PHP disabled by default. To correct this, go to the console and change directory to /etc/apache2 and open httpd.conf in your favourite editor. For me this means typing:

sudo mate httpd.conf

You’ll probably have to enter your admin password. Find the line that reads:

#LoadModule php5_module libexec/apache2/libphp5.so

and uncomment it so that it looks like this:

LoadModule php5_module libexec/apache2/libphp5.so

Next, we need to make sure that your user directory allows .htaccess rules. To do this, create a file called jameshiggs.conf (obviously, you’ll need to replace my user name with yours) in /etc/apache2/users. The contents of that file should read:

<Directory "/Users/jameshiggs/Sites">
	Options Indexes MultiViews
	AllowOverride All
	Order allow,deny
	Allow from all
</Directory>

Again, you’ll need to replace my user name with yours.

The final piece of the jigsaw is to configure WordPress to use friendly URLs – which you do from the Options > Permalinks page. I’ve selected the second option which makes URLs look like this: http://localhost/~jameshiggs/blog/2007/12/25/sample-post/. If WordPress can write to the site root then it will automatically create the .htaccess file. If not, you’ll need to create it yourself in the root of your blog site. On my machine, the file should look like this:

<IfModule mod_rewrite.c>
	Options +FollowSymLinks
	RewriteEngine On
	RewriteBase /~jameshiggs/blog/
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule . /~jameshiggs/blog/index.php [L]
</IfModule>

Finally, you need to restart Apache – the easiest way to do that is to go to System Preferences > Sharing panel and untick Web Sharing. Once Apache has stopped, tick it again and Apache should start up. And that’s it.

Let me know if you have any variants to this procedure.

Thanks to Bagelturf and Ariadoss for hints that helped me get this running.

REST links

December 7, 2007 · Posted in Tech · Comment 

I’ve been doing some research into REST and API design over the last couple of days for a client. In my travels, I collected a few really useful links and quotes.

The overriding feeling is that most APIs that claim to be REST APIs are in fact not. Most of them seem to be more RPC-style services. The pragmatic part of me says that you should just do whatever works, while the perfectionist in me admires the simplicity and cleanliness of a true RESTful style.

Anyway, here are the links and quotes, in no particular order:

There’s no way to get around platform differences when building distributed applications. The sooner people realize that, the better. – Dare Obasanjo

Mark Baker – Accidentally RESTful

Dare Obasanjo – Misunderstanding REST: A look at the Bloglines, del.icio.us and Flickr APIs

Joe Gregorio – How to Create a REST Protocol

Roy Fielding – Represetnational State Transfer (REST) – the original dissertation that coined the term REST.

Excellent concrete example of a RESTful API:

Instead of a “turnOnTheLightbulb?” request to a server object, we have a PUT “true” to the http://example.com/lightbulb/lit object supplied by the server. The http://example.com/lightbulb/lit object also responds to a GET request that returns true or false. POST is an “add information” request that doesn’t make sense for the lightbulb, nor does it really make sense to DELETE the lightbulb. So those requests would fail with a response indicating the fact. – from REST in plain English

Dare Obasanjo – WS-* is to REST as Theory is to Practice – read the comments too: they’re brilliant.

Steve Vinoski – The ESB Question includes a great quote:

Frankly, if I were an enterprise architect today, and I were genuinely concerned about development costs, agility, and extensibility, I’d be looking to solve everything I possibly could with dynamic languages and REST, and specifically the HTTP variety of REST. I’d avoid ESBs and the typical enterprise middleware frameworks unless I had a problem that really required them [...]. I’d also try to totally avoid SOAP and WS-*

The comments there are also a must.

iPhone beats Windows Mobile in 5 short months.

December 4, 2007 · Posted in Tech · Comment 

Wow. The iPhone already has a greater share of the browser market than all Windows Mobile/CE devices combined. Windows CE is 10 years old, while the iPhone is just 5 months old.

(Via 9 to 5 Mac.)

Facebook and iPhoto

December 3, 2007 · Posted in Tech · Comment 

I’m probably the last person in the known universe to find out about this, but I’ve been very impressed recently with the Facebook iPhoto Exporter. It adds another tab to the Export dialog that lets you create albums, upload photos and tag your friends in them. Very slick.

Here’s what it looks like in practice (click for full-size):

A screenshot of the Facebook iPhoto plugin

« Previous PageNext Page »