DEV Community

Discussion on: What habit do many senior engineers have that juniors should try to avoid adopting?

Collapse
 
jmcp profile image
James McPherson

A few things:

  • taking a moment (or 10) to understand the whole problem being addressed
  • xkcd.com/1205/
  • taking the "you" out of code review
  • ask about intended side effects
  • ask about *un*intended side effects
  • (with very few exceptions) make your code understandable by anybody who comes along afterwards to maintain it.
  • make your block scope explicit (see github.com/illumos/illumos-gate/bl... for a historical example)
  • DO NOT IGNORE ERRORS -- but know when it's actually safe to do so
  • extend the scope of your fix -- ask "what else could go wrong that is related to what I'm fixing?"
Collapse
 
jmcp profile image
James McPherson

Sigh ... I was sure that when I responded to Ben's post this morning it was about habits that juniors should adopt, rather than should not.

The worst habit I've come across from senior engineers has been the tendency (based on their experience in the past) to shut down a request to consider either a new feature or a new way of doing something - and do so without explaining why.

How are more junior engineers (let alone management!) supposed to understand the problem better if you do not explain things (carefully and without rancour or attitude) to them?