Code Quality Week part 6 of 8

This week we at Little Chicken are celebrating code quality. Resident Developer and Code Quality Guru Joris Van Leeuwen penned eight byte sized posts on this subject. Each day will see a new post on this subject.

PART 6: Quality Code is Scalable

Code that has high quality means that it is scalable; it’s expandable with minimal increase of complexity.

Take a look at the following example:

PART 6: Quality Code is Scalable Code that has high quality means that it is scalable; it’s expandable with minimal increase of complexity. Take a look at the following example:

A level with a list of enemies. When updating the level, it updates all containing enemies. This code is scalable because the level is only referencing the enemies by their abstract Enemy type.

It means we can add more types of enemies by simply adding more and more Enemy subclasses, without having to update the Level class. We can expand our feature, without increasing depths of complexity.

Scalability doesn’t stop at isolating complexity – it can also result in efficiency. Let’s take No Man’s Sky for example: everything they made is a result of focusing on scalability. In such a way that they can go up to an incredible amount of content, just by sliding a button.

What makes your code scalable? Tell us on facebook