Job interviews2:09
Job interviews · Software developer · Advanced
Feedback on a Code Reviewملاحظات على مراجعة الشيفرة
- Mr. Okafor
- Ella
0:00 / 2:09
Transcript
- Mr. OkaforElla, in this team, every change gets a review. How do you feel about that?
- EllaI like it. A second pair of eyes finds things that I miss, especially when I have worked on the same code for hours.
- Mr. OkaforCan you give an example of a comment that was hard to hear?
- EllaYes. A colleague once wrote that my function was too long and hard to read. I felt a little annoyed at first, because it worked.
- Mr. OkaforWhat did you do?
- EllaI waited an hour, then read the comment again. The comment was right. Nobody else could understand it quickly. So I split it into three small functions and added clear names.
- Mr. OkaforAnd if you disagree with a reviewer?
- EllaI ask a question instead of defending myself. For example, I might say, "Can you show me what you would change?" Often we find a middle way. If we still disagree, we ask a third person.
- Mr. OkaforHow do you give feedback to others?
- EllaI start with something that works well. Then I explain the problem and suggest an option. I try to comment on the code, not on the person.
- Mr. OkaforDo you ever review code from people with more experience than you?
- EllaYes, and it was a little scary the first time. But my manager told me that a review is not a test of the writer. It is a way to protect the product. Since then, I say what I see, politely and clearly.
- Mr. OkaforWhat if you do not have time for a careful review?
- EllaI tell the author how much time I have. For example, I can say, "I only looked at the main part today. I can look at the rest tomorrow." It is better to be honest than to say yes and miss something important.
- Mr. OkaforHas a review ever taught you something new?
- EllaMany times. Once I read a colleague's code and learned a shorter way to sort a list. I used it in my own work the next week. So reviewing is also a good way to learn.
- Mr. OkaforThank you. That is how we like to work here.