Saturday, January 14, 2006 5:52 AM szurgot

Testing Trivia: When Science fiction creeps into your code

Has any one else ever:

  1. Tested for 2 + 2, an expected to get back 3.99997 or the like (or hoped not to)?
  2. Put in Assert.AreEqual(2+2, 5); as a failure placeholder?

What sci-fi books are those two from?

Update: As noted in the comments #2 was from 1984. #1 was from The Number of the Beast by Robert A. Heinlein (When trying to make sure the ship works, they test 2 +2, to make sure it equals 4)

Filed under:

Comments

# re: Testing Trivia: When Science fiction creeps into your code

Saturday, January 14, 2006 8:09 PM by Scott Mitchell

The dystopian novel 1984 had a line like that, no, about how people would believe 2+2=5 if Big Brother said so? Although I don't know if I'd call 1984 a science fiction book, so perhaps there's some other title you're thinking of...

# re: Testing Trivia: When Science fiction creeps into your code

Saturday, January 14, 2006 11:34 PM by Chris Szurgot

1984 is what I was thinking of. The line is probably somewhat blurry as to it's status as a Science Fiction book now, but it certainly held that distinction when I was younger, and considering it was written in 1948, I certainly think it would qualify.

# re: Testing Trivia: When Science fiction creeps into your code

Saturday, January 14, 2006 11:46 PM by Chris Szurgot

http://www.scifi.com/scifiwire/index.php?category=1&id=34162

"George Orwell's classic dystopian SF novel 1984." If it's good enough for the SciFi channel, it's good enough for me.

Seriously, though, just because it seems outdated today, doesn't mean it's not SF.