1. Computing & Technology

Control Structures

Often ignored or only glossed over, control structures and loops are very important to master. While they're very straightforward in languages such as C, there are several subtleties to understand before you can really leverage the conditional and loop statements in Ruby.

Learning Control Structures
Ruby Spotlight10

Worked Example: Number Guessing Game

Monday April 30, 2012

If you were like me, your eyes would just glaze over when reading programming books.  "OK," you'd say, "but how is that useful?"  This article is the first in a series of "worked examples," articles that feature working example programs and explain the Ruby features that make it tick.  It starts off simple, with a number guessing game (that I'm sure many if you have already written if you've learned other programming languages).

Weak References

Tuesday April 24, 2012

Imagine you want to keep tabs on an object, but that object takes a lot of memory.  If you were to save a reference to that object, the garbage collector cannot deallocate that memory.  The WeakRef class allows you to use weak references to watch objects without actually keeping references to them.  This is not without caveats though.

What is Ruby?

Friday April 20, 2012

Are you new to Ruby?  Or even new to programming in general?  This article tries to answer this question as simply as possible, in plain english and without buzzwords.

Getting Information About a File in Ruby Using File::Stat

Thursday April 12, 2012

How large is a file?  When was it last modified?  These are types of things that can't be (or are difficult to be) answered by querying a File object.  However, the File::Stat class can be used to gather such information, as well as a variety of other statistics.

Discuss in my forum

©2012 About.com. All rights reserved.

A part of The New York Times Company.