March 2018
Intermediate to advanced
276 pages
7h 11m
English
Here are the solutions to the exercises in Chapter 5, The Principles of Code Age.
TensorFlow’s core/lib/core has low package cohesion and could be separated into smaller and more cohesive packages. The threadpool module would go into a concurrency package, while the arena and refcount modules are related to managing heap memory and could be contained together in a new allocation package.
To calculate a median value, we need to get the age of each individual line of code. This sounds like a job for git blame. We could even add the --porcelain option to make it easier to consume the output.