Programming 101: Basics You Should Know Before Breaking into Coding

Maha Arshad
3 min readOct 26, 2023

--

Imagine, for a moment, you’re about to play a board game for the first time. Before diving in, you’d need to understand the basic rules, right? Similarly, before delving into the vast realm of coding, it’s crucial to grasp some programming fundamentals. It’s like understanding the rules of a new game you’re eager to play.

DALLE-3: The Coding World

The Groundwork of Coding

Imagine coding as a journey where you’re both the traveler and the mapmaker. The landscape of this journey is vast, but every traveler starts with some basic tools in their backpack.

  1. Input and Output:

Input and putout are called the two pillars of the coding world. Let’s be honest, how can we code if we don’t take something as input, and our ultimate goal is to get an output against that input.
Input: Think of it as asking a question. You’re seeking an answer.
Output: This is the answer to that question. A result that your program provides after processing your input.

2. Variables:

Let’s call them the ‘storing boxes’ of coding.

Imagine that you have a box and you label it ‘fruits’. Inside, you can put an apple, an orange, or any fruit of your choice. The box is your variable, and what you put inside is its value. And just like in real life, you can change its contents.

3. Loops:

Remember the days when you’d repeatedly practice a skill until you got it right? That’s what loops are all about.

For Example, If you want to be reminded every morning to practice a skill, you’d set a daily alarm. In coding, a loop would echo a command repeatedly, just like that alarm.

Illustration of a serene digital landscape at dusk. In the foreground, there’s a tree with leaves shaped like labeled boxes, symbolizing variables. Each box contains items like numbers, fruits, or symbols. Surrounding the tree, there are glowing pathways made of interconnected circular arrows representing loops. These pathways move in repetitive cycles, branching out to different directions. Fireflies, shaped like miniature code snippets, flutter around, adding to the magical atmosphere. The sce
DALLE-3: Tree with box-leaves for variables, circular-arrow pathways for loops, and fireflies as code snippets.

Building Your Code

Once you have your basic tools in place, you start constructing, piece by piece.

Decision Making:

Often, your program, just like you, will stand at a crossroads. It will need to choose a path. For example, imagine deciding what to wear based on the weather. If it’s cloudy, perhaps a light jacket. Sunny? Maybe a hat. Your program, too, makes decisions based on the conditions you provide.

Numbers and Characters:

These are the building blocks. Numbers help to perform the calculations and keep the logic intact, whereas the Characters are the storytellers. They form the content, create messages, and share stories.

Giving Your Code Personality

A piece of art isn’t just about the colors and the canvas. It’s also about the essence and the personality that the artist infuses into it.

Strings: In programming, strings are more than just sequences of characters. They’re the sentences, the messages, the stories. For Instance, The sentence “The sky is blue” paints a picture and evokes a feeling. In programming, this is a string.

DALLE-3 Image of Strings and Functions

Functions: Think of them as your favorite recipes. Once you know how to make that perfect pasta, you can whip it up anytime without starting from scratch. Similarly, functions are chunks of code you can call upon whenever needed.

File I/O: It’s about communication. Writing to files is like penning down a letter, and reading is like diving into a beloved book.

Wrapping Up

Programming is all about understanding how to solve problems, something we all do in every aspect of our lives. At every moment, we are trying to solve a problem, like what to eat for dinner, what to wear, etc.

These are some of the basic things you need to know before breaking into coding. This article offers a simple and detailed explanation of what basic programming is and comprises.

In the coming articles, I will tell you about basic C++ Coding. Stay tuned. Happy Coding.

Hope you enjoyed my article! If you’re looking for engaging content, let’s connect! I’m just a click away on Upwork: Hire me here for writing services that bring your ideas to life. Let’s make your project the next topic of conversation!

--

--

Maha Arshad

Hey, I’m a freelance writer on Upwork. I love reading novels (fantasy is my favorite!), watching anime and food!