The computation is trivial, it’s the arrangement of objects and methods that is complicated

Two programmers can write the same program and the programs will be completely different because different variable names were used, different grouping of data was used and so on. The classes and methods are incompatible.

What if there was a language which could be written in such a way that generally if the computation is the same, then the code is the same. There’s only one way to write an addition. But there’s hundreds of ways to write a btree.

The grouping operators: variable, classes, structs, methods, functions, types all need to be abstracted. They all do the same thing. They group code together or where data is stored in memory. They’re an abstraction or syntactic sugar.

Most modern programming isn’t writing number crunching formulas (actual computation) but arrangement of object of the right type that contain the right data or arrangement of method calls. This book keeping is so complicated that software is slow to write and interoperability hard to impossible.

Interfaces partially solve the problem of interoperability. But it’s painful to implement 100s of methods in an interface.

I feel we haven’t found the right abstraction for writing and reasoning about code. Methods, classes, structs, variables, types are all incomplete. Everyone has strong opinions about what code is good. But one man’s beauty is another man’s garbage code. And there’s a lot of garbage code out there.

What upsets me is how unreadable mature codebases are. There’s no separation of concerns that is readable. Every concern is mushed together and sprinkled throughout the codebase. Little of a mature codebase is actually algorithmic, it’s mostly poorly managed complexity. The complexity is self-created. The abstractions that do exist are rife and terrible.

I’m still trying to think of alternative abstractions that make code more interoperable by default.

Many complex projects have taken a YAML approach to configuration – which makes sense for simple problems. As soon as the problem becomes more complicated, the YAML becomes unreadable. These projects provide no other way to integrate with the software – so you’re stuck with an unmaintainable mess. There’s no API besides the YAML.

Leave a Reply

Your email address will not be published. Required fields are marked *