AppTcom Interview Question

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