Large-Scale Software Development

Log in to your course web

You are not logged in KTH, so we cannot customize the content.

The biggest problem in the development and maintenance of large-scale software systems is complexity — large systems are hard to understand. [Out of the Tar Pit, by Moseley and Marks, 2006].

A major part of this complexity is accidentally created when we introduce and manage state. 

This course will enrich the participants on how functional programming can reduce unintended complexity and create code bases that are simpler to maintain and reason about. 

Functional programming is a paradigm, which focuses on values and pure functions rather than mutable objects and imperative statements. In a functional language, state management is typically pushed to the boundary of the program.

Since well design of code is intersubjective we need to have a good dialogue together in the course. We need to be open-minded, share our perspectives and experiences, and continuously reflect upon our own and others experiences. 

By gaining experience, we will acquire empirical knowledge, intuition and sensors for avoiding unintended complexity, creating appropriate abstractions and a sustainable code base.

We will use the principle of single source of truth with atomic updates. The library re-frame states the following useful thoughts upon those concepts:

  • Using a single source of truth (i.e. one map for the whole state), we write no code to synchronise state between many different stateful components. You end up writing less code and an entire category of bugs is eliminated. This mindset is very different to OO which involves distributing state across objects, and then ensuring that state is synchronised, all the while trying to hide it.
  • The one state can also be updated with a single operation, which acts like a transactional commit. There is an instant in which the app goes from one state to the next, never a series of incremental steps which can leave the app in a temporarily inconsistent, intermediate state (where we have to lock users from reading our state). Again, this simplicity causes a certain category of bugs or design problems to evaporate.


Feedback News