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
		
- 
				
				Well that if statement has a few nested if statements... i have given up on fixing the users shit code (our site was outsourced) and we are rebuilding the whole thing in house now... so accept and move on :) not my problem
- 
				
				xD maybe, just maybe, it's all about the code style. Think about it, the code speaks louder than comments, so instead of removing the if statement and putting a comment like "// I don't care if it is_today or not" and author decides to make the code rhyme.
 
 Next up:
 if (toBe || !toBe) {}
 if (isFuture || isPast) {}
 if (yes && !no || definitelyYes || maybeOnlyThisTime) {}
- 
				
				 Peekaboo9129yPerhaps someone was trying to convey that it also works as for tomorrow, but didn't realize their boolean algebra skills were sufficient enough? Peekaboo9129yPerhaps someone was trying to convey that it also works as for tomorrow, but didn't realize their boolean algebra skills were sufficient enough?
- 
				
				@C-Info i just had the same thought and realized that logically "if(to_be || !to_be)" isn't really a question after all, right?
- 
				
				 Peekaboo9129y@aikone That would on the other hand be null for you since you don't seem to having stocked up on pizza. 😄 Peekaboo9129y@aikone That would on the other hand be null for you since you don't seem to having stocked up on pizza. 😄
- 
				
				Make sure u explicitly check that pizza is null... we are in php land here.. false could also be null... oh and 0 could be too! Its a mine field out there
Related Rants













 Everyone always says the previous developer was crap, sometimes you're right
Everyone always says the previous developer was crap, sometimes you're right
 bad code that works 👍
source: reddit.com/r/ProgrammerHumor/
bad code that works 👍
source: reddit.com/r/ProgrammerHumor/
 Maintaining software built by interns who have all quit by now and made zero documentation
Maintaining software built by interns who have all quit by now and made zero documentation
I have no words...
undefined
gore
bad code
in production