{"id":24,"date":"2007-05-18T15:13:45","date_gmt":"2007-05-18T21:13:45","guid":{"rendered":"http:\/\/www.pervasivecode.com\/blog\/2007\/05\/18\/prefactoring\/"},"modified":"2007-05-18T17:02:16","modified_gmt":"2007-05-18T23:02:16","slug":"prefactoring","status":"publish","type":"post","link":"http:\/\/www.pervasivecode.com\/blog\/2007\/05\/18\/prefactoring\/","title":{"rendered":"Prefactoring"},"content":{"rendered":"<p>I have a text file full of links and notes extracted from about a month of reading everything posted to the 2 dozen Ruby, Rails, Postgres, and web tech blogs that I subscribe to via RSS. There&#8217;s so much going on in Ruby and Rails in particular, especially when it comes to convenient shortcuts that save you work, that there&#8217;s something new and cool and slightly revolutionary on a daily basis that you could use to make your app prettier.<\/p>\n<p>So I&#8217;ve been in a state of analysis paralysis for about a week.<\/p>\n<p>I was trying so hard to be clever and state of the art that I forgot to get something working.<br \/>\n<!--more--><br \/>\nReally, I have an admin login page that&#8217;s done poorly, and a list of user visits that is pointless but follows the RESTful paradigm that&#8217;s so popular nowadays. The admin login <em>works<\/em>, because I decided I didn&#8217;t care if it was pretty, I just wanted something to work front-to-back, HTML template to database, so I hacked it. The regular login <em>doesn&#8217;t work<\/em>, because I let myself get scared into trying to use advanced stuff that I don&#8217;t understand when I also don&#8217;t understand the basic stuff intuitively yet.<\/p>\n<p>I dub this antipattern <strong>Prefactoring<\/strong>. If <a href=\"http:\/\/www.cookcomputing.com\/blog\/archives\/000084.html\">premature optimization is the root of all evil<\/a>, prefactoring is the reason engineering-dominated projects tend to <a href=\"http:\/\/thrillingwonder.blogspot.com\/2007\/05\/all-cranes-are-doomed.html\">fall over sideways<\/a> while the developers, like <a href=\"http:\/\/en.wikipedia.org\/wiki\/Lotophagi\">lotus eaters<\/a>, are perfectly happy to keep playing with bright shiny new doodads and never get anything working.<\/p>\n<p>I&#8217;m ready to get some stuff working (ugly code, but with tests so I know it works) now. I&#8217;ll refactor it later.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have a text file full of links and notes extracted from about a month of reading everything posted to the 2 dozen Ruby, Rails, Postgres, and web tech blogs that I subscribe to via RSS. There&#8217;s so much going on in Ruby and Rails in particular, especially when it comes to convenient shortcuts that &hellip; <a href=\"http:\/\/www.pervasivecode.com\/blog\/2007\/05\/18\/prefactoring\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Prefactoring&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,14,5,20],"tags":[],"class_list":["post-24","post","type-post","status-publish","format-standard","hentry","category-architecture","category-humor","category-process","category-ruby-on-rails"],"_links":{"self":[{"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/posts\/24"}],"collection":[{"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/comments?post=24"}],"version-history":[{"count":0,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/posts\/24\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/media?parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/categories?post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/tags?post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}