{"id":251,"date":"2009-03-14T11:28:01","date_gmt":"2009-03-14T19:28:01","guid":{"rendered":"http:\/\/jaredrobinson.com\/blog\/?p=251"},"modified":"2009-03-14T11:28:01","modified_gmt":"2009-03-14T19:28:01","slug":"mwrc-code-reading-by-james-edward-gray-ii","status":"publish","type":"post","link":"https:\/\/jaredrobinson.com\/blog\/mwrc-code-reading-by-james-edward-gray-ii\/","title":{"rendered":"mwrc: Code Reading by James Edward Gray II"},"content":{"rendered":"<p>I&#8217;m attending the third annual Mountain West Ruby Conference in Salt Lake<br \/>\nCity.  Since my notes may not represent the speakers accurately, it may be<br \/>\nwise to read the summaries of the presentations over at the<br \/>\nover at the [web site](http:\/\/mtnwestrubyconf.org\/2009\/speakers). I&#8217;m taking notes for each of the speakers, and I&#8217;ll prefix the title of each blog post with &#8220;mwrc&#8221;.<\/p>\n<p>Code Reading by James Edward Gray II<\/p>\n<p>Little Big Planet: A cool PS3 game that people have created levels for. It&#8217;s interesting to see the code that shows how people create levels.<\/p>\n<p>Why is code reading important?<\/p>\n<p>&#8211; Shows common idioms<br \/>\n&#8211; Get better at working on other&#8217;s code<br \/>\n&#8211; Understand how something works<br \/>\n &#8211; Understand limitations<br \/>\n&#8211; Seeing bad code helps you write better code<br \/>\n&#8211; Always need more ideas<\/p>\n<p>rest_client: Networking code done right<br \/>\nYou can tell from the structure that it&#8217;s clean code. He showed us the ugliest parts of the code, and it looked clean.<\/p>\n<p>Restful-shell: IOD shell<br \/>\nIf you create a log file, it&#8217;s executable code that you can then edit and enhance.<\/p>\n<p>He created the Towers of Hanoi for LittleBigPlanet. He had to redesign the playing interface serveral times to get it to fit into the game correctly.<\/p>\n<p>### FasterCSV<\/p>\n<p>Sometimes users want to work using indexes of columns. Other times, they want to work with column names. Sometimes, column names repeat.<br \/>\nThis library was one of the first users of the new Ruby m17n libraries, and he found a lot of bugs at that time.<\/p>\n<p>&#8212;<\/p>\n<p>BJ, Slave, Terminator: Ruby libraries to build multiprocessing UNIX software. Built to be very robust.<\/p>\n<p>&#8211; Terminator is better than Ruby&#8217;s timeout handlers. &#8220;plot_to_kill pid&#8221;<br \/>\n&#8211; BJ &#8211; robust background priority queue for Rails. Notices changes from outside world via signals.<br \/>\n&#8211; Slave &#8211; multiprocessing with built in IPC. Heartbeat.<\/p>\n<p>### The Art of Code Reading<\/p>\n<p>&#8211; Take a deep breath and relax<br \/>\n&#8211; Not all code sucks<br \/>\n&#8211; Don&#8217;t start with Rails. There&#8217;s a ton of great stuff in there, but it&#8217;s really complex and hard to follow.<br \/>\n&#8211; Have a goal. &#8220;How does it do that?&#8221;<br \/>\n &#8211; gem unpack <gem name><br \/>\n&#8211; Start with the tests<br \/>\n&#8211; Check for &#8220;examples&#8221;<br \/>\n&#8211; Try irb: irb -r <class><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m attending the third annual Mountain West Ruby Conference in Salt Lake City. Since my notes may not represent the speakers accurately, it may be wise to read the summaries of the presentations over at the over at the [web site](http:\/\/mtnwestrubyconf.org\/2009\/speakers). I&#8217;m taking notes for each of the speakers, and I&#8217;ll prefix the title of &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/jaredrobinson.com\/blog\/mwrc-code-reading-by-james-edward-gray-ii\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;mwrc: Code Reading by James Edward Gray II&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[20,21],"class_list":["post-251","post","type-post","status-publish","format-standard","hentry","category-programming","tag-mtnwestrubyconf","tag-mwrc"],"_links":{"self":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/251","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/comments?post=251"}],"version-history":[{"count":1,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/251\/revisions"}],"predecessor-version":[{"id":252,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/251\/revisions\/252"}],"wp:attachment":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/media?parent=251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/categories?post=251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/tags?post=251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}