Hacker News new | ask | show | jobs
by burke 1679 days ago
I’ll frequently do this when I start large refactors or implementations. I’ll build a big ugly branch that kind of works, then, when I have a better idea of where I’m headed, start from master again, building a chain of sometimes a dozen or more PRs, mostly from scratch, that build to the same point as that big ugly branch. Along the way, the code and architecture tend to improve dramatically.
1 comments

I’ve followed a similar pattern before in large features as well. During each iteration my mental model improves dramatically, and I have no qualms about deleting everything and starting over, because I _know_ the next iteration will be that much more correct, performant, and/or maintainable.