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

help-circle



  • Yes and no. I mean sure, if you are going to leverage this to gain a significant edge in the market, that works.

    If you add a tool to the project, that you need to understand to maintain some parts of it, which adds to the learning curve of someone joining said team, then the gains have best be worth the effort.

    We adopt so many librairies/plugins/tools over time that adding more complexity than you need this way is just terrible.


  • Yeah, but it’s easy to overuse it. If your for loop is much longer. For a few lines I’d agree, don’t bother using something longer.

    Code should scream out it’s intent for the reader to see. It’s why you are doing something that needs to be communicated, not what you are doing. “i”, “counter” or “index” all scream out what you are doing, not why. This is more important than the name being short (but for equal explanations of intent, go with the shorter name). The for loop does that already.

    If you can’t do that, be more precise. At the least make it “cardIndex”, or “searchIndex”. It makes it easier to connect the dots.