Re: Nervous Nuby Starting Out!
- From: "Bill Guindon" <agorilla@xxxxxxxxx>
- Date: Mon, 18 Jun 2007 03:36:31 +0900
On 6/17/07, The MacRubyist <macrubyist@xxxxxxxxxxxx> wrote:
"Axel Etzold" <AEtzold@xxxxxx> 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".
.
- References:
- Nervous Nuby Starting Out!
- From: The MacRubyist
- Nervous Nuby Starting Out!
- Prev by Date: Re: Nervous Nuby Starting Out!
- Next by Date: [ANN] ObjectGraph 0.2.0 Released
- Previous by thread: Re: Nervous Nuby Starting Out!
- Next by thread: Re: Nervous Nuby Starting Out!
- Index(es):
Relevant Pages
|