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?

  • hendrik@palaver.p3x.de
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    1 day 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.

  • expr@programming.dev
    link
    fedilink
    arrow-up
    6
    ·
    1 day 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.

  • Nikelui@lemmy.world
    link
    fedilink
    arrow-up
    30
    ·
    2 days 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.

    • Graphy@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      1 day 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

  • owsei@programming.dev
    link
    fedilink
    arrow-up
    4
    ·
    1 day ago

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

  • darklamer@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 day 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

    • NOT_RICK@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      2 days ago

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

  • Waldowal@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    1 day ago

    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.

    • sighofannoyance@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      1 day ago

      alright, I get the random articles thing, but what about the official language documentation/reference on the language’s homepage?

  • Nyxicas@kbin.melroy.org
    link
    fedilink
    arrow-up
    2
    ·
    1 day ago

    Reading programming language books isn’t a waste of time. What is a waste of time, is delving into a programming language and finding out how little of use it is. You’d hate yourself for pursuing a programming language and find out that it has little purpose.

    The point of programming however, is to be versatile. Do not be content. You may focus on one or two programming languages, but there are jobs and fields out there that’s going to require more programming languages so you might want to keep a head up on that.

    But no, reading programming books is not a waste of time. Just do not expect one book to answer everything. There’s a reason why there’s tons of editions of C/C+ for example. There is something new to document and learn about with that programming language.

  • UnpopularCrow@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    1 day ago

    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.

    • jet@hackertalks.com
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 day ago

      Exactly. I know I learn the best from reading. I’ll read the book, do the exercises, then reread the book after a while. The first pass I pick up some of it, and the second pass I pick up a lot more detail. Once I’ve built the mental model

  • Nate Cox@programming.dev
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 day ago

    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.

  • helmet91@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    1 day ago

    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.

    • sighofannoyance@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      1 day ago

      alright, I get the just buying a text book thing, but what about the official language documentation/reference on the language’s homepage?

      • helmet91@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        1 day ago

        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.

  • AbouBenAdhem@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 day 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.