Roping in Complexity, Decay, and Duplication in a Growing Scala Project

Posted on September 13, 2016 in blog

Roping in Complexity, Decay, and Duplication in a Growing Scala Project

All software projects will grow in complexity and decay over time. Lehman's Laws of software evolution state that as a system evolves, "its complexity increases unless work is done to maintain or reduce it", and that a system "must be continually adapted or it becomes progressively less satisfactory".

Scala has a lot of tools to help combat complexity and decay. I will cover my own process of spotting decaying components of our system, and how my team and I apply functional programming concepts to grow our system without wide-spread, unmaintainable complexity growth. Specifically, how we define and practice standards within our group of engineers and how I utilized Shapeless and HLists to remove heavy code duplication.

I will briefly touch on the following specific topics: - Scalaz and Functional Syntax as a standard - Code formatting with Scalafmt - Common structures vs. Copied Code - Doing it right the first time - Removing duplicated code using Shapeless