Yeah learned this the hard way.

  • Rooster326 ( Rooster326@programming.dev ) 
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    1 year ago
    1. (3) Get annoyed by constantly increasing Code Coverage Requirements on untestable (often legacy) code. Even afding comments requires code coverage go up! Line must always go up!
    2. Change step 2 to “Commit and push ONLY when absolutely necessary. Because adding comments often requires a rewrite of untestable code.”
    3. Go back to Step 2 and wait for a major bug.
    • 3 is not related to using git in any way. I’m not really sure what you mean in 4. I didn’t mean making a lot of changes, I meant that you should not wait with committing until you have a finished feature / fix / whatever. Commit after each refactor, commit after adding a new testable unit. It’s always better to have more checkpoints. If your team does code review, they will appreciate atomic commits too.