Settings

Theme

Pros/Cons of the "drive by" code fix?

2 points by hlship 2 years ago · 0 comments · 1 min read


A question for HN: I'm in the habit of making small changes, as I see them, in code - usually fixing documentation strings and comments, occasionally refactoring code or even adding missing tests.

These "drive by" fixes, as I call them, are often not related to why I've created a branch and PR on some codebase, they're incidental.

I feel like if I tried to put them aside and address them later, they would never get fixed. The work of tracking them, checking out a fresh branch, making those changes, and getting them reviewed, merged, and released - outside of "real work" on the codebase - seems too difficult.

This applies to many open source projects I work on, as well as many of my current and past companies' internal code.

So is this a common habit? Is it something I should embrace, or something I should avoid?

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection