Chaz Meyers (cpm) wrote,
Chaz Meyers

Note to self: precidence matters!

Note to self:

variable = A and B ? some_method_returning_array() : []

`variable` is always set to `A` because `and` does not bind as tightly as `&&`! Oops!

I definitely did not spend an hour not realizing this. Not at all. :)
Tags: computers, nerdcore, ruby, you wish you were as cool as me

  • My tweets

    Sun, 01:39: RT @ dinoman_j:

  • My tweets

    Mon, 00:15: In a randoms Among Us discord, people were going "POGGERS" and I ask, "Hey, are any of you old enough to remember the game "pogs"…

  • My tweets

    Sun, 11:55: RT @ computerfact: everyone thinks theyre the plumber but in reality we're all just turtles minding our own business waiting to be…

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.