{"id":12,"date":"2012-10-13T21:56:00","date_gmt":"2012-10-13T21:56:00","guid":{"rendered":""},"modified":"2021-05-09T10:03:35","modified_gmt":"2021-05-09T10:03:35","slug":"india-code-review","status":"publish","type":"post","link":"https:\/\/blog.ajayamrite.me\/index.php\/2012\/10\/13\/india-code-review\/","title":{"rendered":"India: code review"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">Anybody who has done any coding will realize that the problem in India is the exception handling. There is none. Only the happy path is coded. If you follow the happy path your life will be alright. If something goes wrong, accident, health issues, fire, theft etc&#8230; (exceptions), you are basically screwed because police is incompetent, it takes forever to get justice in the courts, no health service, no life\/health insurance.<\/p>\n<p>Indian @independence<\/p>\n<div>systems\/processes are like the first piece of &#8216;hello world&#8217; code <br \/><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">public void life() throws Exception {<\/span><\/span><\/div>\n<div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">&nbsp; &#8230;<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">}<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">\/\/ we don&#8217;t even know the exceptions may occur<\/span><\/span><\/div>\n<div><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">public void main() {<\/span><\/div>\n<div><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">    &nbsp;&nbsp; life();<\/span><br \/><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">}<\/span><\/span><\/div>\n<div><span style=\"font-family: Courier New;\"><\/span><br \/><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\">India @65<\/span><\/div>\n<\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\">Sweep the exceptions under the carpet<\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">public void life(){<\/span><\/span><\/span><br \/><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><\/span><\/div>\n<p><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><\/p>\n<div><\/div>\n<p><\/span><\/p>\n<div><\/p>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">&nbsp; &#8230;<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">}<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">\/\/ we know things can go bad and we have robust mechanism for handling the issue<\/span><\/span><\/div>\n<div><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">public void main() {<\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">    &nbsp; try{<\/span><\/span><\/div>\n<div><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; life();<\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">&nbsp;&nbsp;}catch(Exception e) {<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(&#8220;We are sorry for the interruption, You are screwed&#8221;);<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit();<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">    &nbsp; }<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">}<\/span><\/span><br \/><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\">Developed country<\/span><br \/><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">public void life() {<\/span><\/span><\/span><br \/><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><\/span><\/div>\n<p><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><\/span><\/div>\n<div>\n<div><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">&nbsp;&nbsp;do lot of paper work.<\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">&nbsp;&nbsp;birth<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">&nbsp;&nbsp;do somemore paper work<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">    &nbsp; take loan for education<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">    &nbsp; do a lot of paperwork<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">    &nbsp; get job<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">    &nbsp; do a lot of paperwork and pay a lot of taxes<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">    &nbsp; marriage()<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">    &nbsp; do a lot of paperwork for mortgage<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">    &nbsp; &#8230;..<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">}<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">\/\/ life is filled with exceptions<\/span><\/span><\/div>\n<div><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">public void main() {<\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">    &nbsp; try{<\/span><\/span><\/div>\n<div><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">&nbsp;&nbsp; &nbsp;         life();<\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">    &nbsp; }catch(Exception e) {<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">         &nbsp;&nbsp;&nbsp;&nbsp; media cries foul<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">         &nbsp;&nbsp;&nbsp;&nbsp; politician says people need to grow up<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">         &nbsp;&nbsp;&nbsp;&nbsp; fill this 100 page form<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">         &nbsp;&nbsp;&nbsp;&nbsp; help is on the way<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">         &nbsp;&nbsp;&nbsp;&nbsp; help is here<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">         &nbsp;&nbsp;&nbsp;&nbsp; do a lot of paperwork<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">         &nbsp;&nbsp;&nbsp;&nbsp; recieve help<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">&nbsp;     }<\/span><\/span><\/div>\n<div><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\"><span style=\"font-family: &quot;Courier New&quot;, Courier, monospace;\">}<\/span><\/span><br \/><span style=\"background-color: rgba(255, 255, 255, 0.0078125);\">I can go on&#8230; but I am sure you get the idea.<\/span><\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Anybody who has done any coding will realize that the problem in India is the exception handling. There is none. Only the happy path is coded. If you follow the happy path your life will be alright. If something goes wrong, accident, health issues, fire, theft etc&#8230; (exceptions), you are basically screwed because police is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-12","post","type-post","status-publish","format-standard","hentry","category-lament"],"_links":{"self":[{"href":"https:\/\/blog.ajayamrite.me\/index.php\/wp-json\/wp\/v2\/posts\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ajayamrite.me\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ajayamrite.me\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ajayamrite.me\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ajayamrite.me\/index.php\/wp-json\/wp\/v2\/comments?post=12"}],"version-history":[{"count":1,"href":"https:\/\/blog.ajayamrite.me\/index.php\/wp-json\/wp\/v2\/posts\/12\/revisions"}],"predecessor-version":[{"id":25,"href":"https:\/\/blog.ajayamrite.me\/index.php\/wp-json\/wp\/v2\/posts\/12\/revisions\/25"}],"wp:attachment":[{"href":"https:\/\/blog.ajayamrite.me\/index.php\/wp-json\/wp\/v2\/media?parent=12"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ajayamrite.me\/index.php\/wp-json\/wp\/v2\/categories?post=12"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ajayamrite.me\/index.php\/wp-json\/wp\/v2\/tags?post=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}