3 Data and Meaning
This chapter covers
- Exploring data’s meaning
- Moving from meanings to constraints
- Capturing it all in code
In the previous chapter we explored what data is; now we’re going to explore what it means. It might sound a bit abstract at first, but this pursuit of “meaning” is one of our primary tools for building rock solid systems. To quote Leslie Lamport, “It’s a good idea to understand a system before building it”. Being very explicit about what our data means is how we get down to that fundamental level of understanding prior to any coding.
Once we know what our data means, we have the much simpler task of moving that meaning into code. We’ll explore various techniques we can use for data modeling. We’ll look at which ones work, which ones fall short, and the criteria we can use for weighing if our modeling is moving in the right direction or not.
The last thing we’ll do is turn all this talk about meaning towards the type system itself. The types we use while modeling our data can have a significant impact on the meaning of our code as a whole. They determine how easy or hard it is to do the right thing. We’ll learn to see types under a new light and visualize them for what they are: sets of values. Once we can do that, we unlock a powerful form of analyzing our modeling in order to squeeze out potential bugs before they’re allowed to surface.
Let’s dive into the world of meaning!