You are viewing a single thread.
View all comments
10 points

Honestly refactoring everything isn’t an “improvement.” More often than not it’s a sign of that developer not understanding what the code does. Which is fine if they need to do that in a new code base or are otherwise rather green. Writing code is easier than reading it, after all. However they really should stash those changes or reopen a new branch after that exploratory phase.

IMO (in general) a good bug fix makes the smallest possible change to implement said fix. Otherwise the focus is about documention of the bug if needed and some minor refactoring to improve readability, consistency, or efficency

permalink
report
reply
14 points
*

I like the approach of when finding a bug, write a test to reproduce it, fix the bug so the test passes, next do whatever refactoring you want because you have a test passing :)

permalink
report
parent
reply
2 points

This sounds like a great technique. I’ll have to give it a go on Monday haha

permalink
report
parent
reply
1 point
*

Unfortunately sometimes the code base is fuckd up beyond repair, it can’t even be tested. that’s why i submitted 3000 line PR ☠️

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 3.4K

    Monthly active users

  • 1K

    Posts

  • 38K

    Comments