Here are some key principles of clean code I usually follow. The examples are written in typescript.