{"id":48,"date":"2007-03-21T15:37:38","date_gmt":"2007-03-21T23:37:38","guid":{"rendered":"http:\/\/dougmccune.com\/blog\/2007\/03\/21\/try-to-read-this-code\/"},"modified":"2007-03-21T15:37:38","modified_gmt":"2007-03-21T23:37:38","slug":"try-to-read-this-code","status":"publish","type":"post","link":"https:\/\/dougmccune.com\/blog\/2007\/03\/21\/try-to-read-this-code\/","title":{"rendered":"Try to read this code"},"content":{"rendered":"<p>I often use the <a href=\"http:\/\/en.wikipedia.org\/wiki\/%3F:\">?:<\/a> format for conditional tests (Wikipedia tells me this is called a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Ternary_operator\">ternary conditional expression<\/a>), it makes code short and sweet and often easily readable. But I was digging through some of the Flex framework source (mx.containers.Panel line 801) and came across this line:<\/p>\n<pre>\r\n<code>\r\nvm.bottom = o.bottom + (isNaN(btb) ? \r\n  (controlBar && !isNaN(btt) ? btt : isNaN(btl) ? bt : btl) : \r\n  btb);\r\n<\/code>\r\n<\/pre>\n<p>Honestly?<\/p>\n<p>I&#8217;ve used conditional expressions a lot, and even nested conditional expressions occasionally, but adding that third level of nesting makes a line of code that I can hardly read. My head almost exploded.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I often use the ?: format for conditional tests (Wikipedia tells me this is called a ternary conditional expression), it makes code short and sweet and often easily readable. But I was digging through some of the Flex framework source (mx.containers.Panel line 801) and came across this line: vm.bottom = o.bottom + (isNaN(btb) ? (controlBar [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[2],"tags":[],"class_list":["post-48","post","type-post","status-publish","format-standard","hentry","category-flex"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.9 - aioseo.com -->\n\t<meta name=\"description\" content=\"I often use the ?: format for conditional tests (Wikipedia tells me this is called a ternary conditional expression), it makes code short and sweet and often easily readable. But I was digging through some of the Flex framework source (mx.containers.Panel line 801) and came across this line: vm.bottom = o.bottom + (isNaN(btb) ? (controlBar\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Doug\"\/>\n\t<meta name=\"keywords\" content=\"flex\/flash\/actionscript\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/dougmccune.com\/blog\/2007\/03\/21\/try-to-read-this-code\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.9\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Doug McCune | Sculptor\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Try to read this code | Doug McCune\" \/>\n\t\t<meta property=\"og:description\" content=\"I often use the ?: format for conditional tests (Wikipedia tells me this is called a ternary conditional expression), it makes code short and sweet and often easily readable. But I was digging through some of the Flex framework source (mx.containers.Panel line 801) and came across this line: vm.bottom = o.bottom + (isNaN(btb) ? (controlBar\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/dougmccune.com\/blog\/2007\/03\/21\/try-to-read-this-code\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2007-03-21T23:37:38+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2007-03-21T23:37:38+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Try to read this code | Doug McCune\" \/>\n\t\t<meta name=\"twitter:description\" content=\"I often use the ?: format for conditional tests (Wikipedia tells me this is called a ternary conditional expression), it makes code short and sweet and often easily readable. But I was digging through some of the Flex framework source (mx.containers.Panel line 801) and came across this line: vm.bottom = o.bottom + (isNaN(btb) ? (controlBar\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/2007\\\/03\\\/21\\\/try-to-read-this-code\\\/#article\",\"name\":\"Try to read this code | Doug McCune\",\"headline\":\"Try to read this code\",\"author\":{\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/author\\\/admin-2\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/2007\\\/03\\\/21\\\/try-to-read-this-code\\\/#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1559cc79696919726297c735cddc893c8983709f55a8773bdc1d45aea8c79051?s=96&d=blank&r=x\",\"width\":96,\"height\":96,\"caption\":\"Doug\"},\"datePublished\":\"2007-03-21T15:37:38-08:00\",\"dateModified\":\"2007-03-21T15:37:38-08:00\",\"inLanguage\":\"en-US\",\"commentCount\":13,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/2007\\\/03\\\/21\\\/try-to-read-this-code\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/2007\\\/03\\\/21\\\/try-to-read-this-code\\\/#webpage\"},\"articleSection\":\"Flex\\\/Flash\\\/Actionscript\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/2007\\\/03\\\/21\\\/try-to-read-this-code\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/dougmccune.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/category\\\/flex\\\/#listItem\",\"name\":\"Flex\\\/Flash\\\/Actionscript\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/category\\\/flex\\\/#listItem\",\"position\":2,\"name\":\"Flex\\\/Flash\\\/Actionscript\",\"item\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/category\\\/flex\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/2007\\\/03\\\/21\\\/try-to-read-this-code\\\/#listItem\",\"name\":\"Try to read this code\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/2007\\\/03\\\/21\\\/try-to-read-this-code\\\/#listItem\",\"position\":3,\"name\":\"Try to read this code\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/category\\\/flex\\\/#listItem\",\"name\":\"Flex\\\/Flash\\\/Actionscript\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/#person\",\"name\":\"Doug McCune\",\"image\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/tTL5uiW4_400x400.jpeg\",\"sameAs\":[\"https:\\\/\\\/instagram.com\\\/doug_mccune\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/author\\\/admin-2\\\/#author\",\"url\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/author\\\/admin-2\\\/\",\"name\":\"Doug\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/2007\\\/03\\\/21\\\/try-to-read-this-code\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1559cc79696919726297c735cddc893c8983709f55a8773bdc1d45aea8c79051?s=96&d=blank&r=x\",\"width\":96,\"height\":96,\"caption\":\"Doug\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/2007\\\/03\\\/21\\\/try-to-read-this-code\\\/#webpage\",\"url\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/2007\\\/03\\\/21\\\/try-to-read-this-code\\\/\",\"name\":\"Try to read this code | Doug McCune\",\"description\":\"I often use the ?: format for conditional tests (Wikipedia tells me this is called a ternary conditional expression), it makes code short and sweet and often easily readable. But I was digging through some of the Flex framework source (mx.containers.Panel line 801) and came across this line: vm.bottom = o.bottom + (isNaN(btb) ? (controlBar\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/2007\\\/03\\\/21\\\/try-to-read-this-code\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/author\\\/admin-2\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/author\\\/admin-2\\\/#author\"},\"datePublished\":\"2007-03-21T15:37:38-08:00\",\"dateModified\":\"2007-03-21T15:37:38-08:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/\",\"name\":\"Doug McCune\",\"description\":\"Sculptor\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/dougmccune.com\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Try to read this code | Doug McCune","description":"I often use the ?: format for conditional tests (Wikipedia tells me this is called a ternary conditional expression), it makes code short and sweet and often easily readable. But I was digging through some of the Flex framework source (mx.containers.Panel line 801) and came across this line: vm.bottom = o.bottom + (isNaN(btb) ? (controlBar","canonical_url":"https:\/\/dougmccune.com\/blog\/2007\/03\/21\/try-to-read-this-code\/","robots":"max-image-preview:large","keywords":"flex\/flash\/actionscript","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dougmccune.com\/blog\/2007\/03\/21\/try-to-read-this-code\/#article","name":"Try to read this code | Doug McCune","headline":"Try to read this code","author":{"@id":"https:\/\/dougmccune.com\/blog\/author\/admin-2\/#author"},"publisher":{"@id":"https:\/\/dougmccune.com\/blog\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/dougmccune.com\/blog\/2007\/03\/21\/try-to-read-this-code\/#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/1559cc79696919726297c735cddc893c8983709f55a8773bdc1d45aea8c79051?s=96&d=blank&r=x","width":96,"height":96,"caption":"Doug"},"datePublished":"2007-03-21T15:37:38-08:00","dateModified":"2007-03-21T15:37:38-08:00","inLanguage":"en-US","commentCount":13,"mainEntityOfPage":{"@id":"https:\/\/dougmccune.com\/blog\/2007\/03\/21\/try-to-read-this-code\/#webpage"},"isPartOf":{"@id":"https:\/\/dougmccune.com\/blog\/2007\/03\/21\/try-to-read-this-code\/#webpage"},"articleSection":"Flex\/Flash\/Actionscript"},{"@type":"BreadcrumbList","@id":"https:\/\/dougmccune.com\/blog\/2007\/03\/21\/try-to-read-this-code\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/dougmccune.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/dougmccune.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/dougmccune.com\/blog\/category\/flex\/#listItem","name":"Flex\/Flash\/Actionscript"}},{"@type":"ListItem","@id":"https:\/\/dougmccune.com\/blog\/category\/flex\/#listItem","position":2,"name":"Flex\/Flash\/Actionscript","item":"https:\/\/dougmccune.com\/blog\/category\/flex\/","nextItem":{"@type":"ListItem","@id":"https:\/\/dougmccune.com\/blog\/2007\/03\/21\/try-to-read-this-code\/#listItem","name":"Try to read this code"},"previousItem":{"@type":"ListItem","@id":"https:\/\/dougmccune.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/dougmccune.com\/blog\/2007\/03\/21\/try-to-read-this-code\/#listItem","position":3,"name":"Try to read this code","previousItem":{"@type":"ListItem","@id":"https:\/\/dougmccune.com\/blog\/category\/flex\/#listItem","name":"Flex\/Flash\/Actionscript"}}]},{"@type":"Person","@id":"https:\/\/dougmccune.com\/blog\/#person","name":"Doug McCune","image":"https:\/\/dougmccune.com\/blog\/wp-content\/uploads\/2022\/01\/tTL5uiW4_400x400.jpeg","sameAs":["https:\/\/instagram.com\/doug_mccune"]},{"@type":"Person","@id":"https:\/\/dougmccune.com\/blog\/author\/admin-2\/#author","url":"https:\/\/dougmccune.com\/blog\/author\/admin-2\/","name":"Doug","image":{"@type":"ImageObject","@id":"https:\/\/dougmccune.com\/blog\/2007\/03\/21\/try-to-read-this-code\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/1559cc79696919726297c735cddc893c8983709f55a8773bdc1d45aea8c79051?s=96&d=blank&r=x","width":96,"height":96,"caption":"Doug"}},{"@type":"WebPage","@id":"https:\/\/dougmccune.com\/blog\/2007\/03\/21\/try-to-read-this-code\/#webpage","url":"https:\/\/dougmccune.com\/blog\/2007\/03\/21\/try-to-read-this-code\/","name":"Try to read this code | Doug McCune","description":"I often use the ?: format for conditional tests (Wikipedia tells me this is called a ternary conditional expression), it makes code short and sweet and often easily readable. But I was digging through some of the Flex framework source (mx.containers.Panel line 801) and came across this line: vm.bottom = o.bottom + (isNaN(btb) ? (controlBar","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/dougmccune.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/dougmccune.com\/blog\/2007\/03\/21\/try-to-read-this-code\/#breadcrumblist"},"author":{"@id":"https:\/\/dougmccune.com\/blog\/author\/admin-2\/#author"},"creator":{"@id":"https:\/\/dougmccune.com\/blog\/author\/admin-2\/#author"},"datePublished":"2007-03-21T15:37:38-08:00","dateModified":"2007-03-21T15:37:38-08:00"},{"@type":"WebSite","@id":"https:\/\/dougmccune.com\/blog\/#website","url":"https:\/\/dougmccune.com\/blog\/","name":"Doug McCune","description":"Sculptor","inLanguage":"en-US","publisher":{"@id":"https:\/\/dougmccune.com\/blog\/#person"}}]},"og:locale":"en_US","og:site_name":"Doug McCune | Sculptor","og:type":"article","og:title":"Try to read this code | Doug McCune","og:description":"I often use the ?: format for conditional tests (Wikipedia tells me this is called a ternary conditional expression), it makes code short and sweet and often easily readable. But I was digging through some of the Flex framework source (mx.containers.Panel line 801) and came across this line: vm.bottom = o.bottom + (isNaN(btb) ? (controlBar","og:url":"https:\/\/dougmccune.com\/blog\/2007\/03\/21\/try-to-read-this-code\/","article:published_time":"2007-03-21T23:37:38+00:00","article:modified_time":"2007-03-21T23:37:38+00:00","twitter:card":"summary_large_image","twitter:title":"Try to read this code | Doug McCune","twitter:description":"I often use the ?: format for conditional tests (Wikipedia tells me this is called a ternary conditional expression), it makes code short and sweet and often easily readable. But I was digging through some of the Flex framework source (mx.containers.Panel line 801) and came across this line: vm.bottom = o.bottom + (isNaN(btb) ? (controlBar"},"aioseo_meta_data":{"post_id":"48","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[],"defaultGraph":"","defaultPostTypeGraph":""},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-01-03 18:02:32","updated":"2025-06-03 20:02:20","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/dougmccune.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/dougmccune.com\/blog\/category\/flex\/\" title=\"Flex\/Flash\/Actionscript\">Flex\/Flash\/Actionscript<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tTry to read this code\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/dougmccune.com\/blog"},{"label":"Flex\/Flash\/Actionscript","link":"https:\/\/dougmccune.com\/blog\/category\/flex\/"},{"label":"Try to read this code","link":"https:\/\/dougmccune.com\/blog\/2007\/03\/21\/try-to-read-this-code\/"}],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/dougmccune.com\/blog\/wp-json\/wp\/v2\/posts\/48","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dougmccune.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dougmccune.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dougmccune.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dougmccune.com\/blog\/wp-json\/wp\/v2\/comments?post=48"}],"version-history":[{"count":0,"href":"https:\/\/dougmccune.com\/blog\/wp-json\/wp\/v2\/posts\/48\/revisions"}],"wp:attachment":[{"href":"https:\/\/dougmccune.com\/blog\/wp-json\/wp\/v2\/media?parent=48"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dougmccune.com\/blog\/wp-json\/wp\/v2\/categories?post=48"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dougmccune.com\/blog\/wp-json\/wp\/v2\/tags?post=48"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}