Recently, I had a conversation with a junior developer on my team. Let’s call him Alan. We were talking about a new notification feature that was going to be used to send reminder e-mails to potentially thousands of people if they had forgotten to enter certain data in the last month or so. Alan was confident that the code he’d written was correct. “I’ve tested it well.”, he said…
This is my typical experience as well, too many people don’t do a code review of their own PR first.
When I was a junior, I had this coworker who did all my reviews. I was doing my absolute best and wanted to show that I was learning, so I would review all my work before submitting it and think, how would he review and respond to this code.
That just stuck with me and it’s my normal practice now.
I eventually learned that’s not as normal as I thought. I also tend to give better code reviews than others.
Edit: the other thing I do is check in with who will be reviewing my code well before I submit anything someone might think is weird and have a discussion about it before the reveiw. If it’s weird, there might be a better way unless were stuck due to technical debt or something, and doing that early vs at the end usually saves time.
I had the exact same path to that habit as well! Good mentors make good devs!!