If you’re amazed at some terrible code, think about all the crap code that you’ve written.
I was in my first year of my first software engineering gig, and I ran into some code that I disapproved of. In my next one-on-one meeting with my manager, I ranted about how gross it was and how it needed the fix I implemented so badly. He asked me which part of the codebase I was talking about, and then his face fell - "Oh... yeah, sorry, that was me a few years ago."
I felt awful - from that point on, I've tried to start from a place of understanding. Every time something similar happens to me, I look back on that moment and remember where I was then.
I learned this one the hard way:
I was in my first year of my first software engineering gig, and I ran into some code that I disapproved of. In my next one-on-one meeting with my manager, I ranted about how gross it was and how it needed the fix I implemented so badly. He asked me which part of the codebase I was talking about, and then his face fell - "Oh... yeah, sorry, that was me a few years ago."
I felt awful - from that point on, I've tried to start from a place of understanding. Every time something similar happens to me, I look back on that moment and remember where I was then.
What a moment!
Note to myself: run
git blame
before criticize other's code.It even could be mine and I totally forgot it.
haha just kidding.