usable in any place a human can be used

20100126

when in rome

[caption id="attachment_624" align="alignright" width="300" caption="Trust me, you want to do what the Romans do, I mean... have you ever built a Collisium?"]collisium[/caption]

Ah the cliché of it all, "When in Rome." Although it would be nice to have a post about being in or traveling to Rome, sadly this is not the case. Instead, this post is about following convention and how that can help you learn.


I've been getting into ruby as of late, after learning Smalltalk, Objective-C, and LISP (to varying degrees), ruby hits a nice sweet spot of stealing some of the best bits from each. I was recently approached by a friend who does primarily .Net programming about the best way to go about learning ruby. He had decided that, at least in the beginning, he should use the NetBeans IDE. This seems harmless enough, even logical for someone who spends their entire day in Visual Studio to want the comforting guidance of the IDE. It is also the exact wrong approach.


As he progressed past simple "Hello World" examples and onto his first rails project he found himself battling with the IDE. Odd error messages, the IDE struggling to provide auto-completion on the dynamic models, but most importantly a complete lack of resources. The ruby and rails world to a large degree lives and breathes on the command line, right now if you go to my home computer you will find 4 terminal windows arranged with a mysql shell, script/console, script/server, and one for git. If something goes wrong and I get a weird error, I do what all great programmers do, copy and paste that sucker into Google. I normally find somewhere around a bajillion hits with solutions, huzzah!


My friend on the other hand had trouble doing the simple things through the IDE, like installing gems. I'm certain the IDE was capable of it, and that someone better versed in it would be able to help him out, but the Google-scape was barren to his questioning. All I could say to answer his questions were, "well I'm not sure how NetBeans does it, but on the command line just type gem install [gem]" (Also I can speak in teletype, I just do a robot voice.)


Despite the difficulties, my friend clung to the belief that the IDE was the way to go for beginners. I finally realized the perfect analogy to drive home the point, I asked, "Would you ever advise someone new to .Net to learn it by using the command line tools?" It's a perfectly valid question, I'm sure plenty of people who hang out in vim all day and don't mind doing things like ./configure && make && sudo make install (thanks Jeremiah for pointing out my n00bishness) would feel much more at home on the command line.


I am not free of fault on this either, when I attempted to learn git for the first time, I used TortoiseGit. I was very comfortable with TortoiseSVN and thought it would ease the transition. It sure did, I was able to treat git exactly like svn, and completely miss the point! Once I moved to the command line (and watched some screencasts and read some articles) I felt much more at home with git, and even began to understand why I would want to use it over svn. I had stopped trying to make it something it isn't and embraced the thing that it is.


The point here is that when you learn something new, it's new, don't bring along your technological baggage. If the community all rallies around some IDE (.Net, I'm looking at you) then for flying spaghetti monster's sake, use that IDE. If they rally around the command line (ruby, I'm looking at you) then by the hammer of Thor, use the command line. If they rally around some weird virtual environment machine (smalltalk, I'm looking at you) then have fun and realize you are never going to be able to use that at work (just poking fun, I <3 smalltalk).


The point here is that learning something new is often times uncomfortable, you have to feel like a tourist for a while. When in Rome though, do as the Romans do. Embrace the methodologies, naming conventions, and tools that are the community standard. Give it a few weeks, if you still find yourself hating it, then maybe that particular technology isn't for you, it's ok, we can't all love everything. Life is about trying new things and figuring out what makes you want to get out of bed in the morning, for some people it will be .Net, for some ruby, for some COBOL (just kidding, no one likes COBOL).


You never do yourself any favors by half-way learning something, because you will either hate it because it was poorly shoehorned into an inappropriate paradigm, or you will learn to love it. "That second thing doesn't sound too bad" (I can sense your thoughts), and at first blush its not, until you want to start participating with the community by using others' code and sharing your code. Then you will have to unlearn all the bad practices you've adopted and have a difficult transition into the community, attempting to erase months of muscle memory. Save yourself the difficult task of trying to unlearn something and simply embrace the technology in full to begin with. It's a steeper curve, but the payout is the depth of understanding.

3 comments:

  1. Hah, interesting post. I do try to warp the technology to do my bidding. (btw found a wonderful IDE in Aptana for ruby/rails). I mix the command line and IDE. All installation is best on the commandline, I prefer app navigating in the IDE (so many subdirectories!)

    ReplyDelete
  2. I do empathise with your friend. Ruby is a great language, but for complete beginners it is harder to learn than it should be. Netbeans does an admirable job at trying to provide auto complete and good idioms, and its project setup is very good. Netbeans internal usage of Ruby is actually very Ruby-ish, and it exposes the tools in a familiar way. But you can't use Netbeans for Ruby the same way you would use Visual Studio for .NET stuff.

    The very dynamic nature of Ruby/Rails means that its autocompletion is heuristic based, and not based on absolute lookups. Netbeans does provide a lot of useful features that can help beginners. But it is useful to know Netbeans first.

    RubyGems can be quite unforgiving on Windows whether you are using just MRI Ruby with CLI tools or whether you are going the whole hog with a big swanky IDE. I wrote a bit about it here:
    http://richardconroy.blogspot.com/2009/11/ruby-on-windows-rant-and-call-to-action.html

    The situation is improving a lot, but not in a way that a Windows Ruby beginner is likely to appreciate.

    I don't think the issue is about IDE driven learning vs conventional CLI tool learning. But the road well traveled is the CLI one, and its a fair point.

    The real issue is about scoping your learning experience. Its very easy to get dragged into a lot of cool technologies that are implemented or enabled by Ruby. You wouldn't attempt to learn Java + Eclipse + Struts + Maven all at once - you would be overwhelmed.

    Yet it's a common mistake for Ruby beginners to try to learn Ruby, Rails, the tools involved (IRB,RI,IDEs), Rake, RubyGems etc. All at once. Which is actually a reasonable approximation of the scope of that set of Java technologies.

    Realistic expectations are important, and reaching out for help is probably the best way to learn Ruby and the associated frameworks. The mailing lists are friendly and helpful.

    ReplyDelete
  3. Tim Hurson said "As in any discipline, to become good you need first to learn the rules. To become great, you need to break them."

    First diving deep into something and playing along with the choices and preferences most others have made will get you far, but to rise above and create something great it sometimes pays off paving new paths. The best example I can think of now is the rise of AJAX, combining two previously existing technologies in a whole new way and creating something revolutionary.

    ReplyDelete