Conversation

Notices

  1. !TIL "Yoda Conditionals": if (5 == x) then... Because it's like saying "if blue is the sky" or "if tall is the man" https://blog.codinghorror.com/new-programming-jargon/

    Thursday, 03-Nov-16 02:11:59 UTC from sn.jonkman.ca at 43°36'0"N 80°32'58"W
    1. And !TIL that Yoda Conditionals are actually a pretty good idea: If you accidentally mistype 'if (5 = y)' then the compiler barfs instead of getting the unwanted side-effect of adding 5 to y with 'if (y = 5)' https://discourse.codinghorror.com/t/new-programming-jargon/41/5

      Thursday, 03-Nov-16 02:15:09 UTC from sn.jonkman.ca at 43°36'0"N 80°32'58"W
      1. ...and !TIL to proofread messages before posting ("the unwanted side-effect of *assigning* 5 to y")

        Thursday, 03-Nov-16 02:16:50 UTC from sn.jonkman.ca at 43°36'0"N 80°32'58"W
      2. I came across this (without the catchy name) in a !cplusplus course I took in the late # As I drifted first toward the sysadmin side, then toward user support, I forgot both.

        Thursday, 03-Nov-16 02:28:04 UTC from fresh.federati.net