@jballs@sh.itjust.works
link
fedilink
English
78M

Nah, refactoring this would be a bitch. Your function name contains everything that happens in the function. Which means if you add something to it, you also have to change the name of the function. So CallThisWhenThePlayerTakesDamageAndIfThePlayerHealthIsLessThanZeroThenAlsoTheyDie would have to go to something like CallThisWhenThePlayerTakesDamageAndIfThePlayerHealthIsLessThanZeroThenAlsoTheyDieAndIncrementTheTotalDamageTakenCounter if you added something else.

IDE renames all references, no issue

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 153 users / day
  • 312 users / week
  • 700 users / month
  • 2.84K users / 6 months
  • 1 subscriber
  • 1.57K Posts
  • 34.8K Comments
  • Modlog