Get the latest tech news

Deliberate Abstraction


We just talked about what modules are: they are ways to create program families without having to tear up existing code and rewrite it. They accomplish this by hiding design decisions so that subsequent decisions cannot depend on the ones we might change.

The details are irrelevant, but it was a great opportunity to put inside-out design into practise, because when I started programming, I didn’t actually know the rules of the game, nor what all the card types were. What’s neat is that by swapping out the implementation of Ply for something else, we can create widely different games, using the same basic building blocks. The way I have designed this, all types of actions permitted by the game need to be exposed as methods by the Ply module’s interface.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Deliberate

Deliberate