“A programming language is a formal language, which comprises a set of instructions used to produce various kinds of output. Programming languages are used to create programs that implement specific algorithms.” ~~~ Wikipedia

 

Why am I sharing the definition of the programming language with you?

Because I want you to know that the ‘sole purpose of any programming language is to generate output – not just any output but one that fits the requirement specification of its target user. And to become that programmer, you need to understand the core constructs of a programming language first.

 

Some of the healthy programming concepts are mentioned below:

 

  1. Store data into the code using variables and objects. Think about Facebook storing millions of user data to show you the text, images, videos, etc.
  2. This will allow us to create arrays and collections so that we can place a list of similar types of items together.
  3. Use APIs to connect with the external data safely and securely.
  4. Instead of typing logic manually use logical and comparison statements to differentiate and make decisions, this will decrease the size of the code and increase efficiency.
  5. Use Comment wherever possible so that we can specify what we are asking the machine to do in a human understandable language.

 

There exist two type of programmer: One who writes code so simple that there are obviously no deficiencies and the second who make it so complicated that there are no obvious deficiencies.

Both of them are in the race to rule the world, but the first method is a far more difficult path to become a bigger and better idiot-proof programmer. If you haven’t already decided your type yet, I’d advise you to do it now!

 

Here is a sure shot way to becoming the programmer who writes the code that computer, as well as a human, can understand:
  1. Use more declarative documented comments in conjunction with single/multi-line comments to make the code more understandable by the human.
  2. User properly structured indentation taking special care of where the code starts and where it ends.
  3. Proper naming conventions will make your life much easier. Use single responsibility principle for naming class, use camel case for naming variables, and avoid magic numbers.
  4. Good code is well-tested. The test serves as an executable specification of the code and examples of its real use.
  5. Good code does think in a straightforward and obvious way.
  6. Good code is developed in a small, easy to read units of computation. These units are reused throughout the code.
  7. Instead of reinventing the wheel, try to use standard libraries and extensions wherever appropriate and available.

Let’s incorporate these small but vital changes in the way we write code, these small things make a lot of difference especially when in terms of code hygiene. Let me forewarn you — good software developers doesn’t just code they do much much more…