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?

  • @[email protected]
    link
    fedilink
    334 months ago

    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.

    • @[email protected]
      link
      fedilink
      94 months ago

      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

  • @[email protected]
    link
    fedilink
    14 months ago

    I’ve read the full C++ programming book by Bjarne Stroustrup before. It’s good because you get the insight of the author about the language, but I don’t think it’s the best way to learn the language. I think it’s good if you want to learn what is at the root of the programming language.

  • @[email protected]
    link
    fedilink
    14 months ago

    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.

  • @[email protected]
    link
    fedilink
    English
    44 months ago

    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.

  • @[email protected]
    link
    fedilink
    44 months ago

    For me The Rust Book was useful for discovering features of the language, not to discover how to code with Rust

  • @[email protected]
    link
    fedilink
    44 months ago

    God I hate learning by books.
    I need a series of solution walkthroughs I can follow along with, until I get a solid foundation.

  • @[email protected]
    link
    fedilink
    English
    44 months ago

    A coworker from Alabama once told me that programming is like kissing your sis: you can’t get better at it by reading books, you have to try and make mistakes to learn

  • @[email protected]
    link
    fedilink
    English
    3
    edit-2
    4 months ago

    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.

      • @[email protected]
        link
        fedilink
        English
        14 months ago

        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.

  • @[email protected]
    link
    fedilink
    24 months ago

    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).

  • @[email protected]
    link
    fedilink
    English
    14 months ago

    It depends on what you want to learn. One book won’t teach you everything there is to know about a language.

    Decide on what area of the language you want to learn more about and then try to find a book that focuses on conveying that.

    Otherwise you may spend a bunch of time learning something you don’t care about. You don’t need to know everything about a language unless you have a specific reason for why you want or need that knowledge.

    The depth you go into a language will dictate where you need to go to gain the knowledge you’re seeking, if that makes any sense.

    A simple 2-3 hour breeze through online documentation may be all that you need to get by. Or maybe a deep dive into serialization is needed because the kind of project you’re on and therefore finding a few books on that subject will be required.

  • @[email protected]
    link
    fedilink
    English
    74 months ago

    After I had learned programming well enough to do it comfortably in a few different languages, the return on investment for reading most common programming books declined sharply and since then the only programming books I still read are of a very specific kind and the very best of those still remains The Practice of Programming by Kernighan & Pike which still remains a greatly educational and relevant book today, 25 years later: https://en.wikipedia.org/wiki/The_Practice_of_Programming

  • hendrik
    link
    fedilink
    English
    7
    edit-2
    4 months ago

    Yes. I think it’s massively useful to learn coding in a structured manner. And books will do that. I usually read at least one chapter at a time and then try to apply it. Either myself, or do the attached assignments. Plus it’s relatively fast to learn with proper material. You don’t need to search for the information yourself, they’re in the correct order and you’re unlikely to run into some dead ends because you missed some more fundamental knowledge (if you taught it yourself pretty randomly).

    If I already know things, I just read a few more chapters at a time. That’s also some nice thing with books (in my opinion) you can read them as slow or fast as you like.

  • I first started from just reading “teach yourself” books. But I would say most of the actually useful shit I learned was just by sheer brute force fucking around with my own things and learning by doing.

    • @[email protected]
      link
      fedilink
      English
      54 months ago

      Yeah I’ve only learned at work by bashing my head against the wall whilst complaining about bad documentation

  • @[email protected]
    link
    fedilink
    84 months ago

    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.