7 ms·
Exercises, I want Exercises, no I need Exercises. In order for me to learn anything, I need some form of "homework". If you want to teach me a new language, a
by mswift42 9y ago
Exercises, I want Exercises, no I need Exercises.
In order for me to learn anything, I need some form of "homework". If you want to teach me a new language, a new framework, I need to "get my hands dirty".
Working through exercises makes sure I actually understand what I am reading, and sometimes it even shows me I don't understand what I thought I did.
- mattherman 9y agoYou could take a look at exercism.io. I just started the exercises on there yesterday so I don't have an informed opinion on whether they are good or not overall, but it might be what you're looking for. http://exercism.io/languages/rust/about http://exercism.io/languages/rust/about
- mswift42 9y agoNo, I mean that every chapter ends with exercises testing your knowledge about the chapter's contents. This is not specific to this github site. I've recently read the O'reilly Programming Rust Book, not a single exercise in it, and the official The Rust Programming Language Book also doesn't have any.
- shepmaster 9y ago> and the official The Rust Programming Language Book also doesn't have any Could you expand on bit on what you see as the difference between an "exercise" and the "projects" that the book includes? - Guessing game: https://doc.rust-lang.org/stable/book/second-edition/ch02-00-guessing-game-tutorial.html https://doc.rust-lang.org/stable/book/second-edition/ch02-00... - I/O: https://doc.rust-lang.org/stable/book/second-edition/ch12-00-an-io-project.html https://doc.rust-lang.org/stable/book/second-edition/ch12-00... - Web server: https://doc.rust-lang.org/stable/book/second-edition/ch20-00-final-project-a-web-server.html https://doc.rust-lang.org/stable/book/second-edition/ch20-00... There's also some exercises scattered at the end of various chapters, but not with the header "exercise" - Control flow: https://doc.rust-lang.org/stable/book/second-edition/ch03-05-control-flow.html#summary https://doc.rust-lang.org/stable/book/second-edition/ch03-05... - Collections: https://doc.rust-lang.org/stable/book/second-edition/ch08-03-hash-maps.html#summary https://doc.rust-lang.org/stable/book/second-edition/ch08-03... Sometimes they are even inlined with the text: > Try modifying Cacher to hold a hash map rather than a single value. > try introducing more generic parameters to increase the flexibility of the Cacher functionality. - https://doc.rust-lang.org/stable/book/second-edition/ch13-01-closures.html#limitations-of-the-cacher-implementation https://doc.rust-lang.org/stable/book/second-edition/ch13-01...
- chc 9y agoI think this is the difference between the "projects" all through the book and the "exercises" the earlier commenter is looking for: The projects in the Rust book are just a construct to give the example code context. It's not you working through the problem — it's Steve Klabnik, with you just following along. In fact, a reader who is actually learning Rust can't do the projects, because they don't have the requisite knowledge before reading the chapter that the project appears in. "Exercises" are more of a challenge: "Now that you know this stuff, try to accomplish X task on your own." By accomplishing the task, you both prove to yourself that you understood the material and help solidify it in your mind. Retyping code doesn't give the same benefits or experience. The second list of examples you gave does seem like the right sort of thing. I'm guessing the earlier commenter overlooked those because they're listed under the header "Summary," which kind of screams "skip me."
- steveklabnik 9y ago> In fact, a reader who is actually learning Rust can't do the projects, because they don't have the requisite knowledge before reading the chapter that the project appears in. Hm, we certainly expect that this is possible. If this is too hard, we need some tuning!
- chc 9y agoI think maybe I was a little bit imprecise. It's not that the projects are too hard, but that the way the book is structured doesn't give you what you need to complete the project before giving you the project itself. They're a "follow along" thing, not a "here, now you're 100% ready for this" thing. The projects tend to be designed to illustrate the concepts introduced in the chapter, so a reader can't do the project before they've read the chapter, because they don't know the things that the project is meant to teach. And after they've finished the chapter, they've already finished the project just by following along — but they haven't actually demonstrated any mastery of the subject in doing so. For example, it's not like somebody's going to start TRPL, see "Let's make a guessing game," stop there and successfully make a guessing game — they don't know any Rust at that point! Similarly, IIRC we're not introduced to most of the IO functionality before the IO project, and so on.
- dumindunuwan 9y agoHave plans to add a "Labs" section besides docs. The idea is in https://www.reddit.com/r/rust/comments/5a2q4k/suggestion_rust_by_practice_practicing_rust/ https://www.reddit.com/r/rust/comments/5a2q4k/suggestion_rus... (and https://medium.com/@dumindu/pushing-rust-to-2019-9616d82172d3 https://medium.com/@dumindu/pushing-rust-to-2019-9616d82172d...) unfortunately I am super busy with my career. So have very less time to spend on Learning Rust and updating this.
- agumonkey 9y agoSimilarly, what I liked the most about programming MOOCS was the online test/grading server. It gamified the learning, and was very stimulating for me. At one point, all "quantitative" subject learning platform could probably just be a grading server plus exercises.
- deleted 9y ago[deleted]
- smt88 9y agoI've always made my own exercises by deciding what I want to build with a language before I build it. Then I break it up into chunks and learn as I go.
- lukes386 9y agohttps://github.com/carols10cents/rustlings https://github.com/carols10cents/rustlings
- weavie 9y agoI agree. Good exercises will make you realise that you haven't actually read the chapter properly and you should probably go back and actually pay attention!
- jordigh 9y agoHow about Advent of Code? They start out easy, but after a while the difficulty is all over the place, and it'll force you to seek out new features of the language. It's a somewhat "realistic" way to learn the language, instead of having a set of more contrived set of exercises that only make you look at a particular part of the language. The first day, for example, will kind of force you to figure out how to parse arguments, how to loop, how to convert strings into ASCII... all basic, practical tools that you will need sooner or later anyway. Now it's your job to pick up a Rust reference, look around for the tools that you need, and use them to solve an actual problem. That's how I got very comfortable with D. http://jordi.inversethought.com/blog/advent-of-d/ http://jordi.inversethought.com/blog/advent-of-d/ If you do this for Rust, I'd love to see a blog post like the above.
- asimpson 9y ago100% agree with this! I used Advent of Code this year to explore Common Lisp. If you have any programming experience it becomes a fun hunt of "ok, I need to loop over an array. How do I do that in X lang?".
- bschwindHN 9y agoWhile this probably isn't helpful to you in particular, my company has a learning site geared towards beginner/intermediate programmers, including some content on Rust. The catch: it's in Japanese, so you'll have to use Google translate if you can't read it. The code is in English though. https://codeprep.jp/books?tags=&sortBy=createdAt&keyword=Rust https://codeprep.jp/books?tags=&sortBy=createdAt&keyword=Rus... The exercise style is "fill in the blank" so it's not as rigorous for learning, but still fun to get a sense of different language concepts.
- YuukiRey 9y agoI wholeheartedly agree with this! I am a pretty inexperienced self-taught frontend developer currently trying to learn Haskell and C. I went through Learn You A Haskell and have started going through Zed Shaw's Learn C The Hard Way. On the surface, LYAH looks a lot more polished. It has nice drawings, less typos, seems like an actual book rather than a gathering of notes and thoughts turned into teaching material. But the exercises in LCTHW are amazing. They always challenge my knowledge in a way that often makes me realize that I didn't understand anything from the prior paragraph. In LYAH I usually tried following along in GHCI to get an intuitive idea of the functions and patterns used. Yet, whenever I sit down to just build something that, while using the same features, deviates from the example code quite a lot, I often notice glaring holes in my understanding of the topics. And so, bottom line, I want teaching material to ask hard questions which challenge my assumptions and perceived understanding. As a beginner, I can't come up with such questions on my own. Just presenting me with already assembled programs and going through them line by line just doesn't work (for me at least).
- Errsher 9y agoHave you taken a look at the Haskell Programming from first principles book? They have a lot of exercises with each chapter. http://haskellbook.com/ http://haskellbook.com/
- nobleach 9y agoIt's an absolutely fantastic book... but you're asking someone to swallow that first chapter on Lambda Calculus. Maybe that's the best approach, but I can see it completely scaring off an entire class (or classes) of programmers.
- dumindunuwan 9y agoThanks for the feedback! It's a good idea to add questions section at the end of each section.