I’ve been coding for years in a multitude of languages, but other than one c class I had in college I mostly learned through osmosis, or learned new things as they were needed.
So my knowledge is honestly all over the place and with a ton of gaps.
I’m trying to learn rust and starting going through The Rust Book and afterwards I plan on going on Rust by Example and trying to code my stuff as strictly following best practices as possible.
Is that a waste of time? I mean rawdogging it has been working for me for a decade now. Should I just yolo and write what I wanna write in Rust and learn as I go?
In my opinion, once you have learned the basics (and a few advanced topics) of programming, you are already 40-50% into learning any other new programming language. If you feel reading a book is a waste of time, skim it to learn the syntax while you work on projects and come back to it when you are stuck on something. Also programming books often have sections about best practices and common mistakes, make sure not to skip those.
Yeah when I swap between languages these days I usually just google some form of “cheat sheet” and hope some college kid made one I can reference
The Rust Book helped me realize that I wasn’t likely to just learn Rust by doing as I had done with many other languages. I fucking love Rust but it is a bit of an oddball and the book is a great way to start.
I think it comes down to how you learn. I’ve found programming books useful because I tend to learn quickly from books. I know others do not. Regardless, if I’m reading a programming book, it is usually nearby a computer where I can try stuff out. At the end of the day, the time at the keyboard will be time well spent when learning a language.
Generally the Rust Book, even in comparison to most languages, is considered to be very good and it is the expected way to learn the language. It won’t teach you everything, but it does give you a very solid foundation. The Rust community has put considerable effort into their learning materials.
God I hate learning by books.
I need a series of solution walkthroughs I can follow along with, until I get a solid foundation.For me The Rust Book was useful for discovering features of the language, not to discover how to code with Rust
Yes. I find it very difficult to get a complete knowledge of something just reading random articles and playing with it. For me, one of those giant books intended to document every little aspect has always helped fill the gaps, and take my working knowledge up to expert level. It’s getting harder to find those kind of quality books though.
alright, I get the random articles thing, but what about the official language documentation/reference on the language’s homepage?
Anki for practicing recall and a lot of practice. Tons of daily practice. Build as many things as you can. Build for fun. Build to use the tools given by the language. Build unoptimized slop to experience first hand why it’s normally not done.
I rely on Anki heavily so that the book content sticks around in my head. Do it long enough and you’ll be able to recall entire books bit by bit.
Identify the gaps in your knowledge and plug em with books and courses. Reading books without practicing recall and working on your own projects might be a waste of time. I personally don’t think it is if it’s fun.
so how long do you retain this anki-knowledge?
If you review something every day you are more likely to remember it every day. Whatever I’ve actively recalled for an extended period is up there tumbling around the mind.
I think related/similar languages can be picked up on the fly, but if (for example) you’re only familiar with object-oriented languages, you need a more comprehensive introduction to your first functional language.
That’s basically how I learned programming. I’ve bought a book I was interested in, an as I was progressing, always typed the sample codes by hand and tried them.
Even today I buy a bunch of programming books.
alright, I get the just buying a text book thing, but what about the official language documentation/reference on the language’s homepage?
That’s a great resource for when you know what you’re looking for, but I wouldn’t use it for learning new stuff. It’s like if you were trying to learn a language from a dictionary.
The last one I have read was “Java in 21 days”, when I had some spare time between jobs.
Already decades ago… The last one before that was the API reference of Windows 3.1 :)
Today I start a new topic or language with a few youtube tutorials (when I have time) or just with ChatGPT (when I don’t have time).
Reading the rust book is a great use of your time. Rawdogging is a good method if you’re just concerned with things you’re working on. You can also read documentation on different things that you may not be working on, but know is a gap in knowledge. For me that was the async and tokio books as async rust is a bitch.
A lot of rust libraries use the same approach by having some type of “book” for documentation. I treat them like normal reading, so I’ll be out and about or just sitting and I’ll pull one out and read it leisurely. It’s another way I’ve found to learn by osmosis. Doesn’t even have to be something I’m working on, just something interesting. It sounds like you’re doing what interests you, and that’s what’s important.
Personally, I like to supplement my knowledge with the occasional book. Like shit, that’s sort of the whole point of books.
I don’t think a book has ever got me started on something new while programming. Like if I want to pick up a new language or framework, I have better luck going directly to the documentation. If I have a specific problem, then I can search online or find a tutorial or something.
Another risk of using a book as the entry point is when those books go out of date and no longer become relevant. Always make sure they’re using the right version of whatever tool you’re using, lest you pick up a book vaguely titled “Learn Python” and discover it’s for 2.7 when you’ve installed 3.11
But as you’ve kind of surmised here, books are great for filling in the gaps in knowledge. They’re also generally speaking written by authors with tons of experience (and perhaps biases) which might tell you why things are done a certain way.
Of particular interest - and caution - are opinion-based books. For example, Clean Code is full of examples that sound good on paper, and then when taken to their extreme are shown to be brittle and cumbersome. I still think the book has some good points, but at the end of the day it’s opinion, and opposing opinions exist for a reason.
So I guess what I’m saying there is books are great, but you shouldn’t follow them dogmatically
I got more out of the Google class because it gives instructor notes with time estimates for each lesson.
this lets me figure out if I need to dive down a particular rabbit hole or if the class is just giving an overview of a topic.
I have read and worked through most of the O’Reilly animal books - perhaps this is before your time. Perl, C, C++, Java, etc… Yak, Camel, animals galore. I still have most of them buried in a closet somewhere.
This was before you could just google or (gasp, CGPT) your answer. You had to read and learn how to do something then try, practice and refine until you had a solution.
To this day I really prefer to enter a new language with a manual that has an index and examples. I could not have learned shit with nothing but Discord and (today’s) google to help.