chapter ten
10 Standards of coding and creating maintainable ML code
This chapter covers
- Understanding ML code smells and applying that knowledge to identify problematic signs of production instability in code bases.
- Clarifying the importance of naming conventions, structural standards, and basic good code architecture to reduce complexity in ML code bases.
- Learning an alternative to the time intensive paradigm of tuple unpacking to minimize unexpected bugs in feature development and to reduce code complexity.
- Learning the risks associated with improper exception handling and how to craft a try/catch properly.
- Understanding the dangers of mutability, particularly how it can create very difficult to diagnose bugs in ML code.
- Applying alternative approaches to heavily nested logic and illustrating how declarative logic can create unnecessarily complicated code.
In the last chapter, we covered the broad strokes of code foundation. Focusing on breaking up complex structure by utilizing was important to pave the way for further discussion of the more detailed aspects of software development for ML. Without having the foundation laid of the basic best-practices, the code architecture and design elements that follow simply don’t matter.