5 ms·
I don't disagree! The vast majority of the IRC group was very helpful! I should have mentioned that in my original post. There was just one particular day where
by Jemaclus 12y ago
I don't disagree! The vast majority of the IRC group was very helpful! I should have mentioned that in my original post. There was just one particular day where I was struggling with a concept and I felt like people were making fun of me and it just really made me not want to touch Rust for a few months.
But that's not really the point. I think the point is that there's a need for a sort of onboarding process for people who have never had to deal with some of these basic concepts. For instance, in web development, there's not a lot of need to know much about ownership or memory. The popular languages (Java, PHP, Python) kinda handle those things for you. So when you dig into Rust, you spend a lot of time thinking things like "wtf is a pointer?" and "wtf is a reference?" instead of actually building something useful.
That's a really frustrating part for me. I can build anything I want in PHP or Python or Java. I know those languages like the back of my hand, and if you give me a problem, I can solve it.
But then I start with a language like Rust, which concerns itself with all kinds of things I've only vaguely heard of, and then I'm completely lost. Super, super, super frustrating. It's a struggle to do a basic blackjack game -- something I could do in my sleep with Python!
So you don't know these concepts, which is already frustrating, and then you go into chat and you say "WTF is a pointer?" and hopefully people say "Oh, dude, it's so easy, imagine. you have this..." instead of "That's basic computer science, man. RTFM."
To be fair, I think Rust's documentation back at 0.9 was great. I'm positive it's way better now. But back at 0.9, it didn't answer the questions I had, which is why I had to go to chat in the first place.
But yes, most people were very, very helpful and I really did learn a lot. :)
- hga 12y agoDoes Wikipedia help, e.g. https://en.wikipedia.org/wiki/Pointer_(computer_programming) https://en.wikipedia.org/wiki/Pointer_(computer_programming) ? I can remember struggling to really learn pointers in C, the key for me was this bit of samizdat: https://en.wikipedia.org/wiki/Lions%27_Commentary_on_UNIX_6th_Edition,_with_Source_Code https://en.wikipedia.org/wiki/Lions%27_Commentary_on_UNIX_6t... So one obvious solution is to annotate a body of real code ... but in general you're suffering from trying to learn a moving target, and good documentation tends to trail.... That Version 6 UNIX(TM) was updated/reimplemented as Xv6 https://en.wikipedia.org/wiki/Xv6 https://en.wikipedia.org/wiki/Xv6 ... maybe someone should do a pedagogical Rust version??? Maybe x86_64 and/or ARM?
- Jemaclus 12y agoYeah, I think the ever-changing nature of Rust was an obstacle, for sure, which is one of the reasons I'm so excited for Rust 1.0. :)
- jimbokun 12y agoIf you're still stuck on pointers (although sounds like you eventually got past it), Kernighan and Ritchie have a very no-nonsense, straightforward presentation of the concept. http://books.cat-v.org/computer-science/c-programming-language/The.C.Programming.Language.2nd.Edition.pdf http://books.cat-v.org/computer-science/c-programming-langua... See chapter 5. Starts with a nice little picture. Of course, the basic concept of a pointer is not really that tricky. It's how to use them, what you can do with them, and how to avoid accidentally shooting off your foot with them that are the tricky parts. Anyhow, if you know any other programmers who want to understand pointers, I don't think you can go too far wrong pointing them towards Kernighan and Ritchie.
- hga 12y agoI, for one, found the arrays and pointers chapter in K&R Edition 1 to be mostly useless (per my other comment in this subthread I used the Lions Notes). Do you know if it was significantly improved in the 2nd Edition you recommend?
- jimbokun 12y agoNo, I don't know if the versions are different. I scanned the first couple of pages again in the PDF, and still like the simplicity of the presentation, avoiding indirect metaphors ("a pointer is kind of like..."). I never got a copy of Lions, unfortunately. Seems a shame to not have more books in that style.
- hga 12y agoHmmm, I read the first N pages of 2nd Edition of the chapter and it sure looks clear and good to me, and one area where I found it confusing looks like it was improved (but who can say 33 years later?). I won't make an anti-recommendation of this edition, but would be curious if anyone has problems with it.
- smosher_ 12y agoI happen to have both editions handy. Some sub-sections seem to be 30%-50% rewritten. A big change is there are lots of graphics. 2e seems to be improved, but it's hard for me to estimate how much of an improvement it really is.
- pjmlp 12y agoHaving started programming in ZX Spectrum it baffles me people don't get pointers nowadays. Not hinted at you, just a general rant, as I see this a lot around me. Actually I think the way pointers are used in Pascal/Modula line of languages it is easier to understand than how C and C++ do it. Have a look at "Algorithms and Data Structures. Oberon version", "Object-Oriented Programming in Oberon-2." and "Project Oberon". http://www.inr.ac.ru/~info21/ADen/ http://www.inr.ac.ru/~info21/ADen/ http://ssw.jku.at/Research/Books/ http://ssw.jku.at/Research/Books/ http://www.inf.ethz.ch/personal/wirth/ProjectOberon/ http://www.inf.ethz.ch/personal/wirth/ProjectOberon/ Even if Oberon(-2) isn't your cup of tea, I personally think these concepts are well explained in these books.
- rictic 12y ago"it baffles me people don't get pointers nowadays" If you continue to be baffled in the face of consistent evidence then the problem is probably in you rather than in reality (or you're not actually baffled, but instead are feigning confusion as a way of projecting superiority). Honestly what's there to be baffled by? There are many programming environments that are both common and quite productive that have no pointers at all. I've gone literally years of my working life without touching a single pointer in production code. That's an unusually harsh response I know, but I find this sort of attitude incredibly toxic, and it has hollowed out several communities I've been adjacent to. Some people know some things but not others. You can make them feel crappy by signalling that they are damaged or deficient, or your attitude can be positive and inviting.
- pjmlp 12y ago> I've gone literally years of my working life without touching a single pointer in production code. But you did use references, right? What baffles me is how many young developers code without caring about the underlying infrastructure. Not caring to understand what makes their coding possible. I have met many that deal with programming like car owners that just want to drive down to the supermarket, so to speak. > You can make them feel crappy by signalling that they are damaged or deficient, I explicitly stated I wasn't targeting the OP with my comment. > or your attitude can be positive and inviting. That is why I pointed out a few, quite good, books where the subject of reference vs pointers happen to be described quite well in a programming language that isn't as intimidating as C or C++, while allowing for the same type of coding. One of them even shows how to build an entire computer.
- ossreality 12y agoYou don't "know" Java or PHP then. Not to be a dick, but you don't.
- pjmlp 12y agoJemaclus, if for some reason you felt bad about my remark, even though I mentioned I wasn't targeting you, excuse me. It wasn't that clear to me that the words were a bit harsh.
- Jemaclus 12y agoNo worries. :)