RubyHead Update and Rant, 1 July 2009

If you are wondering why I haven’t done much lately, that’s because I’ve been extremely busy now that I’m completely independent. In other words, I’ve been focusing on client work. By the way if you need a RubyHead, let me know.

This brought an interesting issue for me. It appears that I’m not very scalable. I have my limit on how much I can work.

The problem is that I was born this way. The way God made me does not make me very scalable. If he designed me to be very scalable from the beginning, I may not have this issue.

Interesting.

The same can be said about an application. If you never give an ounce of thought on scalability, then “scale later” may not even be possible or very expensive. I see this everyday as Rails made time to market ridiculously fast and focus solely on application features. I see too many apps slapped together with a bunch of plugins that makes scaling difficult.

The choice of tools is also very important. I always believe that there’s a right set of tools for every situation. I’m not talking about the text editor or IDE, but frameworks such as Rails, Sinatra, Merb, and etc. For example, do you really need entire Rails stack if you’re creating a web services? Do you really want one application handling both front-end and back-end services?

In coming weeks, I plan on creating screencasts on scalability as I’m trying to transfer some of the experiences I had with other platform to Ruby.

iPhone Tethering in US

I wonder if this works.

HOWTO: iPhone AT&T Tethering
============================

In 10 steps:

* Update iTunes to 8.2 via Software Update
* Update your iPhone to the 3.0 release (out today - June 17th)
* Download this dmg and mount it: tethering file
* Enable hidden carrier testing option (in Terminal.app): defaults write com.apple.iTunes carrier-testing -bool TRUE
* Start up iTunes
* Go to you iPhone’s summary page
* Option-Click the Restore button
* Select the ATT_US.ipcc file from your mounted dmg (step 3)
* Open Settings -> General -> Network -> Internet Tethering on your iPhone and switch it ON
* When your computer is connected via USB you will see a dialog to open network preferences. Open it and hit apply.

If you have problems with visual voicemail after this follow these steps (thanks to [luigi](http://github.com/luigi) for pointing this out):

* Connect your iPhone and fire up iTunes
* Option-click on the Restore button like you did before
* Navigate to [your-username]/Library/iTunes/iPhone Carrier Support
* Click on the file in there to reset your carrier settings

Dynamically Instantiating an Object

Ever wanted to write a method that instantiated an object of a class you specify? Below should be self-explanatory. Just call “const_get” method on the Object.

>> a = Object.const_get("String").new
=> ""
>> a.class
=> String
>> class Joon
>> def initialize
>> puts "Hello Joon"
>> end
>> end
=> nil
>> a = Object.const_get("Joon").new
Hello Joon
=> #<Joon:0x18468e4>
>>

Snippets?

Wouldn’t you know it, just as I was about to upload my Komodo Edit snippet collection, I accidentally blew away the file. So, as an exercise, I’ll post the code snippets as I write them on daily basis. I’ll post the file. All you have to do is just go to tools menu and import the file, then keep or throw away the snippets.

Cool Videos from ATLRUG

I really love attending RUG (Ruby Users Group) as I usually get real world examples and lessons. Here’s a link to ATLRUG’s videos where interesting topics are covered:

http://skiptree.blip.tv/posts?view=archive&nsfw=dc

I’ll ask NJRUG about taping our sessions too, now that I got all the video recording and editing equipment.

MacRuby Learning

As a former Obj-C+Cocoa developer, I can’t tell you how happy I am about MacRuby. To be quite honest, after taking a brief look at RubyCocoa, I wasn’t too excited. But after taking a careful look at MacRuby, I’m very excited. In fact, I think this is as big as Rails for Ruby.

Here’s a list of learning resources I compiled:

Pragmatic Studio Bonus Track #6 and #7 - screencasts
Mike Clark did an excellent job explaining MacRuby. I’m very stunned that he’s not charging for these two screencasts. Who know, he may come to his senses and start charging for them. Get them now!

Meet MacRuby by Peepcode - screencast
I already reviewed this. It’s $9 and well worth it.

Developing Cocoa Application Using MacRuby
Excellent tutorial from Apple. Basically similar tutorial as Mike Clark’s screencast. I wonder if he wrote this…

MacRuby.org
The official site with documentation and all the goodness.

By the way, to my delight, MacRuby is based on 1.9 version of Ruby. Have fun!

RubyMine 1.0

I just couldn’t resist the price tag of $49. That’s with 50% off coupon code I got from JetBrains when I signed up for beta. So, I got RubyMine 1.0.

I just want to make it clear that the primary reason is NOT the price. As a former Java programmer (that sounds terrible), I used IntelliJ and thought it was the perfect replacement for Visual Studio on MS side. Although in its infancy, RubyMine didn’t disappoint.

RubyMine has all the features you’d expect from an IDE; code completion, code inspection, version control integration, documentation lookup, testing helpers, and etc… The best part is that it runs on my Linux, Windows, and Mac. I only use the Linux version, which took some time to set up.

I still like Komodo Edit and will continue to use TextMate on Mac, but RubyMine really makes my life simpler. The only complain I have is that it takes way too long to start up.

I look forward to future upgrades.

Next Page »