{"id":824,"date":"2014-10-07T16:19:42","date_gmt":"2014-10-07T23:19:42","guid":{"rendered":"http:\/\/www.imaginary-institute.com\/blog\/?p=824"},"modified":"2014-10-07T16:23:27","modified_gmt":"2014-10-07T23:23:27","slug":"parentheses-more-than-emoticon-mouths","status":"publish","type":"post","link":"https:\/\/www.imaginary-institute.com\/blog\/2014\/10\/07\/parentheses-more-than-emoticon-mouths\/","title":{"rendered":"Parentheses: more than emoticon mouths"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft  wp-image-827\" src=\"http:\/\/www.imaginary-institute.com\/blog\/wp-content\/uploads\/2014\/10\/emoticon.png\" alt=\"emoticon\" width=\"202\" height=\"202\" srcset=\"https:\/\/www.imaginary-institute.com\/blog\/wp-content\/uploads\/2014\/10\/emoticon.png 200w, https:\/\/www.imaginary-institute.com\/blog\/wp-content\/uploads\/2014\/10\/emoticon-150x150.png 150w\" sizes=\"auto, (max-width: 202px) 100vw, 202px\" \/>I keep telling my students to use parentheses all the time. I even tell them to parenthesize something like 2+(3*4), even though we know that multiplication has precedence over addition, because it&#8217;s a good habit to always be crystal-clear to humans and computers alike.<\/p>\n<p>Sometimes I feel silly for being so dogmatic about this. But I just spent an hour debugging, because <code>(a&amp;0xFF&lt;&lt;24)<\/code> did not put my alpha value into the top 8 bits of an int. It should have been <code>((a&amp;0xFF)&lt;&lt;24)<\/code>. Now I feel good again about telling people to use lots of parentheses!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I keep telling my students to use parentheses all the time. I even tell them to parenthesize something like 2+(3*4), even though we know that multiplication has precedence over addition, because it&#8217;s a good habit to always be crystal-clear to humans and computers alike. Sometimes I feel silly for being so dogmatic about this. But [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-824","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.imaginary-institute.com\/blog\/wp-json\/wp\/v2\/posts\/824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.imaginary-institute.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.imaginary-institute.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.imaginary-institute.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.imaginary-institute.com\/blog\/wp-json\/wp\/v2\/comments?post=824"}],"version-history":[{"count":5,"href":"https:\/\/www.imaginary-institute.com\/blog\/wp-json\/wp\/v2\/posts\/824\/revisions"}],"predecessor-version":[{"id":830,"href":"https:\/\/www.imaginary-institute.com\/blog\/wp-json\/wp\/v2\/posts\/824\/revisions\/830"}],"wp:attachment":[{"href":"https:\/\/www.imaginary-institute.com\/blog\/wp-json\/wp\/v2\/media?parent=824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.imaginary-institute.com\/blog\/wp-json\/wp\/v2\/categories?post=824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.imaginary-institute.com\/blog\/wp-json\/wp\/v2\/tags?post=824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}