{"id":82,"date":"2009-02-15T18:52:05","date_gmt":"2009-02-15T23:52:05","guid":{"rendered":"http:\/\/littlesvr.ca\/grumble\/?p=82"},"modified":"2012-12-05T00:54:36","modified_gmt":"2012-12-05T05:54:36","slug":"mad-marking","status":"publish","type":"post","link":"http:\/\/littlesvr.ca\/grumble\/2009\/02\/15\/mad-marking\/","title":{"rendered":"Mad marking"},"content":{"rendered":"<p>I&#8217;m marking the first assignment for the data structures and algorithms course. Two problems &#8211; a painful but well-defined majority element and the other a linked list. I&#8217;m reading this code and I&#8217;m getting a headache. I need to take a break every 30 minutes, it&#8217;s so hard.<\/p>\n<p>The problem is I&#8217;m looking at the code and I know that it can&#8217;t possibly work. But it does. I try creating a scenario where it will fail as I expect it should, I fiddle with the memory arrangement on the stack, but the bloody things work anyway.<\/p>\n<p>I know the right way to do it, but who says what I think is the right way really is? I&#8217;m not going to take marks off for thinking out of the box, even if that&#8217;s just evidence of not paying attention in class.<\/p>\n<p>While it&#8217;s extremely unlikely that these weird ways to solve problems are any good in the real world, where other people have to read your code &#8211; I&#8217;ve read enough code in my life to know that whether it works is the ultimate quality metric, and readability is but an illusion.<\/p>\n<p>Back to work.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m marking the first assignment for the data structures and algorithms course. Two problems &#8211; a painful but well-defined majority element and the other a linked list. I&#8217;m reading this code and I&#8217;m getting a headache. I need to take a break every 30 minutes, it&#8217;s so hard. The problem is I&#8217;m looking at the &hellip; <\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":{"0":"entry","1":"post","2":"publish","3":"author-andrew","4":"post-82","6":"format-standard","7":"category-opensource"},"_links":{"self":[{"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/posts\/82","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/comments?post=82"}],"version-history":[{"count":3,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/posts\/82\/revisions"}],"predecessor-version":[{"id":84,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/posts\/82\/revisions\/84"}],"wp:attachment":[{"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/media?parent=82"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/categories?post=82"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/tags?post=82"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}