Magento 2 offers new methods to achieve high quality source code and therefore a stable and long-living system. Applied wrong they lead to bad source code – hard to read, hard to adjust and hard to hand over to other developers. Dr. Nikolai Krambrock and Andreas von Studnitz show how good code looks and how it is produced. The first part is about code quality in general. The second part is about code quality specific to Magento 2 that helps developers to write better code in Magento. Last but not least, some tools which support quality during the development process will be introduced.