DEV Community

Discussion on: Revisiting your code: a simple technique for writing better software

Collapse
 
d_ir profile image
Daniel Irvine 🏳️‍🌈

Right, I agree. Do you think taking time away helps with this? Allowing you to "forget" to some extend, and loosening your mental grip on your original implementation.

Collapse
 
hefaistos68 profile image
Hefaistos68

Actually no, often i review code i wrote years ago and still remember why and how I came to the result. I guess the only way is a radically different approach to the problem. Or leave it to someone else.

Thread Thread
 
fluffystark profile image
John Matt

Remembering why and how you solved it isn't a problem, it's probably like revisiting an old memory we had. With new experiences, won't you have a different take towards it? If not, I'm pretty sure that would make your code relatively optimal and there's nothing wrong with that.

I think revisiting code usually refers to those times where you were able to solve something but reflecting on it you had some obstacles you struggled. These struggles are what you carry on and look to fix or improve on.