Dec. 5th, 2008

Games such as chess, backgammon, Risk, and Connect Four have featured prominently in Lost; one game conspicuous by its absence is Tetris.

Consider:

* Tetris is played with 7 tetrominoes, which look like the letters I, J, L, S, T, N, and O. Together these spell "LOST" and "JIN", the name of a main character.

* Pressing the space bar mysteriously causes a Tetris piece to drop. On Lost, the DARMA organization mysteriously drops food supplies on the Island.

* The game of Tetris is played on a two dimensional plane; the show Lost began with a plane crash.

* At the end of Lost season two, the sky changed color when Desmond turned the fail safe key. In many implementations of tetris, the screen changes color upon completing a level.

* In Lost, one of the purposes of the DARMA initiative was to explore paranormal brain activity. According to research done by Dr. Michael Crane and Dr. Richard Haier, "prolonged Tetris activity can also lead to more efficient brain activity during play."

* Every tetris piece is made of four squares; 4 is of course the first of the Lost Numbers.

* The predominant action in Tetris is rotating a piece by 90 degrees; at the end of Lost season 4, Ben rotates the frozen donkey wheel by approximately 90 degrees.

I could go on, but I wouldn't want to spoil your fun. Or your dinner. Or your dinner's fun.
To do a case insensitive sort in Python, one is often advised (by the Sorting mini-HOWTO, for example) to write something like

array.sort(key=str.lower)

However, it is actually better to write something like

array.sort(key=lambda s:s.lower())

because that will work for both normal and unicode strings. (Or indeed, for any wacky and crazy custom string class that you yourself dream up, as long as said class supplies a reasonable .lower() method).

This improvement was devised by [livejournal.com profile] fairdice, who accompanied it with the snarky comment, "I never thought I'd see the day where *I* suggested using a lambda expression to *Thomas*."

Profile

thomascolthurst

February 2011

S M T W T F S
  12345
6789101112
13141516 1718 19
20212223242526
2728     

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 14th, 2025 09:24 am
Powered by Dreamwidth Studios