From: Leslie Viljoen Date: 2006-08-04T04:28:05+09:00 Subject: Re: I’m having a hard time learning ruby. On 8/3/06, Nate Imaqaguy wrote: > > For starters, just do you know where I'm coming from: I have little to > no programming experience, except for some C and VB classes I took 6 > years ago, which I did fine in. > > My biggest hurdle getting started with ruby is finding which > methods/classes/files to call upon for whatever the heck I'm trying to > accomplish. > > I'm use to being able to perform a search, like in MSDN Library, using > key words of something I'm trying to perform. Then research results > from there, and get pointed in the right direction (with explanations on > what the feature does, and examples, etc). I find VS.NET 2003 has a fast and useful help system, but 2005 is way slow. With Ruby I have a PDF of the Pickaxe book and also bought the PDF version of Hal Fulton's "The Ruby Way". Using the latest Acrobat Reader's search features, I get close to the MSDN effect. Beyond that I use the "Forum Search" - ask a question on Ruby-Talk and normally within 5 minutes you have 5 answers! > The editors also helped with showing the available methods, as I wrote > the code. > > So, with ruby, I'm using the SciTE editor (on WinXP), which doesn't give > method options as you go. Yeah, I know they are kinda like training > wheels, but they help when you're starting out. I think normal Intellisense would be impossible to do for Ruby because every variable can be any object at any time. So an editor would have to run your program to find out what methods a variable supports at a certain point. That said, Radrails does have limited code completion. > And I can't really find any close equivalent to using something like an > MSDN Library. The best thing someone has pointed me to so far is > http://www.ruby-doc.org/. Which is cool and all, but it's not really > "searchable"�you kind of have to know what file/class/method to look up > in the first place. And even if I find what I think I'm looking for, > the documentation is confusing to me. Sometimes there isn't the > slightest word as to what something does. You should buy the PDF versions of a couple of Ruby books and search them. > Someone told me about ".methods", but that only works if you're in an > irb session, which I find painful to use because I have to type all my > code in, line by line. I can't even figure out how to paste each line > of the code I already have. Inevitably I fat finger something and get > mad. I often start in IRB and then make a mistake and have to do it all in the editor again. Best to just use an editor. Scite can run your code quickly - just go to Tools->Go. Radrails can also run your code inside the IDE. > So, you can kinda see a n00bs frustration�. > > I must be missing something big. Any tips (other than "try not to suck > so much")? Keep at it! After a while you'll have a ton of examples of how to do things, and you just reuse your code. Ruby will pay you back ten times what you put in. "The Ruby Way" has many many code examples too. Les