Computers: Programming Languages

    Computers: Programming Languages

      When you get right down to it, computers only really understand zeros and ones. Don't let Luke Skywalker's magical ability to give R2-D2 instructions fool you: actual computers aren't even close to being able to understand every single instruction you could give them in plain English.

      Even the ones programmed in human-cyborg relations.

      Luckily, you don't have to learn how to talk in binary (numbers counted entirely in zeros and ones) to interact with computers—all thanks to some programmers at IBM. Instead, you can write code in a programming language—a stunted form of language that tells the computer how to do things in binary logic.

      A programming language is a way to bridge the gap between something a human can understand and something a machine can understand. When you use a programming language, you're using language (in the form of keywords and variable names) to tell a machine what to do. That's called coding, by the way. In a galactic universe where more and more droids can help with all the chores we’d rather not do, there will always be a job for us carbon-based life forms. Those near-sighted scrap piles aren’t going to program themselves.

      Programming languages all have specific rules and syntax, just like human languages (which are actually called natural language in computer science). Before you can write code, you'll want to think about

      • what type of computer the program will run on. 
      • what you want the program to do.

      Each language has strengths and weaknesses, so choose wisely. There are literally hundreds to choose from. Here's a couple of our favorites.

      LANGUAGE WHAT IT'S USED FOR
      FortranNumber crunching
      COperating systems
      SQLDatabase searches
      JavaRunning on any and all computers
      PythonText processing, data analysis, and scripting in general
      JavaScriptMaking webpages responsive
      CThreePOInsulting R2-D2 (probably)

      Between your programming and the computer's language, you'll need a compiler: a software program that translates the statements of a computer language into a lower-level language that the computer can understand. Every upper-level programming language (a language that doesn't make you write exclusively in numbers) needs a compiler to turn it into numbers. Some languages make you compile your code separately from running it and some will compile for you automatically, but whichever way it goes, it's going to need to recompile any time you make a change to the code. The compiled code, in machine language, is considered an executable program in object code.

      That object code is the version of the program that the operating system moves back and forth from ROM to RAM when it's used.

      From your lips to the computer's ear. Just like that.