{"id":881,"date":"2002-12-08T17:04:47","date_gmt":"2002-12-08T22:04:47","guid":{"rendered":"http:\/\/whizkidnine.com\/?p=881"},"modified":"2021-07-25T11:52:16","modified_gmt":"2021-07-25T15:52:16","slug":"refactoring-grid","status":"publish","type":"post","link":"https:\/\/xp123.com\/refactoring-grid\/","title":{"rendered":"Refactoring Grid"},"content":{"rendered":"\n<p class=\"MsoNormal\">The refactoring grid is a toy designed to give you a feel for what refactoring is like, by working in a simple, non-code domain.<\/p>\n\n\n\n<p class=\"MsoNormal\">[Michael Wainer has made game pieces available here: <a href=\"https:\/\/web.archive.org\/web\/20110502154157\/http:\/\/www2.cs.siu.edu\/~wainer\/Pieces4RefGame\/pieces4RefGame.html\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/www.cs.siu.edu\/~wainer\/Pieces4RefGame\/pieces4RefGame.html<\/a> ]<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The Domain<\/h3>\n\n\n\n<p class=\"MsoNormal\">There is a grid of &#8220;windows,&#8221; like this:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"352\" height=\"139\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image001.gif\" alt=\"Empty Grid\" class=\"wp-image-4254\"\/><\/figure><\/div>\n\n\n\n<p class=\"MsoNormal\">Each square in a window is known as a &#8220;pane.&#8221; Each pane can contain &#8220;tokens&#8221;; we&#8217;ll use two types, represented as &#8220;o&#8221; and &#8220;x.&#8221; A pane can contain any number of tokens. There are refactorings that define how tokens can be added, removed, or moved between panes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Smells<\/h3>\n\n\n\n<p class=\"MsoNormal\">To refactor, you need a sense of when your system needs improvement.<\/p>\n\n\n\n<p class=\"MsoNormal\">When there are problems that we can name, we call those &#8220;code smells.&#8221; A goal of refactoring is to eliminate (or at least minimize) the smells.<\/p>\n\n\n\n<p class=\"MsoNormal\">Here are four smells that can happen in this system:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong style=\"font-size: 16px;\">Basement<\/strong><span style=\"font-size: 16px;\"> \u2013 there are any tokens in the lower row of windows.<\/span> <\/li><li><strong>Duplication<\/strong> \u2013 two of the same token occur in any pane.<\/li><li><strong style=\"font-size: 16px;\">Conflict<\/strong><span style=\"font-size: 16px;\"> \u2013 the grid contains both an &#8220;x&#8221; token and an &#8220;o&#8221; token (in any panes of any windows).<\/span> <\/li><li><strong style=\"font-size: 16px;\">Sou&#8217;wester<\/strong><span style=\"font-size: 16px;\"> \u2013 any window has a token in the lower-left corner, and another token in either the upper-left or upper-right corner.<\/span> <\/li><\/ul>\n\n\n\n<p class=\"MsoNormal\">Here&#8217;s a grid that demonstrates each of these smells:\n<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image002.gif\" alt=\"Empty Grid\" class=\"wp-image-4254\"\/><\/figure><\/div>\n\n\n\n<p class=\"MsoNormal\">Here&#8217;s a grid that is &#8220;smell-free&#8221;:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"352\" height=\"139\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image003.gif\" alt=\"Smell-Free\" class=\"wp-image-4255\"\/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Refactorings<\/h3>\n\n\n\n<p class=\"MsoNormal\">It&#8217;s not enough to know smells; to do anything about them we need transformation rules (refactorings).<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Vertical refactorings<\/h1>\n\n\n\n<p class=\"MsoNormal\">V1x.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"241\" height=\"143\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image004.gif\" alt=\"Rule V1x\" class=\"wp-image-4253\"\/><figcaption>Rule V1x<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"MsoNormal\"><!-- [if !supportEmptyParas]-->&nbsp;<!--[endif]-->This rule should be read: &#8220;If you see two windows stacked vertically, you can move an x from the pane in the lower right corner to the corresponding pane in the upper window, or vice versa.&#8221; (The shading is just to highlight the cells involved in the rule, and has no other significance.)<\/p>\n\n\n\n<p class=\"MsoNormal\">V2x.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"241\" height=\"142\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image005.gif\" alt=\"Rule V2x\" class=\"wp-image-4252\"\/><figcaption>Rule V2x<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"MsoNormal\">V3x.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"241\" height=\"143\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image006.gif\" alt=\"Rule V3x\" class=\"wp-image-4251\"\/><figcaption>Rule V3x<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"MsoNormal\">V4x.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"241\" height=\"142\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image007.gif\" alt=\"Rule V4x\" class=\"wp-image-4250\"\/><figcaption>Rule V4x<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"MsoNormal\">There are corresponding rules V1o, V2o, V3o, and V4o to move &#8220;o&#8221; tokens.<\/p>\n\n\n\n<p class=\"MsoNormal\"><strong>Exercise 1.<\/strong><\/p>\n\n\n\n<p class=\"MsoNormal\">Try your hand at this refactoring. One step at a time, convert this:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"352\" height=\"140\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image008.gif\" alt=\"First exercise\" class=\"wp-image-4249\"\/><\/figure><\/div>\n\n\n\n<p class=\"MsoNormal\">to this:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"352\" height=\"140\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image009.gif\" alt=\"First Exercise Goal\" class=\"wp-image-4248\"\/><\/figure><\/div>\n\n\n\n<p class=\"MsoBodyTextIndent\">You&#8217;ve probably noticed that it&#8217;s pretty tedious to move things vertically one at a time. For repetitive refactorings, you may be comfortable taking shortcuts after you&#8217;ve done them a few times. (The same thing happens in code. For example, suppose you&#8217;re changing the name of something; you might change the first couple carefully, run tests, and then change all the others in one go, without running tests until the end.)<\/p>\n\n\n\n<p class=\"MsoNormal\">The vertical refactorings are tedious; give yourself permission to do them all at once. (You could call this shortcut rule Vx or Vo).<\/p>\n\n\n\n<p class=\"MsoNormal\"><strong>Exercise 2.<\/strong><\/p>\n\n\n\n<p class=\"MsoNormal\">A unit test will be a rule that you can apply to the before and after states to reassure you that a grid has been refactored correctly. What unit test could reassure you that you&#8217;ve applied a group of vertical refactorings correctly? (Hint: there&#8217;s something true about the grid that is true before and after each of the vertical rules.)<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">One-pane refactorings<\/h1>\n\n\n\n<p class=\"MsoNormal\">Pxo.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image010.gif\" alt=\"Exercise Starting Point\" class=\"wp-image-4247\" width=\"183\" height=\"36\"\/><\/figure><\/div>\n\n\n\n<p class=\"MsoNormal\">(There&#8217;s no order implied; &#8220;ox&#8221; = &#8220;xo&#8221;. The rule says that an &#8220;x&#8221; and &#8220;o&#8221; token in the same pane cancel each other out.)<\/p>\n\n\n\n<p class=\"MsoNormal\"><strong>Exercise 3.<\/strong><\/p>\n\n\n\n<p class=\"MsoNormal\">A. Remove as many smells as you can with the refactorings you have so far.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"352\" height=\"139\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image011.gif\" alt=\"Rule P1xx\" class=\"wp-image-4269\"\/><\/figure><\/div>\n\n\n\n<p class=\"MsoNormal\">B. What smells can you eliminate?<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">One-window refactorings<\/h1>\n\n\n\n<p class=\"MsoNormal\">P1xx.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image012.gif\" alt=\"Rule P1xx\" class=\"wp-image-4268\" width=\"241\" height=\"64\"\/><figcaption>Rule P1xx<\/figcaption><\/figure><\/div>\n\n\n\n<p>P2xx.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"241\" height=\"64\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image013.gif\" alt=\"Rule P2xx\" class=\"wp-image-4267\"\/><\/figure><\/div>\n\n\n\n<p class=\"MsoNormal\">P3xx.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"241\" height=\"64\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image014.gif\" alt=\"Rule P3xx\" class=\"wp-image-4258\"\/><figcaption>Rule P3xx<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"MsoNormal\">Rules P1oo, P2oo, and P3oo are the corresponding rules for &#8220;o&#8221; tokens.<!-- [if !supportEmptyParas]-->&nbsp;<!--[endif]--><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Horizontal refactoring<\/h1>\n\n\n\n<p class=\"MsoNormal\">H24x.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"450\" height=\"64\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image015.gif\" alt=\"Rule H24x\" class=\"wp-image-4266\"\/><figcaption>Rule H24x<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"Code\"><!-- [if !supportEmptyParas]--><span style=\"font-family: 'Times New Roman';\">&nbsp;<!--[endif]--><\/span><!-- [if !supportEmptyParas]--><br>&nbsp;<!--[endif]-->(This rule applies to any two horizontally adjacent windows.)<\/p>\n\n\n\n<p class=\"MsoNormal\">Rule H24o is the corresponding rule for &#8220;o&#8221; tokens.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Examples<\/h3>\n\n\n\n<p class=\"MsoNormal\">Here are a couple examples:<\/p>\n\n\n\n<p class=\"MsoNormal\"><!-- [if !supportEmptyParas]-->&nbsp;<!--[endif]--><strong>Example 1.<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"546\" height=\"442\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image016.gif\" alt=\"Example\" class=\"wp-image-4265\"\/><\/figure><\/div>\n\n\n\n<p class=\"MsoNormal\"><strong>Example 2.<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"546\" height=\"442\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image017.gif\" alt=\"Example\" class=\"wp-image-4264\"\/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Exercises<\/h3>\n\n\n\n<p class=\"MsoNormal\">Here are some more exercises for you to try. Eliminate all smells.<\/p>\n\n\n\n<p class=\"MsoNormal\"><strong>Exercise 4.<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"351\" height=\"139\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image018.gif\" alt=\"Exercise\" class=\"wp-image-4263\"\/><\/figure><\/div>\n\n\n\n<p class=\"MsoNormal\"><strong>Exercise 5.<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"351\" height=\"140\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image019.gif\" alt=\"Example\" class=\"wp-image-4262\"\/><\/figure><\/div>\n\n\n\n<p class=\"MsoNormal\"><strong>Exercise 6.<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"356\" height=\"139\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image020.gif\" alt=\"Exercise\" class=\"wp-image-4261\"\/><\/figure><\/div>\n\n\n\n<p class=\"MsoNormal\"><strong>Exercise 7.&nbsp; Do it yourself.<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"352\" height=\"139\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image021.gif\" alt=\"Exercise\" class=\"wp-image-4260\"\/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Debrief<\/h3>\n\n\n\n<p class=\"MsoNormal\">Work through the exercises before you try these questions.<!-- [if !supportEmptyParas]-->&nbsp;<!--[endif]--><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li class=\"MsoNormal\">Can you detect all the smells right away? Does fixing one smell make you aware of others? (How is this like programming?)<\/li><li class=\"MsoNormal\">What is your strategy for addressing smells?<\/li><li class=\"MsoNormal\">Can you design a strategy where once you&#8217;ve &#8220;fixed&#8221; a window, you don&#8217;t have to touch it again? Can you do this for code?<\/li><li class=\"MsoNormal\">Some of the smells are very local; others are more diffuse. How can you detect smells that span several areas of a system?<\/li><li class=\"MsoNormal\">Can any grid be transformed into one with no smells? What about any code?<\/li><li class=\"MsoNormal\">The H24x and H24o refactorings only fix part of the &#8220;Sou&#8217;wester&#8221; smell; define&nbsp; shortcut transformations that address the rest.<\/li><li class=\"MsoNormal\">These refactorings don&#8217;t come with tests; can you devise a test that you can apply to the initial and final states to reassure you that a grid has been refactored correctly?<\/li><li class=\"MsoNormal\">Just for fun, you could try one of these approaches to creating different sets of smells or rules:<ul style=\"margin-top: 0in;\" type=\"circle\">\n<li class=\"MsoNormal\">Create an aesthetic that will clear every box except the lower right pane of the lower right window.<\/li>\n<li class=\"MsoNormal\">Stop worrying about the &#8220;Sou&#8217;Wester&#8221; smell. Drop rule H24x and add rule P4xx instead. Is the system as a whole simpler?<\/li>\n<\/ul><\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"451\" height=\"63\" src=\"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image022.gif\" alt=\"Rule P4xx\" class=\"wp-image-4259\"\/><figcaption>Rule P4xx<\/figcaption><\/figure><\/div>\n\n\n\n<p><strong>Rule P4xx<!-- [if !supportEmptyParas]-->.<\/strong>&nbsp;<!--[endif]--><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li class=\"MsoNormal\">The &#8220;conflict&#8221; smell is global. Experiment with more local versions of the smell that still encourage you to apply rule Pxo but allow you to have both &#8220;x&#8221; and &#8220;o&#8221; tokens in the same grid.<\/li><\/ul>\n\n\n\n<p><span style=\"font-size: small;\">[Written December 8, 2002. Thanks to Steve Wake for feedback. Correction from<\/span> <span style=\"font-size: small;\">Shibukawa Yoshiki, 3-13-03. Updated images and added link to Michael Wainer&#8217;s work, Oct. &#8217;09.]<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The refactoring grid is a toy designed to give you a feel for what refactoring is like, by working in a simple, non-code domain. [Michael Wainer has made game pieces available here: http:\/\/www.cs.siu.edu\/~wainer\/Pieces4RefGame\/pieces4RefGame.html ] The Domain There is a grid <a class=\"more-link\" href=\"https:\/\/xp123.com\/refactoring-grid\/\">Continue reading <span class=\"screen-reader-text\">  Refactoring Grid<\/span><span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_wp_convertkit_post_meta":{"form":"-1","landing_page":"0","tag":"0","restrict_content":"0"},"footnotes":""},"categories":[1],"tags":[35,77,79],"class_list":["post-881","post","type-post","status-publish","format-standard","hentry","category-xp123","tag-games","tag-prog","tag-refactoring"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Refactoring Grid - XP123<\/title>\n<meta name=\"description\" content=\"The refactoring grid is a toy designed to give you a feel for what refactoring is like, by working in a simple, non-code domain.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/xp123.com\/refactoring-grid\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bill Wake\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/xp123.com\\\/refactoring-grid\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/xp123.com\\\/refactoring-grid\\\/\"},\"author\":{\"name\":\"Bill Wake\",\"@id\":\"https:\\\/\\\/xp123.com\\\/#\\\/schema\\\/person\\\/72474af0de7f699327fcff15bebf04c9\"},\"headline\":\"Refactoring Grid\",\"datePublished\":\"2002-12-08T22:04:47+00:00\",\"dateModified\":\"2021-07-25T15:52:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/xp123.com\\\/refactoring-grid\\\/\"},\"wordCount\":938,\"publisher\":{\"@id\":\"https:\\\/\\\/xp123.com\\\/#\\\/schema\\\/person\\\/72474af0de7f699327fcff15bebf04c9\"},\"image\":{\"@id\":\"https:\\\/\\\/xp123.com\\\/refactoring-grid\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/xp123.com\\\/wp-content\\\/uploads\\\/2002\\\/12\\\/image001.gif\",\"keywords\":[\"games\",\"programmer\",\"refactoring\"],\"articleSection\":[\"xp123.com\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/xp123.com\\\/refactoring-grid\\\/\",\"url\":\"https:\\\/\\\/xp123.com\\\/refactoring-grid\\\/\",\"name\":\"Refactoring Grid - XP123\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/xp123.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/xp123.com\\\/refactoring-grid\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/xp123.com\\\/refactoring-grid\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/xp123.com\\\/wp-content\\\/uploads\\\/2002\\\/12\\\/image001.gif\",\"datePublished\":\"2002-12-08T22:04:47+00:00\",\"dateModified\":\"2021-07-25T15:52:16+00:00\",\"description\":\"The refactoring grid is a toy designed to give you a feel for what refactoring is like, by working in a simple, non-code domain.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/xp123.com\\\/refactoring-grid\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/xp123.com\\\/refactoring-grid\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/xp123.com\\\/refactoring-grid\\\/#primaryimage\",\"url\":\"https:\\\/\\\/xp123.com\\\/wp-content\\\/uploads\\\/2002\\\/12\\\/image001.gif\",\"contentUrl\":\"https:\\\/\\\/xp123.com\\\/wp-content\\\/uploads\\\/2002\\\/12\\\/image001.gif\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/xp123.com\\\/refactoring-grid\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/xp123.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Refactoring Grid\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/xp123.com\\\/#website\",\"url\":\"https:\\\/\\\/xp123.com\\\/\",\"name\":\"XP123\",\"description\":\"Exploring Extreme Programming\",\"publisher\":{\"@id\":\"https:\\\/\\\/xp123.com\\\/#\\\/schema\\\/person\\\/72474af0de7f699327fcff15bebf04c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/xp123.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/xp123.com\\\/#\\\/schema\\\/person\\\/72474af0de7f699327fcff15bebf04c9\",\"name\":\"Bill Wake\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/xp123.com\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/bill2012.jpeg\",\"url\":\"https:\\\/\\\/xp123.com\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/bill2012.jpeg\",\"contentUrl\":\"https:\\\/\\\/xp123.com\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/bill2012.jpeg\",\"width\":200,\"height\":200,\"caption\":\"Bill Wake\"},\"logo\":{\"@id\":\"https:\\\/\\\/xp123.com\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/bill2012.jpeg\"},\"sameAs\":[\"http:\\\/\\\/xp123.com\"],\"url\":\"https:\\\/\\\/xp123.com\\\/author\\\/bill\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Refactoring Grid - XP123","description":"The refactoring grid is a toy designed to give you a feel for what refactoring is like, by working in a simple, non-code domain.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/xp123.com\/refactoring-grid\/","twitter_misc":{"Written by":"Bill Wake","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/xp123.com\/refactoring-grid\/#article","isPartOf":{"@id":"https:\/\/xp123.com\/refactoring-grid\/"},"author":{"name":"Bill Wake","@id":"https:\/\/xp123.com\/#\/schema\/person\/72474af0de7f699327fcff15bebf04c9"},"headline":"Refactoring Grid","datePublished":"2002-12-08T22:04:47+00:00","dateModified":"2021-07-25T15:52:16+00:00","mainEntityOfPage":{"@id":"https:\/\/xp123.com\/refactoring-grid\/"},"wordCount":938,"publisher":{"@id":"https:\/\/xp123.com\/#\/schema\/person\/72474af0de7f699327fcff15bebf04c9"},"image":{"@id":"https:\/\/xp123.com\/refactoring-grid\/#primaryimage"},"thumbnailUrl":"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image001.gif","keywords":["games","programmer","refactoring"],"articleSection":["xp123.com"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/xp123.com\/refactoring-grid\/","url":"https:\/\/xp123.com\/refactoring-grid\/","name":"Refactoring Grid - XP123","isPartOf":{"@id":"https:\/\/xp123.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/xp123.com\/refactoring-grid\/#primaryimage"},"image":{"@id":"https:\/\/xp123.com\/refactoring-grid\/#primaryimage"},"thumbnailUrl":"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image001.gif","datePublished":"2002-12-08T22:04:47+00:00","dateModified":"2021-07-25T15:52:16+00:00","description":"The refactoring grid is a toy designed to give you a feel for what refactoring is like, by working in a simple, non-code domain.","breadcrumb":{"@id":"https:\/\/xp123.com\/refactoring-grid\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/xp123.com\/refactoring-grid\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/xp123.com\/refactoring-grid\/#primaryimage","url":"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image001.gif","contentUrl":"https:\/\/xp123.com\/wp-content\/uploads\/2002\/12\/image001.gif"},{"@type":"BreadcrumbList","@id":"https:\/\/xp123.com\/refactoring-grid\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/xp123.com\/"},{"@type":"ListItem","position":2,"name":"Refactoring Grid"}]},{"@type":"WebSite","@id":"https:\/\/xp123.com\/#website","url":"https:\/\/xp123.com\/","name":"XP123","description":"Exploring Extreme Programming","publisher":{"@id":"https:\/\/xp123.com\/#\/schema\/person\/72474af0de7f699327fcff15bebf04c9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/xp123.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/xp123.com\/#\/schema\/person\/72474af0de7f699327fcff15bebf04c9","name":"Bill Wake","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/xp123.com\/wp-content\/uploads\/2022\/09\/bill2012.jpeg","url":"https:\/\/xp123.com\/wp-content\/uploads\/2022\/09\/bill2012.jpeg","contentUrl":"https:\/\/xp123.com\/wp-content\/uploads\/2022\/09\/bill2012.jpeg","width":200,"height":200,"caption":"Bill Wake"},"logo":{"@id":"https:\/\/xp123.com\/wp-content\/uploads\/2022\/09\/bill2012.jpeg"},"sameAs":["http:\/\/xp123.com"],"url":"https:\/\/xp123.com\/author\/bill\/"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/xp123.com\/wp-json\/wp\/v2\/posts\/881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xp123.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xp123.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xp123.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/xp123.com\/wp-json\/wp\/v2\/comments?post=881"}],"version-history":[{"count":1,"href":"https:\/\/xp123.com\/wp-json\/wp\/v2\/posts\/881\/revisions"}],"predecessor-version":[{"id":5373,"href":"https:\/\/xp123.com\/wp-json\/wp\/v2\/posts\/881\/revisions\/5373"}],"wp:attachment":[{"href":"https:\/\/xp123.com\/wp-json\/wp\/v2\/media?parent=881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xp123.com\/wp-json\/wp\/v2\/categories?post=881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xp123.com\/wp-json\/wp\/v2\/tags?post=881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}