by Havoc · 3y ago · 0 comments
Finding it hard to judge. Sooner seems better but at risk of missing major understanding pieces which could end up being slower in total
There are also language concepts that will not make much sense when learning without context from a book, but will make much more sense after attempting to write something without using that first.
Suppose you're read a book about Rust and now you want to write a web service. You take a peek on Reddit and hear good things about Axum, so you check out its docs.
You write some handlers that do crud operations on a database, and it's all going well. You can translate the examples in the docs into your code in a pretty straightforward way.
Then you decide you want live chat. You've heard of websockets, and axum has a websocket example. But you keep beating your head against the compiler. What is the right type for a chat room? Who owns the chat rooms?
You realize now would be a good moment to take a step back and learn more systemically. After reading through the tokio mini redis tutorial async makes a lot more sense and you're back on track.
In this example you "wasted" a little time before you took a step back and studied async more, but you saved significant time by tailoring your learning to what you needed. If you hadn't gotten partway into your project you might not have realized you'd want to learn async next and instead studied something else.
Rust is sufficiently complex that you have to do projects to encounter every nook and cranny of even the core language. Other language like python expertise in the language often involves knowing the libraries.