Quidest?

Clever code and obviousness-oriented programming

· Lorenzo Drumond

When it comes to writing code, always strive for obvious code but clever design.

When you’re in front of a hard problem, stop and break down it to simpler problems.

If we’re writing complicated code, something’s gone wrong.

The thing of excellent programs (e.g. golang’s standard library) is that everything looks simple and straightforward.

The cleverness of well-written programs is at a higher level: in the design. Everything is very carefully and thoughtfully structured so that when you get down to the level of individual functions or statements, the code follows clearly and elegantly from the design.

This simplicity is the goal all along.

We call this approach obviousness-oriented programming. (the only kind of worthwhile OOP)

When we can’t see clever code, is because we are looking at clever design.

References

#computer_science #obvious #code #oop #programming #clever