A simple but effective refactoring guide

in #refactoring2 years ago

1. Write code within 200 lines in one file.

  • Reducing the number of lines of code in the file is very effective.

2. Write code within 20 lines in the function.

  • A function should only with one role.
  • If a function with more than one role, the function must be divided.

Refactoring is very effective by reducing the number of lines of code in files and functions.
This way, you only need to look at the file or function that performs the function.

Sort:  

This is really awesome to know about refactoring

😊😊

Congratulations @pishio! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s):

You received more than 15000 HP as payout for your posts, comments and curation.
Your next payout target is 16000 HP.
The unit is Hive Power equivalent because post and comment rewards can be split into HP and HBD

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Check out the last post from @hivebuzz:

The Hive community is in mourning. Farewell @erikasue!
Level up your NFTs and continue supporting the victims of war
Support the HiveBuzz project. Vote for our proposal!