Reading Project

By Jessica Pressman, Mark C Marino and Jeremy Douglass



Reading Project

Annotation -- Source Code -- killInterval

killInterval = setInterval(killSubliminal, subliminalMilliseconds);


From Reading Project

Like mainInterval, killInterval begins a loop that calls the function killSubliminal at an interval of subliminalMilliseconds, which is 0.017 seconds. At one point “kill” was a term that, in Unix and other languages, indicated the termination of a process. In this case, rather than ending a process, it begins another process that will kill the subliminal word by replacing it with the next word in the story. So that first call to mainInterval has essentially started two subroutines—one updating the spam words, and the other updating the story words. But the spam words are updated first. Meanwhile, the call to update the story, which kills the subliminal words by erasing them from the display, is subordinated, technically speaking. Since the call to update the story words happens on a shorter interval, the erasure of the spam word it replaces happens much faster. This is what accounts for the flickering of the spam words.
(Reading Project, 127)

Contents of this annotation:

This page has paths: