# Can Bob From 'Stranger Things' Really Code Or Nah

Lance McDonald is an Australian video game developer with a particular passion for coding in BASIC. He made an entire video game, Black Annnex, in almost pure QBASIC.

So it's safe to say he knows his stuff. But the real question here is - does Bob from Stranger Things? In that episode, in that scene - just how legit was it? Lance knows.

This article has been retimed to coincide with the third season of Stranger Things this week.

And what spurred on this critique/worship?

"I was just annoyed at how many people are like 'THIS IS THE DUMBEST SCENE IN STRANGER THINGS YOU CANT RESET A BREAKER WITH BASIC CODE' like as if this was some CSI; Cyber level shit," Lance told me.

"He's just writing a brute force password retriever on an interpreter that would be on EVERY computer in that era that he probably sold the company and already knew how to use like jeez it's a good scene."

If you're keen to hear more of Lance's retro tech insights, you might want to check out his YouTube channel here.

I gotta say, I kinda cringed when he was all like, "I know basic, I got this". I dunno why. I think it felt kind of contrived. I think I've been cringing at hacking scenes since swordfish.

...since Swordfish? Not Hackers? Lets all re-watch Hackers. Why does that guy arrive on a skateboard? Because....Hackers.

Maybe because it sounded like the infamous "It's a UNIX system, I know this!" line from Jurassic Park.

Not all super heroes wear capes

Forget the spoiler warnings, this article needed a trigger warning! I'm not ready to re-live it yet...

Bob the Brave. A true superhero.

So explain to me how an integer is the right variable type when you want to check a passcode for 0312 which is clearly a string. certainly the return value is a string.

Its all numbers. if there was a letter thrown in it would be a string.

"0312" is a string 0312 integer would be 312

is a string.

Not that I watch Stranger Things nor know BASIC too well, but looking at the screenshot he sets a FOR loop for each letter i, j, k & l from 0 to 9. Wouldn't this mean you've got an integer in each variable which, when he puts them together is still an integer no?

Gotta assume this scenario gets caught by internal policy and the mysterious getFourDigits.

Since Bob's code ran, we can assume that getFourDigits returns an integer, and that checkPasswordMatch takes an integer parameter. Considering this API, for all intents and purposes the system would consider 0312 and 312 the same. That said, using four for-loops to brute force a single numeric password is wasteful when he could have just used a single loop iterating 0..9999 instead. In fact, he wouldn't have needed to use getFourDigits at all unless it had odd semantics like shifting (which is unlikely).

Of course, it's a TV show. Even though they got the code correct (and kudos for that!) they still had to make it look good on screen. Longer, more indented code is more visually interesting. The program could have been written like below instead, but 6 lines, most of which are only 4-5 characters long, is much less interesting. Underscores for indentation:

10 FOR i = 0 TO 9999
20 __IF checkPasswordMatch(i) = TRUE THEN
30 ____PRINT i
40 ____END
50 __END IF
60 NEXT i

Best of all... if you look closley you see the code goes off the edfge of the screen and overlaps the monitor bezel. Ooops ;P