Code Review Tips (How I Review Code as a Staff Software Engineer)

Cody Engel
15 Feb 202112:08

Summary

TLDRIn this video, Cody Engel, a staff software engineer, shares his insights on achieving drama-free code reviews based on his extensive experience with over a thousand pull requests. He emphasizes the importance of approaching code reviews with a growth mindset, asking questions, and maintaining open communication with code authors. Engel discusses his review process, which includes reading pull request descriptions, skimming changes, testing code in an IDE, and providing constructive feedback. He highlights the significance of acknowledging well-written code while also addressing any necessary changes, ultimately promoting a collaborative and positive code review culture.

Takeaways

  • 😀 **Preparation is Key**: Thoroughly read the pull request description to understand the context and changes being proposed.
  • 🔍 **Importance of Unit Tests**: Unit tests are crucial for verifying the intended functionality of code changes and should be reviewed carefully.
  • 💬 **Positive Reinforcement**: Highlighting good practices in code helps motivate developers and fosters a positive review environment.
  • ❓ **Ask Questions**: When uncertain about business requirements, asking clarifying questions is better than making assumptions.
  • 📈 **Growth Mindset**: Adopting a growth mindset is essential for both reviewers and developers, promoting continuous learning and improvement.
  • 🤝 **Open Communication**: Encouraging open dialogue during reviews helps address concerns and promotes a collaborative atmosphere.
  • 📊 **Review Metrics**: Aim for a balanced review outcome—approving 70% of the code, commenting on 20%, and requesting changes on about 10%.
  • 🧠 **Ego Check**: Humility in code reviews is vital; keeping egos aside leads to better discussions and outcomes.
  • 🎯 **Structured Approach**: Having a systematic process for code reviews can help streamline feedback and enhance productivity.
  • 👥 **Community Engagement**: Engaging with the community through platforms like Discord can provide additional insights and support.

Q & A

  • What is the main goal of Cody Engel's video?

    -The main goal of Cody Engel's video is to share his approach to conducting drama-free code reviews and provide tips on how others can achieve the same.

  • What mindset does Cody suggest adopting during code reviews?

    -Cody suggests adopting a growth mindset, which focuses on learning and improvement rather than a fixed mindset that may lead to defensiveness.

  • What is the first step Cody takes when reviewing a pull request?

    -The first step Cody takes is to read the description of the pull request to understand the context before examining the code.

  • Why does Cody emphasize reviewing unit tests first?

    -Cody emphasizes reviewing unit tests first because they provide insight into how the code is intended to function and help clarify the developer's intent.

  • What does Cody do if he finds something clearly wrong in the code?

    -If Cody finds something clearly wrong, he calls it out in the comments and usually sends a direct message to the author to discuss it further.

  • How does Cody handle complex code reviews?

    -For complex code reviews, Cody pulls down the code and tests it in his IDE, performing manual tests to ensure it works as intended.

  • What percentage of code reviews does Cody typically approve?

    -Cody typically approves about 70% of the code reviews he conducts.

  • What does Cody mean by 'leaving your ego at the door' during code reviews?

    -Leaving your ego at the door means being open-minded and willing to accept feedback or admit when you are wrong, which is crucial for effective collaboration.

  • What kind of feedback does Cody provide for good code?

    -Cody provides positive feedback by acknowledging well-written code and calling out clever solutions, reinforcing good practices.

  • What is Cody's approach to asking questions about business requirements?

    -Cody's approach is to simply ask questions when he is confused, without offering solutions, which helps clarify requirements and signals to the code author any gaps in understanding.

Outlines

plate

هذا القسم متوفر فقط للمشتركين. يرجى الترقية للوصول إلى هذه الميزة.

قم بالترقية الآن

Mindmap

plate

هذا القسم متوفر فقط للمشتركين. يرجى الترقية للوصول إلى هذه الميزة.

قم بالترقية الآن

Keywords

plate

هذا القسم متوفر فقط للمشتركين. يرجى الترقية للوصول إلى هذه الميزة.

قم بالترقية الآن

Highlights

plate

هذا القسم متوفر فقط للمشتركين. يرجى الترقية للوصول إلى هذه الميزة.

قم بالترقية الآن

Transcripts

plate

هذا القسم متوفر فقط للمشتركين. يرجى الترقية للوصول إلى هذه الميزة.

قم بالترقية الآن
Rate This

5.0 / 5 (0 votes)

الوسوم ذات الصلة
Code ReviewsSoftware EngineeringCommunication TipsTech IndustryBest PracticesUnit TestingGrowth MindsetPull RequestsDeveloper InsightsCollaboration Tools
هل تحتاج إلى تلخيص باللغة الإنجليزية؟