Feeling lost and frustrated in Rust

Hey everyone,

first of, I am really glad about Exercism, the work you put into this, and the #12in23 challenge. I am a computer science graduate, who did some programming at University and then I became a Java web developer, which I am doing for the last 5 years now, so I am not entirely new to programming, yet I never did much more than Java and I thought this challenge would be a good idea to dabble with some other languages. I did some Elixir and the track felt really good and I got along quite well.

Now for Rust this is an entirely different thing. I feel quite bad that my first post on this forum is criticism, but I hope it’s constructive. Or maybe it really is just me, maybe I am not getting how this is supposed to work. I’ve finished 7 exercises, following along with the syllabus. The Hello, World! and Lasagne were super easy, all information was in the description themself, no need to look things up; then came the Assembly Line exercise, and this one already had important concepts missing in the syllabus and the help text (match, _, panic!), but I was able to figure this out, and with the help of a mentor also managed to get a solution that looked quite nice. For Semi Structured Logs however, I was investing hours into understanding what I was doing wrong; the concept is Enums Basic, but the problems lie in the different (and at least to me untypical) handling of Strings in Rust. Information that I would have needed were things like owned vs. shared, String vs str vs Literal strings, Format strings. What’s a trait, what’s a Display, etc. For all these things there isn’t even a point on the Syllabus - but there are also no hints that could point you in the right direction. In the end, I spend reading the book, reading stack overflow, and googeling a lot, and in the end, you always find a solution that works, but I’d rather understand what to do, before I see a solution, and be able to find the answer myself. At least, that is what I believe is also the goal of Exercism? But to be able to do this, there needs to be at least a list of keywords to google?

I am at the same problem once more, now with the Low-Power Embedded Game. While there is a lot of information, the crucial part is missing: How do I get rid of cannot mod '&T' by '{integer}': &T, i.e. how do I cast this type into an int? Googling this will actually show me the solution to exactly this exercism task, as apparently others also struggled here and did not find a solution themselves; the solutions on the internet use concepts that I don’t quite get, and because they seem overly complicated (add this to the function signature where T: Eq + Copy + std::ops::Rem<Output=T> + TryFrom<i32> and then do something weird like T::try_from(0).ok().unwrap(); with the numbers 0 and 2 and also dereferencing the closure variable), so I also peeked into the community solutions after over an hour of frustration. And there, people are not using filter or map but simply use step_by(2).

So, my feedback at this point is the following: I feel that the information in the syllabus plus in the hints and the readme - including links - does not really help; there is somewhat of a mismatch between the information and the exercise itself. While the information is pretty basic, the problems that someone entirely new to the language faces, are rather hard. In fact, they are so complex that someone like me, who actually already has a lot of experience in programming is getting frustrated as well. I feel like I am missing out on essential concepts that I even don’t know how to name (like the where line). After getting stuck a lot, I actually started reading the Book - but even after having read a third of that, I am still struggling with Exercism.

In the Elixir track, this felt more in tune, I could easily follow along, I didn’t need to google, because I got the information I needed from the files and the linked documents. I read through the info, looked at the tests and knew what to do, and was able to find a solution. With rust, I feel like I know what to do, and then get stuck with high-level concepts that are not explained or hinted at and that take a huge amount of research with the risk of finding the solution to the problem (which is neither the point of Exercism nor is it helpful). In the end, I found myself looking forward to April, and hoping this will get better again, then. But that’s actually a quite sad thought, and totally different to my experience with Elixir, where I was actually sad that I had to stop, and wanted to go on with.

But maybe I am misunderstanding how to use this track? Am I the only one with these kinds of problems? How do others cope with this? Is there something I am doing wrong? Am I supposed to read the entire material presented at the information tab before even starting the exercises? (But wouldn’t a lot of them then be rather dull?)

2 Likes

I’m sorry you’re having a difficult time with Rust. This sort of question comes up pretty regularly. The short version of it is that Exercism isn’t really set up to teach people a language from scratch. There’s an expectation that people starting a track already know the basics from elsewhere (or can figure them out at they go from elsewhere). Exercism isn’t set up (nor intended) as a primary language learning resource.

1 Like

Exercism by itself is seldomly enough for learning a language. Elixir (+ linked official docs) may be an exception. Your primary learning resource should probably be elsewhere, for the great majority of languages.

For learning resources about Rust, see this thread. In particular, try Rustlings and Rust by Example. And (largely) finish the book. And google why things are the way they are in Rust, rather than only how.

This is a dangerous sentiment. ‘Programming experience’ is poor justification for frustration, but it is easily taken as justification nonetheless, leading to giving up too early.

Programming experience is not linear. An experienced C programmer and an experience Prolog programmers may well have a very hard time switching places. Most of the time it does not make sense to judge the one amount of experience as ‘greater’, ‘equal’, or ‘lesser’ than another amount.

It is evident that you lack concepts relevant to Rust. That’s fine; we’ve all been (or still are) there. ‘Programming experience’ doesn’t come into it though. Had you written only Java for 10 more years, it wouldn’t have made any difference.

Ruminations on solutions

Rust looks a lot like a ‘normal’ imperative language, but it isn’t one at all. Maybe we could emphasize this in the track?

Going through exercises and marking them with relevant language concepts seems like a relatively cheap thing to do. We can then set up prominent warnings about (unexpected) prerequisites. How do you reckon such warnings would have influenced your experience, @pygospa?

3 Likes

We agree that the syllabus needs work which is we’re temporarily disabling learning mode for Rust: Disable learning mode by ErikSchierboom · Pull Request #1660 · exercism/rust · GitHub

2 Likes

Hey @pygospa - thanks for the feedback and for the tone of your post. We really appreciate when feedback assumes the best and I felt your post did so.

As @ErikSchierboom mentioned, we’re disabling learning mode for the time being while we thing through how we can make it a better experience overall.

2 Likes

@pygospa When I take mentoring sessions for Rust, it’s quite often a lot about very basic things. Which are just not obvious with Rust. This really is another beast, compared to other languages. Just too many things you actually must know to even understand code. Thinking about the different syntax for closures, which are in Go still function of pretty much the same style. Just a simple example.

I do my best to accept also many Rust mentoring requests, while my main language is Go.

1 Like

@pygospa Sorry that the Rust track is not supporting your learning journey in the way you need. Rust can be a difficult language to grok in and of itself, without the learning path having gaps. With the learning path now temporariy disabled, you may want to look at the practice lessons that appeal to you and continue your journey with them. Although I wrote several concepts for Rust quite a while ago, I don’t know if I have the time (or inclination) to work on the syllabus, but we’ll see…

1 Like

Wow, thank you for your positive reactions. As I said I wasn’t feeling too good about writing this because I know that this is non-profit and people putting their free time and effort into it, and as I said, this is highly appreciated and should be praised. So I am happy to read that you weren’t offended and that my criticism was understood constructively.

@MatthijsBlom Thank you for the link and the resources.

You are absolutely right - with my statement about the experience I wanted to underline that I am not a total beginner; but of course, as a programmer, you never stop learning, and it shouldn’t matter if I am totally new or experienced.

That would be helpful for me. I don’t expect the site to teach me everything, but having some good link to a concept or maybe even pointers to pitfalls, and some keywords to help you look things up would be really helpful.

To be quite honest I am a bit shoked - positively as well as negatively. On the one hand, I am surprised how fast there is an “official” reaction, and I think it is really cool. I hadn’t reckoned with that. On the other hand, I hope that this is not just because of my post and that I now didn’t block anyone who was looking forward to doing this with the syllabus. But again, thanks for all the work you put into this and also this fast reaction. I am looking forward to the improvements, and if I can in any way help, please let me know.

1 Like

It’s not :slight_smile: It’s something we’ve been discussing for a little while. I want us to make a great Rust track, but it’s proven to be a hard language to do this for (not for lack of many people trying). So we should back up and try again but not leave something half-finished around to confuse people in the meantime! :)

1 Like

I’m a little surprised that it has been mentioned multiple times here that Exercism isn’t well suited to teaching a language from scratch. I thought going in, that that was the point? I’m probably missing something but the course for Rust and Python both start with Hello, World!. Which one would not need to cover for non-beginners. Python then eases you into basic function calls and return variables, then begins to talk about data types etc.
This rust course immediately asks you to invert a string, with no syntax or best practice hints.
Looking at the exercises in the rust catalogue so far, a lot of them seem like more mathsy things that someone who can already write a program in rust may not (?) benefit from, yet a total beginner would have to go around googling a lot of things to get started.
I remember many years ago learning Python with Codecademy, which literally took you through the language’s features step by step, with brilliant examples and managed to never overwhelm 15 year old me. It lacked Exercism’s tutoring features for if/when you DID get stuck, but to me it seemed very nicely structured to give people the tools to go off and make their own python projects after a few hours. I’m sure that site has changed much in the decade since I last used it, but perhaps this course could look to that more granular example of teaching for inspiration?

Unrelated, but I feel like project setup / management is an oft-overlooked part of learning a new language. I went though a great deal of pain with my C++ projects as the compilation was effectively its own language(s) and the “proper” ways to organise and build my projects became more and more difficult for me to determine as I went along. And this process is quite unique to each language (make/cmake for C, compiler flags, library installation and linking etc. venv and a suitable folder structure for python etc).

Sorry if this is a little rambly- I’m not great at articulating. But hopefully I’ve managed to raise some interesting points in a constructive manner.

2 Likes

In my understanding it’s not for beginners in programming, but of course you can learn new languages from scratch.

I’m a little surprised that it has been mentioned multiple times here that Exercism isn’t well suited to teaching a language from scratch

I think (hope!) I’ve been clear in various places that I disagree with this entirely. You can learn languages from scratch, especially those with syllabuses (try Elixir, or Go, or Python, the others that have them to get a feel).

Rust’s syllabus isn’t yet ready for production, which is why we’ve disabled it. So because of that you’d need a seperate guide to the language. Once we re-enable it, hopefully you won’t! :slight_smile:


Welcome btw and thanks for the post! :)

And speaking from experience I can confirm this for Elixir and Python. I didn’t do the Python track but my girlfriend did, and she learnt it from scratch coming from a totally different field and now holding a job in IT (Exercism wasn’t her only source but it helped her a lot - she actually recommended the site to me); and I might be biased with my experience, but I did not have to look up anything when going through Elixir, and really enjoyed it.

I guess that’s where most of my frustration stemmed from: I was debating between Rust and Go, and chose Rust because it had a Syllabus and because people using it really love the language, so after enjoying Elixir on Exercism a lot, I had really high expectations; to be quite honest though - Rust is really tough. I did not give up, because I have a hard time quitting, and I do want to get even that mechanical march batch (damn you, gamification :smile: ), so now I worked through an entire book in depth, doing all the examples, etc. There are so many concepts that are simply different to any other language (slices, borrowing, ownership, lifeline variables, traits (and trait conditions)); when finished, I picked up Exercism again, and I manage to work through the exercises without feeling like having two left hands on the keyboard… but it’s still complicated with all these new concepts; I now get, why it’s complaining at certain points and what to do when Rust does - but I feel that it will take a much longer time until I manage to write something that’s error free on the first try.

I know why this is the only language showing up twice - and it totally makes sense for Mindshifting May, because it really is mindshifting… :exploding_head:

2 Likes

How soon can we expect the Rust syllabus back? :slight_smile: Or, how a volunteer (though a novice) can possibly help in pushing this forward?

2 Likes

If you want to participate, this thread is probably the place to start.

2 Likes

You can also track this and this thread for the work that’s going on right now.

2 Likes