M
Martin DeMello
What are some of the 'fun' things someone just getting into programming
(as a hobby) could do with Ruby?
martin
(as a hobby) could do with Ruby?
martin
What are some of the 'fun' things someone just getting into programming
(as a hobby) could do with Ruby?
martin
Martin said: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.
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.
Gawnsoft said:Could I see them please?
Nicholas said:For writing, I wrote a jnl.rb that creates a journal entry template with
today's date and then opens it in vi. That's slowly extending into a
PIM, with parseopts for command line parsing and options for using
different editors, adding an entry from the command line (--entry "blah
blah blah"), and so on. I think this would be a good learning program as
well.
abandonware slandered indepth gawdamned acquintance inbuilt chegwinJames Britt said:I wrote something like that for myself on a recent contact job. I
wanted a way to track little issues as they came and went, so that I
could go back and see how much time was wasted dealing with WebLogic and
assorted J2EE issues. I needed some way to just tap out notes at the
command line, with date and time stamps in the text.
What makes something like that a good starting point for a newbie is
that it's simple but it offers some immediate practical value, and, once
it's working, features can gradually be added.
And when the features get out of control, one can learn refactoring, too.
James
abandonware slandered indepth gawdamned acquintance inbuilt chegwinJames Britt said:I wrote something like that for myself on a recent contact job. I
wanted a way to track little issues as they came and went, so that I
could go back and see how much time was wasted dealing with WebLogic and
assorted J2EE issues. I needed some way to just tap out notes at the
command line, with date and time stamps in the text.
What makes something like that a good starting point for a newbie is
that it's simple but it offers some immediate practical value, and, once
it's working, features can gradually be added.
And when the features get out of control, one can learn refactoring, too.
James
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.