• 33 Posts
  • 1.49K Comments
Joined 2 years ago
cake
Cake day: June 12th, 2023

help-circle








  • While the rules governing the display of the flag don’t actually have the force of law, due to the constitutionality protected right to freedom of speech, it is still considered improper to fly any flag above the national flag.

    Given my intent is to show that the US flag is all of ours and can’t be taken away from minorities, immigrants, trans, etc., it wouldn’t be appropriate to do so in a way that suggests disrespect for the US flag.








  • Later on, I learned that an excess of comments is actually not considered a good practice.

    Pointless or uninformative comments are not good, regardless of the quantity.

    Useful and informative comments are always good, regardless of the quantity.

    I learned that comments might be a code smell indicating that the code is not very clear.

    When I’m looking at someone else’s code, I want to see extensive, descriptive comments.

    Good code should be so clear, that it doesn’t need comments.

    That hits me like something a teacher tells you in a coding class that turns out to be nonsense when you get to the real world.

    I’m not sure how others do it.

    As I’m coding, the comments form part of my plan. I write the comments before the code. As I discover I’ve made incorrect assumptions or poor decisions, I correct the comments with the new plan, then correct the code to match the updated comments.

    As a final step in coding, when I feel it is complete, I’ll review comments to determine what should remain to help future me if I ever have to dig into it again.

    Variable names should be reasonably memorable and make contextual sense, but that’s it. That’s what they exist for. Don’t overload the purpose of anything I’m the code.




  • NABDad@lemmy.worldtoPhysics@mander.xyzBest gift ever
    link
    fedilink
    English
    arrow-up
    11
    ·
    1 month ago

    When I was in college a million years ago, I had a class in Chaos Theory.

    The professor knew I worked on sets for the theater group, and he wanted me to build a full-size double pendulum that someone could ride on. I pointed out that it would likely kill the rider, tear itself apart, or both.

    Instead I wrote a double pendulum simulator. You could adjust the weights and lengths for each pendulum and the starting position. Run it with the exact same setup and see the exact same result, or make a tiny, tiny change and see the motion was completely different.

    I think I still have it somewhere. On a 3.5" floppy disk. Borland TurboPascal.