The Way I Write Clean Code
Creating good architecture design.
Creating good database design.
Creating good API design.
Write unit tests or test-drive development.
Keep tests clean.
Creating good names
Don’t use literals.
Keep functions small and do one thing
Write functions as writing a story.
Avoid repeated code. Extract repeated code into a common function or utility function.
Consider using better data structures and algorithms.
Keep small classes
Consider creating a better class hierarchy
Consider using a better design pattern
Consider possible exceptions for each line of code.