CLEAN CODE PRINCIPLES

A growing software craftsmanship movement has, among other things, begun to champion the idea of developers continuing to study their craft, with a goal of being able to write clean code. In summary, the point of this movement and philosophy is that developers should always strive to learn and try to write the best possible code they can based on a set of prescribed practices and principles.

OOP Principles

Object-oriented programming (OOP) is a method of abstracting real-world objects into classes that code can use. The idea is that if you can model your business problems in code, it will be easier to create applications that correctly address those business problems in a way that is more reflective of the real world. Most modern development languages support OOP. OOP makes it easier to conceptualize and develop your applications to meet the business's needs while keeping your individual units of code small and reusable. Having a solid basis in OOP will make many of the concepts you'll use in TDD easier to understand and work with.

In general terms, OOP has three major tenets. Over the years many people have insisted that there are others. These people are not necessarily wrong. But when you scratch the surface of these claims, you quickly find that these additional tenets are intended to either tout the advantages of one language over another or disparage a language or platform as not being truly OOP. Or perhaps they constitute a wish list a developer may ...

Get Professional Test-Driven Development with C#: Developing Real World Applications with TDD now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.