Chapter 8. Development Example

In this chapter, I will pretend to develop a piece of software guided by the Best Practice Patterns. It will likely seem incredibly slow to you, since I won’t write more than a couple of words of code without pointing out another pattern. Not to worry, once you get used to the patterns you don’t really think of them individually. You build higher levels of structure in your mind that let you just write clean code quickly and without thinking consciously of the smaller steps, much as you can speak without consulting a grammar book.

Problem

The problem we will solve is representing multi-currency monetary values. It’s not as simple as it might seem. There are lots of unit-value computations in the world. Any time ...

Get Smalltalk Best Practice Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.