Make your code small
10 lines of code = 10 issues.
— I Am Devloper (@iamdevloper) November 5, 2013
500 lines of code = "looks fine."
Code reviews.
Long long code is a problem
As I mentioned above using twitter, long long code is a problem to review. It’s difficult for reviewers where they check… If I were a reviewer, long code get me down… And this long code imply you have a problem that you do not identify your problem.
What we have to do is dividing small code.
Just make your code small by dividing long code into small code. This article called Let’s divide your program introduce separation of concerns. First you should divide your problem into small problems. Second you should solve the small problems by writing small codes. Third test the small codes.
What is Advantage
In conclusion,
- Easy to understand purpose and composition
- Easy to understand a function
- Easy to understand a data flow by clarifying parameters and return values
- Easy to test
Let’s make your code small 💪💪💪