Computer programming, also often simply referred to as “coding,” has become an increasingly popular career track in recent decades. As the tech sector in the U.S. has blossomed and produced some of the economy’s largest companies, it’s largely grown because of a small army of programmers, which includes individuals like Bill Gates, Mark Zuckerberg, and others.
While programming may sound complicated, it is, at its core, the process of dictating instructions and solving problems. And the ability to do that, at least in front of a computer screen, has been a relatively scarce skill set over the past 50 years or so.
That’s what’s driven growth in the tech sector and an interest in programming. Median salaries for programmers, as of 2022, were just shy of $100,000, according to data from the Bureau of Labor Statistics.
Programming has become increasingly competitive, but it can still be a viable career option for many—but it all starts with gaining a fundamental understanding of what it is, and what it entails.
What is computer programming?
Computer programming involves using a programming language to write programs, which are a set of instructions dictating what a computer should do. “A computer on its own does nothing, you need to give it instructions so it’ll do what you want it to do,” says Grace Lewis, First Vice President of the IEEE Computer Society.
“The essence of coding is telling a computer to perform some task on your behalf,” she says. “If a certain situation happens, then calculate this in a certain way,” she adds, as programmers need to anticipate the decision points that a computer will run into when performing a task, and need instructions as to how to navigate.
Other experts define programming or coding in more or less the same way. An effective programmer “needs to be able to tell the computer what to do, to perform an action or response to a user’s input,” says Dr. Sriram Mohan, Ph.D., head of the Department of Computer Science and Software Engineering at Rose-Hulman Institute of Technology.
That may sound technical and complicated, but Lewis says that we perform similar actions all day long without realizing it—or, at least, not recording it into a programming language.
“Programming is a lot like driving,” she says, explaining that as you drive down the road, you’re making decisions about how fast to go, when to brake, what turns to make, and more. Those are the types of instructions that may be written into a program that a computer references to complete a given task.
As such, learning to program can be similar to learning to drive. “If you take the driving course, at some point you become good enough to take the driving test and pass it—programming is the same way, you learn the basics,” Lewis says.
How does programming work?
Programming works by deciding what task a programmer wants a computer to perform, and then writing the specific instructions (i.e., a program) to perform that task—and doing it in a programming language. A programming language is one that a computer understands.
Depending on the specific task, programmers may choose one language or another, and languages have varying levels of difficulty. Some are “high-level” languages, which may be easier for humans to understand, as they more closely resemble the English language. Others can be “low-level,” which are closer to the binary language (zeroes and ones) that computers communicate with, but that are further from English.
But in terms of the nuts and bolts of programming, a coder decides what it wants the computer to do, and uses a programming language to write a program to perform the task. The details can vary significantly from program to program, but what programming boils down to is the act of writing detailed instructions to perform a task in a language that the computer can interpret.
What are the different types of programming languages?
There are different types of programming languages (beyond the high-level and low-level categories) that are used to write various programs. Within those types, there are numerous specific languages as well.
The languages that are ultimately used for one task or another depend on several factors, including how granular a program needs to be, the context in which it’s being used (say, a specific industry use or within a specific company), and even a programmer’s personal preferences. But mostly, “It comes down to the company and the industry that it’s in,” says Dr. Mohan.
With that, there are three primary types of programming languages: Procedural, functional, and object-oriented.
Procedural languages
Procedural programming languages do more or less what they sound like they do: They follow a procedure. “A procedural language is the way you provide instructions to a computer or define instructions,” Dr. Mohan says. And that generally means using a sort of step-by-step approach to writing a program. As such, a programmer might write a set of instructions to be followed in sequence for the computer to complete a given task.
Some common procedural languages include C, Java, and C++.
Functional languages
Functional languages are more complex than procedural languages, as they rope in different mathematical functions to construct a program. That can require a higher-level skill set than using a procedural language, in many cases. “In functional programming, you need to use a technique called ‘recursion,’ and it can be a tricky concept,” says Arjun Chandrasekhar, an assistant professor of computer science at Southwestern University. Recursion involves reducing or simplifying a problem into its simplest form—and yes, it can be tricky to grasp.
For programmers who may be more mathematically inclined, utilizing a functional language may feel more natural. Common functional languages include Haskell and Python.
Object-oriented languages
Object-oriented programming languages use “objects” rather than functions or procedural instructions to create programs. It’s yet another abstract concept to wrap your head around, but in a nutshell, object-oriented languages or programming uses “classes” and “objects” within its code to build or create programs. Those can then interact with each other to create programs.
Unfortunately, it only gets more abstract from there for those who don’t have a programming background. Some examples of object-oriented languages include C#, Ruby, and Rust.
While this all might sound intimidating and overwhelming, especially for someone who lacks a tech background but is interested in programming, the experts say that everyone, even the most experienced coders, at one point had to start from scratch, too.
With that in mind, it’s best to try not to get discouraged, and if you’re interested in a career in programming, to give it a shot and see if you like it, Lewis says. “Like anything, you need to try things out.”
Frequently asked questions
What do computer programmers do?
Computer programmers use programming languages to write programs, which act as instructions for a computer to follow and complete a specific task. In effect, programmers translate English into code, which a computer can interpret to follow a certain function.
Do programmers get paid well?
Computer programmers tend to be paid relatively well compared to many other professions in the U.S. As of 2022, median annual salaries were just shy of $100,000, whereas median household income that year was around $75,000.
How difficult is programming?
Programming will be difficult for some people and less difficult for others, depending on a number of factors. However, experts say that individuals with a knack for problem-solving and math may find it easier than others.