4 ms·
That sounds like learning something only very superficially. Rewriting from scratch is the only way to really learn any topic of non-trivial depth and complexit
by grg0 1y ago
That sounds like learning something only very superficially. Rewriting from scratch is the only way to really learn any topic of non-trivial depth and complexity.
- rTX5CMRXIfFG 1y agoIt's not necessarily superficial learning. If you want to learn math, you'd be crazy to rewrite the rules of math just to learn it---you'd be better off with a good teacher and constant practice instead of building the theorems and formulas yourself, or you'll never finish learning math in your lifetime. Same can be said of learning a large inherited codebase. If you're assigned to a large piece of functionality and you need to understand it, your first instinct shouldn't be to rewrite the whole thing from scratch just to understand it; it should be to either read the code and documentation, or if those are impossible to comprehend, ask around what it's supposed to do, maybe even write tests to get a general sense of the behavior. I don't expect programmers to be cognitive psychologists here but the thing about learning is that you must do a "progressive overload" of complexity as you go, which is why building on top of what exists is the best way to go. You get a general idea first of what something is supposed to do, and then when you're good enough, that's when you can work backwards to building something from scratch where all the complexity at lower levels of abstraction wouldn't be too much for your brain to handle. Starting with a large amount of complexity will impair your learning and only discourage you.
- christophilus 1y agoDifferent people learn differently. I learned computer science by first learning low-level languages, and then moving up the abstraction tree. Many go the opposite direction. Personally, I’m a fan of learning by doing. Reinventing the wheel works better for me than just about anything I’ve tried.
- grg0 1y agoSure, you draw the line at different levels of abstraction, but you still need to rewrite from scratch the thing you're learning. If you want to learn how a web server works, you better write one. You don't need to write the OS that it runs on, however, although doing so also informs certain aspects of web server design. Reading the documentation of an existing web server alone is only going to result in a superficial understanding of it.