Hacker News new | ask | show | jobs
by samdk 5108 days ago
I do this whenever I read complicated pieces of code. It's enormously helpful, even if I don't keep my changes around.

Some of the time the changes are broadly beneficial (like taking a multi-thousand-line file and adding some organizational structure) and it makes sense to commit them upstream. Some of the time the changes are personal preference and aid only in your own understanding of the code.

As with most things, the best approach is to use your judgement, not get too attached to your own changes, and to understand that context matters.