Our online Coding Dojo sessions became the most powerful learning experience for me, and recently we came across Conway’s Game of Life.
I remember playing this game on paper when I was a child. Yesterday I had the pleasure to code the rules and see them working.
To make it more fun, we in our Coding Dojo club decided to separate concerns between “cells” and “grid” where the cells exist. After an exciting discussion for which I am grateful to Dennis, Saeed and Byron, I had started an all-nighter.
Here is what I got with a sunrise:
I can not deny that SOLID code has its price. It takes much more time (2x or maybe 3x to compare to writing a monolithic code). Nevertheless, we get benefits such as extensibility and reusability.
Let’s say we want to run the same game in 3D space. We can easily make this modification with SOLID code.
What do I think about events in C#? I think they are not so different from what we have in real life. And when we have an event, we need to think of three things: who is the host, who are the guests, and what do we need to put onto the invitation cards. Continue reading “Events in C#: Let’s Party”