sswanson: Sorry that was rattled off as an entry as quickly as I wrote it.
That code is written in the language Ruby. I learned to program
the language by reading Programming Ruby: The Pragmatic Programmer’s
Guide, which can be read here: http://www.rubycentral.com/book/
Unfortunately, though, the Pragmatic Programmers assume you’ve already
worked on that sort of thing before. Information on the language
itself (for English speakers, anyway) is here:
Actually getting into programming computers requires a kind of muse- I
stopped programming for a long time because I couldn’t think of
anything that I felt that I needed to program; with enough searching,
you’ll often find that somebody, somewhere created exactly what you
want already. While that’s occasionally the case for me, I’ve run
into so many ‘That’s perfect, except-‘ that being able to write a quick
program that does the last step for me is very important.
If you want me to explain the basics of the language, or even go line by line through the last program, just ask.
Being a bit more specific this time, I wrote the code in the last entry
to make up for the fact that though my music program at home can create
pretty cool random-ish playlists for me, the music comes from all kinds
of crazy directories and it’s hard to pick them all out if I want to
play them in my PDA. I often just put all the music in one
directory to play, and well, that didn’t achieve the desired result.
Since the playlist saves with all the oddball directories in it, and
it’s in a nice plain readable format, I wrote the program to read those
filenames out, and copy the file to my PDA. However, if I also
copied that playlist file on my PDA, the directories would point to the
wrong places, so I have to change the places that get pointed to as
well. Finally, the last bit writes out the brand new playlist.
Thanks for the comment, I hope that wasn’t too redundant.
See you next time.