?

Log in

Star Trek - Sex and Sums and a Controlled Dose of Rock and Roll [entries|archive|friends|userinfo]
Richard Clegg

[ website | Castle Gormenghast ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Star Trek [Aug. 20th, 2011|07:24 pm]
Richard Clegg
Geeky I know but I've been rewatching Star Trek:TNG. This sort of thing happens loads:

"Computer, where is Lieutenant Spurious?"
"Lieutenant Spurious is not on the ship."
"Computer, how did Lieutenant Spurious leave the ship?"
"Unknown."

Seriously engineering dept, this is easy to fix.

while(true):
    for (person: ship.peopleMeantToBeHere()):
        if (person.getLocation == UNKNOWN):
            soundLoudAlarm()
        if (!person.onShip() && person.methodOfLeaving() == UNKNOWN):
            soundLoudAlarm()
        if (person.identity() == UNKNOWN):
            soundLoudAlarm()
        #Add more checks here to fix issues as they occur
    sleep(1000)


(Probably want to change that predefined UNKNOWN when moving from dev to production code).
link