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
-
C0D4669026yAlmost looked like something I spotted today.. but there’s no ternary operations and assignments occurring in that if . Happy to swap 😂
-
Root797706yLengthy Boolean logic without parenthesis makes me very confused and often angry.
Especially in php since its evaluation order is often backwards from what I expect. -
after converting, using an object for the options:
if (!$option->hasIndexFilter() || $options->getIndexFilter() === (bool) $row['indexed'])
.... -
Bin it & rewrite it. I’d have killed that programmer just for using a while loop on an array, and I’ve seen some pretty shitty code.
I have 2 very simple questions
1) what’s wrong with - if (empty()) { }
2) if they are expecting an int, what wrong with saying, i don’t know, CASTING IT TO A FUCKING INT!!!
It’s programmers like these that make me go why?
Related Rants
Naaarf
Refactoring the whole day.
Someone who prefers while(list(...) = each(...)) or for($x=0; $x < count($array); $x++) wrote the following code, too.
if ($indexed == null || $indexed == "0" && $row[$x]["indexed"] == 0 || $indexed == "1" && $row[$x]["indexed"] == 1) ....
It's buggy. Why does this not surprise me?
This stuff. Whole day.
My brain feels foggy.
rant
nsfw
not safe for sanity