{"id":81,"date":"2008-08-23T21:35:13","date_gmt":"2008-08-24T04:35:13","guid":{"rendered":"http:\/\/lookforwardconsulting.com\/wordpress\/?p=81"},"modified":"2025-07-15T15:40:06","modified_gmt":"2025-07-15T14:40:06","slug":"extract-method-the-most-important-refactoring-ever","status":"publish","type":"post","link":"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/","title":{"rendered":"Extract Method &#8211; The Most Important Refactoring EVER"},"content":{"rendered":"<p>Coming off my\u00a0<a href=\"http:\/\/thescrumacademy.com\/?p=79\">last rant<\/a>, I thought it might be valuable to the community if I were to blog on the various refactorings I felt software developers should be using if they consider themselves professionals. To that end, I am going to borrow the refactoring patterns from Martin Fowler\u2019s\u00a0book, but provide up-to-date examples in C# code. To start the series off, I will start with the one refactoring ever developer should know and love &#8211; Extract Method.<\/p>\n<blockquote><p><strong>How Do I Find It?:<\/strong>\u00a0You have a code fragment that can be grouped together.<\/p>\n<p><strong>What Do I Do Once I Found It?:<\/strong>\u00a0Turn the fragment into a method whose name explains the purpose of the method.<\/p><\/blockquote>\n<p>Fear not if you have never heard of this refactoring. It is so fundamental that many developers execute this pattern as a matter-of-course, but did not know the name for it; well, now you do &#8211; it is called Extract Method. IMO, mastering this refactoring is the key to understanding the later refactorings, like Extract Class, buy youtube shares which we will discuss next week.<\/p>\n<p>So, how do you located code that is a candidate for this refactoring? Here are some guidelines I use:<\/p>\n<ol>\n<li>Long methods -&gt; methods that exceed 20 lines are a good candidate for this refactoring since they are normally doing more than one thing.<\/li>\n<li>Code comments -&gt; comments are normally a visual marker that the next lines are conceptual similar and this refactoring is about grouping conceptual similar things in methods.<\/li>\n<\/ol>\n<p>I randomly searched through our source code repository at work and in a mere 24.4 seconds I found this sample code from a utility class (Util.cs). It is a nice method that does a useful thing (removes extra decimal points from a string &#8211; who knew you needed to do that, but why not?), and it needs some help based on my guidelines above:<\/p>\n<pre>44  static public string RemoveExtraDecimalPoint(string text)\r\n45  {\r\n46      string returnString = \"\";\r\n47      int countDecimal = 0;\r\n48\r\n49      foreach (char character in text)\r\n50      {\r\n51          if (character == '.')\r\n52          {\r\n53              countDecimal++;\r\n54          }\r\n55      }\r\n56\r\n57      if (countDecimal &gt; 1)\r\n58      {\r\n59          bool first = true;\r\n60          foreach (char character in text)\r\n61          {\r\n62              returnString += character.ToString();\r\n63              int length = returnString.Length;\r\n64              if (character == '.')\r\n65              {\r\n66                  if (first == true)\r\n67                  {\r\n68                      first = false;\r\n69                  }\r\n70                  else\r\n71                  {\r\n72                      returnString = returnString.Remove(returnString.Length - 1, 1);\r\n73                  }\r\n74              }\r\n75          }\r\n76      }\r\n77      else\r\n78      {\r\n79          returnString = text;\r\n80      }\r\n81\r\n82      return returnString;\r\n83  }<\/pre>\n<p>What makes this a good candidate for Extract Method is this method us 39 lines long &#8211; WAY too long for a method if our target is to create method from 5 to 10 lines long (which is the target of this refactoring). Remember, one of the main goals of Extract Method is to create small methods with intention revealing method names that read like comments. Our main focus will be to turn this long method in to a series of method calls which tell the reader what happens inside RemoveExtraDecimalPoint.<\/p>\n<p>The first step after identifying a candidate method for Extract Method is to check the unit tests for this method and make sure they run.\u00a0 Surprise, surprise &#8211; this method has no tests!!\u00a0 Just a polite reminder &#8211; never, ever refactor code without having either an automated unit test or integration test confirming you did not break anything.\u00a0 That is called hacking.\u00a0 Yes, there will be times you have to \u201chack\u201d something in, but while learning how to refactor is not it.\u00a0 Writing a unit test after-the-fact is called a\u00a0<a href=\"http:\/\/en.wikipedia.org\/wiki\/Characterization_Test\">characterization test<\/a>.\u00a0 Here is one of my unit tests (I actually wrote five tests) that will serve as my safety net during the refactoring:<\/p>\n<pre>22  [TestMethod]\r\n23  public void RemoveExtraDecimalPointTest()\r\n24  {\r\n25      \/\/ setup\r\n26\r\n27      \/\/ execute\r\n28      string test = Utils.RemoveExtraDecimalPoint(\"23..45.0.\");\r\n29\r\n30      \/\/ verify\r\n31      Assert.AreEqual(\"23.450\", test, \"Extra decimal points not removed.\");\r\n32\r\n33      \/\/ teardown\r\n34  }<\/pre>\n<p>My very first Extract Method refactoring will focus on line 47 in the original sample code.\u00a0 The code below shows the new method call I made for this refactoring:<\/p>\n<pre>44  static public string RemoveExtraDecimalPoint(string text)\r\n45  {\r\n46      string returnString = \"\";\r\n<strong>47      int countDecimal = Utils.CountDecimalsInString(text);<\/strong>\r\n48\r\n49      if (countDecimal &gt; 1)\r\n50      {<\/pre>\n<p>The Extract Method refactoring product a method 10 lines long and has an intention revealing name.<\/p>\n<pre>77  private static int CountDecimalsInString(string text)\r\n78  {\r\n79      int countDecimal = 0;\r\n80      foreach (char character in text)\r\n81      {\r\n82          if (character == '.')\r\n83          {\r\n84              countDecimal++;\r\n85          }\r\n86      }\r\n86      return countDecimal;\r\n87  }<\/pre>\n<p>We run all our tests, everything passes, we are fine! Time to move on to find another chunk of code to extract.\u00a0 Next we take a look at line 59 from the original code and use Extract Method to make the following new method.<\/p>\n<pre>89  private static string ParseExtraDecimalPoints(string text)\r\n90  {\r\n91    \u00a0 string returnString = \"\";\r\n92\u00a0\u00a0\u00a0\u00a0\u00a0 bool first = true;\r\n93\r\n94 \u00a0\u00a0\u00a0\u00a0 foreach (char character in text)\r\n95\u00a0\u00a0\u00a0\u00a0\u00a0 {\r\n96    \u00a0\u00a0\u00a0\u00a0\u00a0 returnString += character.ToString();\r\n97\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if (character == '.')\r\n98\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {\r\n99    \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if (first == true)\r\n100 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {\r\n101    \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 first = false;\r\n101\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\r\n102\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 else\r\n103\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {\r\n104\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0     returnString = returnString.Remove(returnString.Length - 1, 1);\r\n105\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\r\n106\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\r\n107 \u00a0\u00a0\u00a0 }\r\n108\u00a0\u00a0\u00a0\u00a0 return returnString;\r\n109 }<\/pre>\n<p>Again: run all the test, everything passes, we are fine!\u00a0 Notice that our extracted method is a little long (20 lines), but conceptually all the code in ParseExtraDecimalPoints is related, so we are OK.\u00a0 Remember, we are more interested in finding related code than following a rule of \u201c10 lines or less\u201d.\u00a0 Even if all you can pull out is a 200 line method, then that is cool &#8211; it is a first start once you pull one chunk out, you can begin to see the smaller chunks embedded in there.<\/p>\n<p>But what does the refactored method look like?\u00a0 I highlighted the addition of the two static methods &#8211; CountDecimalsInString and ParseExtraDecimalPoints &#8211; to make it easier to see our changes.<\/p>\n<pre>44  static public string RemoveExtraDecimalPoint(string text)\r\n45\u00a0 {\r\n46    \u00a0 string returnString = \"\";\r\n<strong>47\u00a0\u00a0\u00a0\u00a0\u00a0 int countDecimal = Utils.CountDecimalsInString(text);<\/strong>\r\n48\u00a0\u00a0\u00a0\u00a0\r\n49\u00a0\u00a0\u00a0\u00a0\u00a0 if (countDecimal &gt; 1)\r\n50\u00a0\u00a0\u00a0\u00a0\u00a0 {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\r\n<strong>51    \u00a0\u00a0\u00a0\u00a0\u00a0 returnString = Utils.ParseExtraDecimalPoints(text);<\/strong>\r\n52\u00a0\u00a0\u00a0\u00a0\u00a0 }\r\n53\u00a0\u00a0\u00a0\u00a0\u00a0 else\r\n54\u00a0\u00a0\u00a0\u00a0\u00a0 {\r\n55    \u00a0\u00a0\u00a0\u00a0\u00a0 returnString = text;\r\n56\u00a0\u00a0\u00a0\u00a0\u00a0 }\r\n57\r\n58\u00a0\u00a0\u00a0\u00a0\u00a0 return returnString;\r\n59  }<\/pre>\n<p>Upon examination, we see the refactored version of RemoveExtraDecimalPoint is only 15 lines long and does just two things: counts decimal points and parses code to remove extra decimal points.\u00a0 Oh, that is real easy to understand as opposed to trying to read the original 39 lines of code (take a look if you don\u2019t believe me) with all the loops, conditionals and white space and trying to figure things out.<\/p>\n<p>And that is the point of the Extract Method refactoring.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Coming off my\u00a0last rant, I thought it might be valuable to the community if I were to blog on the various refactorings I felt software developers should be using if  [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":7494,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_price":"","_stock":"","_tribe_ticket_header":"","_tribe_default_ticket_provider":"","_tribe_ticket_capacity":"0","_ticket_start_date":"","_ticket_end_date":"","_tribe_ticket_show_description":"","_tribe_ticket_show_not_going":false,"_tribe_ticket_use_global_stock":"","_tribe_ticket_global_stock_level":"","_global_stock_mode":"","_global_stock_cap":"","_tribe_rsvp_for_event":"","_tribe_ticket_going_count":"","_tribe_ticket_not_going_count":"","_tribe_tickets_list":"[]","_tribe_ticket_has_attendee_info_fields":false,"footnotes":""},"categories":[208,205,19,10,6,24,206,26,44,53,36,17],"tags":[],"class_list":["post-81","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-advanced-practitioners","category-beginners","category-design-excellence","category-developers","category-extreme-programming","category-legacy-code","category-practitioners","category-refactoring","category-scrum-master","category-simple-design","category-test-driven-development","category-testing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Extract Method - The Most Important Refactoring EVER - The Scrum Academy<\/title>\n<meta name=\"description\" content=\"The Extract Method is the one refactoring every developer should know and love.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Extract Method - The Most Important Refactoring EVER - The Scrum Academy\" \/>\n<meta property=\"og:description\" content=\"The Extract Method is the one refactoring every developer should know and love.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/\" \/>\n<meta property=\"og:site_name\" content=\"The Scrum Academy\" \/>\n<meta property=\"article:published_time\" content=\"2008-08-24T04:35:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-15T14:40:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/thescrumacademy.com\/wp-content\/uploads\/2008\/08\/vecteezy_important-word-on-metal-pointer_6380147.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"751\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Carlton Nettleton\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Carlton Nettleton\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/\"},\"author\":{\"name\":\"Carlton Nettleton\",\"@id\":\"https:\/\/thescrumacademy.com\/es\/#\/schema\/person\/2a0fb199044ecd4af3704c734747fc6a\"},\"headline\":\"Extract Method &#8211; The Most Important Refactoring EVER\",\"datePublished\":\"2008-08-24T04:35:13+00:00\",\"dateModified\":\"2025-07-15T14:40:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/\"},\"wordCount\":810,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/thescrumacademy.com\/wp-content\/uploads\/2008\/08\/vecteezy_important-word-on-metal-pointer_6380147.jpg\",\"articleSection\":[\"Advanced Practitioners\",\"Beginners\",\"Design Excellence\",\"Developers\",\"Extreme Programming\",\"Legacy Code\",\"Practitioners\",\"Refactoring\",\"Scrum Master\",\"Simple Design\",\"Test-Driven Development\",\"Testing\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/\",\"url\":\"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/\",\"name\":\"Extract Method - The Most Important Refactoring EVER - The Scrum Academy\",\"isPartOf\":{\"@id\":\"https:\/\/thescrumacademy.com\/es\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/thescrumacademy.com\/wp-content\/uploads\/2008\/08\/vecteezy_important-word-on-metal-pointer_6380147.jpg\",\"datePublished\":\"2008-08-24T04:35:13+00:00\",\"dateModified\":\"2025-07-15T14:40:06+00:00\",\"author\":{\"@id\":\"https:\/\/thescrumacademy.com\/es\/#\/schema\/person\/2a0fb199044ecd4af3704c734747fc6a\"},\"description\":\"The Extract Method is the one refactoring every developer should know and love.\",\"breadcrumb\":{\"@id\":\"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/#primaryimage\",\"url\":\"https:\/\/thescrumacademy.com\/wp-content\/uploads\/2008\/08\/vecteezy_important-word-on-metal-pointer_6380147.jpg\",\"contentUrl\":\"https:\/\/thescrumacademy.com\/wp-content\/uploads\/2008\/08\/vecteezy_important-word-on-metal-pointer_6380147.jpg\",\"width\":1200,\"height\":751,\"caption\":\"important word on metal pointer\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/thescrumacademy.com\/es\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Extract Method &#8211; The Most Important Refactoring EVER\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/thescrumacademy.com\/es\/#website\",\"url\":\"https:\/\/thescrumacademy.com\/es\/\",\"name\":\"The Scrum Academy\",\"description\":\"Everyone anywhere can do better Scrum\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/thescrumacademy.com\/es\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/thescrumacademy.com\/es\/#\/schema\/person\/2a0fb199044ecd4af3704c734747fc6a\",\"name\":\"Carlton Nettleton\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/thescrumacademy.com\/es\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6d69c37c349230a49a1ec6c77c21c4b35043de9fbcce8a202d61f707025cd537?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6d69c37c349230a49a1ec6c77c21c4b35043de9fbcce8a202d61f707025cd537?s=96&d=mm&r=g\",\"caption\":\"Carlton Nettleton\"},\"description\":\"My name is Carlton Nettleton and I am the President of Look Forward Consulting. I am an international speaker, trainer and author of the book, Fourteen Observations of Good Scrum Practice and my book has been translated into Spanish. My passion is to share my excitement, enthusiasm and encouragement with teams and organizations as they reach for higher levels of performance and engagement. My business is to help your business grow and flourish.\",\"url\":\"https:\/\/thescrumacademy.com\/es\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Extract Method - The Most Important Refactoring EVER - The Scrum Academy","description":"The Extract Method is the one refactoring every developer should know and love.","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:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/","og_locale":"es_ES","og_type":"article","og_title":"Extract Method - The Most Important Refactoring EVER - The Scrum Academy","og_description":"The Extract Method is the one refactoring every developer should know and love.","og_url":"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/","og_site_name":"The Scrum Academy","article_published_time":"2008-08-24T04:35:13+00:00","article_modified_time":"2025-07-15T14:40:06+00:00","og_image":[{"width":1200,"height":751,"url":"https:\/\/thescrumacademy.com\/wp-content\/uploads\/2008\/08\/vecteezy_important-word-on-metal-pointer_6380147.jpg","type":"image\/jpeg"}],"author":"Carlton Nettleton","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"Carlton Nettleton","Tiempo de lectura":"4 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/#article","isPartOf":{"@id":"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/"},"author":{"name":"Carlton Nettleton","@id":"https:\/\/thescrumacademy.com\/es\/#\/schema\/person\/2a0fb199044ecd4af3704c734747fc6a"},"headline":"Extract Method &#8211; The Most Important Refactoring EVER","datePublished":"2008-08-24T04:35:13+00:00","dateModified":"2025-07-15T14:40:06+00:00","mainEntityOfPage":{"@id":"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/"},"wordCount":810,"commentCount":0,"image":{"@id":"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/#primaryimage"},"thumbnailUrl":"https:\/\/thescrumacademy.com\/wp-content\/uploads\/2008\/08\/vecteezy_important-word-on-metal-pointer_6380147.jpg","articleSection":["Advanced Practitioners","Beginners","Design Excellence","Developers","Extreme Programming","Legacy Code","Practitioners","Refactoring","Scrum Master","Simple Design","Test-Driven Development","Testing"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/","url":"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/","name":"Extract Method - The Most Important Refactoring EVER - The Scrum Academy","isPartOf":{"@id":"https:\/\/thescrumacademy.com\/es\/#website"},"primaryImageOfPage":{"@id":"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/#primaryimage"},"image":{"@id":"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/#primaryimage"},"thumbnailUrl":"https:\/\/thescrumacademy.com\/wp-content\/uploads\/2008\/08\/vecteezy_important-word-on-metal-pointer_6380147.jpg","datePublished":"2008-08-24T04:35:13+00:00","dateModified":"2025-07-15T14:40:06+00:00","author":{"@id":"https:\/\/thescrumacademy.com\/es\/#\/schema\/person\/2a0fb199044ecd4af3704c734747fc6a"},"description":"The Extract Method is the one refactoring every developer should know and love.","breadcrumb":{"@id":"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/#primaryimage","url":"https:\/\/thescrumacademy.com\/wp-content\/uploads\/2008\/08\/vecteezy_important-word-on-metal-pointer_6380147.jpg","contentUrl":"https:\/\/thescrumacademy.com\/wp-content\/uploads\/2008\/08\/vecteezy_important-word-on-metal-pointer_6380147.jpg","width":1200,"height":751,"caption":"important word on metal pointer"},{"@type":"BreadcrumbList","@id":"https:\/\/thescrumacademy.com\/es\/2008\/08\/23\/extract-method-the-most-important-refactoring-ever\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/thescrumacademy.com\/es\/"},{"@type":"ListItem","position":2,"name":"Extract Method &#8211; The Most Important Refactoring EVER"}]},{"@type":"WebSite","@id":"https:\/\/thescrumacademy.com\/es\/#website","url":"https:\/\/thescrumacademy.com\/es\/","name":"The Scrum Academy","description":"Everyone anywhere can do better Scrum","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thescrumacademy.com\/es\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Person","@id":"https:\/\/thescrumacademy.com\/es\/#\/schema\/person\/2a0fb199044ecd4af3704c734747fc6a","name":"Carlton Nettleton","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/thescrumacademy.com\/es\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6d69c37c349230a49a1ec6c77c21c4b35043de9fbcce8a202d61f707025cd537?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6d69c37c349230a49a1ec6c77c21c4b35043de9fbcce8a202d61f707025cd537?s=96&d=mm&r=g","caption":"Carlton Nettleton"},"description":"My name is Carlton Nettleton and I am the President of Look Forward Consulting. I am an international speaker, trainer and author of the book, Fourteen Observations of Good Scrum Practice and my book has been translated into Spanish. My passion is to share my excitement, enthusiasm and encouragement with teams and organizations as they reach for higher levels of performance and engagement. My business is to help your business grow and flourish.","url":"https:\/\/thescrumacademy.com\/es\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/thescrumacademy.com\/es\/wp-json\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thescrumacademy.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thescrumacademy.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thescrumacademy.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thescrumacademy.com\/es\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":0,"href":"https:\/\/thescrumacademy.com\/es\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thescrumacademy.com\/es\/wp-json\/wp\/v2\/media\/7494"}],"wp:attachment":[{"href":"https:\/\/thescrumacademy.com\/es\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thescrumacademy.com\/es\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thescrumacademy.com\/es\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}