22
totoxto
6y

I excused myself for writing a switch statement with only one case during a code review with thinking it was likely to get more cases in the future. Lead dev said that's okay, then chuckled a little before he showed me a switch statement with two cases added by one of the people who can bypass the review process: case true and case false.

Comments
  • 3
    Yours was prevention. Theirs was....well....only they know what it was
  • 3
    Future proofing, that’s ok
  • 0
    Was it boolean or Boolean?
  • 0
    It'll work in javascript. Well, because you know, undefined and null. *sighs*
  • 0
    @hugh-mungus it's the CEO who is also the original author of the product. AFAIK it used to all reside in one file with no VCS in the start. The fact that tests now exists, there's a review process and many other things are a result of a lot of convincing. Forcing him through the review process seems to be a battle none of the developers are willing to take though.
  • 0
    While the code might look odd like that, he is smart and rarely breaks something. So it's not much of a problem, probably the main reason that my seniors doesn't push the issue. So I hope I don't paint a too dark picture of the situation.
Add Comment