Proficient vs Senior


I recently read a post in LinkedIn claiming that the difference between junior and senior developers is how we check if a number is even or odd (I was unable to find that post again to share the link). According to this post, junior developers would do something like:

if number % 2 == 0
  print "even"
else
  print "odd"

And that instead, senior developers (like this person) would use a bitwise operator to find this out, like this:

if number & 1 == 0
  print "even"
else
  print "odd"

In my opinion, this is definitely not an indicator of whether someone is junior or senior. And in fact, I think that only a junior engineer would believe such a claim.

Usually, proficient developers are also senior developers, so it may be easy to use the term interchangeably, but they are not the same. A proficient developer is someone who has a deep technical knowledge, while a senior developer has enough experience to balance trade-offs like when code needs to be optimised.

Using bitwise operators is way more performant than checking the modulo value of a number. But a more efficient solution is not always the best.

In my article “Premature Code Optimisation”, I explained how we should identify our bottlenecks before trying to optimise some code. If our product must do an “even” check for so many numbers that it can become a problem, then some optimisation may be in order.

However, I would claim that checking number % 2 is universally understood as checking for an even number. Doing anything different than that would obfuscate the code and make it harder to read (at least for “junior” engineers, as the author of that post claimed). Additionally, some compilers are quite smart and make the processing very efficient, so even code that may look inefficient may be as fast as the more “senior” way of writing it.

This is important because software developers spend most of our time reading code, not writing it. We need to understand the code at hand so we can change it according to specifications. And things like this do make the code harder to read.

In any case, irrespective of the approach we take, I would definitely advise creating an is_even function so we can hide the implementation details.


I am a software developer because I really enjoy writing code and learning new hacks, but I’ve also learnt that we need to know when is the right time to use them. Particularly, a senior developer doesn’t do unnecessary optimisations at the cost of readability.

Happy coding!
José Miguel

Share if you find this content useful, and Follow me on LinkedIn to be notified of new articles.


Leave a Reply

Your email address will not be published. Required fields are marked *