by akasakahakada · 3y ago · 0 comments
Great! Now I have to travel through 100 small classes spread across 1000 files in a 10000 nodes directory tree in order to understand 1 high level class. Great readability improvement!
> if you have a class that solves a difficult problem with, say, only 2 methods with no more than 3 arguments each, you’re in good shape
Keep your APIs small, but poweful. This is the opposite of short function people which keep their APIs huge, but weak.
You'll see down below a case for inlining functions that are only used once, and the quote "As for one liners that are called only once, just inline them. The small functions guy can take a hike."
Nowhere does he say that you should have 100 small classes across 1000 files. He says the opposite: your modules should have a lot of functionality but a small interface.
Also if you can keep that much context in your head when reading code that's great for you -- most people can't.