Ask HN: How do you avoid small misses and mistakes in a PR?
I have been working as a software engineer for 3 years now, and I am happy with how much better I have become in that time period. However, I do have one issue that seems to be a constant with me: When I open PRs, I tend to have small misses or tiny changes that always need to be fixed. What I mean is missing something like adding a parameter for logging that all other similar functions of this type have, or doing something in a slightly more complicated way because I am reinventing the wheel when our code base already has something to use that I just couldn't find.
This hasn't been mentioned by a manager or anything, but I can tell compared to the other engineers on my team, I find myself making those mistakes more. I realize to some degree, some of that is inevitbale, but I do feel like my PRs have more than I should.
I am wondering what type of habits all you use when starting a ticket. Should I be asking as many questions as possible during planning so I know everything about the ticket before I start? Should I be having a long planning phase before even writing code?
Any advice is helpful, thanks