"If you want to get it smooth, you’ve got to rewrite it from scratch at least five times."
This is so true, and so hard to have the time and motivation to do in practice.
"If you want to get it smooth, you’ve got to rewrite it from scratch at least five times."
This is so true, and so hard to have the time and motivation to do in practice.
On personal projects, it’s a pleasure to rewrite code until I feel it “looks” good.
If you need to fit your application into 5kb of pascal code so it can be bundled with an OS, there’s going to be less code to refactor and probably less ability to not-refactor.
(Not saying refactoring isn’t important now - it’s just more of a choice now and would usually have different goals)
Somehow, I do a lot of refactoring. I noticed that I am unable to improve code by more than two notches of quality in a single refactoring pass. If it's very bad and the end result must be very good (it happens rarely to never that both are true), I need to come back to the code after a year or so and have another go. To understand the original code, I need to get "into its logic", and that understanding, as well as eagerness to fix the worst problems right away, somehow prevent improvements that involve a completely different approach.
The only way to make improvements larger than that is when I've already seen a very good way to handle a similar enough problem to the code in question.
Making a lot of progress in refactoring is even harder for code I have written myself because I understand the original reasoning behind things a little too well. Getting out of that trap probably requires a good amount of external input and / or a particular mental flexibility. I assume that Bill Atkinson had these.
It does not seems to work at all.
Atkinson invented double-clicking, the selection lasso, MacPaint, QuickDraw, and HyperCard. When Steve Jobs was asked how many man-years QuickDraw took to develop, he asked Atkinson how long it took him. Atkinson said, "four years" so Jobs responded to the reporter, "Twenty-four man-years." Yes, Jobs was a hype machine for the Mac team, but he (and everyone around him) also knew that one Atkinson year was the equivalent of six typical developer years.
https://www.folklore.org/StoryView.py?project=Macintosh&stor...