How To Study Programming

How To Study Programming hackernoon.com3 years ago in #Dev Love38

Originally published by Ahmad ElAmine on March 10th 2019 And think like a programmer Photo by David Rangel on Unsplash Disclaimer: This is not a tutorial on how to code using a specific programming language. Rather, this is a guide for someone studying (or willing to study) a programming language on how to start or from where to start in order to learn the language efficiently and thus be able to think like a programmer. Learning and studying programming could be tricky sometimes. The key point for learning programming is to be able to think like a programmer. This is the first thing you need to learn, understand & grasp In my opinion, the first thing you need, before getting further into any other details, is to have a good understanding of the data types and structures used in the language you’re learning. The main common data types/structures between all programming languages are: integer, double (or float), boolean, string, character, array and object. Python, for instance, has in addition, list, tuple, dictionary and set. Understanding how each language stores information will enable you to get a feel of what data type you will need to create to store each variable for the problem you’re implementing. For example, if you’re creating a program that calculates the user’s BMI (body mass index), and stores the result along side the user’s name and age, you can easily observe that you will need a string to store the user’s name, a floating variable to store his weight and height (needed for calculating the BMI), and an integer to store his age. Next you need to learn the fundamental statements, logical, relational and arithmetic operators, and array indexing If elseif else, for loop, while loop (including do-while loop if supported by the language), and switch-cases. By understanding the concept and logic of each of them, you will be able to know how, why, and when you will be using each statement in your code. These statements will constitute a huge portion of any code that you will be writing, so it’s important to have a good understanding of how they work. While learning how to use these statements, you will definitely need to learn the basics of conditional operators, as all the statements, except switch-cases, work depending on a logical condition being satisfied or not. The main logical operators are AND (&&), OR (||) and NOT (!) (note that the logical operators syntax I wrote are for Java, C and C#, for instance, but are not necessarily the same for other languages). In addition to logical operators, relational operators will also be handy for creating conditions. For example, you might want to check equality (==), greater than (), less than (=), less than or equal (  » Read More

Like to keep reading?

This article first appeared on If you'd like to keep reading, follow the white rabbit.

View Full Article

Leave a Reply