From: Just Another Victim of the Ambient Morality Date: 2006-08-04T06:10:06+09:00 Subject: Re: I'm having a hard time learning ruby. "Nate Imaqaguy" wrote in message news:ff1d62f8d0af3f4e5b1e66a085fabec5@ruby-forum.com... > > 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. This is, perhaps, your biggest hurdle, in my opinion. As much as I love Ruby, I've always been suspicious of Ruby as a first language. It's so free and lacks any kind of hand-holding, which is a breath of fresh air for experienced programmers but can be a hurdle for novices... > 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. However, if this is your only problem then you're probably a more competent programmer than you let on. If that's the case, Paul's suggestion of this reference will be valuable to you: http://www.rubycentral.com/book/builtins.html It's not exactly searchable but, if you know what kind of behaviour you're looking for, you can probably simply guess what you're looking for and be right. For instance, if you're looking for string concatenation, then you can guess that it will be a method of the "String" class and then, look at all the methods of that class for something that might suggest concatenation. You can get quite far doing simply this... > 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'm an experienced MS Windows developer and I am, thus, intimately familiar with both the Win32 API and the MSDN Library and, yet, despite all this, I've never found the search tool (as you've described it) useful, so I can't help you here. I don't know if this is considered rude or not but, since the Pickaxe book is available online at: http://www.rubycentral.com/book/ ...you could simply suck down the entire site and perform your search on the HTML, all for free. Again, I don't know how the community feels about you downloading the entire online "book," so my apologies if this is considered rude... > 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. Embarrassingly enough, I wasn't aware of ruby-doc.org before and, now that I'm looking at it, it looks like an excellenet reference, which doesn't bode well for the advice I have given you up til now. I haven't scrutinized it but ,judging from the documentation for class "Array," it looks rather thorough. Are you looking up more obscure functionality? > 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. The "methods" method works anywhere in Ruby but it is most useful in an IRB session. I'm unsure why you want to type in your entire program into IRB. You probably just want to type in relevant situations to test Ruby's behaviour, such as operator precedence or regex behaviour. If you want to look at all the methods of a class, you simply need to create an object of said class and call the "methods" method, perahps followed by the "sort" method which can help you find what you're lookig for... > So, you can kinda see a n00bs frustration.. > > I must be missing something big. Any tips (other than "try not to suck > so much")? I assure you, we're all familiar with frustration, even if it's not over the same things. Good luck to you and I hope you make progress!