DEV Community

Discussion on: What's the worst code you have seen by a senior dev?

 
awdng profile image
AWDNG

I have the same opinion as Brandin as a dev of 15 years. Also your way of communicating is quite patronising. In a language like JS, this kind of conditional makes sense, especially in bigger projects with multiple developers. It adds no weight but is a stricter check that helps to prevent bugs. If this value is changed by someone to a non-truthy value for whatever reason, a code review will most likely not catch it and even your tests might work and you have an extremely hard to track bug. Software projects are never perfect and you should never assume so.
In our company of 150+ devs, the strict checks in loosely typed languages are actually in the coding standards and will get flagged if you don't do them.