Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Typical newbie fail... Hate it every time I see it. Bloats the code and is absolutely useless.
-
heikomat6867yEarly-exit ftw. Just immediately return as soon as possible (for example in fail situations), so the only case remaining is the intended one, thus barely any else-block is needed.
-
I see this kind of mistake as a clear lack of proof reading your code. It's like an essay. First working version is a draft. Then you have to go back and look for improvements. So many people skip this step.
Related Rants
The over-use of } else {
undefined
elseif
if
junior
juniordevs
juniordev
else