Everyone can write code! Some create solutions, others create mess!

Well the credits of the quote above goes to me.

And I truly believe, that whatever is written above, is correct. Not everyone writes code that is readable. Let’s dive in deep!

Senseless image

From the first year itself, students of all branches in IIT Mandi are taught to write codes. Though they are in C, and are really basic. For instance, adding two numbers, finding GCD, finding prime numbers are some of the tasks given to the students of first year. Many students who are not in CSE (Computer Science Engineering) branch are mostly not interested in this stuff and they just complete the course by hooks or crooks.

Importance of first level computer programming courses

As the world is going manless for over 30% tasks which used to be done manually in 1904 (Projected 80% in 2030). Computer Programming has become like any other language we speak. Today, people are more fluent in Python and C# than Hindi, English or Marathi. And keeping in mind that most of the work in 2030 will be done by the machines and not by humans, no matter where you work, you will eventually have to know how to control these machines working as puppets for you with the thread as a Python Script.

All the disciplines in basic sciences, engineering demand the knowledge of programming. When I went to attend PyCon India 2018 held at Hyderabad, what I observed was, not all speakers and attendees were computer scientists. Some were mechanical engineers, some were just artists, graphics creators, even an electrical engineer(Oops! not yet) [Yes, you guessed it right. It’s me]. So, code is not more a task for computer scientists. It’s a tool to be used by everyone. Possibly, you don’t have to write codes as difficult as a CSE guy might be writing in his company, but that’s what the first level computer programming courses teach you.

Writing Clean Code

Not everyone can understand why writing a clean code is important.

Most programmers don’t have a natural talent for programming. Programming is like composing music: anyone can learn to do it, but only people with a talent for it are ever any good at it. ~ Anthony Atkielski in one of their answers on quora

I feel this is completely true.

Look at this image. This is what I am talking about:

Senseless image

When we ship this kind of code to large projects, two things can happen:

Both the cases are bad and one should try to avoid such situations. Take this example. There are two programmers, A and B. A can write beautiful, understandable code, but can accomplish only 80% of the given tasks. While B can do everything but his code is messy. No matter how good a programmer B is, his code will always get rejected. Because even if A can’t complete his job, atleast someone else can pust less efforts and complete it. In case of B, no one would be able to understand the code and hence due to 0 Maintenance, the code will be dumped.

Also, writing good code will eventually some day save your own time understanding it.