Re: Nervous Nuby Starting Out!



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".

.



Relevant Pages

  • Re: XML-based object orientated pre-Assembler
    ... > I have been promising an object orientated ASM IDE for a while now. ... > that will parse XML code and output ASM files. ... > compile and viola, the code is ported. ... "Why would someone use this product over other assemblers?" ...
    (alt.lang.asm)
  • Re: XMLReader skip current element
    ... You should try Eclipse some time - it will compile (in some cases, ... Likewise, just how handy would it be to just skip over an invalid section of XML, when you have no idea what the overall effect of doing so would be? ... It does seem to me that in an editor, where the user is actively modifying the data, it makes more sense to put the effort in, but even there I wouldn't necessarily insist on it. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: XMLReader skip current element
    ... You should try Eclipse some time - it will compile (in some cases, ... just how handy would it be to just skip over an invalid ... Just because the remaining XML can be parsed, ... should try to recover. ...
    (microsoft.public.dotnet.languages.csharp)
  • Save as XML with Applescript and Excel 2008
    ... Save as XML with Applescript and Excel 2008 ... I used to have a VBA macro that saved my current active workbook as an XML ... doesn't work for the "file format" parameter, ...
    (microsoft.public.mac.office.excel)
  • Re: MFC, XML, C++ .NET Help.....
    ... parse your XML and still compile native. ... The application scraps a single small xml string from ... I want to parse this xml string out to be used in the ...
    (microsoft.public.vc.mfc)