logoalt Hacker News

loup-vaillant • yesterday at 10:02 PM • 0 replies • view on HN

A lot, yes, but far from most.

Most of the complexity I've seen in most programs I worked with so far was avoidable complexity, caused by under- and over-engineering. Mostly the latter.

If I had to identify the biggest culprit, that would be the OOP cult: all these organisation "principles" (not just SOLID) that have little basis in reality, and ultimately causes programs to be up to several times bigger, and up to several orders of magnitude slower, than the reasonable thing that just does the job.

The slower part is mostly because we forgot the laws of physics, ironically: the speed of light that ultimately drives the cache hierarchy for instance. That stuff is so fundamental by the way that even we humans have similar limitations with our working memory. The reason we split our source code in manageable, relatively isolated chunks, is very similar to the reason CPUs work faster when memory locality is good.

This parallel by the way may explain in part why simpler programs tends to run faster.