model

Notes from Functional and Reactive Domain Modeling alvin July 20, 2018 - 10:17am

I’m a big fan of the book, Functional and Reactive Domain Modeling, and these are some of my notes (“CliffsNotes”) from the book, most of them coming from the first chapter.

Charlie Munger on having and using multiple mental models

“What are the models? Well, the first rule is that you’ve ot to have multiple models — because if you just have one or two that you’re using, the nature of human psychology is such that you’ll torture reality so that it fits your models.”

“You must know the big ideas in the big disciplines, and use them routinely — all of them, not just a few. Most people are trained in one model — economics, for example — and try to solve all problems in one way. You know the old saying: to the man with a hammer, the world looks like a nail. This is a dumb way of handling problems.”

~ from the book, Charlie Munger, The Complete Investor

Show me your flowcharts and conceal your tables ...

“Show me your flowcharts (source code), and conceal your tables (domain model), and I shall continue to be mystified; show me your tables (domain model) and I won’t usually need your flowcharts (source code): they’ll be obvious.”

~ Fred Brooks, “The Mythical Man Month

It’s hard to grow because it’s difficult to let go of the models of ourselves alvin September 14, 2017 - 6:34pm

“It’s very hard to grow, because it’s difficult to let go of the models of ourselves in which we’ve invested so heavily.”

~ Ram Dass

A terrific Model View Controller (MVC) diagram

Every once in a while when something hits you, you really remember it; it stands out in your mind as an “Aha” moment. One of those moments for me was when I saw a particular “Model/View/Controller” (MVC) diagram, and the light bulb went on. This diagram made the MVC pattern very simple, and I’ve never forgotten it.

How to add new behavior to closed classes in Scala (type classes)

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 19.7, “How to add new behavior to closed classes (models) in Scala (type classes).”

Back to top

Problem

You have a closed model, and want to add new behavior to certain types within that model, while potentially excluding that behavior from being added to other types.

Back to top

Solution

Implement your solution as a type class.

Table of Contents

  1. Problem
  2. Solution
Back to top