2 ms·
I'm a C++ developer at Google; I've been writing software "professionally"[0] for about 16 years, including a fair chunk of C, but no C++ until I reached Google
by jsolson 11y ago
I'm a C++ developer at Google; I've been writing software "professionally"[0] for about 16 years, including a fair chunk of C, but no C++ until I reached Google. So, arguably I started in a position where commenting on code reviews was a bad idea.
Nonetheless, I commented on LOTS of code reviews when I joined, but almost always with questions asking (usually) 'why is this done this way?' or (rarely) 'could this by done this other way?'. It helps that our code review tool lets you mark comments as 'no action required'. This allows the first form to be a genuine question without judgement. I would usually learn something, and sometimes the original author would revisit a decision and improve the code. I reserve the second form for when I'm pretty sure I think what I'm suggesting is an improvement.
In my experience this allowed me to provide feedback without perceived ego or offense[1], but also accelerated the rate at which I came up to speed on both the language and the details of the project I'd joined. Despite being a few years in now and fairly familiar with our project, I try (although sometimes fail) to maintain this style today.
[0]: My father got me my first development job as a subcontractor building terminal emulation software for the Pennsylvania Turnpike Commission at 16. I'd learned C a few years beforehand on QNX. A number of other jobs from the same folks followed over the years while I finished up high school and undergrad.
[1]: Usually, anyway. There are some people who take ANY comment, question, or critique as an accusation. Thankfully I've encountered only one of these people at Google.