Join Newsletter


Share with:

Recent Posts

September 2009

A good area to spend some time for someone new to Ruby is to understand about objects. This serves as a basic wrap-around over view of what you need to know to get going.

First off remember to use the .class method on any object too (in your IRB, for example), giving you its class name. If you’re playing along here, that’ll help.

You will need to know what object orientation is in programming for this to make sense, and I hope it is geared to people coming from an object orientation learned in a different environment.

Everything in Ruby is an object. Even true and false have their own objects. Occasionally operators (like << and ||) are language contructs, but that's really insignificant for the purpose of this lessen. When we say nearly everything in Ruby we mean everything you think is an object and then some. Other languages have what are called primitives -- numbers, integers or floats; strings; booleans, etc. These things are see by the compiler and treated as what they are. But in Ruby all the primitives are objects too: numbers, strings, even boolean operators have their own classes. So, you can do things like ask an object if it is a nil object. Since it is used to return a negative meaning to an operation or a non-result, it's a good way to catch edge cases. False and nil are trip-ups for programmers coming from other languages where because false does not evaluate to 0 and true doesn't eval to 1.

Symbols used in CSS symbolnamewhat fornotes .dot (period)denotes class value #pounddenotes id value *staruniversal selector spacedescendant selector ,commagroup selector :colonused for pseudo-classesonly :hover and :active are supported by older IE versions; different pseudo-class support based on browser > greater thanchild selectornot supported by IE6 & earlier +plusadjacent selector CSS3 only [ ]bracketsattribute selector CSS3 only ...

Read More

Two more presentations from TechCrunch worth mentioning. The first, a interesting gift-card auction site that aims to expand retailers market for gift cards. RackUp is an EBay-like site where shoppers can bid on gift cards. The people who bid soonest (unlike ebay) and the most...

Read More

One wonders just how far outside the echo chamber that is Silicon Valley a conference full of fanciful startups will matter. Yes, Tech Crunch, now in its third year, provides a media pulpit from which countless mostly-unknown tech industry startups launch their hot new idea....

Read More