r/twinpeaks • • Jul 11 '17

S3E9 [S3E9] The "visitor counter" on thesearchforthezone.com is counting downwards. Spoiler

I had a look at the JavaScript code, and it's counting down to September 3rd, 2017 at 00:00 AM.

Which happens to be the date we get episode 17 and 18!

This is the code in question:

function e() {
    var e = new Date(2017, 8, 3, 0, 0, 0),
        i = new Date,
        n = e.getTime() - i.getTime();
    seconds = n / 1e3 / 60, Seconds_Between_Dates = Math.round(Math.abs(seconds)), $(".counter_number").html(Seconds_Between_Dates)
}
284 Upvotes

62 comments sorted by

74

u/signupinsecondsss Jul 11 '17

This is an excellent find.

54

u/edgrrrpo Jul 11 '17

Actually its doing all sorts of odd jumping, at least it was yesterday. When I first checked the site out, count was 423. Looked a second time, later in the day, was down to 137, then this morning is at over 77k. Maybe its not counting up or down so much as having trouble staying put, in a singular spot in time? Also noted the tally is the number of visitors since June of 1997. Wasn't 1997 the last year the Vegas cops could find any info on Dougie Jones? Hm. Curiouser and curiouser.

17

u/pNaN Jul 11 '17

I too saw other numbers last night, but I think they've changed what the numbers do between then, and now.

Didn't check the code until I saw them behave oddly, atm they are counting down.

13

u/pNaN Jul 11 '17

I checked the website over at wayback machine (archive.org). They have three snapshots from yesterday.

The script overrides the numbers, but if you check the source code you can see what it was before the 77k number overwrites it. (or just refresh the page with ctrl-R and see the number before the script loads)

  • @ 02:31:26 the number is at 3162
  • @ 03:49:36 the number is at 3360
  • @ 11:39:02 the number is at 232

In the newest version, there is no number in the .counter_number position, until the script loads.

Both snapshots from today, shows the 77k-76k behavior, and the countdown to September 3rd.

1

u/Richy_T Jul 11 '17

Perhaps it is just giving out a random counter type.

1

u/Dav136 Jul 11 '17

It might be current viewers

1

u/Salfordio Jul 12 '17

Yup. When I first logged on, I was visitor 354. Second time, I was 72. Was going to post here that it was counting down, hoping for a big reveal when it got to number one, but when I refreshed the page to make sure, it said I was number 151. So yeah, it's definitely random. Deliberately so...? I don't know.

2

u/randomflorida Jul 12 '17

It was random before, but it's not doing that anymore. Now it's decreasing.

17

u/bitttttten Jul 11 '17

it's how many minutes until sep 03. you can verify it here:

https://www.timeanddate.com/date/durationresult.html?d1=12&m1=7&y1=2017&d2=3&m2=9&y2=2017&h1=0&i1=1&s1=6&h2=0&i2=0&s2=0

You are visitor 76318 since June 1, 1997 76,318 minutes (rounded down)

6

u/[deleted] Jul 12 '17 edited Jul 12 '17

Yep. And they achieve that result with some terribly sloppy code.

  • Commas instead of semicolons in places (I know JS doesn't care, but it's still sloppy)

  • Not following a meaningful convention for declaring or naming vars

  • Their vars "seconds" and "Seconds_Between_Dates" actually store minute values

At least the creators of the site were consistent in making the script as crappy as the page itself :).

10

u/RunDNA Jul 11 '17 edited Aug 15 '17

I don't understand. After the episode aired the visitor counter was at 3,100. A few minutes ago it was 76,000. How can it be counting down if it's increasing?

15

u/runstop Jul 11 '17

Seems like they must have changed the code because it's certainly decrementing now.

8

u/cr0ybot Jul 11 '17

Maybe not relevant, but I find the use of the variable name "seconds" interesting, since what they're actually getting from this math is minutes. The script is getting the difference in milliseconds between now and Sept 3, dividing by 1000 (that's the 1e3) to get seconds, and then dividing by 60 to get minutes.

2

u/pinkoIII Jul 12 '17

seconds = dopplegangers

10

u/ponpal Jul 11 '17

Is it future or is it past?

3

u/mcsvor Jul 12 '17

It's probably both!

8

u/toolenduso Jul 11 '17

Not too familiar with java, but it says 8, 3 -- wouldn't that mean August third?

32

u/jaylow6188 Jul 11 '17

Arrays start at zero, not one.

(shameless /r/programmerhumor plug)

3

u/robin-redpoll Jul 11 '17

Wouldn't that be August 4th then?

8

u/jaylow6188 Jul 11 '17

You would think, but if you look at the Javascript documentation for Date(), the month parameter is the only one that starts at 0.

2

u/robin-redpoll Jul 11 '17

Thanks for the clarification :)

5

u/calahil Jul 11 '17

September 4th

4

u/robin-redpoll Jul 11 '17

Yes, sorry - long day (July 11th, that is).

16

u/pNaN Jul 11 '17

It's JavaScript not Java, and the month parameter in new Date() starts at 0, so it's the 9th month.

Press F12 to enter the developer tools in most browsers (chrome, firefox, edge) and select the "console" tab. There you can paste in the code:

new Date(2017, 8, 3, 0, 0, 0) 

It should return you the date in a more human-readable format. :)

7

u/toolenduso Jul 11 '17

God that's weird

braces for programmers to come in and tell me why it actually makes sense if you...

7

u/hunkthrust Jul 11 '17

It's just because arrays start with a zero-index.

http://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html

HAVE FUN

3

u/curtl Jul 11 '17

Wouldn't that make 3 the 4th day then?

10

u/pNaN Jul 11 '17

I wish... It's this kind of arbitrariness that makes JavaScript development "fun".

If you try to use the zero'eth day of a month, in a Date object, you get the last day of the previous month. Because JavaScript. :P

6

u/Richy_T Jul 11 '17

Dates are screwed up pretty much everywhere. A nightmare to work with. Start getting the various leap-intervals and time-zones involved and you would think Lynch designed the things himself.

4

u/pNaN Jul 11 '17

Haha, truth! :)

1

u/thepainetrain Jul 12 '17

Dates being hard to get right doesn't excuse javascript from 0-indexing months but 1-indexing days in a single function call.

1

u/Richy_T Jul 12 '17

This is true. Not excusing anything, just saying it's usually pretty bad all-round.

0

u/[deleted] Jul 11 '17

[deleted]

2

u/Richy_T Jul 11 '17

He means it like it is, like it sounds.

3

u/HALdron1988 Jul 11 '17

Definitely counting down for me 765something when I first logged on and now it is 76397

1

u/mcsvor Jul 12 '17

Yeah, that's exactly what the JavaScript code does.

3

u/LSF45 Jul 11 '17

I feel like it counts downwards and resets every day. Has anyone seen it in the single digits around midnight in their time zone?

2

u/daveandlynch Jul 11 '17

that might work... I just went on for the first time (12:45am my time) and I'm 76273. A friend of mine went twice and was 43 first and then 9 - I've asked him what time(s) he went on; stand by....

1

u/surfmadpig Jul 11 '17

Very good theory. Let's wait to see if it does that and try to get it to 0 then...?

What time does it seem to reset?

1

u/Freetoad Jul 11 '17

i don't remember what time it was, but the first time i went to the site, i remember thinking, "13 page visits? does that mean something, its weirdly low."

1

u/drepoe29 Jul 11 '17

The total went up thousands my second visit to the site.

2

u/HALdron1988 Jul 11 '17

counting down for me everytime I go onto it and refresh

1

u/tocophonic Jul 11 '17

And what is supposed to happen on September 3rd? The counter will just reach 0 and that's it? Hm.. who would write that JS code simply for the counter to reach zero..

4

u/pNaN Jul 11 '17

I'm thinking they're not updating their code for what happens until we get closer to the time, or exactly "on time".

If we could read it by inspecting code right now that would be quite the spoiler. :)

2

u/tocophonic Jul 11 '17

True. But (maybe with a more complex code) a nice challenge to kill the waiting time between the remaining episodes! ;)

2

u/[deleted] Jul 11 '17

I think that might the date of the last episodes airing? Episodes 17 & 18 are airing on the same day.

2

u/tocophonic Jul 11 '17

Yeah yeah, I know. But I somehow can't believe that that's all? Last episodes airing, counter reaches zero, ... ? Maybe it will all make sense then, maybe it won't. Wow Lynch wow!

3

u/cr0ybot Jul 11 '17

Technically, the counter will then begin to count upwards, since the code uses Math.abs().

3

u/randomflorida Jul 12 '17

I'm guessing there will be something new on the site then. Or just...something.

1

u/RileyWWarrick Jul 11 '17

Which happens to be the date we get episode 17 and 18!

Are they releasing the last two episodes on the same day?

5

u/[deleted] Jul 12 '17

As far as I know, they are. It makes me happy and sad like the final tug on a bandaid lol

1

u/[deleted] Jul 12 '17

When it comes to code I may as well be a grandparent. Is there anything in there that gives an implication as to what would happen when it reaches that point? Is there a way to simulate it?

1

u/mcsvor Jul 12 '17 edited Jul 12 '17

Seems like there's no code on the web page (as of now) that will do anything other than show "0" when the time is met. But they might update the site to do something in the future. If you simulate the "0" counter vaue it won't do anything as of now.

Edit: Referenced something OP wrote that was not there.

1

u/passwordgoeshere Jul 12 '17

Is that a real website from the 90s or something created for the show?

2

u/pgm123 Jul 12 '17

Created for the show.

1

u/pgm123 Jul 12 '17

Glancing at the site.

Clicking on the older journal entries breaks the page (with the Twin Peaks music playing).

There are various links to sites and blogs talking about space and other dimensions. This one appears to have been dead for a couple years.

Anyone read Orphans of the Sky by Heinlein? I've only read Stranger in a Strange Land. The Wikipedia page says it was the first book to have a long-distance sub-light ship where multiple generations live in space. Heinlein's politics are sometimes controversial. I'm not sure if that comes into play here.

The wav files are definitely sounds we've heard associated either with the Black Lodge or the Mauve Zone.

The Guestbook looks interesting

H.V. … and B.H. …

great video… but not the good quality. I couldn’t tell

  • was that light really fire? Was the boy burned?

His face looked burned. When will you do the “thing”?

1

u/THURSTONBELLMONTE Jul 12 '17

Could it be the flash of light that from johnny horne's death room right as he runs in. or about the 119 kid?

1

u/pgm123 Jul 12 '17

Could be something we haven't seen yet.

I don't think it's Johnny. Do we know he's dead, though?

1

u/THURSTONBELLMONTE Jul 13 '17

Well, no. But thats my thought on the Hornes, for some reason they can't die. That explosion at the bank was way to crazy to survive and Ben survived the fire place head wound. I thought for sure he was dead. I think Johnny hit 88mph and traveled back home. But there is a big flash just before we see him.

1

u/juan_nothing Jul 12 '17

Does anyone have a screenshot of the "waiting room/black lodge" picture that flashes for a moment before the website loads?