8 ms·
Realising that maintenance is the job and when you get to looking at legacy code, that it's not crap, but just represents a person/team's point in time understa
by groundCode 8y ago
Realising that maintenance is the job and when you get to looking at legacy code, that it's not crap, but just represents a person/team's point in time understanding of a domain. Your understanding is different or maybe the domain has changed (no business stands still) and so you would code it differently here and now. But you might not have back then with the understanding and knowledge the team had when they wrote it.
Realising that in x days/months/years your own code will be the legacy and viewed by other developers and yourself. Your code will represent your understanding at the point in time you write it. It's natural if it looks horrid or incomplete or bad or that you missed something obvious. Don't beat yourself up over it.
Look on any code with the understanding and compassion with which you would have the next developer look on your code.
That and making sure to get up, stretch regularly and look out the window and get out the building. Smell the roses. That sort of thing.