Category: Time Management

  • 3 tips on getting eyeballs on your code review

    3 tips on getting eyeballs on your code review

    “Why is nobody reviewing my code?”

    I sometimes witness new engineers (or even seasoned engineers new to the company) submit code reviews that end up sitting idle, gaining zero traction. Often, these code reviews get published but comments never flow in, leaving the developer left scratching their head, wondering why nobody seems to be taking a look. To help avoid this situation, check out the 3 tips below for more effective code reviews.

    3 tips for more effective code reviews

    Try out the three tips for more effective code reviews. In short, you should:

    1. Assume nobody cares
    2. Strive for bite sized changes
    3. Add a descriptive summary

    1. Assume nobody cares

    After you hit the publish button, don’t expect other developers to flock to your code review. In fact, it’s safe to assume that nobody cares. I know, that sounds a bit harsh but as Neil Strauss suggests,

    “Your challenge is to assume — to count on — the completely apathy of the reader. And from there, make them interested.”

    At some point in our careers, we all fall into this trap. We send out a review, one that lacks a clear description (see section below “Add a descriptive summary”) and then the code review would sometimes sits there, patiently waiting for someone to sprinkle comments. Sometimes, those comments never come.

    Okay, it’s not that people don’t necessary care. It has more to do with the fact people are busy, with their own tasks and deliverable. They too are writing code that they are trying to ship. So your code review essentially pulls them away from delivering their own work. So, make it as easy as possible for them to review.

    One way to do gain their attention is simply by giving them a heads up.

    Before publishing your code review, send them an instant message or e-mail, giving them a heads up. Or if you are having a meeting with that person, tell them that you plan on sending out a code review and ask them if they can take a look at the code review. This puts your code review on their radars. And if you don’t see traction in an appropriate (which varies, depending on change and criticality), then follow up with them.

    2. Strive for bite sized code reviews

    Anything change beyond than 100-200 lines of code requires a significant amount of mental energy (unless the change itself is a trivial updates to comments or formatting). So how can you make it easier for your reviewer?

    Aim for small, bite sized code reviews.

    In my experience, a good rule of them is submit less than 100 lines of code. What if there’s no way your change can squeeze into double digits? Then consider breaking down the single code review into multiple, smaller sized code reviews and once all those independent code reviews are approved, submit a single code review that merges all those changes in atomically.

    And if you still cannot break down a large code review into these lengths and find that it’s unavoidable to submit a large code review, then make sure you schedule a 15-30 minute meeting to discuss your large code review (I’ll create a separate blog post for this).

    3. Add a descriptive summary for the change

    I’m not suggesting you write a miniature novel when adding a description to your code review. But you’ll definitely need to write something with more substance than a one-liner: “Adds new module”. Rob Pike put’s it succinctly and his criteria for a good description includes “What, why, and background”.

    In addition to adding this criteria, be sure to describe how you tested your code — or, better yet, ship your code review with unit tests. Brownie points if you explicitly call out what is out of scope. Limiting your scope reduces the possibility of unnecessary back-and-forth comments for a change that falls outside your scope.

    Finally, if you want some stricter guidelines on how to write a good commit message, you might want to check out Kabir Nazir’s blog post on “How to write good commit messages.”

    Summary

    If you are having trouble with getting traction on your code reviews, try the above tips. Remember, it’s on you, the submitter of the code review, to make it as easy as possible for your reviews to leave comments (and approve).

    Let’s chat more and connect! Follow me on Twitter: @memattchung

  • My time management tip #1  – Pomodoro Technique

    My time management tip #1 – Pomodoro Technique

    Since the pandemic hit the states back in February this year, I’ve been working remotely from home (such a blessing and a serious privilege). Working from home underscores the importance of time management, especially for someone like me who can either deeply fall into work mode for hours and hours (never breaking eyes away from screen) or scroll mindlessly on websites like Hacker News or Reddit.  The former melts my mental health and the latter kills my productivity.

    So to avoid either scenario — working too long or not working at all — I employ a Pomodoro technique1. The pomorodoro technique, which I picked up years ago when taking Learning How to Learn Course on Coursera, was invented in the early 1990s by Franscesco Cirillo. The basic premise is this: you set a timer for 25 minutes and work deeply for those 25 minutes. Once the alarm sounds, you break. The idea is that the technique improves your focus and promotes giving your brain some time off to relax.

    So how do I use the Pomorodo technique in practice? What does it look like?

    I use a kitchen timer, the TIMER YS-390 to be specific. This model hits all of my own personal requirements. The device has a dual count timer. I set the top timer to 50 minutes (my personal period of deep focus) and the bottom for 10 minutes; the 10 minutes is my grace period, allowing me to ease into my work (basically I cut myself some slack here). In addition to the dual timers, the alarm’s volume can be adjusted: no sound, low, high. I typically set the volume knob on low as to not frighten my daughter awake when she’s sleeping (my dentist’s rule: never wake a sleeping baby). And finally, the third feature I love is the physical cue. When either of the timers hit zero, the little button begins flashing red like a cop car. This makes it difficult to ignore and I find it really forces my eyes to break away from the screen.

    So what happens when the timer sounds the alarm? I start by silencing it, hitting the silicone start/stop button, stepping away from the computer and if I’m lucky enough, take a 5-10 minute break with either my baby daughter (who is growing up way too fast) or wife or dogs (or if I’m really lucky, all four of them). This break, is also no exception, but instead of using my TIMER YS-390, I set a countdown alarm on my G-Shock watch.

    Do I always break at the very moment the alarm sounds?

    No. Sometimes I find that I’m really in the flow (for work or for graduate school or for writing on this blog) so what I do instead is quickly press the bottom right button, resetting the 10 minute timer. This allows me another grace period of deep work. It’s okay to not be so rigid and cut yourself some slack.

     

    References

    1. Pomorodo Technique
    2. Learning how to learn course by Barbara Oakley
    3. Amazon – Timer YS-390 (I stripped off the unnecessary query string parameters to limit tracking)