Solving LOST

Over the past few weeks, I got deeply into the television series LOST. Prior to this, I had only heard people talking about the show and how hard it is to stop watching. So, with the final episode coming May 23, 2010 I decided to start from the beginning and see what all the hype was about. As expected I could not stop watching episode after episode in the first season, but something seemed less interesting when I got into the second season. Particularly, the whole bit about having to continuously enter this sequence of numbers to reset a timer which had something to do with correcting an electromagnetic field experiment that went bad. This did not make me stop watching the series and maybe something changes in future episodes, but I was thinking about how could a person program this action to continuously happen over time so a person would not have to keep entering it manually. I did this mostly for fun but here is a small code snippet in pseudo-code/JAVA syntax.

int index = 0;
//sets value of the start time of 2mins or a count of 120
FINAL int START_TIME = 120;
// sets the minimum number
FINAL int MIN = 10;

private void lostCycle(){
while (index < START_TIME){
// decrement 120,199,198, etc
START_TIME = START_TIME--;
// Sets a reset for when lostCycle reaches the MIN value START_TIME gets original value.
if(START_TIME == MIN){
System.out.println(4);
System.out.println(8);
System.out.println(15);
System.out.println(16);
System.out.println(23);
System.out.println(42);
START_TIME = 120;
}
//method calls itself to repeat infinitely
lostCycle();
}
}

Comments

  1. Chris says:

    Would a decrement function such as START_TIME– work in equivalence to seconds though?

    In as3 a loop/while like this would be carried out much faster then the delay your looking for. Thread.sleep(6470000) would give you the delay your looking for it seems (since the Lost timer is 108 minutes, sleep is expressed in milliseconds, thus putting the delay at 107 minutes and 50 seconds)

  2. matt says:

    yeah, good thought. I was mostly trying to think of how something could pan out.(My Java and logic is probably really off though) hah. I think I might try and write the actual program using BlueJ.

  3. Chris says:

    It’s definitly the right logic, as it would do what you want it to. I think the only issue is the time span that it gets played out in since normal increments in programming aren’t coresponding with normal increments of time. Definitly try it out, it would be interesting to see what it turns into.

Most Recent Project

Recent Project - Catherine Collautt, PH.D.

View All Projects »

Most Recent Note

Digesting Web Content

This past week I read an article in the latest issue of WIRED magazine. The article was entitled Chaos Theory by author Nicholas Carr. His main argument in the article is basically that the internet is changing the way we read , focus on and analyze writing. In fact he provides recent studies that show that the [...]

View All Notes »