The blog of Rahoul Baruah from 3hv Ltd

What's going on?

My name is Rahoul Baruah (aka Baz) and I'm a software developer in Leeds (England).

This is a log of things I've discovered while writing software in Ruby on Rails. In other words, geek stuff.

However, I've decided to put this blog on ice - I would ask you to check out my business blog here (or subscribe here).

20 March, 2007

Ruby on Rails is the MacOS to Java/.Net's Windows

Pierre Igot rants about the user interface for Apple's Mail.

John Gruber rants about click-through in background windows in OSX.

Both of these (and there are many more if you search the interweb) show the extremely high standards that Apple is held to when it comes to user-interface details. You don't often see criticisms of Linux or Windows applications that go into such intricate detail:

If you select “Sending…” while Mail is in the process of sending the message, Mail continues to display your list of sent messages, excluding the message currently being sent. In other words, not only does the text label temporarily display a status message instead of the text that should normally describe its contents, but on top of it that temporary message misleads you into thinking that you will be able to see the message that Mail is currently in the process of sending by clicking on it, when actually it does not show you that message.

The reason I mention it is not in some sense of Apple vs Microsoft superiority (I've not used Vista or Office 2007 and they are supposed to be OK on the UI front - although I bet you could find a folder caption being used to display a status message if you looked hard enough) but more a sense of Rails vs everything else superiority.

I was talking to another developer today about what I should call a method on one of my objects. My colleague is one of the most talented developers I have ever met but he has never used RoR.

I said "I'm not sure if I should call it account.number_of_events_remaining or account.number_of_remaining_events". He said either would be fine - "if the name reads right then that's good enough". To which I replied "but no matter which one I choose I seem to type the other name". To Nick this was "operator error" - a problem of typing. To me it was symptomatic of something deeper. The words didn't feel right. And as we all know if it doesn't feel right it probably isn't right. It was a folder caption being misused as a status label.

I could alias the method names - in other words use both. Nick said programmers need consistency. I agreed - aliasing is useful but I think it just adds unnecessary confusion in this case. He suggested I choose one and type it out one hundred times so it becomes imprinted in my brain. This proved to me that the name was wrong - "if i have to force myself to do all of that just to get a property name right then it's the property that's at fault - not me". Plus if we have five developers, with a hundred properties, think how much typing that is before you even write a line of code!

Esoteric discussion by developers with too much time on their hands (I wish)?

In a way, yes; no paying customer will ever see that property (apart from indirectly through the UI).

But, looking deeper, it's important. Vitally important. Because it's all about meaning and understanding. When you are looking for the status message do you look to the status bar or your folder list? When you are trying to find out how many events you have left do you have to try different combinations of valid words?

Is it designed so that you "get it" straight away or do you have to rehearse it till you understand?

(In the end, I went with account.remaining_event_allowance)

No comments:

eXTReMe Tracker