From: Bill Guindon Date: 2007-06-18T03:36:31+09:00 Subject: Re: Nervous Nuby Starting Out! On 6/17/07, The MacRubyist wrote: > > "Axel Etzold" wrote: > > [very useful hints and bits snipped, will definitely look at this stuff] > > Unfortunately, the very first real-world Ordinary Stupid Problem i > actually want to solve is that the flow of control in one of my Applescripts > that creates text data and saves it in a small bunch of XML files (which > i use because my boyfriend pointed out that XML works well as a Better > Text File) is slightly wonky and won't iterate through the last file, so > i'd actually quite like to implement the > iterate-through-small-bunch-of-files thing in Ruby. I know the basics of using the DOM in as simple > and easy way as I can get away with. That's pretty much the first thing I did with Ruby, it's fairly simple, and a good way to learn. > Having just run irb so far because am slightly scared of getting into > compilation and package management without using binaries, (and I tried > telling Tiger to 'require gems' and it didn't like that, which presumably > means i have to download & compile) would you advise me to: > a) debug my Applescript properly by staring at it until I grow > cross-eyed, because debugging is good experience and then i won't be tempted to > jump ahead too far just to get something to work. > b) try to compile and install Gems so I can have a go at using the > packages that will give me an XML parser > or I suggest 'b'. No compile needed. Just download from rubyforge, unzip it, and then run: ruby setup.rb > c) Take a Deep Breath and start from the beginning with the Pickaxe and > Why's cartoon book, desperately reining in my desire to work with any > real-world data at all until I've got the hang of the basics, at which > point I can 'plumb in' actual data, because the reason I want to have a go > at Ruby In The First Place is to take a step back and learn from the > ground up to avoid the heaving mass of spaghetti code I can see in my > future if I keep learning Applescript as self-taught with nobody to talk to. > The (...still nervous...) MacRubyist Nothing to fear here. Give it a shot, you'll be pleasantly surprised. -- Bill Guindon (aka aGorilla) The best answer to most questions is "it depends".