Don’t just be a coder

Hitesh Paryani
4 min readApr 26, 2018

--

The difference between a computer engineer and a coder.

Yes, you heard it right. They are not the same thing. Well at least for me they are completely two different things. I am saying this because I have facts that support the difference. Before you read ahead, I just want to make sure that this is my ideology and it may differ from person to person.

Definition:

A coder is a person who writes code. Yes, I am straightforward. Just Kidding. A coder is a person who applies his/her logic to solve a complex/simple problem using a programming language. It doesn’t matter to him whether the solution is the most optimal one unless the code is working.

On the other hand, a computer engineer is a person who knows that starting to code is the last stage in solving a problem. He follows a structural approach to find the most optimal solution to the problem and it's only after that he touches his/her system to write the code.

Now, the question is how do you become a computer engineer than just being a good coder.

I am gonna share some of the things that I know about. I will be updating this post as soon as I find some more.

1. Understand the problem statement

Many times it so happens that as soon as we hear a problem we start thinking about the code that we gonna write to solve the problem. This will help you achieve speed in simpler problems, but trust me it's a lot of pain in the long run.

Instead, start with reading the problem twice. I wrote in my earlier post that many times it so happens that we are stuck on the wrong path while the most simple solution was available, On Stack Overflow :p. But seriously, try to google your problem before jumping on your solution. It is possible that the problem you are trying to solve has been already solved by someone. But make sure you understand the solution before just blindly copying it. Because when you face bugs in code in the future, it will be very difficult to solve.

2. Choose your editor

Choosing the perfect editor for your job is very important. Editor does play an important role in saving you a lot of time.

Even I never cared about which editor I used during college. Frankly, I have used gedit too a lot of time to write code. Judge me all you want but that was before when I got introduced to emacs. I could customize it with my programming language, add git support in the editor itself to save time switching between editor and terminal.

I am not recommending emacs to everyone but make sure you search what kind of editor is best for a particular coding language. Also, it helps in keeping up with the standard coding ethics so that your code is easily readable to everyone around the globe.

3. Use comments // For god’s sake

Speaking of readability, what’s better than adding comments to your functions. Give a descriptive comment so that the tester or any other person reading your code can understand what is the function doing. It saves time for others and you too when you read your code after years.

4. var a = “I am a variable with a very non-descriptive name”;

Along with comments, make sure you use proper naming for your variables and your functions.

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. — John Woods

I think the above quote is enough to explain the importance of proper naming.

Do not forget to indent your code. A nonindented code is not only unprofessional but also is difficult to understand.

5. Using the correct data structure

Decide the data structure even before writing the code. Choosing the right data structure helps in saving a lot of time in maintaining multiple variables. Understand what the problem is and how you will be manipulating your variables. Take into consideration the speed at which each data structure works and how comfortable you are with using inbuilt functions on that particular structure.

6. Unit Testing

I know you are a programmer and not a tester but believe me, this is the most important thing to make sure your code is not buggy. Write tests for all your functions and test them with as many cases as you can think of.

Better, use TDD. If you don’t know what Test Driven Development is, it’s a development practice where your write your test cases first before writing your function and then make sure all your test cases pass.

7. Make sure your code is unit-testable

For unit testing, it is important to understand how unit testing works. Unit testing can be done on functions that do only work and not many. For example, if a function is written to validate the username and password, make sure it is not doing any other work like ‘if the user is successful then add him to database’. It will only be returning either a true or a false(in most cases).

In scenarios where the function is doing multiple tasks, unit testing becomes difficult.

8. Learn more about git

If you are working in a team, it is important to use git properly. Any mistake will land you and your whole team in trouble.

Understand why branching is useful, understand the difference between merge and rebase.

Give a proper message to your commit so that your team can understand what it is about.

Well, these are some of the points that I feel differentiate between the two roles and will add more as soon as I learn. Thanks a lot for reading.

Originally published at https://medium.com on April 26, 2018.

--

--

Hitesh Paryani
Hitesh Paryani

Written by Hitesh Paryani

An engineer of computers and no I cannot fix your printer, amateur writer, wannabe standup comic and I will never tell you 'I have seen this meme before'

No responses yet