Get the latest tech news

Locality of Behaviour (2020)


Carson Gross explores the Locality of Behaviour (LoB) principle, which emphasizes making the behavior of code units obvious on inspection to enhance maintainability. He discusses the tradeoffs between LoB and other software design principles like DRY and SoC, offering insights on balancing clarity, abstraction, and maintainability in modern development.

This “spooky action at a distance” is a source of maintenance issues and stands in the way of developers understanding of the code base. A good function abstracts away its implementation details, but is also invoked in an obvious manner, without any spooky action at a distance. Increasing the obviousness of the behaviour of an element is, ceteris paribus, a good thing, but it falls to both end-developers and especially framework developers to make LoB both as easy and as conceptually clean as possible.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of behaviour

behaviour

Photo of Locality

Locality

Related news:

News photo

Behaviour Interactive snaps up Darkest Dungeon developer Red Hook Studios

News photo

Dead By Daylight's Behaviour Interactive hooks Darkest Dungeon developer

News photo

Two Useful Prompts to Explore Intent and Behaviour