Sport & Auto
- About Future
- Digital Future
- Cookies Policy
- Terms & Conditions
- Investor Relations
- Contact Future
With the huge variety of computing devices all around us, it’s important to remember what it is that’s special about a full-fledged personal computer. We think the main difference can be summed up in one word: mastery. No matter how much time you spend with an iPad or an Android phone or in a web browser, you can never truly master it. There’s just not enough there to learn. But the PC? That’s different. The PC goes deep.
As you develop your mastery over the PC, you move past all sorts of boundaries. First, you learn to replace the software that came on the computer. You discover the command prompt and how to tweak the OS. You learn to build your own PC, and to benchmark it. And then, at the very bottom of it all, there’s one last boundary standing between you and true PC mastery. You have to learn computer programming.
Why is coding the ultimate test of PC mastery? Because learning how to program is the thing that breaks down the wall between you and your computer—it makes it possible for you to truly understand what’s going on underneath your desktop.
And, all philosophical ramblings aside, it’s a pretty great skill to have. Whether you need to automate a process on your computer or whip up a quick web app for a family member’s website, knowing how to code is a big boon. Who knows, you might even be able to earn some money.
Learning to program isn’t something you can do in an hour, or even in an afternoon. You have to learn to think in a whole new way, which takes dedication and patience. Fortunately, it can also be a lot of fun. In this article, we’re going to take a whirlwind tour through some of the most important concepts in computer programming, and we’ll direct you to resources that’ll help you start your adventures in coding.
A Q&A on the ABCs of programming
Before we can do anything, we’ve got to cover the basics. Here’s what you have to know before you can get started.
For this article, we’re going to use a fairly narrow definition of programming, and say that what we’re talking about is the process of creating software on a computer. That process involves writing out a series of commands for the computer to execute, which will create our desired behavior. We write those commands using a programming language.
A programming language is the set of rules that define how we express what the computer should do when it executes the program. There’s an incredible variety of programming languages available for use, but the vast majority of commercial and personal software is written in one of a core group of languages including C/C++, Java, C#, Python, and a few others. Modern programming languages share a lot of the same basic concepts and some syntax, so learning your second, third, or fourth programming language is much easier than learning your first.
Each programming language has its own strengths and weaknesses. C and C++ are low-level languages, meaning that code written in C is closer to the machine code that your CPU understands (see below). Low-level languages can produce faster, more efficient software, so they’re used where performance is at a premium—for programming an operating system or a 3D gaming engine, for instance. High-level languages, like Java and Python, have the advantage of being much easier to program in, and the same program can generally be written with fewer lines of code in a high-level language.
There’s no one best language—it really depends on what kind of programming you want to do. If you want to program native Windows applications, you’ll use C#; if you want to program sophisticated web applications, Ruby would be a good choice; if you want to be the next John Carmack, you should probably start with C.
The secret is to not stress too much about whichever particular language you start with. The important things you will be learning are all basic concepts that work pretty much the same in every programming language. You’ll learn how to use data structures and conditionals and loops to manage how your code flows. You’ll learn to structure your program in a way that’s readable and organized. Once you’ve done all that, learning a bit of syntax to pick up a new language won’t seem like much work at all.
Not quite! HTML is a markup language, used to define the contents of a webpage. Although HTML has a specific syntax (a set of rules defining how you have to write things), it doesn’t have semantics, or meaning. An HTML document is rendered, rather than executed. That said, if you have written an HTML document, you at least have experience writing a formalized computer language, which may make the jump to programming easier.
An IDE (short for integrated development environment) is the software suite programmers use to actually write programs. They generally include a specialized text editor for writing the source code, as well as the ability to test and debug your program. Two of the most popular IDEs are Eclipse (open source, free, and available at www.eclipse.org) and Microsoft Visual Studio (proprietary and expensive, but with a free “Express” version that’s limited to and excels at programming in C, C#, and BASIC).
Visual Studio is one of the most advanced IDEs around, and is used by nearly all Windows programmers.
Unfortunately, it can be a bit of a hassle to get started coding in most programming languages. You generally have to install and configure an SDK (software developer kit), and sometimes an IDE as well, in order to be able to write and compile code in a new language. It’s rarely super hard, but be prepared to spend 15–30 minutes Googling, reading a guide for your chosen language, and setting things up.
Click the next page to learn about how it all works.