O'Reilly logo

Sams Teach Yourself Ruby in 21 Days by Mark Slagell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

What to Name Things

Naming guidelines have occasioned much argument, pontificating, and browbeating, but here are three simple and intuitive principles that might save you some grief.

1.
Though you see them in examples, never use names like foo or Qaz in a real program. Those are meaningless words (called “metasyntactic variables”) commonly used in language instruction so that the form of a thing can be shown without bringing attention to specific content. When you're doing real work, the content matters, and the variable and method names should reflect it.

Note

An authoritative list of metasyntactic variables is found in the Jargon File, which any search engine can find all over the Web. It's good reading, full of insight, history, fun, and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required