{"id":833,"date":"2008-10-29T16:00:42","date_gmt":"2008-10-29T23:00:42","guid":{"rendered":"https:\/\/www.reenigne.org\/blog\/?p=833"},"modified":"2008-10-29T16:04:19","modified_gmt":"2008-10-29T23:04:19","slug":"a-stack-of-refactorings","status":"publish","type":"post","link":"https:\/\/www.reenigne.org\/blog\/a-stack-of-refactorings\/","title":{"rendered":"A stack of refactorings"},"content":{"rendered":"<p>I'm not sure if this is a bad habit of mine or if other programmers do this too. Sometimes after having partially written a program I'll decide I need to make some change which touches most of the code. So I'll start at the top of the program and work my way down, making that change whereever I see it needed. Partway through doing this, however, I'll notice some other similarly impactful change I want to make. Rather than adding the second refactoring to my <a href=\"https:\/\/www.reenigne.org\/blog\/todo-list-management-website\">TODO list<\/a> and continuing with the first, I'll go right back up to the top of the program and work my way down again, this time making changes whereever I see either of the refactorings. I reckon I've had about as many as 5 refactorings going on at once sometimes (depending on how you count them - sometimes an earlier refactoring might supercede a later one).<\/p>\n<p>Keeping all these refactorings in my head at once isn't as big a problem as it might sound, since looking at the code will jog my memory about what they are once I come across a site that needs to be changed. And all this reading of the code uncovers lots of bugs.<\/p>\n<p>The downside is that I end up reading (and therefore fixing) the code at the top of my program much more than the code further down.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I'm not sure if this is a bad habit of mine or if other programmers do this too. Sometimes after having partially written a program I'll decide I need to make some change which touches most of the code. So I'll start at the top of the program and work my way down, making that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-833","post","type-post","status-publish","format-standard","hentry","category-computer"],"_links":{"self":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts\/833","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/comments?post=833"}],"version-history":[{"count":2,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts\/833\/revisions"}],"predecessor-version":[{"id":836,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts\/833\/revisions\/836"}],"wp:attachment":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/media?parent=833"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/categories?post=833"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/tags?post=833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}