Stranger Things Bob's Basic Program

Stranger Things And Bob Coding BASIC

My daughter called out to me from our family room, “hey Dad, you have to see this scene from Stranger Things”! There is a character named Bob Newby, played by Sean Astin, telling another character that to hack into the system you need to know BASIC.  

BASIC is earlier programming language that many of us learned in school and used to code some early computing systems.  I thought it would be fun to break down that scene and use it as a little ‘teaching moment’ as it actually is a pretty legitimate body of code.

What is Stranger Things?

If you don’t know about Stranger Things which is on Netflix and you are a kid that grew up during the 1980’s, you really do need to watch it.  It is like a combination of the Goonies, which starred Sean Astin (pictured here, first on left), and the X-Files which was a science fiction/fantasy show in the 1990’s.  All throughout the show are references to 80’s culture.  So if you are a kid of 80’s or like 80’s culture, it is a fun show to watch (or binge watch) on Netflix.

Goonies
Goonies (1985) - Warner Bros & Amblin Entertainment

BASIC Programming Fact or Fiction

In this scene from Stranger Things, season 2: “The Mind Flayer”, Bob, a fellow who knows computing systems, gets on an IBM computer to attempt to get into the system that controls the security to unlock doors in the facility they are located.  So he boots up (geek speak for ‘turning on’) the computer and begins to work in a version of BASIC  (an early programming language) that was available on IBM computers.  

Enter “hero-nerd”…YES!   He runs the code, unlocks the doors, and they move on to the next challenge!

There is still something to be said about the black background, green colored text, and a flashing cursor on the display monitor.  It just gives me a warm and fuzzy feeling.  It is the world I grew up learning about computers.  

BASIC (see my earlier post) is a top down style of programming and in this example it shows a great simple example of a BASIC program.  

Lets get started…

(1) You can see each line is numbered such that it steps through them in order unless another command comes along like a….

(2) GOTO which you see on line 80.  

(3) Next is how he used INDENTATION.  INDENTING in BASIC is not needed but it organizes the code so you can understand what section matches up with another section of code.  

(4) Starting on line 20, Bob starts using a FOR loop.  It is the first of 4, FOR loops. Loops allow you to repeat whatever lines of code it contains between the command FOR and its corresponding NEXT  as many times as you tell it.  Each loop contains another FOR loop and this is called ‘nesting’.  Sounds confusing reading it here….exactly….which is why you indent your code.

Stranger Things & BASIC
Bob's code on the screen

When I was learning to code, we would need to print out these program listings, roll them out on the floor and trace our loops with a pen or marker to ensure we enclosed everything correctly.  Indenting it allowed for you to spot these problems and keep your logic in order.  Otherwise if you didn’t, odds are your code would break or not do what you expected.  Fun stuff.

Is it missing something? getFourDigits?

There are a few things, and really only a few, that has me and a few other long time software programmers on the internet scratching our heads.  There is what appears to be a function called getFourDigits.  

Functions are small bodies of code written to handle a specific task.  More importantly, you give it something, and it gives you something back.  Think of your favorite weather app on your tablet or smartphone.   You give it a zip code and it gives you back the weather for that zip code.  

In this getFourDigits function, which must be part of a bigger computing system, it gets values stored in the variables named I,J,K,L  These are values created by the 4 FOR loops.  Kinda cool.

The other odd thing is the letter that appears after each NEXT which close the FOR loops.  Maybe this is part of the system, but you wouldn’t necessarily do that.  You would just leave it with the word NEXT…no letter.  Last thing, inside the FOR I loop, there is an IF statement CHECKPASSWORDMATCH and a boolean value of TRUE.  

This too may be part of a larger system.  No worries, it doesn’t need to be introduced anywhere.

I Love This Example - Here is why...

The notion of coding is growing across the country albeit we need to get it moving faster.  This is one of those times where pop culture crosses into the real world and quite frankly, they did a great job of it.  Unlike many professions today, software programming really doesn’t have a ‘face’ to it.  

We all know what a fireman, nurse, doctor, and construction worker are but it is much more vague when it comes to information technology.  Seeing it like this in Stranger Things, which has a growing following, is a small way to get people interested in coding.  

Heck, if it weren’t for Star Wars in 1977 and two droids moving through laser beams while on board a spaceship during the opening scenes, I may not have ever caught the science fiction bug which lead me to learning about computers and writing computer code!!!  

Thank you George Lucas (creator of Star Wars) and May the Force Be with You!!

If you like what I covered here and know of others who might be interested….PLEASE SHARE THIS.

Enjoy the show and the coding goodness!!
GetMeCoding.com Mr Fred

Start Coding Today In 5 Minutes!

GetMeCoding Learn to Code

Take 5 minutes and try a FREE coding activity!

Let Me Help You

GetMeCoding Mentoring

If you are a teacher or someone looking to help others learn to code, let me help you.

3 thoughts on “Stranger Things And Bob Coding BASIC”

  1. Since the combination is meant to be an integer variable, it would make sense to loop from 0 to 9999 and not use a separate function to re-assemble the digits into a single number. Bob likes to program like he likes to talk: Too much. 🙂 Also, function calls are rather costly in basic, as are extra loop structures. On a 4mhz machine (if he was lucky enough to have one at his disposal) this still would have taken a few minutes to finish. That plus the extra time to type unnecessary code means you’re a demodog snack.

    1. Great observation Brendan! I think it is a lot of fun to look at these examples from all angles. Thanks for posting.

  2. Pingback: Music and Programming: A Talk With Dave Recchione - Get Me Coding

Comments are closed.

Scroll to Top

it only takes

5 Minutes and 22 Seconds

Skip to content