Archive for Other Languages

Remove Firebug JavaScript Console Calls on Deployment

One thing I keep forgetting to do when deploying a Rails application is to remove any Firebug JavaScript console calls I use for debugging.

You know, those:

Or something like that.

When committing back to the repository, you simply forget to remove them. Thus when deploying your new code, for those people who don’t have Firebug installed, the script will end in a premature death.

Oh noes!

This definitely isn’t cool, and its just a minor thing you forgot to do…and its causing a hell lot of problems.

Lucky for us we can hook into the Capistrano after update code callback to comment/strip out those lines from the JavaScript file.

To Comment Out:

To Strip Out:

So instead of removing those debugging calls from the file, just leave them there and let Capistrano and sed strip them out for ya!

Talk about an easy life :3.

Note: This only works in the top level javascripts directory.

Comments

Ruby on Rails vs PHP and Java

The guys at Rails Envy, have put up videos in the style of Apple’s Mac vs PC ads, putting Ruby on Rails upfront vs heavy weight champions PHP and Java.

Via Youtube:

  1. Ruby on Rails vs Java
  2. Ruby on Rails vs PHP - Migrations
  3. Ruby on Rails vs PHP - Organization
  4. Ruby on Rails vs PHP- Changing Database

Comments and Critiques

Ah pitting Ruby on Rails vs the big two. Though at times it can seem like pointless bickering. Is this what these videos are?

The first video (vs Java) was good. I like the use of ‘jars’ and the various frameworks stored in them. Nice touch. The background music starts a bit late though.

In the second video (vs PHP Migrations), I wondered why the used the same guy for Java as for PHP. In my opinion bad choice. Though they did change the Java/PHP guy’s shirt…

The third video (vs PHP Organization) is not entirely. Sure there is no pre defined set on how to build your application, but good programmers do separate code from logic, and do use MVC via various frameworks. Similarly I feel the end (after they showed the Rails logo) was carried too long.

I felt the fourth one was simply weak.

Naturally they would use the Ruby on Rails logo. But it doesn’t carry a ‘professional’ touch that the Apple logo does. This is not a fault of the logo (which I think is great by the way), but might have been with the use of the serif font for the link ‘RubyOnRails.com’. Or maybe that the logo was just TOO big.

Ruby on Rails Video

My take. Smaller, with a reflection on the bottom, and the address in lowercase. The font could be better, and its in the way of the reflection. Just a quick example nonetheless.
Rails Envy

The video quality could have been a bit better. It may just have been their bad encoding, then uploading Youtube, which degraded the quality even more. But somehow it seems like it was taken off a normal home video camera.

Maybe it would help if the Rails duded didn’t look so nerdy. In the Apple ads, Apple wants the Mac guy to be perceived as cool, hip, hop, and very stylo. They are advertising a lifestyle. The Rails ads doesn’t do this, and it helps a lot. Basically put, It doesn’t look cool to use Rails. Actually the Ruby guy sounds very cocky. “Actually Ruby on Rails…”

When the final version of the Rails logo was released, it was compared as:

The remix signals less rigidness and more fun than the original—two important properties to Rails development.

Note: Emphasis by me.

In the same way, the ad doesn’t seem to portray to me that Rails development is “less rigid” and “more fun”. Sure it’s stated clearly by the actors, but you don’t get the sense of it.

Ok sure, it was a parody. But this is also comments and critiques. Doesn’t matter, as reading the comments people seem to love the ads anyways.

I wonder why ASP wasn’t considered? Or even Django?

Personally I prefer the various The Least Surprised videos about Ruby.

Comments (1)