Forgot your password?
typodupeerror
Movies It's funny.  Laugh. Programming

Programmer Debunks Source Code Shown In Movies and TV Shows 301

Posted by timothy
from the movie-mistakes-of-a-particular-kind dept.
rjmarvin writes "Someone is finally pausing TV shows and movies to figure out if the code shown on screen is accurate or not. British programmer and writer John Graham-Cumming started taking screenshots of source code from movies such as Elysium, Swordfish and Doctor Who, and when it became popular turned the concept into a blog. Source Code in TV and Films posts a new screenshot daily, proving that, for example, Tony Stark's first Iron Man suit was running code from a 1998 programmable Lego brick."
This discussion has been archived. No new comments can be posted.

Programmer Debunks Source Code Shown In Movies and TV Shows

Comments Filter:
  • common and fun (Score:5, Interesting)

    by Speare (84249) on Tuesday January 14, 2014 @10:33AM (#45950567) Homepage Journal

    Doesn't everyone who can proram do this? Just like gun fans identify and count shots for each weapon they see?

    From the (mistaken? wise?) use of a .300 in an IPv4 address in The Net, to the identification of some kind of 6502 assembly code in the Terminator's red overlay, it's always been something to try to do in the theater without freeze-frame available.

    • Re:common and fun (Score:5, Informative)

      by TooTechy (191509) on Tuesday January 14, 2014 @10:41AM (#45950651)

      Watching 'Castle' the other night. Enjoying it for the accurate, serious show that it is. Beckett indicated the entry wound was too big for a 9mm round. Had to be something bigger. They later found a .357 which was the right size.

      25.4*.357 = 9.07mm She has a good eye. Actually she has great looking eyes.

      • by i.r.id10t (595143)

        Which is funny, 'cause when you are reloading w/ lead bullets (non-jacketed, maybe even made yourself in a mold) you size a bullet for 9mm to .355 and for 357 you size it to .358. And .380 is the same diameter as 9mm (its "european" name is 9x17 vs 9x19 for 9mm Parabellum) and 38 special is the same diameter as .357 magnum (only difference is .1" of case length which is why you can shoot 38 special in a 357 revolver)

        • by Grishnakh (216268)

          .38 Special and .357 Magnum use the exact same bullets; the .357 is simply a lengthened version of the the .38 Special round, with that additional space being used to hold a lot more powder. The difference in numbers comes from a change in the way bullets were measured. In the really old days, when the .38 Special was made, they measured the gun's barrel between the grooves of the rifling (the maximum diameter of the barrel, neglecting the lands), whereas when the .357 came out, they changed to measuring

          • .357 is simply a lengthened version of the the .38 Special round, with that additional space being used to hold a lot more powder.

            Many would think that, but the main reason is actually to make it not fit most revolvers made for .38 special. Elmer Keith loaded original .38 special to pressures and speeds that are very close to the .357 specs. So there's no shortage of case capacity, since it was originally a black poweder cartridge, you wouldn't expect there to be.

            How ever, Elmer Keith used the new N-frame S&W revolvers that could take the beating. It was feared that older revolvers would blow up regularly if people started loadin

      • by Megol (3135005)
        A .357 have more kinetic power and so causes a bigger hole. One doesn't even need to be hit by a bullet to be killed by it - high speed ammunition can tear tissue apart by the pressure differentials.
        • Re:common and fun (Score:5, Insightful)

          by rts008 (812749) on Tuesday January 14, 2014 @11:59AM (#45951545) Journal

          A .357 magnum may have a bigger exit wound under rare circumstances, but under similar conditions, the .357 magnum and 9mm will have essentially equal size entrance wound characteristics.

          One doesn't even need to be hit by a bullet to be killed by it - high speed ammunition can tear tissue apart by the pressure differentials.

          The only part of that statement that is even remotely true is the second part:
          yes, frequently high velocity projectiles do damage soft tissue from tearing and rupturing...but there are a lot of variables that affect this, so it cannot be ruled as absolute.(pro tip: the bullet has to hit the soft tissue before this can even be considered--all the bullets whizzing past cause no physical harm)

          But that statement that "One doesn't even need to be hit by a bullet to be killed by it -..." is so full of crap that it's ludicrous!
          I'll even give you the possibility that in extremely rare (so rare as to be unheard of for all practical purposes) that some few individuals have 'died from fright' from being shot at...but [citation needed].

          I have personally been shot three times:
          twice with 9mm ammunition (one pistol:Soviet made Makerov, and one sub-machine gun), and once with 7.62x39 ammo (AK-47--which has a MUCH higher velocity and kinetic energy than either 9mm or .357 hand guns).

          I can assure you that I am not a ghost/dead. And having witnessed hundreds of combat deaths, none happened from near misses but bullets!

          I think your highest priority at this stage should be to finally stop putting off that education you should have received as a child..it's for your own good, really.

        • by Grishnakh (216268)

          It causes a bigger exit wound. The entry would should be the same size, since the bullet is the same size until it actually hits something and starts to deform.

        • by malakai (136531)

          Grandparent was informative, but parent is correct. .357 has about 25-30% more velocity than a comparable grain 9mm ( 125g vs 124g).

          The other difference is .357 rounds don't need to feed smoothly into a chamber via a semi-auto mechanism ( I know that there _are_ .357 semi-autos but they are rarely seen outside of a gun show). Sitting in a barrel allows their bullet geometry to be pretty much anything and not jam. The physical design of the bullet can obviously play a large part in the characteristics of the

    • by gstoddart (321705)

      From the (mistaken? wise?) use of a .300 in an IPv4 address in The Net

      I count that as wise. If you put a real IP address, it would likely get a lot of traffic.

      Mostly, I've long since learned to go "la la la" when techno-babble happens -- either the movie is good, or it isn't, the specifics of what they show on the screen are irrelevant.

      Getting mired in the fact that it's actually just a scrolling Pascal program or a web-page is kind of pointless for me.

      Hell, the biggest piece of techno-babble that made me

    • When I read the title, I just started laughing. I have actually given a thought or two to capturing a screenshot to see what the hell the code meant. Just a thought, now and then, I've never taken it seriously enough to do it. If I had, I could have posted here, "Hey, Slashdot! The code in 'The Matrix' actually does mean something, almost, except, they screwed up right here and made it meaningless after all!" Or, whatever I actually found.

      Problem is, I'm not a programmer, and it would have taken me hou

    • If I recall correctly, I'm pretty sure "ASSHOLE" is a perfectly cromulent argument for the "FUCK YOU" opcode in 6502 assembly language.
      At least the way I coded.
      • by jeremyp (130771)

        All 6502 opcodes are three characters long e.g. LDA (load accumulator), ASL (arithmetic shift left). So the opcodes you are thinking of are the AHL and FKU opcodes.

    • I'm a programmer.

      The source code? Sometimes I might glance at the syntax to see if they just put COMPLETE gibberish in there or an actual well structured statement / for-loop / etc. But I've never bothered to see if it was trying to do anything cute or even close to what it should have been, or if the loop was infinite or whatever.

      For command-line stuff, I might look to see if it looks like a real command of just gibberish.

      What I DO tend to do is freeze-frame newspapers and stuff where the character is re

      • I like to see if they just copy/paste the same paragraph over and over or use the cliche lorem ipsum .... text.

        Or if they include H. Rackham's translation of the "Lorem ipsum" passage of Cicero's De finibus as an in-joke. (Latin dolorem ipsum means "pain itself".) I've done that myself when making a demo of a font renderer for an 8-bit computer platform [pineight.com]. From lipsum.com:

        But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of hu

    • some kind of 6502 assembly code in the Terminator's red overlay

      I knew a guy (Hi, Tom!) who identified the code as coming from the Apple ][ ROMs (which were 6502)
      He said he recognized some of the code comments.

    • Re:common and fun (Score:5, Interesting)

      by ledow (319597) on Tuesday January 14, 2014 @11:36AM (#45951283) Homepage

      Well, yes, but the point is that there's no need to do this.

      If you're making a film about cars, get someone who knows about cars to help produce/edit it, at least for glaring inaccuracies. If you're making a film about guns, the same. If you're making a film about computers, the same.

      To be honest, even the "555" phone number is enough to jolt me out of a movie I'm into - you instantly are reminded that it's fake things you are watching (which is not what a film director should be doing to their captivated audience).

      I've always had this annoyance, too. I have it about computer movies, mathematics and science. A geneticist I live with has it about science and genetics in general (do not let her watch Gattaca or Jurassic Park!). My ex and her father (both black belts) have it about anything martial-arty. My dad (a mechanic) has it about cars and mechanics.

      I just don't see how hard it is to get someone who vaguely knows what they are doing to actually step back and say "hold on, that wouldn't happen". I don't expect perfection but at least if you're qualified enough to teach, say, a film star kung fu over a year of filming, have the decency to make sure that the moves you teach are realistic and there's no "queue of baddies waiting to be beaten up, because they're too stupid to attack simulatenously" elements. Same for computer graphics - SOMEONE with computer knowledge had to make them and display them, just ask them what it would look like if they REALLY did what the actors are being asked to do.

      Same for cars, guns, planes, stunts, etc. You have an expert on the movie, ask them if it's at all realistic and, if not, change it. Artistic licence is fine so long as you KNOW that's why you're doing it but too often directors go OUT OF THEIR WAY to make things "pretty" when actually the real thing would be a lot more realistic, useful, interesting, less jarring, etc. (e.g. who the hell uses text-based displays nowadays, and why do you need to "fake" loading screens or password decryptions or whatever - everyone KNOWS what a computer looks like and how display windows work).

      You don't get this in theatre, except by accident. You don't get it in novels, because the amount of detail required means you can hide all the potential pitfalls behind the line "He logged on..." or similar.

      You only get it in Hollywood, and you must only get it through directors who think they know what LOOKS better. While a certain percentage of the audience can't stop laughing at the ridiculous methods used, or just screen "NO! That's NOT how it works" at the screen.

      I don't get why annoying your audience is a good thing, at the expense of listening to the people you hired to be experts anyway.

    • by Xest (935314)

      "From the (mistaken? wise?) use of a .300 in an IPv4 address in The Net"

      I don't know how it works in the rest of the world but in the UK there are a bunch of telephone numbers reserved for TV/Movie use so that real numbers don't get called when people see it on screen.

      This is the same as with IP addresses, they don't want anyone harassing a real IP so they just make it up. Sure they could've used 127.0.0.1 instead but then geeks would've said "LOL SHE'S HACKING LOCALHOST" or whatever so they'd still get fla

  • by Anonymous Coward on Tuesday January 14, 2014 @10:37AM (#45950593)
    I think this was meant as a fun and interesting kind of thing, not as some kind of whistle-blowing on how "OH MY GOD TV ISN'T REEEEAAAAAL!" Lighten up.
    • by terevos (148651) on Tuesday January 14, 2014 @10:46AM (#45950715)

      No, they're responding appropriately to how the story was posted. The original article is supposed to be fun. But the post says "Programmer Debunks Source Code Shown In Movies and TV Shows" and "Someone is finally pausing TV shows and movies to figure out if the code shown on screen is accurate or not." as if it's something new.

      It's not new, but it is cool how deeply they investigated this stuff.

    • Its pretty redundant to even do. The medical decisions in movies make no sense, the car jacking makes no sense, the jumping through windows, computer hacking, alarm defeating and air duct crawling are all ridiculous too.

      Looking at the source code is barely even interesting on that scale.

  • by Bradmont (513167) on Tuesday January 14, 2014 @10:41AM (#45950667)
    So if the code is taken, used, and redistributed without acknowledgement, is that copyright abuse? I imagine tiny snippets would fall under fair use, but if a substantial block of code from, say, a GPLed project is reproduced without acknowledgement or attaching the license, what are the chances the filmmakers could be held liable?
    • by mark-t (151149)
      Fair use equally applies to copying from GPL projects as well. The GPL does not trump copyright law. If you wouldn't have needed permission to copy something from a non-GPL'd work (because it fell under fair use), you wouldn't need to include or adhere to the GPL license when copying the same amount from a GPL'd work, since you never a actually needed any permission to copy that amount in the first place.
  • Debunk? (Score:5, Informative)

    by JohnGrahamCumming (684871) * <slashdotNO@SPAMjgc.org> on Tuesday January 14, 2014 @10:48AM (#45950739) Homepage Journal

    Hmm. I am the person who created that Tumblr. I'm not trying to "debunk" anything. Just showing what it really is: sometimes it's nonsense, sometimes it's there's an amusing juxtaposition, sometimes it's a fun Easter Egg.

    • Found your site yesterday linked from Yahoo! Shared some of the things you found with friends, who also thought it was cool. Don't mind the people saying it's needless, as I found it really entertaining, especially where you identify commonly found code being presented, as in the Iron Man case or how it would actually be interpreted, as in the Malbolge from Elementary. It's a little educational but mostly fun, which is what it should be. I look forward to what else you and your subscribers find!

    • Re:Debunk? (Score:5, Funny)

      by Anonymous Coward on Tuesday January 14, 2014 @11:22AM (#45951141)

      Sorry, the Slashdot editor staff has decided you are debunking. Therefore you have been debunked.

    • It's one thing to pause, recognise and test the code. But I'm truly amazed that you manage to find the origins of those snippets, especially as some of them would have to be very hard to find.

      I'm very impressed. :)

  • by StripedCow (776465) on Tuesday January 14, 2014 @10:53AM (#45950807)

    But what if they used a special compiler that works roughly as follows:

    if(code == "insert code from programmable lego brick")
      return "insert binary for iron-man suit";
    else
      return compile_ansi_c_code_as_usual();

    • This sounds like a Ken Thompson "trusting trust" attack. Someone in that universe ought to have used David A. Wheeler's "diverse double compiling" construction [dwheeler.com] (bootstrap the compiler through several competing compilers and compare the binaries after self-compilation) to expose the compiler's publisher as untrustworthy. It'd be more believable if Mr. Stark's original prototype suit was jury-rigged from a LEGO kit, and the LEGO code was carried into further revisions.
  • I did not realize how huge this "Hollywood" scam went. Kudos to Graham-Cumming for uncovering it. In other news, many foreign language scenes appear not to be spoken correctly. E.g. http://www.youtube.com/watch?v=LhVg2uLVDtk [youtube.com]
    • by i.r.id10t (595143)

      Better example - skip ahead to 0:45s http://www.youtube.com/watch?v=MAYt6dpCgOI [youtube.com]

    • What I never really get is why an american movie, especially world war two movies, the original german spoken by the "germans" either has an american accent, or is simply completely wrong. I mean: how retarded is it in an "english spoken movie" to have "german sequences" and then have those be either "nonsense talk" or with an exagerated american accent?
      In a german movie where a few scenes are in the original language, e.g. a texas guy speaking to a scotch, they would take extra care that the texanian speak

      • by c0lo (1497653)

        In a german movie where a few scenes are in the original language, e.g. a texas guy speaking to a scotch, they would take extra care that the texanian speaks in a texas accent/dialect and the scotisch with a scotisch dialect.

        Gosh, how wrong this could be.
        1. texans would never speak to a scotch, even if it may happen to them to speak to a bourbon whisky
        2. there's no such thing as a scotisch dialect. At most, there could be a minor speach impediment (like in "a serious slur") caused by excess of schnaps (yeeahh... you may be onto something... Scotish may sound like that)

      • by rts008 (812749)

        *semi-serious joke ahead!*
        All you foreigners sound the same to us, in the USA.

        Really, we have dialect barriers to hurdle here in the USA, and now you want us to jump MORE hurdles?

        But all joking aside, I have noticed the same things you pointed out and always chalked it up to some combination of ignorance and/or arrogance.

        We assume that everyone in the world watches the same movies we do, but at the same time, we seem to forget the rest of the world is out there, and not culturally identical to us.

    • by Quirkz (1206400)

      I didn't follow the link, but I'm assuming French + taunts means Holy Grail. To me the real hilarity is whenever they speak to each other in French, they never understand each other. They're always saying "eh?" and "what?" back and forth.

  • They can't get computers to stop beeping, booping, and whirring. Text messages are transmitted one character at a time and show up that way. Every piece of information EVER is linked to one central easily searchable government database. And you're fucking looking at the source code that you're not supposed to read anyway?

  • Filmmakers should now add real obfuscated code to the computer screens that do or say something clever if someone sits down and tries to run it.

    (Just not this. [i.qkme.me])

    .
  • by doggo (34827) on Tuesday January 14, 2014 @11:21AM (#45951119) Homepage

    No wonder Stark Industries is so successful. If Tony can modify Lego code to control an armored flying suit, imagine what he could do with... I dunno, the source code for... Emacs!

    • by gaudior (113467) on Tuesday January 14, 2014 @11:46AM (#45951393) Homepage

      Yeah, he might even be able to edit text.

      • Re: (Score:2, Funny)

        by Anonymous Coward

        That joke is unbearably old. (I remember reading the exact same joke here on Slashdot a thousand times before. (It is not even accurate. (Emacs Lisp is a domain-specific language. (For text-editing operations. (Just because there are a million other features (in Emacs (and Emacs Lisp (not to mention hundreds (or thousands) of (sometimes good (sometimes not)) libraries (of Emacs Lisp code (to extend Emacs))))) does not mean that it cannot (by default (as in without any (Emacs) Lisp added (including the defau

  • The scene where Trinity is hacking into a power grid using nmap was actually accurate. Too bad the Matrix never had any sequels. [xkcd.com]
  • The matrix was one of the few movies to get it right. There's a scene where they are sabotaging a computer. The screen showed the output of a real rootkit.

    • by ledow (319597)

      It was nMap if I remember rightly, finding an open port, and then applying a rootkit to it. But it was something like 10 years old at the time of filming. Because of the "we don't know what year it is", you can sort-of get away with it, but how hard would it have been to just change the numbers, tweak the name, etc. to have it do the same thing, convincingly.

      Oh, and display it on a fecking WIMP-based system rather than a text console and it would look infinitely better, more modern and also not be quite s

      • by gl4ss (559668)

        you have to remember that the world in matrix is fake and as such the timegap doesn't even matter.

        watch matrix 1 again - the special effects seem perfect, because they portray a fake world!

        anyhow, the sploit used in the sequel got it quite a lot of nerd press back in the day... so using it was a good move.

  • Would they steal a car?
    Unlike people who download their movies, they are making money from theft.

    Or perhaps they finally figured out why copying isn't the same as stealing. :D

  • by rnturn (11092)

    One of the first times I noticed "realistic"-looking code/console output in a movie was the scene in Robocop when they first "boot" Murphy. (It looked like he/it was booting MS-DOS or CP/M.) But who in the world thinks that that code should be realistic? Nobody's going to consider walking out of a movie after saying "Hey! That doesn't look like robotic control source code!" So "debunk"? Geez get a life. (Of course shortly I'll be off to that web site to see what movie source code they're writing about today

  • On a related note... (Score:4, Informative)

    by Alioth (221270) <no@spam> on Tuesday January 14, 2014 @11:52AM (#45951453) Journal

    On a related note, many shows (including modern ones!) have been using a snippet of tape loading sound from the 1980s Sinclair ZX Spectrum computer which made its way onto some special effects library somewhere. The latest sighting (sounding?) was on an episode of The Wire a few years ago. With some effort (there's lots of other noise in the clip) it was decoded and turned out to be part of the loading screen for a game made by Ultimate: Play the Game (of Knight Lore and Jetpac fame). Ultimate became Rare before being bought out by Microsoft.

  • by netsavior (627338) on Tuesday January 14, 2014 @11:55AM (#45951485)
    The lego source code is completely believable in the context of the story IMO. This is a program he used to run the prototype that he built in a cave in a war-torn country. He probably told them "I need a robotics kit" and this was in the bin of crap that they got him. If I was secretly programming an exo-suit in a cave, a mindstorm kit would be a boon. It sends signals based on several kinds of input... what else do you need?

    The mindstorm program is a lot more believable than anything state-of-the-art.
  • I can't remember the title, but I think it was Executive Decision. They were trying to pull some kind of brute force code breaking hack with tons of passwords scrolling up the screen. But, if you paid attention, the codes were all hexadecimal and just ONE of the nibbles was always a '4'. I had just worked on an RFC-specced library so I recognized them as GUIDs where some of the bits are reserved for type/version information. Not that GUIDs can't be used as passwords (they'd probably serve pretty well de

  • Accurate example (Score:4, Insightful)

    by PPH (736903) on Tuesday January 14, 2014 @12:08PM (#45951635)

    ... in TFA from the movie "White House Down": A progress status popup giving percent complete with 9 decimal places.

    Yep. Pretty much standard programming practice from what I've seen.

    • Hell, I would just be impressed at the building of an actually accurate progress bar. If it worked like most of them in real life it would run super fast to about 25%, basically stop for 10-15 minutes, progress steadily for about an hour until inexplicably spinning at 70% for another hour and then instantly jump to 100% complete.
  • The visuals in Hackers were completely unrealistic - but they avoided the ire of programmers, and the inevitable dating of their film, by instead mostly going for a kind of interpretive mindscape video, instead of attempting to realistically represent the process of hacking.

    I like to think that someone in production design actually went out and researched what hacking looked like.. and instead decided to talk to people about what hacking FELT like.

  • by spaceyhackerlady (462530) on Tuesday January 14, 2014 @02:55PM (#45954673)

    A few years ago I was doing some development that involved AES encryption, and needed to create some test tools.

    One evening I was watching some program about the misdeeds of some computer hacker, and the screen background was perl. It mentioned Crypt::Rijndael.

    I had my test tool the next morning... :-)

    ...laura

  • by DarthVain (724186) on Tuesday January 14, 2014 @04:45PM (#45956661)

    One thing that always bugged me (heh, pardon the pun), is that every hacker A) typed perfectly, and B) never made a mistake.

    Yes I know they just want to move the movie along, and yes occasionally they would insert a "Permission Denied", but those times where rather than running some predefined application they built in the past, but are doing some mad clickity-clacking on a keyboard to much dramatic effect, I would love to see a syntax error, or even just a debug based on a missed colon, comma, quote, or bracket which is impossible to find, and causes much swearing. It would make anyone that has ever coded anything giggle a little. You can even make it something obvious that the audience can figure out and feel all superior (which it usually is anyway to much chagrin). You don't have to waste a lot of time of the movie of the "hacker" blankly starting at the same code forever, just pan back for a second at a time to hear swearing, then back to others doing something else. You could also just insert a "2 hours later" text... :) Then have the next hacker that walks by spot it in 2 seconds, and then lord it over the poor wretch. Bonus points if you have the first hacker promise to do it in like 2 minutes easy.

Any program which runs right is obsolete.

Working...