Learning Ruby, Using Koans

For the longest time I wanted to learn Ruby on Rails. It has been bugging me ever since I’ve built my first website, some five or six years ago, that I have failed to find the time to learn the leading web development framework. I’m familiar with RoR from afar, watching some of DHH’s lectures and reading some texts, but didn’t get to actually try it out.

Why I Chose Django Over RoR

At the time, I looked into two frameworks in languages that were then new to me: Django, the python web framework, and RoR. Since I haven’t worked with either, and haven’t written any code with any of these languages, I had a hard time choosing between them.

At the end, I had a table with pros and cons that looked something like this:

Ruby on Rails:
+ Massive adoption
+ Proven & more mature
– No accessible tutorials
– Ruby

Only to discover Ruby on Rails is meant to be magically simple to use, which means there is a lot to learn about conventions and things that happen in the background that really aren’t well defined in the API. Why does Cat turn into Cats automatically? In 2006-7, the tutorials for RoR were abysmal. And trying to learn Ruby wasn’t so easy. What’s up with this little tidbit of code?

$ 1.+(1)
2

I’m out. This freaks me out.

Django:
+ Best documentation ever
+ Python
+ Less magic
– Not even at 1.0

Django was in beta. That’s a killer, isn’t it? Well, the Django community seemed to have it together with great documentation and easy on boarding. The 0.97 version seemed fairly stable. And I was surrounded by python-loving hippies (no offence, guys).

Also, seriously, compare how nice Jacob Kaplan Moss to David Heinemeier Hansson:

JKM

DHH

Django, I love you, but you are bringing me down

I slowly lost touch with the Django community. Most of my professional life I’ve been the data and databases guy, so I have less stake in web development. I’ve worked on back-end analytic services in some largish PHP (bah!) company. I’ve worked on my startup. I haven’t developed any web site for a while now.

From the sidelines, the size of the community seems to matter. Look at how MongoDB is killing it compared to Couchbase. They don’t do it by having a better product. They do it by having a larger community. They do it by integrating well with Ruby on Rails and others.

RoR is the bigger community, and thus it is more vibrant and moves faster than it’s python counterpart.

Learning Ruby, Take II

I haven’t learned any new language for too long. I’ve only messed with Scala a little in 2009, failing to find a good project to really dig into it. I’ve messed with JS a little in 2010. And some PHP (bah!) in 2011. 2012 belongs to Ruby.

And how the community changed!

I’m going through the Ruby Koans to get used to the feeling of the language. Unit tests are such a perfect learning tool. I’m stumped at how easy and fun it is to learn this way!

Go ahead, give it a try.

I’ll then go more deeply into Rails, and come back to tell you what I think. I still don’t like all the magic they’ve stuck inside, but I’m willing to suspend my discomfort for a later stage, until I can have a more educated opinion.

On and away.

Polaroid is the old Digital

Twenty years ago, if you wanted to take instant photos, you’d have to use Polaroid. That clunky camera with instant film was awesome, if you just had to have your photo right now. With a regular camera, pictures were of higher quality, but it took for ever. During the past decade, digital cameras completely took over the market, leaving both film and Polaroid cameras in the dust. It happened, because digital cameras provided us with a good compromise between quality and time.

Polaroid had this market niche. They should have been ecstatic. Their niche was becoming mass market. Here’s somewhat outdated usage statistics I’ve found. What a terrific opportunity! Polaroid should have been first in line to mass produce these babies.

Polaroid wasn’t the only one holding back on innovation. Kodak tried to save  its film business from the perils of digital. Too late, it declared that it too is moving forward:

You don’t have to be a dying dinosaur

Amazon started out in the business of selling books. It has built an infrastructure to make shipment fast and easy, much better than the competition. The Kindle fits nicely in the core competences of Amazon, as it is the fastest and easiest delivery mechanism for books. Amazon did not worry about a future where people didn’t buy paper books. It embraced it.

Newspapers are in the business of spreading news (as misleading as their name is). How could they deliver news faster and easier? If you sum the amount of money spent each day on producing and hauling paper around the country, you’d reach the conclusion that it is cheaper for newspapers to send you a Kindle for free, and then charge you for the news each day.

The music industry has tried to sue away the new facts of life, but failed. CD sales diminished. However, the music market is rich and vibrant. Digital sales and live show fees have gone up, up, up, matching quite well the reduction in traditional sales. If  the big label companies had embraced the change, instead of going against the consumers, they could have the money Apple is now making on iTunes.

How can you take advantage of your market’s tomorrow? Because once you are out, you become nothing but a fond memory. A Kodak moment. A scene from our past: