|
Mon
31
Jul '06
|
by Frank Spychalski filed under Ruby
|
Later this year I am going to hold a beginners course for Ruby at the VHS in Karlsruhe. Yesterday I started thinking about the topics I want to cover. The participants will have some programming experience which means I don’t have to explain the very basics. The course runs for two days with six hours each day, so I will have 12 hours to teach them Ruby. From the tutorials I read, I liked Mr. Neighborly’s tutorial best and I will use a similar structure.
Here is a very rough draft:
Day 1
- Hello & Intro (30min)
- playing with Variables, Strings and Numbers in irb (30min)
- Array, Hash, Range in irb (30min)
- 1st script with puts, gets, if, then (60min)
- Blocks, Methods (60min)
- Classes and Instances (60min)
Day 2
- Flow Controll (60min)
- Exceptions (30min)
- Closures (60min) at least
- The Ruby Way (60min)
Did I forget something essential? I hope not. I’m still looking for a few simple and short examples which show the differences and advantages of Ruby. At first I thought I would use something from the Rubyquiz but I think these excercises take too much time. At the end of the second day I would like to write one “larger” program, so far I like the idea from PostHelloWorld to parse text and create a histogramm for the words found, like the one described in this tutorial.
If Modules and Mixins are not already included in “The Ruby Way”, you should add them. Besides Closures they are one of the major benefits of Ruby. I general, you should stress the dynamic nature of Ruby.
Looks good to me.
If I could make a suggestion, it would maybe be that you could tack on some library instruction that covers important libraries like Thread and the Net libraries, or if you didn’t want to go that route, the GUI toolkits may be a good topic also.
As for examples, what audience are you targeting primarily? If you’re targeting people from a static language audience, maybe you could show off some of Ruby’s dynamic features (duck typing, metaprogramming, open classes, etc.), or, if you’re targeting other dynamic language users, perhaps you could show off Ruby’s expressive and powerful syntax with closures and some segments of metaprogramming.
Good luck; if you want to bounce any ideas off of me, feel free to e-mail.
Thanks for the feedback.
@Lutz: Yes, I planned to talk about Modules and Mixins at the end or perhaps if it comes up during “Classes and Instances”. I think the experience of the audience will determine how much I will talk about closures. I don’t know if it is possible to appreciate them with little programming experience (this is one area where I am still looking for a good and simple exercise)
@Mr. Neighborly: The audience for my other courses (Java and Perl) were students learning to program and people working in software development adding another language to their toolbox. I hope this time it will be similar. I will talk about Duck typing (can you teach Ruby without?) but I’m not sure about metaprogramming and open classes. I don’t think there will be enough time left to talk about Ruby libraries, so I think I will just point to ruby-doc or the online version of the Pickaxe book and tell them how to include them in their code.
Hi, I wrote the tutorial at semantichumanities.wordpress.com
Feel free to use anything you want from it.
I’d appreciate it if you would post any improvements or enhancements in the comments.
Thanks