There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmerhumor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

exu , in Still, better than Emacs

The only thing Emacs lacks is a good editor.

Thankfully Evil-mode exists.

seaduck , in Waterfall is Back!

Wait, your lines go downwards?

wurzelwerk ,
@wurzelwerk@kbin.social avatar

joke's on you. we use the burnup!

Gerryflap , in Waterfall is Back!
@Gerryflap@lemmy.world avatar

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.

sincle354 , in Still, better than Emacs

/upvote<enter>b<ctrl-a>

lowleveldata , in Being on linux

E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

siriusmart ,

this incidence will be reported

usernamesAreTricky ,

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>

github.com/…/6aa320c96a37613663e8de4c275bd6c49046…

EDIT: apparently it was added back for some cases

github.com/…/9757d29a24ac1872872cf09757b0439c5408…

deegeese , in Who is Json?

Json is a good guy except for his comments.

julianh , in Yup, Javascript can go F@#! itself

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.

RagingToad ,

I’m not sure if you really want to know, but:

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

Mars , in Yup, Javascript can go F@#! itself
@Mars@beehaw.org avatar

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.

OsrsNeedsF2P OP ,

Shouldn’t you be assuring your values are valid first?

Step 1: Get to prod

Step 2-10: Add features

Step 11: Sell the company before it bites you

Bjoern_Tantau , in Yup, Javascript can go F@#! itself

Can someone explain this? I mean, the last result. Usually I can at least understand Javascript’s or PHP’s quirks. But this time I’m stumped.

mycus ,
@mycus@kbin.social avatar

JS null and undefined shenanigans


basically:

  1. bigger an lesser comparison types convert null to zero, so is zero bigger or lesser than zero? no
  2. == is fucky and to it null only equals undefined and undefined only equals null (and themselves), so no
  3. is zero bigger than or equal to zero? yeah
Bjoern_Tantau ,

Ugh, thanks, of course. Stupid brain.

mycus ,
@mycus@kbin.social avatar

I'm starting to think JS maintainers have a thing against mathematicians

Quik2007 ,

more likely against humans

bettse , in Yup, Javascript can go F@#! itself
@bettse@lemmy.ml avatar

This build on that humorously: www.destroyallsoftware.com/talks/wat

PerfectParanoia , in Who is Json?

You need to be agile when you scrum on kubernetes. Especially when you react on nodejs and your json is out to lunch. Y2K was a mercy killing and we couldn’t see it.

TwilightKiddy , in Yup, Javascript can go F@#! itself

This one is one of my favourite JS quirks:

JS quirk

LeFrog ,
@LeFrog@discuss.tchncs.de avatar

Wait wtf is happening there?

usernamesAreTricky ,

parseInt is meant for strings so it converts the number there into a string. Once the numbers get small enough it starts representing it with scientific notation. So 0.0000001 converts into “1e-7” where it then starts to ignore the e-7 part because that’s not a valid int, so it is left with 1

…plainenglish.io/why-parseint-0-0000001-0-8fe1aec…

dmahtani , in Which Lemmy instance is this?
@dmahtani@lemmy.ml avatar

Bro that’s the Reddit server.

RyeBread , in Still, better than Emacs

Say Jarvis, do you want to spend weeks fine tuning your IDE? Because boy do I have a NeoVIM for you. And boy is it glorious.

0xd , in I love university

stackoverflow.com/a/5685943

Here is the answer, M$ changed their mind at some point and your university has a stale information but it seems it was true in the past.

JustANoone OP ,
@JustANoone@lemmy.world avatar

This is a reucurring theme at this specific subject unfortunately. He doesn’t seem to put much effort into it, as most slides are just plain text and nothing else. I stopped attending after the second class.

DrownedAxolotl ,

That truly sucks. Yeah, some professors can be like that. I had a math professor offer bonus points to the first 3 students completed the assignment, only for the majority to cheat and just look up the answer and turn that in. It became a contest of who could copy the fastest and one student even admitted to doing it, but she just didn’t care and gave points to the cheaters anyway.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • [email protected]
  • lifeLocal
  • goranko
  • All magazines