I'm not the GP but I fully agree with what he said, so here is how I would answer your question:
I HATE cleaning up people's messy code. It's 10x easier to do it right the first time. Messy code to me is most messy because it's unclear what is being done. It often comes with insufficient tests, which makes refactoring dangerous.
To me it's a lot like walking into a messy house vs. a clean house. If the house has clutter everywhere, or has a smell from being dirty, then it's not comfortable to be in. If I have to work in it, or clean it, I'd much rather start with a well-organized clean house.
Refactoring is also not fun at all for me. I also LOVE pushing features fast. I don't obsess over "perfect code" but I do obsess over following best practices and stopping for a few minutes to think through a design.
My workflow is:
1. Get it working, minimal effort, PoC
2. Get tests written and passing.
3. Refactor to good code. Perfect is the enemy of good, but it doesn't get committed until it's readable, maintainable, tested, documented.
Sometimes I probably am a little slower than I otherwise could be, but people are often blown away at my ability to iterate and add features quickly. This is because my code is well organized, modular, DRY, and well tested. It takes a little longer the first release, but it more than pays for itself speed-wise as tech debt stays minimum and hackability is high. With over 10 years experience now with this method I'm convinced that it's the only sane way to do things. Anything else is sabotaging your own future.
If I really don't have time to do it right the first time, I know it will be hard to iterate on, it will have bugs in prod, and it will never be pleasant to work in. It takes 10x longer to refactor an existing app to be good code than it does to do it during development when it's all fresh in mind. The best hope is that it has a good spec so it can be re-written from scratch.
I HATE cleaning up people's messy code. It's 10x easier to do it right the first time. Messy code to me is most messy because it's unclear what is being done. It often comes with insufficient tests, which makes refactoring dangerous.
To me it's a lot like walking into a messy house vs. a clean house. If the house has clutter everywhere, or has a smell from being dirty, then it's not comfortable to be in. If I have to work in it, or clean it, I'd much rather start with a well-organized clean house.
Refactoring is also not fun at all for me. I also LOVE pushing features fast. I don't obsess over "perfect code" but I do obsess over following best practices and stopping for a few minutes to think through a design.
My workflow is:
1. Get it working, minimal effort, PoC
2. Get tests written and passing.
3. Refactor to good code. Perfect is the enemy of good, but it doesn't get committed until it's readable, maintainable, tested, documented.
Sometimes I probably am a little slower than I otherwise could be, but people are often blown away at my ability to iterate and add features quickly. This is because my code is well organized, modular, DRY, and well tested. It takes a little longer the first release, but it more than pays for itself speed-wise as tech debt stays minimum and hackability is high. With over 10 years experience now with this method I'm convinced that it's the only sane way to do things. Anything else is sabotaging your own future.
If I really don't have time to do it right the first time, I know it will be hard to iterate on, it will have bugs in prod, and it will never be pleasant to work in. It takes 10x longer to refactor an existing app to be good code than it does to do it during development when it's all fresh in mind. The best hope is that it has a good spec so it can be re-written from scratch.