The Unbearable Awesomeness Of Being

Thursday, May 31, 2007

A Ruby Quirk

# $ denotes global variables in Ruby.

def function()
$number += 1;
$number += 2;
$number += 3;
return 4;

$number = 0;
$number += function();

Problem: What is in $number at the end of this code?

Answer (select to see): 4. the command at the end unfolds to '$number = $number + function()', then '$number = 0 + function()' before it executes function().

Sunday, May 20, 2007

Yes, 'Lost' Is A Repeat Offender

Cultural References that Movies, TV Shows and Videogames Are Not Allowed To Make Until 2050
(Seriously Give It Some Rest Already)

  • Alice In Wonderland - Includes white rabbits, holes with magical lands inside, disappearing cats and mad hatters.
  • Chess - Yes chess is a metaphor for life/war/love we know it. Double-verboten if the villain plays it and holds up pieces meaningfully while diatribing.
  • Judeo-Christian nomenclature and imagery - Includes naming characters Zachary, Jacob, Abraham, Moses and whatever. Also calling your giant space laser the Tetragrammaton is a no-no.
  • Greek-Roman mythology - Is kind of losing proeminence these days. Mostly because real world corporations already love to use this stuff, but haven't gone yet all the way and made a real Hades Corporation. (edit: I was wrong)
  • Alice Through the Looking Glass - Includes any form of going through mirrors. Cumulative with 'Chess' above. Seriously, there are other books.

Thursday, May 10, 2007

Wish You Were Here