• 0 Posts
  • 118 Comments
Joined 6 months ago
cake
Cake day: May 20th, 2024

help-circle
  • englislanguage@lemmy.sdf.orgtoFunny@sh.itjust.worksClever guy
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    1
    ·
    edit-2
    2 months ago

    How good of a conductor wood is depends on its state. If it is very dry and not salty, this should be safe (although he could have taken the piece of wood more at the end to increase the distance between him and the fence and the length=isolation through the piece of wood). If it is wet and salty, it might be dangerous.


















  • One example for self documenting code is typing. If you use a language which enforces (or at least allows, as in Python 3.8+) strong typing and you use types pro actively, this is better than documentation, because it can be read and worked with by the compiler or interpreter. In contrast to documenting types, the compiler (or interpreter) will enforce that code meaning and type specification will not diverge. This includes explicitly marking parameters/arguments and return types as optional if they are.

    I think no reasonable software developer should work without enforced type safety unless working with pure assembler languages. Any (higher) language which does not allow enforcing strong typing is terrible.


  • I have worked on larger older projects. The more comments you have, the larger the chance that code and comment diverge. Often, code is being changed/adapted/fixed, but the comments are not. If you read the comments then, your understanding of what the code does or should do gets wrong, leading you on a wrong path. This is why I prefer to have rather less comments. Most of the code is self a explanatory, if you properly name your variables, functions and whatever else you are working with.