{"id":53,"date":"2009-03-19T22:34:45","date_gmt":"2009-03-19T22:34:45","guid":{"rendered":"http:\/\/andypalmer.com\/?p=53"},"modified":"2009-05-22T13:06:09","modified_gmt":"2009-05-22T13:06:09","slug":"code-should-start-out-messy","status":"publish","type":"post","link":"https:\/\/andypalmer.com\/2009\/03\/code-should-start-out-messy\/","title":{"rendered":"Code should start out messy"},"content":{"rendered":"

Earlier today Antony<\/a> said on Twitter<\/a>:
\n“stop apologising if your code starts out messy… it’s how it ends up that counts…. you can’t make an omelette without breaking some eggs”<\/p>\n

I replied:<\/a>
\n“Code _should_ start out messy. Finding the right places for things is harder when they’re already neatly in the wrong place”<\/p>\n

If you have a preconceived idea of where your code should go, you will put it there by default. Antony told me an experience he had with this when he was untangling dependencies in jnarrate<\/a>. By moving everything into a single package, then repackaging based on affinity, a much better package structure revealed itself.<\/p>\n

At home, I would really like to re-organise my kitchen so that the pans are closer to the cooker. It makes sense from an ergonomics point of view. However, they already have a home. In order to rearrange the pans, I would have to empty the existing cupboard and the destination cupboard. It’s less work for me to put the pans back in their existing space, but it bothers me whenever I think of it. I really should fix that<\/p>\n","protected":false},"excerpt":{"rendered":"

Earlier today Antony said on Twitter: “stop apologising if your code starts out messy… it’s how it ends up that counts…. you can’t make an omelette without breaking some eggs” I replied: “Code _should_ start out messy. Finding the right places for things is harder when they’re already neatly in the wrong place” If you […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[16,19,17,15],"_links":{"self":[{"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/posts\/53"}],"collection":[{"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/comments?post=53"}],"version-history":[{"count":5,"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/posts\/53\/revisions"}],"predecessor-version":[{"id":116,"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/posts\/53\/revisions\/116"}],"wp:attachment":[{"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/media?parent=53"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/categories?post=53"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andypalmer.com\/wp-json\/wp\/v2\/tags?post=53"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}