NDC 2012. Day –1 and–2. De-railing big time.

 
event

This year I wanted to experience the full experience of taking part in a workshop.

The choice range was great but…Hands on Ruby on Rails? Great. Explaining concepts to .Net developers? Sweet. From Rob Connery himself? Sold!

I have already written how much I like Rob’s style of presentation. As an instructor, I think he really rocks. Maybe it was not a workshop planned to the millimeter (it wasn’t) where everything goes smooth and according to plan (it didn’t) and all topics were covered (they weren’t) and pupils get a beautiful set of handouts (I didn’t). But I had a lot of fun discussing styles and approaches of solving problems, helping out each other to find out “why the hell X does not work when it should” and sharing experiences with the instructor and the other attendees.

The workshop itself

I was very surprised that we were so few: only four. Obviously only the good ones signed in Winking smile

The workshop started a bit hectic and maintained like that with few peaks of slower pace. But it’s alright, I like it rough when learning.

Even though we were asked to install Rails Installer in our machines, Rails (and Ruby) is still a framework full of possibilities (and intricacies), so it is kind of difficult to create a “standard” for all of us.
In my case I opted not to install the installer (bad, bad boy) because I already had the “core” environment installed (ruby + devkit and git) and I did not want to mess around with installing (probably older) versions of the tools.
And I managed.
Well, I managed as good as a Rails developer can manage in a Windows machine. I will come back later to that.
Rob and another attendee had Macs (one bootcamped) and the rest of us, straight Windows. But the disparity of environments was not that big of a handicap.

A bigger issue is how the tools are used. You can (and are encouraged to) not use an IDE, and you are switching console/text editor constantly. I am fine with it. I do that quite often the way I develop .NET. But this is orders of magnitude ahead. I am not a very good typist. I am average (or below). So typing long commands that you do not understand and are not “internalized” is painful. Very painful. But it is alright.

It was truly “hitting the ground running”: smashing CLI commands, using generators, bundling gems, database migrations, models, routes, controllers, view engines, factories, database seeding… all in one go. Oh, and screwing up and fixing screw ups as we go while learning. It sounds painful. But it was only hard. the mistakes and the process both made sense. You get a feeling of the power you have at your fingertips once you master their ways. Yet it is everything but easy. I was surprised I was not overwhelmed even though most of the concepts and practices are kind part of my day-to-day work.
I believe that says a lot about Rob and how he is able to explain things as they are (or he feels they are). No bullshit. No indoctrination. Discuss openly what he likes and his dislikes. Ok, I’ll stop brown-nosing, I am not getting higher grades anyway…

We covered a lot of useful concepts, techniques and different tooling. Yet we had to start from scratch a couple of times. Which was indeed a happy side-effect as we could practice the commands we had just learnt. But I am afraid we paid the price of not being able to cover all the points we wanted to cover. No big deal, as I did not feel I wasted any time at all. We did some other things instead that were interesting in themselves.

What I got

I got an invaluable piece of real-world experience of a new, popular and highly usable platform.
No, it was not perfect. It was not academic. And I could not care less it wasn’t.
I feel I could start a pet project or a low-risk project with the framework and have something complete working. That is within two days. Pray for the soul of the guy that has to inherit that codebase afterwards to extend it Winking smile

Windows eXPerience

Rails crawls when run in Windows. You can use it. It installs and mostly runs with few glitches. But when you see the instructor getting instantaneous feedback on his Mac and you have to wait 30-plus seconds (no shit) for your tests or generator or rules or migrations or anything to load, you feel disappointed (and enraged after two days). It is just not good enough. Do yourself a favor (and save money to your client) by getting a Linux or a Mac box. Please, do. Or wait until performance in Windows is on par. Currently, it is nowhere near.

Apart from performance, Rails assumes that you are not using Windows. By that I mean that some gems expect that you have the whole unix-y toolbox gang (git, phyton, decent consoles,…). You don’t have them? Still fine, but you are missing a lot of the real power of the platform: community tools and libraries.

A point of View

I physically hate Haml. I dislike angly brackets. But give me those every day over space-aware languages. “You’ll get used to it”. Yeah, just as you get used to an axe stuck in your chest. Unless you are into the bad habit of breathing.

Ruby-less

It is amazing how far you can go with very little Ruby knowledge. I posses only the rudiments of the language but I could be guided towards the implementation of a somewhat complete checkout process. I can only assume that once you master the language, one can do pretty sweet stuff on top of Rails.

IDE FTW

You will hear that “Ruby is such an expressive language that you do not need intellisense”. And I will articulate my answer: R-U-B-B-I-S-H.

The first day I tried to use just a text editor. Only syntax highlighting as the only indulgence. And I cannot tell you how many typos I made. How many stupid errors I had just because of variable naming, method misspelling or element nesting. Mistakes in controllers, models, view engines and tests. Mistakes that would have been spared by intellisense and an interactive code analyzer. Instead, I had to hit the page or have a test run. Orders of magnitude later, I found out what was wrong (and a good portion of the errors made little or no sense to me).

The second day I used an IDE: RubyMine.
It made me look awesome. I was correcting Rob on method naming (which is sad enough if you think about it) and helping my classmates with the time it saved me.

You want to use it as a glorified text-editor? Knock yourself out. If I ever do any more Ruby, the first thing I’ll do is fire up an IDEA that understands Ruby, Rails, HTML/Haml/whatever-that-does-not-break-my-balls, CSS/LESS/SASS, Javascript/Cofeescript and auto-completes and/or verifies that what I am typing is fine. And I got all of that with RubyMine. The power of choice.