Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • Good one! ...15 Commented Jul 15, 2011 at 6:36
  • 2
    In theory this could work, in practice there is NO WAY IN HELL he's going to go look back at code he wrote 2 weeks ago if it works. Nor should he, probably.. If it works going back to spend time on it for the sole reason of making it "prettier" is a waste of time, it should be done when and if it is touched again. Commented Jul 15, 2011 at 10:27
  • 5
    @Krelp: I look at past code all the time and there is no way you can add features and in general maintain software without looking at previously written code. There is no such thing as a perfect architecture and leaky abstractions are the rule rather than the exception so looking at previously written code is unavoidable. I know that marathon coders are idolized in programming circles but marathon coding quickly leads to burnout and derelict projects so on top of improving code quality taking breaks and coming back also keeps me sane. Commented Jul 15, 2011 at 20:29
  • @david: you mentioned looking back at code after a fixed amount of time, even if there is no need to at the moment. You didn't initially say to look back at the code only when you have to do so in order to add new features.. So if - according to what you said - you have to eventually look back at all old code, why not do so in a moment that's relevant instead of after a fixed time period? Commented Jul 16, 2011 at 0:13
  • 3
    @Krelp: If you're confident enough in your abilities then go right ahead and only look at working code when you feel like it but if you're just starting out and are unsure of how well you're structuring your code then continually looking back at what you wrote a few weeks ago and refactoring it is a really good way to learn proper code structure. My advice was for people looking to improve and reach the point where restructuring previously written code becomes less and less necessary because the initial version has the proper extensible structure. You are more than welcome to ignore my advice. Commented Jul 16, 2011 at 0:59