Why We Should Learn Other People’s Code

Didik Tri Susanto
Teknomuslim
Published in
2 min readDec 30, 2017
Pair programming. (source: https://blog.daftcode.pl)

In programming world, there are many ways to build solution. Different people could bring different solution & approach to code write code. In this way there are many reason too why we need to take a look another people code.

Looking for Better Solution

We often struggling to write code that could solved our problem in our project. After hours we did it, problem is solved. But we ended up using many nested condition that make code is hard to read. If we care about quality, we should refactor that code to make more efficient, more readable, and easy to maintain.

We may browse other people code at github or find solution at stackoverflow. We are able to see many different approach or even a reason why people using that approach. Many approaches means we are able to choose better solution to our problem and this is will increase our knowledge about building solution in our code.

Improve Coding Skill

Yes reading other people code will improve our coding skill. We have many insight to build our code better. We may seen code worse than our code so we know how to not building solution from the worst one, or we may seen elegance code so we know how to code better.

But sometimes the elegance one didn’t suitable to your solution. No problem, it is our challenge to find another better approach. More learning, more knowledge & experience to increase our code quality.

More Open Minded

Our code is our pride, our code is our dignity. It takes blood, sweat, and tears to write, and then there is other programmer that looked down your code. It is hurt, right?

Yes, as I said before that different people brought different solution or approach. There is reason to write code using certain approach based on their knowledge, experience, or maybe deadline. Learning from other people’s code is also help to build our understanding to other people. We are motivated if see better solution but we wont looked down if see the worst one.

Conclusion

Yeah learning from other people’s code is interesting and there are some plenty a good reason to do. And now it’s your turn, you may send your response if you have some good experience while learning people’s code.

Happy coding, Folks!!

--

--

Didik Tri Susanto
Teknomuslim

Proud to be Moslem | Introvert | Backend Engineer | Laravel Developer