• 0 Posts
  • 10 Comments
Joined 5 years ago
cake
Cake day: May 31st, 2020

help-circle


  • Ephera@lemmy.mltoProgrammer Humor@programming.devSenior Wisdom
    link
    fedilink
    English
    arrow-up
    54
    ·
    24 hours ago

    Which is why making code readable is so very important. Our juniors and students will think we’re ridiculous, when we spend a long time cleaning up some code or choosing the least misunderstandable name for a type. But you fuck that up and then others, as well as your future self, will be wasting many more minutes misunderstanding what your code does.


  • Ephera@lemmy.mltoProgrammer Humor@programming.devSenior Wisdom
    link
    fedilink
    English
    arrow-up
    28
    ·
    24 hours ago

    Spamming comments is rather controversial, especially in high-level languages. Problem is, they only show up in one place, so they’re just not very useful, but also have a high chance of becoming inaccurate over time. In particular when you spam them to explain relatively trivial stuff, people will stop reading them, meaning they won’t update them.

    The ‘what’ can be documented with meaningful variable/function names, log/error/assert messages and perhaps most importantly unit/integration tests (which should be understood like a specification that checks automatically that it’s applied correctly).

    Comments are indispensible for explaining the ‘why’, though, whenever that is not obvious.





  • Yesterday, we had a presentation at $DAYJOB, where we showed off our software project at a high level to another department. That department does lots of low-level work, including with C.

    A team lead from that department, who knows our project, had provided the initial draft for the presentation slides. And they threw a sentence at the end of the slides “By the way: $PROJECT powered by Rust”. We were also not the only project there, which explicitly mentioned Rust, even though it wasn’t strictly relevant.

    And yeah, that’s just kind of insane to me. When even management understands that their techies get excited about working with Rust, that’s not anymore just a few select voices that call for it. That’s a whole department discontent with C, where an alternative is presented.

    Which is why I would be extremely surprised, if not something similar happened with the Linux kernel.
    Obviously, those who’ve coded C for twenty years might not understand the issue, but there’s so many people for which low-level development becomes accessible for the first time with Rust. The stream of people wanting to contribute Rust code will just not cut off any time soon.