Search⌘ K
AI Features

Final Remarks on Good Practices for Software Design

Explore key good practices for software design that enhance maintainability and robustness. Understand the concept of orthogonality in software to minimize interdependencies, improve unit testing, and support independent feature development. Discover how to structure Python code using packages to promote better organization and efficiency in your projects.

Good software design involves a combination of following good practices of software engineering and taking advantage of most of the features of the language. There is great value in using everything that Python has to offer, but there is also a great risk of abusing this and trying to fit complex features into simple designs.

In addition to this general principle, it would be good to add some final recommendations.

Orthogonality in software

This word is very general and can have multiple meanings or interpretations. In math, orthogonal means that two elements are independent. If two vectors are orthogonal, their scalar product is zero. It also means they are not related at all. A change in one of them doesn't affect the other one at all. That's the way we should think about our software.

Changing a module, class, or function should have no impact to the outside world from that component that is being modified. This is, of course, highly desirable, but not always possible. But even for cases where it's not possible, a good design will try to minimize the impact as much as possible. We have seen ideas such as separation of concerns, cohesion, and isolation of components.

In terms of the ...