• 0 Posts
  • 32 Comments
Joined 1 year ago
cake
Cake day: July 2nd, 2023

help-circle












  • By typed they mean declairing a type for your variables.

    In some languages, variables needs to be told what kind of data they can hold. That’s it’s type. For instance a number without decimals would be an integer type. While text might be a string type or a list of character types.

    Other languages don’t require types and sometimes don’t even support them. They will just infer the type from the data that’s in the variable.

    If you see Elon Musk please explain this to him.





  • This is why I usually don’t comment on stuff like this in PRs. If it’s readable and easy to understand it doesn’t need more abstractions. Even if it’s less code. What’s it save like a few bytes? That’s not as useful as the whole team instantly knowing how the code works when they see it lol

    I will say though if a jr dev came upon the last code they would just look it up and learn something so that’s a total valid path too. Just depends on your codebase and how your team works. I think it usually ends up being a mix with larger teams.


  • I would disagree. I love to use comments to format my code and separate the sections. I think it’s so beautiful. Also I love when libraries have ASCII art in the comments at the top of the main file lol. It makes the code more fun in my opinion.

    I went to college with a guy who would treat the code as art when presenting projects. His code was always beautiful. Not super functional but always beautiful. It always stuck with me. I want my code to always be functional and beautiful. Easy to read and a pleasure to work with. That’s my goal at least. Comments help with that.

    Also it depends on what the code is for haha