samedi 17 octobre 2015

smallest possible working commit

When coding I often have to fight my urges to change existing code too much. New way to write a function, decouple big into small ones, reorder them, rename variables, etc etc[1]. This is the artsy part of my brain trying to express ... but it's counter productive. I need another dogma, another fetish. Recently I landed on the idea of challenging myself to make the smallest possible set of changes to a piece of code in order to fix an issue. That includes not even fixing loose formatting. Anything that isn't directly and strictly necessary to resolve the problem shouldn't be done. yet.

Ergonomic and aesthetic modifications will be done in a following commit.

As mentioned in [2], Single responsibility principle applies here to.

[1] Or even working on many changes at once.
[2] http://programmers.stackexchange.com/questions/10793/when-is-a-version-control-commit-too-large

Aucun commentaire:

Enregistrer un commentaire