[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ruby-tut] Errata / Comments
From: |
Davis, James (NIH/CIT) |
Subject: |
[ruby-tut] Errata / Comments |
Date: |
Thu, 20 Mar 2003 09:36:58 -0500 |
The Basics / New names for old things
Suggestions:
- Class: Ruby separates everything into classes.
+ Class: Ruby separates everything into classes (or categories).
- Method: These are the things that you can do with an object.
+ Method: These are the things that you can do with an object.
You can think of methods as the "behavior" an object is capable
of performing.
Typo:
- You've already seen thee classes
+ You've already seen three classes
Suggestion:
- You've already seen thee classes for things that you already know:
+ You've already seen three classes for things that you already know
(note that Ruby class names are capitalized):
Suggestion (in second table, to match first table):
- Class
+ Ruby class
Nit:
- Classes vs objects
+ Classes vs. objects
Nit / suggestion:
- Strings have several methods that integers and floats don't have
(e.g. capitalize, length, upcase, etc).
+ Strings have several methods that integers and floats don't have
(e.g., capitalize, length, and upcase).
The Basics / New names for old things / Converting between classes
Typo:
- Ruby has some methods for converting between classess:
+ Ruby has some methods for converting between classes:
Suggestion: capitalize class names in conversion table.
The Basics / New names for old things / Exercises
Comment: After reading, "Ruby can tell you what class an object is.",
I was expecting you to introduce Object#class, or Object#instance_of?.
But after thinking about it, I realized it would confuse beginners,
given the material presented thus far. Still, it left me wanting more.
At some point in the tutorial, I think you should discuss subclasses.
Suggestion:
- Ruby can tell you what class an object is.
+ Ruby can tell you about the class of an object.
Typo:
- How would you explain the difference between 12, '12' and 12.0 to a
younger sibbling?
+ How would you explain the difference between 12, '12' and 12.0 to a
younger sibling?
More later,
- Jim -