Comment by corytheboyd
Comment by corytheboyd a day ago
> […] bottom-up programming, where you write programs in multiple layers, the lower ones acting as programming languages for those above
I like to explain this as “hide the bad parts behind a good API”. Anything interesting is going to require “bad parts”, which just means the low-level, difficult work. From there, compose up and up until a high level orchestration is achieved. It works so much better than the bad parts being distributed everywhere! That’s what you’d also call a “leaky abstraction”
I think that many, perhaps even most, engineers incorrectly believe that the main purpose of abstraction in code is simply DRY, as if the goal is to save keystrokes or something.
In my view, the purpose of abstraction is to compress the concepts of your application into digestible and manueverable chunks, and DRY is just a heuristic for beginners to follow to help point to where appropriate abstraction boundaries may be.
I hope the various theories behind what constitutes good code will make their way out of scattered blog posts and into CSE curriculum.