3 ms·
This puts a name to the approach that I've been using to write my Rust book. Leaping directly to a final, idiomatic solution without explaining all of the funda
by mprovost 3y ago
This puts a name to the approach that I've been using to write my Rust book. Leaping directly to a final, idiomatic solution without explaining all of the fundamentals first doesn't actually teach anything (except memorisation). It's often more effective to show a more straightforward, but possibly less idiomatic or performant, solution first. Then later introduce more complexity.
But I realise that if you stop reading after a few chapters you might go off into the world and write suboptimal code. In my mind this highlights the difference between a reference and a textbook designed to teach. If you just want the final answer, check the reference. (Or have an AI autocomplete for you.) But to teach you have to bring people on a journey and show some "mistakes" along the way.
My premise is that people learn better that way and retain the knowledge because you are giving them the chance to "discover" it themselves.