If anyone wants to laugh at my code, here it is: https://github.com/tzs/WAR-Whom
I also did the same thing with JavaScript. I wanted a calculator for Talisman building in Warhammer Online. At first I was going to do it as an iPhone application. Then I decided a web page would make more sense, and so was going to write it as a Perl CGI application. Then I decided it would make more sense to do it in JavaScript so that my server wasn't doing the work.
That code is here: https://github.com/tzs/WAR-TalismanCalculator
These were fun experiments, but overall I think I prefer to learn the way I learned C. I got K&R, read it, then went to the computer center (this was before personal computers were common), sat down at a terminal, and started hacking out some simple programs, with my K&R at my side. A couple sessions of that cleared up the few things I had misunderstood.
Unfortunately, I've never found a book as good as K&R for any other language I've wanted to learn.
I remember reading an article about "Digital Natives" and "Digital Immigrants". The thesis of the article was that people who grow up in the digital world have a fundamentally different approach to things like learning than do those of us who grew up pre-digital. They are the natives--they grew up with computers, and multitasking, and access to vast amounts of online knowledge. They don't want to learn things by sitting down with a book and reading it through chapter by chapter, and then go out and apply that knowledge. They expect that for any task they wish to accomplish, they can learn what they need when they need it by going to Wikipedia, or Googling, or getting help on IRC, and so on.
When I set out to write my Warhammer Online add-on and the talisman calculator, I was consciously trying to act more like a digital native than a digital immigrant, to see how well it worked. It worked out better than I expected, but not enough to convince me that the digital native approach is better than the digital immigrant approach.
Cleaner, I think is "1.upto(100){ ... }"