Learn To Code With Logic

Logic formulation is fundamental to learning how to code. Although you can learn to code from examples, the ability to solve real world problems can boil down to your ability to apply, build and express logic.

Logic is extensively applied in computer science. If you choose to learn to code, most of the problems you'll encounter can be solved by simply sitting back and thinking through the logic. If you want to write, you have to know something about what you're writing about. Knowing that the result of your thought process can be infallible and can, therefore, not only convince yourself, but also convince everyone else is as satisfying as watching ice cream getting made right in front of you... and eating it too!

It helps to know that the computer does not really know what to do unless you tell it. It does not know where to do what unless you tell it. It does not know when to do what and where unless you tell it. It does not know how to do what, when and where unless you tell it. More so, it helps to be convinced that it is so. The computer knows nothing! You are the brain and you tell the computer your bidding.

Creating a program to tell the computer to show or print "Hello World!" is, by itself, a milestone. Seeing "Hello World!" getting printed out is satisfying. You can probably add more codes to print out some more texts. Or maybe even add some interaction to let the computer wait for a user's entry and print it back nicely. "Hello World!" is every programmer's introduction to programming. It's a tradition. It's a good tradition. I do it to learn new programming languages.

However, after that, what's next? If you are a beginner, "what's next" is like hitting a wall. You begin to write and you immediately get writer's block?! There's got to be more to programming than just printing something out on the screen, right? In fact, wouldn't it be more satisfying to program something that immediately means more to you and to those you care about?

If there is anything programming-like available now that anyone can try out, it's IFTTT.com. "If-This-Then-That" is one of the most basic logic flow utilized in programming. Conditional actions are as common as how we actually live our daily lives: If I'm thirsty, then I drink water. If I'm hungry, then I eat. If I'm sleepy, then I sleep.

"If-This" expresses the condition (or conditions) that need to be met or satisfied before an action is performed.

"Then-That" expresses the action (or actions) performed if the condition (or conditions) in "If-This" is met, fully satisfied and 100% true.

If-This-Then-That (IFTTT) is as natural as the way we think and do. If you've tried using IFTTT.com, you'll realize how easy it is to apply logic programming without actually knowing you're already coding (kind of, sort of). The ability to think about conditions that will cause a specific action to be performed (or for a specific event to happen) is important in learning how to code. The ability to string or chain conditions together to control a sequence of actions or events can look like an easy next step.

Using IFTTT.com and similar products/services can teach you to think like a programmer, without having to commit to being one. Everyone can learn to code, and IFTTT.com makes that possible. In fact, I think it's the best way to learn to code. It's simple, it feels natural, and the result is immediately impactful.

Comments