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

help-circle







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








  • From Germany, I have been:

    • to Switzerland (3 or 4 times)
    • to Sweden via Denmark (twice)
    • to Italy via Austria (one direction) and Switzerland (other direction)
    • to Corsica, technically a part of France (don’t tell them) via Italy, also taking a ferry
    • to the Czech Republic
    • and some mixed hitchhiking & train to Belgium and France

    And I will go to France (Bretagne) soon.

    I hoped to take the sleeper some time, but all routes we looked for, they are so much more expensive than a day train + one night of hotel stay that we opted for the latter.

    Out of the countries I have been to, France and Italy have the best connections between cities/regions, while Denmark has the worst.