Week 46, 2019 Humane Code

Mark Seemann1:

As I describe in my Humane Code video, the human brain can only keep track of about seven things. I think that this rule of thumb applies to the way we read and interpret code. If you need to understand and keep track of more than seven separate things at the same time, the code becomes harder to understand.

This is a practical advice for writing readable codes. Mark mentions another way to measure code complexity.

Another way to evaluate the cognitive load of a method is to measure its cyclomatic complexity.

This probably be the way some services, such like CodeClimate, compute code maintainability score.

Charles Scalfani2:

So what are hierarchies good for?


If you look at the real world, you’ll see Containment (or Exclusive Ownership) Hierarchies everywhere. What you won’t find is Categorical Hierarchies.

In spite of the argument between Object Oriented and Functional programming, Charles reveals why using categorical hierarchies to organize information is hard.