A piece of advice to the Rust community, from a novice Rustacean
First, I want to express my thanks for the people who take the time out of their day to answer what seems like the same questions over and over again. I have been very much enjoying Rust, and been thankful for the countless answers provided to the many questions spread over Reddit, Stack Overflow, and in other forums from people taking time out of their day to help a stranger.
However, it took me awhile to actually become proficient in Rust. I mean over a year. And by "proficient", I mean "able to get more than a "Hello, World" to compile. I would pick up the language, bang my head again it, and give up for a few months. And there was always some permutation of the same line that probably did more harm than good when I was ready to give up. It goes something like, "You must not have read the Rust book", or "You should really read the book before you try programming in Rust", or "the book already answers this kind of question." Even if this was done in part of a response which included additional context and an answer, I still would like to convince you to avoid this kind of language.
I'm not saying that the book itself is a bad document. It's really good! I have read it entirely through at least twice now, and have over the years read multiple versions of some chapters (e.g., the chapter on "borrowing") multiple times more. It's good that we impress upon people the significance of this learning resource. However, "You should read the Rust book" comes off as accusatory, and to those who HAVE read the Rust book (and some sections multiple times), patronizing. It's hard not to read "Anyone who is smart will know the answer simply by reading the book, and if you have read the book, then you must be an idiot."
In conclusion, I recommend that you DO continue to reference the Rust book in answers to questions. It is a useful guide. Just please try to leave the snark out of it.
**Edit:**
Thanks everyone for the interesting perspectives. Of course, I realize there are some people who are just snarky. It's who they are, and they don't want to change. I would be silly to think I can change them. I guess my post was more aimed at those who are genuinely trying to help others and do so in a civil way.
One thing I heard a lot is that it can be frustrating to deal with people asking questions who it seems haven't done enough work to ask a good question. I can understand that this is frustrating; doing what you believe is best for the person (by pushing them to do a bit more on their own) is not necessarily wrong. I guess my point is that phrasing matters. And it can be pretty simple. Rather than...
"This was all answered in the Rust book, chapter X"
...one could write...
"If you haven't already, I recommend going over chapter X in the Rust book."
It's not that much longer, and doesn't make the accusation that you didn't read the Rust book and therefore are at fault for your misunderstanding. Hopefully this isn't too much of an ask :)
Posted Sep 14, 2019, 2:30 PM UTC · edited
A lot of the time people come to Rust from another language, Java/C/whatever, and they initially often see that Rust looks kinda similar visually so they assume it's similar linguistically.
So they dive right in trying to use idioms from their last language in Rust, getting frustrated, and then when they ask for help people explain what's wrong in terms that are basic if you read the book, but which aren't at all familiar if you haven't read it yet. I seriously know a guy who spent six months trying to make a circuit simulation program, including extensive macro usage, without reading the book past chapter 5. It's wild.
While I agree that "read the book" is absolutely not the end of learning Rust, it's certainly fair to always check that a person asking a question has read the book before proceeding with a Q/A session.
Yeah, I'm currently doing interviews for a programming job where part of the description is programming in Rust. I've had multiple applicants who said “yeah I've looked at some Rust code in preparation for this interview, and it didn't look hard at all”. Yeah, right…
My experience doing interviews is that a lot of people tend to claim to be acquainted with Rust just to appear up to date with modern programming. Many of them have read through the book or a tutorial, but have never written a line other than hello world.
A simple question to differentiate between those and the ones who have actually made an effort to use Rust is something along the lines of "what are your experiences with the borrow checker?" If the applicant responds with something like "it's ok" or "I haven't gotten that far", you can rest assured that they haven't done any Rust programming. (Unless the applicant is a genius, that is.)
Responses from folks who have used Rust in practice include "fighting with it all the time", "used to fight with it, but it's getting better", "hate it with a passion, but it saves my butt", "annoys the hell out of me", and so on.
I kinda like it when compilers yell at me. Whether it's the Rust borrowchecker or the GHC typechecker. Am I weird?
Seconding this, I don't think of it as "fighting" the borrowchecker, i'm "working" with it. It stops mistakes and bugs for me, it isn't trying to stop me from writing code or anything. Mindset matters.
Short-lived early noughties gonzo techno act The Laziest Men On Mars, best known for their track Invasion of the Gabber Robots, which was the soundtrack to OG internet meme All Your Base once wrote in an interview, now lost to the web:
So, well, yes, you probably are. But you're in good company.
I'd say that my feelings to borrow ckecker is about the same as to type ckecker. It has its annoying limitations, but today you rarely hit them thanks to nll.
Do I sound like experienced Rust dev? :)
Heh, if you hate it you're doing it right. If I ever encounter somebody who actually claims to know Rust, I'll sure ask that question!
btw, I just posted our job ad here.
Whenever I feel sad about the borrow checker, I just remember that soon I will be able to use a lot of threads and my code will "just work."
But issues around references to temporary objects can be a real pain..
I have a definite love/hate relationship with the borrow checker. We’ve managed to work out most of our differences lately though
My response would probably be "I've learned to appreciate it - the reason I like Rust is because the language enforces borrow checking".
And that's a perfectly convincing response, the key being learned to. Someone who never noticed the borrow checker or who never had issues with it has probably not really used Rust. It would be the Rust equivalent of a C or C++ programmer who has never experienced a crash.
I remember getting one of my first Rust programs working nicely but all as one big long function. Then I was like right, time to tidy this up into smaller functions and structs before I continue with this any further. I thought that since it works fine as is, this wasn't going to be a difficult refactor, like any other language that I've done such.
Hello borrow checker, 99 errors at compile, 99 errors at compile, you fix them all, then compile, 99 errors at compile. Legit experience, so many borrow issues cropped up once I broke all that logic out, I'd fix them, and to my surprise it only revealed that there were more issues somehow.
At one point... it's "WTF just bloody compile and let me run the damn code, enough of your whining damn it!", while at the same time it's also "Wow, I'm really bad at avoiding bugs, I love you borrow checker (and other assorted compile time errors)", especially with those niche cases that get picked up during compile that you'd only otherwise be aware of during run-time and only if you noticed something was actually off.
So it can be a hassle and slow me down, but I like the additional confidence when it compiles happily, I feel that I don't need to offload a bunch of checks in a test suite for ensuring a similar amount of trust(not that tests aren't still useful, if anything the overall value of what remains is higher).
Did I pass the question? 😎
TL;DR: My reaction to the question. While also being like this afterwards.
I find that it really encourages you to modularize your code in the first place in order to avoid the hassle of breaking things apart later, which takes a lot more organization in Rust than in other languages.
This has been a very good thing from my experience.
I've heard from you and others the problem of wanting to answer questions, but finding so many people who appear simply haven't done the work to propose a decent question. I can sympathize with that, and perhaps I didn't do a good job explaining my issue.
By all means, I think it's commendable to try to get those who ask sub-par questions into a better situation by asking them what they've done first. However, I think phrasing is important. My post is really just an ask for rather than saying something like "You should have read chapter X of the book", one phrases it as "If you haven't already, read chapter X of the book." From someone who has read the book, the change in phrasing brings the comment from snarky to benign.
I apologize if I didn't do a good job making this clear in my post.
Oh no no, we all have out own brand of English, and it's very easy for written mediums to mangle tone and intent. I doubt that people are trying to be snarky very often, but it can easily still seem that way.
I agree. Hence this post, where I'm hoping I can improve things, if only a small amount.
Just to be clear, I've not gone much further from "hello world" in rust.
That said, I tend to disagree with "don't tell people to RTFM". More specifically, I don't see any difference between "You should have read chapter X of the book" and "If you haven't already, read chapter X of the book".
Actually, the more I think about it the more I'm convinced that I'd prefer to be given the first answer. Because it tells me that I have definitely missed something and should read that thing again. The other reply sounds too "wooly" and I might brush it off as "I read it, I can just skim over it again to refresh my memory". There's also the fact that some questions are repeated over and over again and for those RTFM is very much suitable as rehashing the answer is a waste of time.
TL;DR: Even when asking a question, I prefer the more aggressive RTFM.
I can see that. Unfortunately, I guess different things work for different people.
I guess this is my issue. I don't really see where it's useful to think that once someone gets stuck with something in Rust, it should be required to reread an entire chapter or two of a book again. In my experience, I learned the most when I ran into problems not from the book (which laid the groundwork for my learning, certainly), but from the people who have provided more in depth answers, taking real-world examples that look much different from those in the book and explaining them in their own way. Eventually, one of these explanations would click.
Unfortunately, I think there is going to be some implicit friction between trying to maintain a novice-friendly environment and trying to increase the efficiency in responding to the most basic of questions. My post was not directed towards the community at large in an attempt to make it more efficient, but rather at those who are trying to make things more welcoming to novices. I understand the point about trying to not allow forums like this to become only a den of very basic questions, and I don't pretend to offer any solutions to that problem.
Thank you for remaining civil in this discussion.
Exactly what the most of my previous post tried to say.
I'm just talking from my experience. In communities that have great documentation (Arch, Gentoo, FreeBSD, OpenBSD - to varying degrees), I did ask questions and got RTFM style responses and not for a single moment did I think that the person responding should have given me a chewed up answer. Instead I (re)read the chapter of the handbook or the wiki page and, if needed, asked a much more specific question regarding a thing I read that I either didn't understand or didn't provide the expected results.
I absolutely agree, but this means that a few things happened before you had to as the question:
If all of the above is true, I absolutely agree that "RTFM" has no place.
I agree with you here as well. Note that I make a distinction between "a basic question with 0 research" and "a basic question that shows some effort". The first kind is of questions are by help vampires and I absolutely don't see anything wrong in telling them to RTFM. The other kind shows willingness to learn and should be helped out.
Today's example case 1: A user cloned my software and started it. It's written in python except a core piece which is in C++. On start the error was "Core not compiled. Check the README for instructions." That guy came to me and said that he's getting a "weird" error that says <quoted error here>.
foo.soin folderbar?Are you telling me that sending him a link and saying "read the instructions" was too harsh?
What I'm trying to say is "RTFM" has its place in two cases:
Lastly
Absolutely no need to thank me. We're exchanging points of view that obviously differ in some aspects, but there's no reason for anything but civil discussion.
Hey dude did he ever finish that program and if so could you tell me more about it? PMs open