1. Modularization Do not write the whole logic code in one block/function instead delegate the each and individual responsibility to each function. For example if you are converting one Date time format to another write this logic in Utils and use it. It might be useful in other place as well. And if you come across any common piece which is repeated in you logic put it in a function call where ever needed. This is basic fundamental rule. 2. Single Responsibility. Always delegate single responsibility to one block/function of code. Don't mess multiple operations in a single block/function. And make sure block/function of name should ideally match to what it actually does . 3. Name Justification Always declare the class, method or variable names based on its purpose. And don't use any shorter names. The one who reads your code should get idea what actually it does.