I know it’s a joke, but it’s an old one and it doesn’t make a lot of sense in this day and age.
Why are you comparing null to numbers? Shouldn’t you be assuring your values are valid first? Why are you using the “cast everything to the type you see fit and compare” operator?
Other languages would simply fail. Once more JavaScript greatest sin is not throwing an exception when you ask it to do things that don’t make sense.
Ok some of these I understand but what the fuck. Why.
Edit: ok I have a theory. == checks equality without casting to any types, so they’re not equal. But < and > are numeric operations, so null gets cast to 0. So <= and >= cast it to 0, and it’s equal to 0, so it’s true.
greater than, smaller than, will cast the type so it will be 0>0 which is false, ofcourse. 0>=0 is true.
Now == will first compare types, they are different types so it’s false.
Also I’m a JavaScript Dev and if I ever see someone I work with use these kind of hacks I’m never working together with them again unless they apologize a lot and wash their dirty typing hands with… acid? :-)
edit: as several people already pointed out, my answer is not accurate. The real solution was mentioned by mycus
This was just recently removed from sudo. Truly the end of an era
<span style="color:#323232;">Remove "This incident will be reported." from user warnings.
</span><span style="color:#323232;">
</span><span style="color:#323232;">This used to indicate that email had been sent to the administrator
</span><span style="color:#323232;">telling them that someone tried to run sudo. Whether or not sudo
</span><span style="color:#323232;">sends email is now configurable, so the warning may not be accurate.
</span><span style="color:#323232;">It is also confusing to the user since they will not know who the
</span><span style="color:#323232;">incident is being reported to. See also https://xkcd.com/838
</span>
Sometimes there’s also the line that goes down at the start of the sprint, because the team still had to finish some dumb busywork to complete a story from the previous sprint.
This was originally an engineers’ complaint about managers’ honesty regarding business trouble: Managers think we’re mushrooms; they keep us in the dark and feed us bullshit.
I actually ran a moderately active (like 20,000 hits a day) small business site from a laptop for a couple years. Of course one of the first thing I did was put a “SERVER DO NOT SHUT DOWN” sticker on it, and set the power settings so closing the lid did not shut down or sleep the computer. It was a Dell 7000 series with 16GB IIRC, it did great.
Not advertising here, but with this low traffic you could be in a permanent free tier with AWS with all the availability guarantees. It doesn’t work with EC2, but for serverless solutions (ApiGateway, Lambda, DynamoDB) they have something like “we start charging after 1M calls per month” (don’t quote me on this exact number). I have a couple of pet projects working this way
Excel wrongly assuming the year 1900 was a leap year for their timestamps is my favorite bug that will never be fixed because everyone has built workarounds for this already
programmerhumor
Hot
This magazine is from a federated server and may be incomplete. Browse more on the original instance.