Obamacare, Facebook Or Unreal Engine: Guess Which Uses More Code

Obamacare, Facebook or Unreal Engine: Guess Which Uses More Code

Computer code. It powers damn near everything in our lives at this point. But we really only ever think about it when it breaks. So, let's think about how many lines of code make CryEngine 2, World of Warcraft and the Curiosity Mars Rover.

There's a swank infographic over at Information Is Beautiful that shows how many millions of lines of code are inside the apps, machines, and games we use everyday. Some surprises lurk in the eye-catching colour-coded chart, like the fact that WoW's server programming uses more code than the Large Hadron Collider's root software (initially, at least). Designer David McCandless admits to some guesswork but if these are at all accurate, it's clear that code-savvy auto mechanic will be the career of the future.


Comments

    A few points of perspective:
    * Obamacare is a gigantic, crappy, contractor-ridden broken mess. It also consists of a frontend plus backends interfacing with lots of insurance companies, hence its size.
    * Game engines are svelte, optimized for efficiency and getting adequate framerates.
    * Lines of code are a stupid metric of code quality.

      Lines of code are a stupid metric of code quality.

      What are you talking about? It's a great way to measure quality. I should know too, I've got more blood than you so obviously I'm smarter. =P

        int x = 0;
        int y = 0;
        int z = 0;
        wait(4000);
        printf();
        return;

        Wheee! I'm super productive. If I want to look super awesome too, I can take out the wait and improve the performance speed phenomenally. Lines of code are as stupid a metric as bugs found. Great if you find all the obvious ones first, sucky if you end up with that 1-in-100-sure-to-be-found-by-a-client crash. I wouldn't be surprised if the government code also counts commented out sections kept around "just in case" but will never be used again.

      * Lines of code are a stupid metric of code quality.

      Especially when it can be reasonably assumed that most of the Windows 3.1 codebase was assembly, ie a single cpu instruction per line. Compare that with almost any other programming language where 10s (sometimes hundreds) of lines of assembly are generated for a single line of code.

      * Lines of code are a stupid metric of code quality.

      Who said anything about quality?

    Measuring the size of a program by "lines of code" is completely arbitrary. In many languages, whole programs could potentially be done one one huge line, regardless of the size or complexity of the program. This is really bad practice, but completely possible.

    function(a,b) {return a+b;}

    function(a,b) {
    return a+b;
    }

    function(a,b)
    {
    return a+b;
    }

    So much of 'code lines' comes down to internal convention. Also comments beef it out a lot. I've worked at places where we've been asked to date/description/argument document each method we work on.

Join the discussion!

Trending Stories Right Now