April 2016

Unity Software Design – Defensive Coding

DefensiveCoding

Defensive coding is the practice of making your code error-resistant. The idea is to make your code handle unexpected circumstances gracefully, rather than just going wrong or crashing. It’s a pretty broad topic, but in its simplest form means checking for invalid values or references before attempting to do things. For example, consider the following….

Read More

Unity Software Design – Inheritance and Composition

sdu_inheritance_composition

Inheritance is a big deal in object oriented programming. The ability to extend parent classes into subclasses, and have those subclasses be recognised as the parent (via polymorphism), is extremely powerful. It’s one of those Big Ideas that, once it clicks in your head, drastically changes how you think about coding. And if you’re not…

Read More