Rails Development: Comparing platforms

And I know what I’m talking about! I’ve been doing heavy rails development lately, on all three major platforms. Start with OS X.

It seems every serious Screencast for Rails was recorded using the famous Textmate Editor on OS X. At first sight, Textmate may seem to be a pretty ordinary Text Editor. Well, it isn’t. It’s very powerful and highly customisable. It’s one of the products I’d buy always again, simply because it’s worth it’s price. Development is rather flawless, not only because of Textmate, but also because OS X is based on a Unix System, giving one the ability to run all utilities natively, avoiding perfomance issues. It’s absolutely my favorite.

After my MacBook commited suicide, I was forced to use XP. I wasn’t happy. There are good code editors for sure ( I used vim nevertheless ) but the overall speed of testing tasks and so on is .. poor. Very poor. Those perfomance problems are well-known, though no one knows the exact reason ( at least I wasn’t able to figure it out ). I don’t want to flame here, but Windows is just not suitable for serious Rails development.

After deciding that the above mentioned system was a pain in the ass rather than a solid solution, I switched to Ubuntu. And I’m amazed, really. Gedit with a few plugins seems to be a good alternative compared to TextMate, and all the packages run like a charm. And it’s free and runs everywhere. It’s my recommendation for every Windows+Rails developer. Install VMWare or VirtualBox and develop there, it’s faster. Trust me.

Tomorrow ( assuming UPS isn’t lying ) my new iMac will arrive, and I’m so looking forward to it. What is your prefered platform for developing with rails?

Why PHP should be banned.

Neither is Basic! Really, normally I’m trying to be objective, but I just can’t when it comes to PHP. I’ve done a lot of stuff in PHP over the years ( yes, including a CMS, Portal, Guestbook and Gallery ) but as far as I can tell this language meets every requirement to be disqualified as something to consider when it comes to serious, professional software development.

There is certainly good software ( or software that pretends to be good ) written in PHP. But it’s not the majority. PHP just encourages programmers to do everything insecure, non-reusable and not really portable.

Just think of the word PHP/MySQL, which is nothing but a pain in the ass. I’ve been running Postgres for years, and every now and then a small PHP script comes my way requiring MySQL. Whhuuzza. No Database Abstraction. And now that there is one, all popular software still uses these funny mysql_do_whatever() methods.

Function naming is certainly another thing that terribly went wrong at some stage of the development. Has someone ever scanned the PHP sources for the functionNameObfuscator.c? I guess there is none, as no program could ever obfuscate stuff that badly. Now, in the upcoming PHP release there will be finally support for Namespaces, though I’m not really convinced that any of the built-in stuff will be used there prior to 2010.

PHP is perfect to learn some concepts. Like OOP, because there is no need to compile stuff, no need to worry too much about data types and stuff, but once you’re about to do a real project, keep in mind that type checking, namespaces etc. are stuff that could potentially matter at some point of the development. 

What I find most confusing is that simple statements just don’t work. Why? I don’t know, they just don’t. Example? There you go

// assuming the function foobar() returns some array.
// this won't work.
echo foobar()[0];

Cool, hu? Not really. And as far as anything WebProgramming is concerned, I just learned my lessons and use something like Merb, Rails or even Java EE. G’day.

DataMapper vs. ActiveRecord, a discussion

5 Reasons DataMapper Will Deprecate ActiveRecord is a well pointed out list of reasons why DataMapper will in the author’s opinion overtake ActiveRecord. And there is nothing left to do but to agree.

I started a project a while ago, 1topf.net, which unfortunately died because of a massive lack of time here, but I started building it using Merb and DataMapper. Although the Merb version at that time was something like 0.9 and had some bugs and flaws, in combination with DataMapper it was a convincing team. 

In my opinion, the Wedding of Rails and Merb will be a very exciting step in the Web-Framework universe. Let’s see what happens, but the freedom to choose an alternative ORM is quite promising.

Antiusability at its best: Language Documentation

Whether you’re an active developer busy doing some Java, Ruby, Perl or ( fill in your language here ) based projects, you’ll most likely have some kind of browser windows opened sometimes providing you with the necessary documentation for libraries or ( but hopefully not ) language basics. 

Because I’m not in love with one language and used to switching back and forth between several of them, I tend to forget some details about built-in classes etc.. It’s certainly o.k. to have the documentation for such features available somewhere on the web, but I’d love to be able to simply download bundles for a language in a “documentation reader”. Open format ( there are lots of them that would suit this application ), simple to transform anything to it via xsl or something comparable, and it would just work ( even offline ). 

I won’t claim to start a new project here as I’m already quite busy doing the rest, and celebrating new years eve, but if somebody is looking for a challenge, here it is. 

This subject shows another important aspect of usability. Usability shouldn’t stop at the Users place. Developers are users, too. And happy users tend to be more loyal and happy, a goal certainly worth achieving.

Edit: Now the night has finally arrived, and I think the following tasks should be completed before any such project can be forged. 

  1. Define an open format for efficiently saving Language Documentation. Keep in mind that language documentation differs in structure depending on what kind of language is documented. Object oriented languages need other formats or present other structures than procedural or functional ones. 
  2. Create scripts that convert existing documentation into that new format. XSL is a powerful friend here. No one will ever take care about a cool project without a funky demo.
  3. Build clients that are eaasssyy to use for all major platforms. I’m talking about smooth integration ( e.g. a spotlight plugin for OS X ), not some dirty hack.
  4. Tell all your programmer friends.

Thats it. But I’m still not ( yet ) interested in doing it by myself, but if anybody wants to do it, don’t bother contacting me. Sleep well.

Edit: found this link, like it.