From: Gawnsoft Date: 2004-08-17T01:16:00+09:00 Subject: Re: Ruby as a first language On Sat, 14 Aug 2004 00:08:30 +0900, James Britt wrote (more or less): >Martin DeMello wrote: >> What are some of the 'fun' things someone just getting into programming >> (as a hobby) could do with Ruby? > > >Well, packaging systems seem to bring smiles to everyone around .... > > >:) > > > >No, seriously, I've written a number of simple scripts to fetch web >pages. Usually they just construct a URL based on some command-line >input, then make a system call to launch a browser. I search Google >this way, as well as look for stuff on buy.com, check TV listings, read >the news, grep/navigate my local wiki, a few other things. Could I see them please? >What might make this interesting for a newcomer would be to write a few >scripts like these, then see what they have in common, then see if they >can extract the common stuff into a class in an external file. I ended >up with a small class to encapsulate browser selection, url >construction, and browser launching. > >Along the way, one learns how to get parameters from the command line, >validate the input, build new strings, do some basic if/then logic, >write a simple class, use 'require'. > >And one ends up with actually useful tools for daily life. -- Cheers, Euan Gawnsoft: http://www.gawnsoft.co.sr Symbian/Epoc wiki: http://html.dnsalias.net:1122 Smalltalk links (harvested from comp.lang.smalltalk) http://html.dnsalias.net/gawnsoft/smalltalk