From the course: Programming Foundations: Object-Oriented Design

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

General development principles

General development principles - Python Tutorial

From the course: Programming Foundations: Object-Oriented Design

Start my 1-month free trial

General development principles

- There are always multiple ways to write a piece of code to accomplish the same thing, and programmers love to argue which ways are better. - I know what's best. - However, no matter which solution you choose, there are a few general principles to keep in mind that'll make maintaining your code base easier in the long run. One set of well-known principles has the acronym SOLID, representing five separate, but interrelated principles that apply to any object oriented design, and are intended to make your software more understandable, flexible, and maintainable. For example, the single responsibility principle warns programmers to avoid creating what are called God objects, objects that do a whole lot of things that aren't related to each other. Those behaviors should be split between multiple, smaller classes, that each have one primary responsibility, one reason to exist. If any of your classes start getting too big, always consider if perhaps they should be split into two or more…

Contents