- Published on
The Holy Trinity of Programming
- Authors
- Name
- Andre Chandra Putra
Forget everything you've been told about programming.
You only need to master three core things to fast-track your way to becoming a programmer, and these are the foundation of every programming language.
Number one: Problem solving
It might sound vague, but here's the truth: coding is just solving problems with a computer. Whether you're trying to build the next billion-dollar app or create a simple calculator, it all starts with breaking down problems into tiny steps.
Let’s say you want to build a simple weather app. You don’t start by writing code right away. First, you break it down into things like getting the weather data, displaying it to the user, letting the user input their location, and so on. Each of these is a mini problem you need to solve, and then you put the pieces together like a puzzle. Coding is problem-solving first, code-writing second. The faster you learn to break down tasks, the easier coding gets.
Number two: Syntax
Syntax is what makes your code readable by the computer, and without it, nothing works.
Think of syntax like learning to say “hello” in different languages. In Python, you might write something like this,
print("Hello, World!")
and in JavaScript, something like this.
console.log("Hello, World!");
It’s different, but the idea is the same. Once you get the hang of the basic syntax like variables, loops, and functions, you’ll be able to pick up new languages super fast.
Once you start building more advanced projects, you’ll naturally run into more complex syntax, but guess what? You can always look it up. The real skill is knowing how to find what you need when you need it, and Google is your best friend these days. The more you code, the more you realize it’s not about memorizing everything, it’s about understanding the core concepts and knowing how to research the rest.
Number three: Debugging
This is the most underrated one. When your code doesn’t work, and trust me, it will break, debugging is how you fix it. Debugging is basically you and your computer having a conversation. Your code says, “I don’t get what you’re trying to do here,” and you say, “Hold on, let me fix that.”
For example, let’s say you’re writing a program to check if a number is even or odd. So, you write something like this,
number = 5
if number % 2 == 0:
print("Odd")
else:
print("Even")
and the program outputs that the number five is even. Wait, what? How can five be even? Let’s debug this.
The computer is doing exactly what you told it to do, not what you meant for it to do.
Notice that you’re printing the wrong message: the condition checks for even, but the message says odd. That’s a classic logic error. The code works, but it doesn’t behave as expected because of the logic inside. It’s not a syntax issue, so the computer won’t give you an error. Instead, the output is just wrong.
Now, let’s switch the print statements around so the right message shows up, and boom, debugged!
number = 5
if number % 2 == 0:
print("Even")
else:
print("Odd") # This will correctly output "Odd" for 5
Now the program correctly checks if a number is even or odd.
Debugging isn’t always about fixing errors or crashes; sometimes, it’s about fixing your own logical mistakes, and every coder, from beginner to pro, makes these kinds of mistakes all the time. Debugging is about thinking through the problem and adjusting your code until it does what you meant it to do.
Sometimes, your code will throw an error message at you, and it might look cryptic, but the key is to read it, understand it, and fix what’s causing the error. Trust me, Google and Stack Overflow are your best friends here. If you’re stuck, look up the error; chances are someone else had the same problem and solved it. That’s the magic of debugging—learning from your mistakes and using all the tools at your disposal to fix them.
Conclusion
And there you have it: problem solving, syntax, and debugging. That’s the holy trinity of programming. Forget about the latest frameworks or shiny new tools for now. Master this, and you’ll be light-years ahead of most beginners.
I hope that was instructional. Thanks for reading!