{"id":191,"date":"2008-08-02T01:17:16","date_gmt":"2008-08-02T06:17:16","guid":{"rendered":"http:\/\/www.jasonmorrison.net\/content\/?p=191"},"modified":"2008-08-02T01:17:16","modified_gmt":"2008-08-02T06:17:16","slug":"the-most-difficult-problems-you-will-ever-face-as-a-programmer","status":"publish","type":"post","link":"http:\/\/www.jasonmorrison.net\/content\/2008\/the-most-difficult-problems-you-will-ever-face-as-a-programmer\/","title":{"rendered":"The most difficult problems you will ever face as a programmer"},"content":{"rendered":"<p><a class=\"tt-flickr tt-flickr-Small\" href=\"http:\/\/www.jasonmorrison.net\/content\/photos\/photo\/2715574761\/Niagara-Falls-and-city-lights-at-night.html\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright\" style=\"border: 0pt none;\" title=\"Niagara Falls at night from the Skylon Tower\" src=\"http:\/\/farm4.static.flickr.com\/3142\/2715574761_eed7f7a9f3_m.jpg\" border=\"0\" alt=\"Niagara Falls and city lights at night\" width=\"180\" height=\"240\" \/><\/a> I was given a problem to solve at work earlier this week and I pretty much totally choked.\u00a0 To be honest it wasn&#8217;t that hard of a problem &#8211; I obviously <a href=\"http:\/\/www.jasonmorrison.net\/content\/standard-disclaimer\/\">can&#8217;t share it with you here<\/a>, but I will say that (among other things) I completely, totally blanked on how to find if two lines on a plain intersect and didn&#8217;t have a laptop handy to look it up.<\/p>\n<p>This bothered me all week and got me thinking about my career as a programmer and the kinds of problems I&#8217;ve been asked to solve.\u00a0 Everything we do as programmers, developers, or software engineers boils down to solving problems&#8211;so what have I been doing all these years?\u00a0 Finally I realized that of all the difficult problems I&#8217;ve worked on in my professional career, most of them were difficult because of:<\/p>\n<ul>\n<li>Imposed constraints;<\/li>\n<li>Convoluted business rules and vague requirements;<\/li>\n<li>Political or organizational issues; or<\/li>\n<li>Human factors.<\/li>\n<\/ul>\n<p>That last type of problem I actually really enjoy working on, but let&#8217;s put that aside for the moment.\u00a0 Notice anything missing from that list?\u00a0 Only rarely have I encountered problems that required really complex logic, difficult algorithms, or lateral thinking.<\/p>\n<p>Why is this?\u00a0 Have I shied away from those sorts of problems, or been unable to hack it?\u00a0 I don&#8217;t think this is the case.\u00a0 I did well enough on the SAT and GRE, and I can usually get myself back up to speed for solving logic puzzles in a week or two.\u00a0 My guess is that my career is pretty typical, and that <strong>most of the problems that most companies face are due to constraints, vague business rules, organizational issues, and human factors<\/strong>.<\/p>\n<p>This flies in the face of the kind of education most of us get as programmers.\u00a0 At OWU the <a href=\"http:\/\/math.owu.edu\/\">computer science department<\/a> always erred on the side of math &#8211; we spent more time on concepts than practical applications.\u00a0 I really, really value the kind of coursework I had in college but when it comes down to it, I learned just two things that I use on a regular basis:<\/p>\n<ul>\n<li>Basic concepts and common programming paradigms; and<\/li>\n<li>How to learn new languages, programming paradigms, etc.<\/li>\n<\/ul>\n<p>I really enjoyed discrete math, but have rarely needed all the combinatorics.\u00a0 Hacking scheme in my AI class was very cool but that&#8217;s the last time I&#8217;ve done any alpha-beta pruning.\u00a0 I have successfully solved problems with some relatively mundane insights:<\/p>\n<ul>\n<li>Don&#8217;t rely on memory, take notes and find references.<\/li>\n<li>Look for low-hanging fruit.\u00a0 Does the database even have indexes?\u00a0 Do you really need to debug 2,000 lines of Javascript that essentially reimplement the concept of linking?<\/li>\n<li>If you ever have a technical quandry, you&#8217;re probably not the only on in the world with the same question.\u00a0 Chances are one of those other people has already asked the question somewhere on the web, and with a little luck someone else has already posted the answer.<\/li>\n<li>Don&#8217;t get involved in political struggles between teams and don&#8217;t play the blame game.\u00a0 Be unerringly pleasent in contentious situations, and if someone agrees to something in a meeting follow up with and email or some kind of documentation.<\/li>\n<li>Prototype and iterate, people tend to use vague terminology and don&#8217;t always want exactly what they think they want.<\/li>\n<\/ul>\n<p>So, if you&#8217;re going to end up implementing shopping carts or interfaces between large internal systems most of your career, why bother with brain teasers and algorithm interview questions?\u00a0 Does this mean all that fancy book learning should be thrown out the window?<\/p>\n<p>&#8230;<\/p>\n<p>No!\u00a0 Of course not!\u00a0 If you do, when a really juicey problem does come along you&#8217;ll choke like me.<\/p>\n<p>I&#8217;ve come to the conclusion that I need to make a concerted effort to look for problems that are difficult not because I don&#8217;t have enough time to do them, or because the two teams involved hate each other, or because the business analyst said &#8220;X is always Y&#8221; when he meant X is usually Y.\u00a0 My guess is I&#8217;ll be hit with some soon at work.<\/p>\n<p>In the mean time, got any good logic puzzles?\u00a0 Textbook problems?\u00a0 Favorite websites?\u00a0 Feel free to post them in the comments below to get me started.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was given a problem to solve at work earlier this week and I pretty much totally choked.\u00a0 To be honest it wasn&#8217;t that hard of a problem &#8211; I obviously can&#8217;t share it with you here, but I will say that (among other things) I completely, totally blanked on how to find if two [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[19],"tags":[333,336,80,335,337,332,330,760,334,331],"class_list":["post-191","post","type-post","status-publish","format-standard","hentry","category-blog","tag-business-rules","tag-computer-science","tag-google","tag-human-factors","tag-interview-questions","tag-lateral-thinking","tag-logic-puzzles","tag-programming","tag-programming-career","tag-vague-requirements"],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/www.jasonmorrison.net\/content\/wp-json\/wp\/v2\/posts\/191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.jasonmorrison.net\/content\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jasonmorrison.net\/content\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jasonmorrison.net\/content\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jasonmorrison.net\/content\/wp-json\/wp\/v2\/comments?post=191"}],"version-history":[{"count":1,"href":"http:\/\/www.jasonmorrison.net\/content\/wp-json\/wp\/v2\/posts\/191\/revisions"}],"predecessor-version":[{"id":192,"href":"http:\/\/www.jasonmorrison.net\/content\/wp-json\/wp\/v2\/posts\/191\/revisions\/192"}],"wp:attachment":[{"href":"http:\/\/www.jasonmorrison.net\/content\/wp-json\/wp\/v2\/media?parent=191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jasonmorrison.net\/content\/wp-json\/wp\/v2\/categories?post=191"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jasonmorrison.net\/content\/wp-json\/wp\/v2\/tags?post=191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}