{"id":32,"date":"2007-05-10T13:41:07","date_gmt":"2007-05-10T21:41:07","guid":{"rendered":"http:\/\/stevenrbrandt.com\/wordpress\/?p=32"},"modified":"2007-05-10T13:41:07","modified_gmt":"2007-05-10T21:41:07","slug":"coding-conventions","status":"publish","type":"post","link":"https:\/\/stevenrbrandt.com\/?p=32","title":{"rendered":"Coding Conventions"},"content":{"rendered":"<p>It is important to follow standard naming conventions when writing code. It increases clarity and readability. Thus, in the <a href=\"http:\/\/www.amazon.com\/gp\/redirect.html?ie=UTF8&#038;location=http%3A%2F%2Fwww.amazon.com%2FElements-Java-Style-Allan-Vermeulen%2Fdp%2F0521777682%2F&#038;tag=giftcoordinat-20&#038;linkCode=ur2&#038;camp=1789&#038;creative=9325\">&quot;Elements of Java Style,&quot;<\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.assoc-amazon.com\/e\/ir?t=giftcoordinat-20&amp;l=ur2&amp;o=1\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/> we are told to capitolize class names but not function names, etc. A recent elaboration on this basic idea was put forward by a colleague of mine (Adam French) and his associate (Andrew France).<\/p>\n<p>The suggestion is that, in addition to other style considerations, your object oriented code should operate as follows:<\/p>\n<ol>\n<li>All variables should be named after Star Wars characters.\n<li>All function names should be named after Star Trek characters.\n<li>All classes should be named after Lord of the Rings characters.\n<\/ol>\n<p>Coding in this fashion will, obviously, require great discipline and nerdity, but in the end the resulting clarity will bring many rewards. And if you are planning to become ISO 9000 certified, remember to document this procedure.<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-32\" class=\"share-twitter sd-button share-icon\" href=\"https:\/\/stevenrbrandt.com\/?p=32&amp;share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\" ><span>Twitter<\/span><\/a><\/li><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-32\" class=\"share-facebook sd-button share-icon\" href=\"https:\/\/stevenrbrandt.com\/?p=32&amp;share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\" ><span>Facebook<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>It is important to follow standard naming conventions when writing code. It increases clarity and readability. Thus, in the &quot;Elements of Java Style,&quot; we are told to capitolize class names but not function names, etc. A recent elaboration on this &hellip; <a class=\"more-link\" href=\"https:\/\/stevenrbrandt.com\/?p=32\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-32\" class=\"share-twitter sd-button share-icon\" href=\"https:\/\/stevenrbrandt.com\/?p=32&amp;share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\" ><span>Twitter<\/span><\/a><\/li><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-32\" class=\"share-facebook sd-button share-icon\" href=\"https:\/\/stevenrbrandt.com\/?p=32&amp;share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\" ><span>Facebook<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[15,3],"tags":[],"class_list":["post-32","post","type-post","status-publish","format-standard","hentry","category-humor","category-programming"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pgWoS-w","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/stevenrbrandt.com\/index.php?rest_route=\/wp\/v2\/posts\/32"}],"collection":[{"href":"https:\/\/stevenrbrandt.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stevenrbrandt.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stevenrbrandt.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stevenrbrandt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=32"}],"version-history":[{"count":0,"href":"https:\/\/stevenrbrandt.com\/index.php?rest_route=\/wp\/v2\/posts\/32\/revisions"}],"wp:attachment":[{"href":"https:\/\/stevenrbrandt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stevenrbrandt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stevenrbrandt.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}