News for hackers. Stuff that matters.
Re:Skills Poor Programmers Lack by drchewbacca on Sunday July 21, 2019 @01:15PM (#20492375)
Is anyone willing to explain the second line? I get the first means "if isDelivered and isNotified are both true then set isDone to True, if not set it to false". However I've never seen a variable being set "isDone = isDelivered" as part of a logical test.

Personally I think programmers who are "too clever" are cancer inside a codebase. Sure you saved a bunch of keystrokes but your code golf has locked the code forever unless someone is willing to rewrite it. This is not a bad example but in general I think people who strive to do things in less characters are highly problematic.

Re:Skills Poor Programmers Lack by whiddershins on Sunday July 21, 2019 @01:31PM (#20492475)
It feels clever if you aren’t used to it but it is super common.

isDelivered && isNotified

always resolves to a Boolean, either TRUE or FALSE

So you are just saying

isDone = TRUE

or

isDone = FALSE

that’s all

Re:Skills Poor Programmers Lack by edflsafoiewq on Sunday July 21, 2019 @02:26PM (#20492834)
It isn't (isDone = isDelivered) and isNotified, it's isDone = (isDelivered and isNotified). It's just an expression being assigned to a variable.
Re:Skills Poor Programmers Lack by drchewbacca on Sunday July 21, 2019 @03:19PM (#20493125)
Ah ok, great, thanks.
Re:Skills Poor Programmers Lack by LaserToy on Sunday July 21, 2019 @01:34PM (#20492497)
I tend to agree that, given compiler doesn’t care most of time, saving characters can’t justify decrease in readability.