Spokalyالإنجليزية تبدأ من السمع
مقابلات العمل · مبرمج · متقدّم

ملاحظات على مراجعة الشيفرةFeedback on a Code Review

  • Mr. Okafor
  • Ella
0:00 / 2:09
الشريط الملوّن مقسوم حسب المتكلّم، فترى من يتحدّث ومتى.

النص

  1. Mr. Okafor
    Ella, in this team, every change gets a review. How do you feel about that?
  2. Ella
    I like it. A second pair of eyes finds things that I miss, especially when I have worked on the same code for hours.
  3. Mr. Okafor
    Can you give an example of a comment that was hard to hear?
  4. Ella
    Yes. A colleague once wrote that my function was too long and hard to read. I felt a little annoyed at first, because it worked.
  5. Mr. Okafor
    What did you do?
  6. Ella
    I 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.
  7. Mr. Okafor
    And if you disagree with a reviewer?
  8. Ella
    I 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.
  9. Mr. Okafor
    How do you give feedback to others?
  10. Ella
    I 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.
  11. Mr. Okafor
    Do you ever review code from people with more experience than you?
  12. Ella
    Yes, 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.
  13. Mr. Okafor
    What if you do not have time for a careful review?
  14. Ella
    I 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.
  15. Mr. Okafor
    Has a review ever taught you something new?
  16. Ella
    Many 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.
  17. Mr. Okafor
    Thank you. That is how we like to work here.