From: Dave Burt Date: 2006-03-01T15:18:38+09:00 Subject: Re: Teaching Ruby to COBOL programmers Wilson Bilkovich wrote: > What are some key points I should make sure to cover for procedural > programmers? > Things on my list so far: > 1. Variables don't hold values, they are just labels. > 2. Objects are nouns, methods are verbs. .... and methods belong to objects' classes. I'd be emphasizing OO. To me, that means getting across the idea of classes as (more or less) types of objects, whose behaviours you define, and objects as instances of those classes. There's also inheritance and polymorphism to be covered. Mixins, too, for bonus points. > 3. Structure keeps you sane. Does this just mean defining classes and modules and naming files accordingly? > 4. Duck typing makes testing easier. > 5. Rake as an example of something procedural in an object-oriented > language. You've got 3 hours, you could cover metaprogramming (see Chapter 6 of Why's (Poignant) Guide to Ruby and Dwemthy's Array) to give your people an understanding of how Rails' before_filter, and has_and_belongs_to_many, etc. work behind the scenes. It is ancilliary, though, and you may get better value by looking at the Rails framework specifically (build a to-do list) or drilling OO (read the rubyquiz.com for some problems and nice rubyish solutions). STOP RUN, Dave