Hacker News new | ask | show | jobs
by Havoc 1169 days ago
At what point would you suggest switching from tutorials to building a toy project?

Finding it hard to judge. Sooner seems better but at risk of missing major understanding pieces which could end up being slower in total

3 comments

Not OP but imho as soon as possible; whatever major understanding pieces you are lacking you will have to learn while making the project.

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.

I wouldn't treat it as a binary. Use the project to provide feedback on what learning material to read, then go back to the project until you hit another blocker.

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.

Just get the basics down for traits, borrowing and move semantics. Make sure you have thorough understanding of heap and stack. Once those are down you can move on to projects.

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.

Thanks - I guess its time for a bit more tutorials first then. Traits & borrow is still very shaky