Which 21 topics would YOU suggest for an Advanced Ruby Course and why?

by Satish Talim on August 26, 2008

There have been some heavy discussions at RubyLearning about what all should be covered in an Advanced Ruby Course. Many topics have been suggested along with a ‘for’ and ‘against’ each topic, but nothing concrete has come out. I’d like the topics to be more relevant to the ‘Real World Ruby‘ which any programmer with a basic knowledge of Ruby could master and use. At our Free Core Ruby Programming Course we cover the following topics.

You suggest: To arrive at this list of 21 topics, I need YOUR help. I’d like you to suggest the topic(s) and remember to mention why the topic(s) you suggest are important.

The ‘Rules’ – Any feedback, suggestions, dreams or ideas that you have are welcome. While I can’t promise to respond to each comment or put every suggestion into place I make a commitment to you to read anything you have to say.

All that I ask in return is that you be honest, courteous and constructive with your feedback.

RubyLearning is a project that I pour a lot of time and effort into – as a result sometimes criticism can be a little difficult to hear – however I think it’s vital to take it all on board if this is to continue to be a valuable resource for would-be Ruby developers wanting to improve their Ruby skills.

So it’s over to you. Feel free to either leave your feedback here as comments or to share them privately with me via my email at mail [at] satishtalim [dot] com

YOU can make a difference!

Update: I do have my own list of 21 topics but I have not posted it here, so that I don’t influence your thinking.

Possibly Related posts:

%RELATEDPOSTS%

Technorati Tags: , ,

Posted by Satish Talim

{ 29 comments… read them below or add one }

Satish Talim August 26, 2008 at 9:52 am

Would you suggest that JRuby be part of an Advanced Ruby course? If yes, why?

Reply

ashbb August 26, 2008 at 10:24 am

Hi,

I’d like to learn about Shoes with many students.

Because _why recently launched the new site
http://shoooes.net/

and released the new revision: Shoes-0.r925.

It looks like to have a lot of new features.

Thanks,
ashbb

Reply

Michael Latta August 26, 2008 at 10:44 am

Advanced Ruby should cover 1/2 cool ways to use ruby (RSpec, parsing, advanced scripting) that go beyond routine uses. The other 1/2 should be on language issues, performance, threading/fibers, and library issues for ruby.

A concrete topic would be performance tuning. This should include DTrace, but also other methods to make Ruby code run better, and what coding patterns are good/bad for perforamnce.

A second concrete topic is to cover creation of C gems/libraries for Ruby that is platform specific and platform neutral.

Reply

James Brooks August 26, 2008 at 11:05 am

* Monkey Patching
* Inheritance (if not already OO familiarized)
* Various pieces of syntactical sugar ( ||=, class << self, etc..)
* Threading

Four there for pure ruby. If you want to start expanding to say, Rails, there are a lot of niche, but yet, important topics (advanced routing, sti, optimising database calls, etc).

Reply

Brice August 26, 2008 at 11:48 am

In my opinion there is no Adv course in ruby. Ruby is design to make my life simple in my daily work. I had never needed an adv course.

BTW, JRuby could be a great subjet. But instead of blogging how to use it, maybe you should write why we need to use Jruby.

You know like: why Jruby+Glasfish is better in that case than rails+mogrel.

See ya

Reply

Gaveen August 26, 2008 at 12:04 pm

Honestly, I don’t think JRuby must be a part of the Advanced Ruby. It’s better to concentrate on the main Ruby VM (MRI/YARV) at this stage. It’s just MHO.

I’m sure you are already getting suggestions for this. :) Let me add one thing I thought of.

How about associating some 1.9 features (since it’s already there and we are expecting 1.9.1 to go stable in December). For example some new and interesting things like fibers, and how things according to YARV, Oniguruma, etc.

Reply

Eol August 26, 2008 at 12:30 pm

im would love to program something like doodle.CH

Reply

Robin Kaarsgaard August 26, 2008 at 12:30 pm

I’m sure a lot of people would appreciate a good introduction to Rack – what it is (and equally important – what it is not), what it does, and so forth. It’s a topic that’s easily overlooked, and yet it is so incredibly powerful, sexy and easy to use once you get to know it.

Reply

SoftMind August 26, 2008 at 1:26 pm

Hi Satish,

Good question indeed and well intTime too.

I think it would be better to focus only on Ruby with advanced features as per suggestions flowing here.

Jruby should not be considered at this stage. Its not tough to understand Jruby or IronRuby, once… one has a grip on Advanced Ruby.

Please focus more on Ruby 1.9.1 features and that’s very important. My honest suggestion would be to explain Advanced Ruby with Tutorials on Shoes too.

There is plenty of awarness about Ruby on rails, where web is concerned, but the DeskTop effect of Ruby is not at all popular.

Shoes + Ruby 1.9.1 + Advanced topics is what is recommend.

A Request Email for suggestions to David Black, Matz, Olabini, Ezra. Peter Cooper, and other experienced Rubyists for suggestions would be great

Thanks

SoftMind

Reply

Michael Uplawski August 26, 2008 at 1:51 pm

I love sockets. Sorry for that.

But combining the simplicity of Ruby with this topic, that had AFAIS never been well explained in the books (exception: Sean Walton) is something I would like to see more about.

Rather than condone the shortcomings in current frameworks, I would love to create my own code for accessing system resources, like sockets.

Reply

Lindsay Holmwood August 26, 2008 at 2:04 pm

Ruby for sysadmins.

Perl has lost favor with sysadmin types and they’re migrating to Ruby land in droves.

Unit testing of scripts, building reusable systems focused code, and integrating existing libraries to solve everyday sysadmin problems would be really useful.

Reply

Jamie van Dyke August 26, 2008 at 5:09 pm

Personally I think that advanced Ruby is more about meta-programming, design patterns and best practises. Anyone can pick up Ruby in under a day, but to really learn the power of Ruby you should combine the 3 topics I’ve mentioned.

I think teaching Ruby 1.9 is a little premature right now as it’s unlikely to be used in a production environment.

JRuby is not Ruby, it’s a topic of its own.

So, just be sure to include the above 3 topics. I know on the training courses I’ve done in the past (and will do in the future for Parfait) these topics have been well received.

Good luck with the course, Satish.

Reply

Willian Molinari August 26, 2008 at 6:21 pm

Æ!!

I want to learn more about shoes too! =)
And obviously tests!!

Cheers,

Willian Molinari

Reply

Karmen Blake August 26, 2008 at 8:51 pm

* Inheritance,
* Modules (extend, include, and good patterns of use),
* Sorting and Filtering collections using Enumerable,
* Duck Typing,
* Procs and Blocks,
* Metaprogramming

Reply

Geoffrey Grosenbach August 26, 2008 at 9:48 pm

* Mocking test objects
* Measuring performance
* Processing command line options with optparse or an alternate like Yehuda Katz’s thor
* Writing Rake tasks
* Using a profiler

Reply

Guy Naor August 26, 2008 at 11:10 pm

I would like to see a topic on classes/objects/meta-programming. My experience show that very few ruby and rails developer really grasp this and the possibilities in t.

In addition to that – performance and testing would be good topics.

Reply

Soleone August 27, 2008 at 12:58 am

1.) At least one GUI framework (RubyFX, maybe Shoes – but Shoes is no real ruby library, it brings it’s own installation of ruby/gem, so I would rather go with RubyFX)

2.) Bash-stuff like File, Directory and execution of programs etc, to make everyday life easier

3.) Sockets

4.) Common design patterns Ruby style (delegate, singleton and whatnot)

5.) Definitely Testing with Test::Unit (although I like RSpec more, Test::Unit is more common and lightweight, and it’s easier to learn RSpec once you know Test::Unit)

6.) Good explanations and examples of Blocks (took me some time to write my own)

7.) Creating your own Gem (to encourage sharing your libraries)

8.) EventMachine (as I don’t know anything about it, but heard it’s pretty often used)

9.) Starting a new bigger project (directory structure, resources, dependencies, maybe even Git)

Although I would love to know more about JRuby (as I’m coming from Java), I don’t think it belongs in an advanced Ruby course, as people need to familiar with Java first)

Reply

Peter Cooper August 27, 2008 at 5:45 am

To pick some uncommon ones that I think shouldn’t be overlooked:

Community / “soft” skills (that is, being able to find the correct libraries to do things instead of reinventing the wheel).

Some form of GUI app development (as a minor thing).

Comparison of various forms of testing (so that people don’t feel forced into going one specific route that might not feel good for them – e.g. BDD vs TDD – whether mocking is useful in their situation at all, etc.)

Reply

Satish Talim August 27, 2008 at 6:31 am

Here are some suggestions from Fabio Akita via email -

Hmm, let’s see

- the Ruby thread model, the differences between green threads and native threads, the problems os shared memory and locking
- command line Ruby, optparse and highline for command line options and interactive user input
- pdf generation, the difficulties and options, Prawn, pdf-writer, rghost
- advanced metaprogramming, eigenclass, strategies for cleaner monkey-patching using modules, the ancestor hierarchy, maybe explaining how activesupport works and how to use it regardless of rails
- tests: the default test::unit, maybe some should or rspec
- screen scrapping, hpricot, mechanize, the standard net package
- consuming rest apis, maybe activeresource but at least rest-client or the basics of the Net package
- objectspace, ruby2ruby and other dynamic code manipulations techniques
- how a garbage collector works, mark and sweep, and the common memory behavior on ruby
- creating classes in real time attributing an instance of Class to a constant and defining methods on the fly
- design patterns in ruby, and why many of the old java-based design patterns – such as injection dependency – no longer apply

Well, I think from the top of my head, this is it, hope it helps.

Thanks Fabio.

Reply

Satish Talim August 27, 2008 at 6:35 am

Here are some suggestions from Ola Bini via email -

Hard to say. I would say it’s kinda hard to do a course that caters for all needs. I see lots of requests for Shoes for example – but there is only a category of people that’s interested in GUI programming. Same thing goes for Rails and related.

I see lots of comments about 1.9, but for me that’s totally uninteresting. If you understand how Ruby works, 1.9 features shouldn’t come as any surprise at all.

I might recommend a focused Ruby GUI programming course, covering Shoes and MonkeyBars, and something separate covering 1.9.

What I’d really want in a course for advanced Ruby is not so much about features, but about good taste – meaning how and when to use metaprogramming – how to do it un-intrusively. How to do good OO design with Ruby’s features. These are things that would be helpful if the audience is at the right level.

Thanks Ola.

Reply

Chris Anderson August 27, 2008 at 9:19 am

The thing I’ve been struggling lately, as I’ve been working on more non-Rails applications, is how to organize code and dependencies in various contexts. Rubygems, git-submodules, Merb dependency loading, Rails plugins — there are many ways to manage groups of inter-related code files, but I’ve yet to run into an overview that made me feel confident that I was organizing my applications in the most robust way possible.

Reply

Robert Evans August 27, 2008 at 9:20 am

* Ruby Design Patterns
* When to use and when not to use meta-programming
* Profiling and Performance testing
* GUI Programming

Reply

Satish Talim August 27, 2008 at 11:39 am

Thank you for your suggestions. Please keep them coming.

Keeping in mind what Ola Bini said – “Ola Bini – “I would say it’s kinda hard to do a course that caters for all needs.”

This is what I have so far -

Some 1.9 features
International Encodings
YAML
GUI
Shoes
FXRuby
Socket Programming
TCPServer and TCPSocket
Threading
Internet and WWW
HTTP
Ruby Internet Services
Net::HTTP and open-uri
Hpricot
Net::SMTP
TMail
ActionMailer
Using Ruby/MySQL
Ruby ActiveRecord and MySQL
Usage of libraries and apis
Ruby and Twitter
Unit Testing
RSpec
Distributing and Releasing Ruby Libraries As Gems
Git and GitHub

To be considered -
Processing command line options with optparse, highline, GetoptLong
Ruby for SysAdmins
Meta Programming
Design Patterns
Profiler
Rake tasks
Performance Tuning – include DTrace
Fibers
Monkey patching
YARV, Oniguruma
doodle.CH
Rack
EventMachine
ActiveSupport
ActiveResource
pdf generation – prawn
objectspace, ruby2ruby

Reply

Dave Miller August 27, 2008 at 12:07 pm

I think that 21 topics may be too many for a single advanced class, given that many of the topics will require at least a full week.

Here are my priorities in order:

Ruby Threading
Survey of some Ruby friendly GUIs
Ruby Meta Programming
Modules
Unit Testing in Ruby
Design Patterns
Survey of especially useful Gems
Socket Programming

And finally — how to become a hardcore Ruby developer. (ie Compile and extend the kernel )

Reply

Olle Jonsson August 27, 2008 at 12:51 pm

Mini-project involving hardware peripherals and C: Read some data from the serial port, or a PS/2 port, avoiding USB for as long as possible.

At some point in the project, pack and send a C struct on the wire (a HELO equivalent).

Reply

Michael Uplawski August 27, 2008 at 1:50 pm

Fabio Akita’s suggestion

design patterns in ruby, and why many of the old java-based design patterns – such as injection dependency – no longer apply

I find very interesting. A topic “design patterns, you won’t need” should be included in all courses for any programming language, AFAIS.

But that possibility had escaped me, so far.

Reply

James Edward Gray II August 27, 2008 at 8:45 pm

I agree with the suggestion that it’s hard to find topics that will appeal to all. Given that, I would probably try to base an “advanced” course on three or for not-so-trivial examples instead of narrow topics.

In building up the examples, I could show some Rubyish class design, refactoring with metaprogramming, etc. Well chosen examples could also allow me to dive pretty deep into certain areas. I/O or network communications for example.

Well, that’s my two cents worth. Hope it helps.

Reply

Duncan Beevers August 27, 2008 at 9:59 pm

+1 Karmen Blake’s suggestions
+1 Peter Cooper’s suggestions

I’d recommend material covering the functionality of the core libraries with special attention paid to Enumerable module, as well as the File, FileUtils classes.

Covering Gems is important as new rubyists need to know where we keep our tools.

Reply

Shashank Date September 3, 2008 at 10:44 pm

I would recommend the following topics in a generic Advanced Ruby course:
1. Ruby Object Model
2. Ruby Metaprogramming
3. Writing DSLs using Ruby
4. Ruby Threads
5. Embedding/Extending Ruby
6. Ruby unit testing using mock objects
7. Performance tuning: using profiler
8. Design Patterns in Ruby

The following topics can also be considered advanced, but they are for specific audience:
1. Network Programming (Sockets, Net::HTTP/SMTP etc)
2. GUI programming using FxRuby/wxRuby/Shoes etc
3. Special Libraries (PDF generation, Hpricot etc)
4. Ruby for SysAdmins (OS Specific nuances of Ruby)
5. ORMs (ActiveRecord, Og etc)

I would not consider other implementations of Ruby (JRuby, Ruby.NET etc) as Advanced Ruby.

Hope that helps.

Reply

Leave a Comment

{ 2 trackbacks }

Previous post:

Next post: