4 ms·
I really like this quotation attributed to Bill Atkinson "If you want to get it smooth, you’ve got to rewrite it from scratch at least five times." This is so
by jdblair 3y ago
I really like this quotation attributed to Bill Atkinson
"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.
- d__a__n___g 3y ago[flagged]
- hulitu 3y agoThey do this with a lot of libraries and programs (GTK, QT, Gnome, KDE, Windows calculator, a lot of libraries in Linux, Windows settings etc.). It does not seems to work at all.
- ahartmetz 3y agoI think the original quote implies that it needs to be the same person who does the rewrites. Probably with some external input because it's hard to question yourself four times :>
- ahartmetz 3y agoI have also noticed that the improvement possible in one refactoring pass is quite significant, but still limited. 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.
- tkiolp4 3y agoI think it’s hard to do refactorings in the context of a product-oriented team that works in sprints of 2 weeks. I have two options: a) either I make the rewrite 5 times in a row… but that would take a lot of time, so management won’t buy it (and I cannot just do it on the side because it actually takes time), or b) I do the rewrite one at a time, but then for every intermediate rewrite I need to open a PR and spend time with my colleagues doing the review. I don’t have anything against about PR reviews, but reviewing intermediate work feels like a waste of time (and kills the fun, because I know where I’m heading to, it’s just not obvious YET how to achieve it, hence the intermediate steps… I don’t really want to answer questions about intermediate work). On personal projects, it’s a pleasure to rewrite code until I feel it “looks” good.
- ResearchCode 3y agoJoin a team that doesn't do "sprints" if you want to do meaningful work.
- Closi 3y agoThere is a different pressure on refactoring in 2023 than in the 1980s / early 1990s. 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)
- sys_64738 3y agoThis is the response from a perfectionist who will never ship code on their own. It's a bad trait to have in a developer.
- tambourine_man 3y agoBill Atkinson shipped. Like, a lot, by any metric.
- sodapopcan 3y agoStrong disagree, we need more of this. The "move fast and break stuff" is exactly why we end up with companies full of dispensable employees who writer sloppy code they don't care about.
- ChristopherDrum 3y agoMaybe read a little bit about the man first. 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&story=Mythical_Man_Year.txt https://www.folklore.org/StoryView.py?project=Macintosh&stor...
- grishka 3y agoThe number of times you have to rewrite something goes down as you gain experience but it never becomes zero. (I also assume that you'd never change your stack so much that a significant part of your experience becomes irrelevant)