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
-
@Letmecode from what I understand the 10 was a PHP variable which was forgotten after switching to static HTML and somehow landed on a production site. More laziness than incompetence.
-
int borderRadius = GetBorderRadius();
if(borderRadius < 3)
{
bubbleShape = 'square';
}
else
{
bubbleShape = 'circle';
}
[Later during a debugging session]
Dev: "I'm just gonna go ahead hard code this for a second. 10 < 3, ah yes that'll do the trick. I'll be sure to put that back later before I commit."
I refuse to believe this happened any other way. 😂 -
Please tell me this was from a CS101 class in attempt to explain how if statements work in that when the condition is false, the second block is executed rather than the first. This serves no other imaginable purpose. 😂
-
Come on guys, there is logic behind this statements. Who knows what the future holds. The guy was simply future proofing his code. Who knows tomorrow 10 is actually less than 3?
-
@Gauthier Firefox's view source. Was too busy laughing to bother with esthetics :D
-
@Gauthier I know. I had the same thought when I took the pic but I just had to post it asap
-
Oh yeah, great code....
Saw similar somewhere else a long time a go, it didn't make it into production... -
@franga2000 That's my point, you didn't have to change it! Otherwise I and @rallport couldn't have made the joke.
-
eldamir12298yWhen you see these kinds of things, you gotta ask yourself "is it him or me, who is stupid?". Now, you are all judging this code, but little do you realize, that this is just a test for whether the compiler reads "10" as an int of "ten" or a binary of "two"
Joke is on you! 😉
/sarcasm -
Fine! 10 > 3...
Then try this in JS --> Open your console and...
>> arr = [3, 10];
>> arr.sort();
// outputs [10, 3]
Now, this is the real WTF!!! LoL :)
Related Rants
-
linuxxx32*client calls in* Me: good morning, how can I help you? Client: my ip is blocked, could you unblock it for m...
-
DRSDavidSoft28Found this in our codebase, apparently one of my co-workers had written this
-
linuxxx23*client calls* "hello, we forgot the password to our WiFi router. Could you reset that for us?" 😐😶😮...
Words cannot describe this...
undefined
wtf