Hello there! So you’ve heard of this thing called programming and you’re interested in what it’s all about. Well, you’ve come to the right place. Whether you’re fascinated by the idea of programming or you’re seeking a basic understanding of it for your job or business, this article will break it down in easy-to-digest parts. Programmers, hold on to your hats, ’cause we’re about to bring it down to the basics and as the saying goes, the devil is in the detail.
Introduction
In it’s simplest form, programming is a way of instructing computers to perform specific tasks. Just as we communicate using languages such as English, Spanish or French, computers also have languages that they understand. We often refer to this communication as code. These languages consist of instructions that the computer is able to execute. So in essence, when one learns to program, they are learning a new language to communicate with computers.
And just like when learning any new language there are often different ways to say the same thing, it’s the same with computer languages. There is not one ‘correct’ way to write a program, just more efficient and less efficient ways. Not all languages are made equal either, some are better suited for certain tasks, while others are universal.
The Body of the Language
Let’s break down the anatomy of a typical programming language, in casual terms.
Imagine you’re cooking, and you have a recipe to follow. The recipe represents your program and the steps it gives are the code. Now, your ingredients like eggs, flour, water are the data the program will utilize. You, the chef, are the computer, preparing the meal per your recipe (or executing the code per your program).
Here’s where it gets more interesting. Some instructions are conditional, meaning that they require a certain condition to be true before they can be carried out. For instance, if your recipe says, “If the chocolate has melted, add the flour”, you will only add the flour when the chocolate has truly melted.
Other instructions are repetitive, they can be carried out again and again until a certain condition is met. If your recipe says, “Stir until the mixture is smooth”, you keep stirring until you get the smooth texture. These conditional and repetitive instructions form a significant part of programming, as much as they do in our recipe.
Programming languages also come with sets of pre-made tools that programmers can use. For instance a language might have a tool for making something repeat itself, or for waiting a certain amount of time before doing something. Much like a chef has utensils and appliances to help him in his task.
These recipes or instructions, as you may have guessed by now, refers to algorithms in programming terms. It represents a sequence of commands designed to perform a specific task. Accomplishing a task might require many algorithms working together. A more complex recipe might need more steps, dependencies and conditionals. Similarly, a complex program utilizes a variety of algorithms to execute its tasks.
The Big Picture
What does this all boil down to? Well, programming at its core is problem solving. Whether it’s building a website, creating a video game, or developing a mobile application, the aim is to solve a problem or fulfill some need. The programmer’s task is to figure out the best way to use their language to formulate the right commands (algorithms) to get the machine to do what they want.
The mark of a good programmer isn’t just knowledge of a computer language or two, it’s also about how they approach problems. It’s how they break those problems down into logic and sequences which they can then translate into code.
Conclusion
So there you are, a casual audience, who came in knowing nothing about programming and now you’re walking away with a basic understanding of what it is and how it works. Like any new language, programming can take time to learn and become proficient in. But if you’ve ever learned a second language, you will find that once you get accustomed to the grammatical rules, sentence structures and vocabulary, you may just start to think in that language. In the world of programming, that’s when the magic truly begins to happen.
Demystifying programming is the first step to understanding the world that is being built by coders around us. Code is, in many ways, the new alphabet and as we advance into the future, it’s importance and influence will only grow. So whether you’re looking to embark on a coding journey or just wanted a primer to help you navigate through the tech-speak, I hope this post has been helpful.