Monday Feb 21, 2022
Episode 3, Clean Code Part 3
Hi there my fellow gamedevs and welcome back to the All Things Unity Podcast. In this episode we are going to continue our journey through clean code with the next four chapters of the book. We are going to discuss chapters 6 through 9. Object and Data structures, Error Handling, Boundaries and Unit Tests.
Chapter 6 is about objects and data structures, where we talk about the distinct differences between them; how objects hide implementation details and expose their data through functions and data structures do the exact opposite and expose their internals without providing an abstract interface.
Then we also discuss error handling in chapter 7 and how error handling can be really difficult in Unity3D since we don’t want to start throwing exceptions everywhere because it will impact performance greatly.
Next is chapter 8, boundaries, and it is about how to integrate with 3th-party code. How you explore it by covering it by tests and how you create facade classes around it to minimize dependencies.
And then, the final chapter, we discuss chapter 9 which is all about unit testing. As I said before finding a unity project that is properly unit tested is very very rare, and that’s for a reason of course. We’re all going to discuss it in this episode.
In this episode I said I wrote a blog about Polymorphism which you can read here: https://hamersoft.com/2021/03/10/14-solid-part-5-the-dependency-inversion-principle/
I also mentioned the Law of Demeter: https://en.wikipedia.org/wiki/Law_of_Demeter
Enjoy!
And as always, remember; With Unity, we can do great things.
Comments (0)
To leave or reply to comments, please download free Podbean or
No Comments
To leave or reply to comments,
please download free Podbean App.