AppTcom interview question

How to write a clean code? (answer with details)