{"id":1539,"date":"2012-05-27T12:10:16","date_gmt":"2012-05-27T19:10:16","guid":{"rendered":"https:\/\/simpleprogrammer.com\/?p=1539"},"modified":"2018-01-11T17:50:23","modified_gmt":"2018-01-11T22:50:23","slug":"types-of-duplication-in-code","status":"publish","type":"post","link":"https:\/\/simpleprogrammer.com\/types-of-duplication-in-code\/","title":{"rendered":"Types of Duplication in Code"},"content":{"rendered":"<p>One of the biggest reasons to refactor code is to eliminate duplication.&#160; It is pretty easy to introduce duplication in our code either unintentionally or because we don\u2019t know how to prevent or get rid of it.<\/p>\n<p>\\n\\n<\/p>\n<h3><\/h3>\n<p>\\n\\n<\/p>\n<h2>The three types of duplication<\/h2>\n<p>\\n\\nI\u2019ve found that there are three basic types of duplication that we can eliminate from our code that successfully build on each other.\\n\\n<\/p>\n<ul>\n<li>Data <\/li>\n<li>Type <\/li>\n<li>Algorithm <\/li>\n<\/ul>\n<p>\\n\\nMost developers tend to get stuck at the data level, but in this post, I will show you how to recognize type and algorithm duplication and refactor it out of your code.\\n\\n<a href=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2012\/05\/duplicate-content.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;\" title=\"duplicate-content\" border=\"0\" alt=\"duplicate-content\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2012\/05\/duplicate-content-1_thumb.jpg\" width=\"479\" height=\"359\" \/><\/a>\\n\\n<\/p>\n<h2>Data duplication<\/h2>\n<p>\\n\\nThe most basic type of duplication is that of data.&#160; It is also very easily recognizable.\\n\\nTake a look at these methods:\\n\\n<\/p>\n<div style=\"margin:0;display:inline;float:none;padding:0;\" id=\"scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:854c9dbd-0082-4c9b-ba71-39353e93a7e0\" class=\"wlWriterEditableSmartContent\">\\n\\n<script src=\"https:\/\/gist.github.com\/simpleprogrammer-shared\/b7b1a295cd9bc7216e2ea0f886198a0c.js\"><\/script>\\n\\n<\/div>\n<p>\\n\\nPretty easy to see here what needs to be refactored.\\n\\nMost developers don\u2019t need any help to realize that you should probably refactor this code to a method like the following:\\n\\n<\/p>\n<div style=\"margin:0;display:inline;float:none;padding:0;\" id=\"scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:cc658493-a341-4d7e-bec8-a18f625af400\" class=\"wlWriterEditableSmartContent\">\\n\\n<script src=\"https:\/\/gist.github.com\/simpleprogrammer-shared\/d520dc17ce1c7442b0eb2e4e15d11d6c.js\"><\/script>\\n\\n<\/div>\n<p>\\n\\nIn this example data is duplicated.&#160; To be specific the string data of the direction passed into move is duplicated.&#160; We can eliminate that duplication by creating a method that parameterizes the differences represented by that data.\\n\\n<\/p>\n<h2>Type duplication<\/h2>\n<p>\\n\\nNow, data duplication is where a majority of developers stop, but we can go much farther than that.&#160; In many cases the difference between two methods is only the type in which they operate on.\\n\\nWith the use of generics in C#, we can refactor out type and parameterize this concept as well.\\n\\nLook at this example:\\n\\n<\/p>\n<div style=\"margin:0;display:inline;float:none;padding:0;\" id=\"scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:f6a87391-ac77-4a1e-b528-a5bd86dff429\" class=\"wlWriterEditableSmartContent\">\\n\\n<script src=\"https:\/\/gist.github.com\/simpleprogrammer-shared\/af832a900a86733d79b9e3c5136f76d3.js\"><\/script>\\n\\n<\/div>\n<p>\\n\\nHere we have two method that do pretty much the same thing, but they just differ on the type they operate on.&#160; Generics gives us the ability to actually refactor out that type information just like we would with data.\\n\\n<\/p>\n<div style=\"margin:0;display:inline;float:none;padding:0;\" id=\"scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:ba4adb01-8937-42c3-8fe3-5dcb5049d1ec\" class=\"wlWriterEditableSmartContent\">\\n\\n<script src=\"https:\/\/gist.github.com\/simpleprogrammer-shared\/1e1a1ffeebaae3603af2b5fa0d7b55dc.js\"><\/script>\\n\\n<\/div>\n<p>\\n\\nBy refactoring to the above method we have eliminated duplication. We have achieved this by refactoring out type.\\n\\n<\/p>\n<h2>Algorithm duplication<\/h2>\n<p>\\n\\nWithout a good understanding of delegates and functional programming, few developers ever even consider refactoring out algorithm duplication, but it can be done fairly easily.\\n\\nTake a look at this example:\\n\\n<\/p>\n<div style=\"margin:0;display:inline;float:none;padding:0;\" id=\"scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:b6e8bec7-795f-4ba1-977b-1f73dff89531\" class=\"wlWriterEditableSmartContent\">\\n\\n<script src=\"https:\/\/gist.github.com\/simpleprogrammer-shared\/5e5833e008958540e1464d4f5ef8e1a9.js\"><\/script>\\n\\n<\/div>\n<p>\\n\\nIt is a pretty basic example, but it highlights the kind of duplication that I often see left in many code bases.&#160; Delegates in C# allow us to treat functions like data.&#160; With this ability we can easily refactor out the commonality in these two method to get something like this:\\n\\n<\/p>\n<div style=\"margin:0;display:inline;float:none;padding:0;\" id=\"scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:5ee157cc-e4f9-4a07-955b-5f65931717b9\" class=\"wlWriterEditableSmartContent\">\\n\\n<script src=\"https:\/\/gist.github.com\/simpleprogrammer-shared\/b8bdfe7ad0c525208d2b0b746692922d.js\"><\/script>\\n\\n<\/div>\n<p>\\n\\nWe could have also refactored out this duplication by using an abstract base class and having the inherited classes definite their own fitness activity, but using delegates creates a much simpler approach and casts the problem in the same light as refactoring any other type of data.\\n\\n<\/p>\n<h2>Combining them together<\/h2>\n<p>\\n\\nOften I find that several different types of duplication are present across several methods in a class.\\n\\nWhen this is the case, it is often possible to apply data, type and algorithm duplication refactoring techniques to find the most simple and elegant solutions.\\n\\nI\u2019ve also found this is a skill that must be practiced.&#160; When I first really started using generics and delegates in C#, I had a hard time finding uses for them, because I could not easily recognize the patterns of duplication that called for them.&#160; But, I found over time that it became easier and easier to recognize where these techniques could be applied to reduce duplication in my methods.\\n\\nI\u2019ve also found the key to eliminating duplication is sometimes to first exaggerate it.&#160; Often I will purposely take two methods that I know have some duplication and make them look even more duplicated in order to be able to clearly see where the duplication lies.&#160; I may do several small refactoring steps to get to the point where it is easy to identify what data, type or algorithm is being repeated.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the biggest reasons to refactor code is to eliminate duplication.&#160; It is pretty easy to introduce duplication in our code either unintentionally or because we don\u2019t know how to prevent or get rid of it. \\n\\n \\n\\n The three types of duplication \\n\\nI\u2019ve found that there are three basic types of duplication that&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[2185,2426,54712],"tags":[],"class_list":["post-1539","post","type-post","status-publish","format-standard","hentry","category-best-practices","category-c","category-refactoring"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Types of Duplication in Code - Simple Programmer<\/title>\n<meta name=\"description\" content=\"One of the biggest reasons to refactor is to eliminate code duplication. It is pretty easy to introduce duplication in our code either unintentionally or because we don\u2019t know how to prevent or get rid of it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/simpleprogrammer.com\/types-of-duplication-in-code\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Types of Duplication in Code - Simple Programmer\" \/>\n<meta property=\"og:description\" content=\"One of the biggest reasons to refactor is to eliminate code duplication. It is pretty easy to introduce duplication in our code either unintentionally or because we don\u2019t know how to prevent or get rid of it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/simpleprogrammer.com\/types-of-duplication-in-code\/\" \/>\n<meta property=\"og:site_name\" content=\"Simple Programmer\" \/>\n<meta property=\"article:published_time\" content=\"2012-05-27T19:10:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-01-11T22:50:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2012\/05\/duplicate-content_thumb.jpg\" \/>\n<meta name=\"author\" content=\"John Sonmez\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"John Sonmez\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/types-of-duplication-in-code\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/types-of-duplication-in-code\\\/\"},\"author\":{\"name\":\"John Sonmez\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#\\\/schema\\\/person\\\/1abc70edfb189184827740310672de67\"},\"headline\":\"Types of Duplication in Code\",\"datePublished\":\"2012-05-27T19:10:16+00:00\",\"dateModified\":\"2018-01-11T22:50:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/types-of-duplication-in-code\\\/\"},\"wordCount\":705,\"commentCount\":11,\"image\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/types-of-duplication-in-code\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2012\\\/05\\\/duplicate-content-1_thumb.jpg\",\"articleSection\":[\"Best Practices\",\"C#\",\"Refactoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/simpleprogrammer.com\\\/types-of-duplication-in-code\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/types-of-duplication-in-code\\\/\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/types-of-duplication-in-code\\\/\",\"name\":\"Types of Duplication in Code - Simple Programmer\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/types-of-duplication-in-code\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/types-of-duplication-in-code\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2012\\\/05\\\/duplicate-content-1_thumb.jpg\",\"datePublished\":\"2012-05-27T19:10:16+00:00\",\"dateModified\":\"2018-01-11T22:50:23+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#\\\/schema\\\/person\\\/1abc70edfb189184827740310672de67\"},\"description\":\"One of the biggest reasons to refactor is to eliminate code duplication. It is pretty easy to introduce duplication in our code either unintentionally or because we don\u2019t know how to prevent or get rid of it.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/types-of-duplication-in-code\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/simpleprogrammer.com\\\/types-of-duplication-in-code\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/types-of-duplication-in-code\\\/#primaryimage\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2012\\\/05\\\/duplicate-content-1_thumb.jpg\",\"contentUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2012\\\/05\\\/duplicate-content-1_thumb.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/types-of-duplication-in-code\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/simpleprogrammer.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Types of Duplication in Code\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#website\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/\",\"name\":\"Simple Programmer\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/simpleprogrammer.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#\\\/schema\\\/person\\\/1abc70edfb189184827740310672de67\",\"name\":\"John Sonmez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc2f18dfa76e017566ce607de002d7abe4acfd5ec19a6db82c180b00867b8d94?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc2f18dfa76e017566ce607de002d7abe4acfd5ec19a6db82c180b00867b8d94?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc2f18dfa76e017566ce607de002d7abe4acfd5ec19a6db82c180b00867b8d94?s=96&d=mm&r=g\",\"caption\":\"John Sonmez\"},\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/author\\\/jsonmez\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Types of Duplication in Code - Simple Programmer","description":"One of the biggest reasons to refactor is to eliminate code duplication. It is pretty easy to introduce duplication in our code either unintentionally or because we don\u2019t know how to prevent or get rid of it.","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:\/\/simpleprogrammer.com\/types-of-duplication-in-code\/","og_locale":"en_US","og_type":"article","og_title":"Types of Duplication in Code - Simple Programmer","og_description":"One of the biggest reasons to refactor is to eliminate code duplication. It is pretty easy to introduce duplication in our code either unintentionally or because we don\u2019t know how to prevent or get rid of it.","og_url":"https:\/\/simpleprogrammer.com\/types-of-duplication-in-code\/","og_site_name":"Simple Programmer","article_published_time":"2012-05-27T19:10:16+00:00","article_modified_time":"2018-01-11T22:50:23+00:00","og_image":[{"url":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2012\/05\/duplicate-content_thumb.jpg","type":"","width":"","height":""}],"author":"John Sonmez","twitter_card":"summary_large_image","twitter_misc":{"Written by":"John Sonmez","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/simpleprogrammer.com\/types-of-duplication-in-code\/#article","isPartOf":{"@id":"https:\/\/simpleprogrammer.com\/types-of-duplication-in-code\/"},"author":{"name":"John Sonmez","@id":"https:\/\/simpleprogrammer.com\/#\/schema\/person\/1abc70edfb189184827740310672de67"},"headline":"Types of Duplication in Code","datePublished":"2012-05-27T19:10:16+00:00","dateModified":"2018-01-11T22:50:23+00:00","mainEntityOfPage":{"@id":"https:\/\/simpleprogrammer.com\/types-of-duplication-in-code\/"},"wordCount":705,"commentCount":11,"image":{"@id":"https:\/\/simpleprogrammer.com\/types-of-duplication-in-code\/#primaryimage"},"thumbnailUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2012\/05\/duplicate-content-1_thumb.jpg","articleSection":["Best Practices","C#","Refactoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/simpleprogrammer.com\/types-of-duplication-in-code\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/simpleprogrammer.com\/types-of-duplication-in-code\/","url":"https:\/\/simpleprogrammer.com\/types-of-duplication-in-code\/","name":"Types of Duplication in Code - Simple Programmer","isPartOf":{"@id":"https:\/\/simpleprogrammer.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/simpleprogrammer.com\/types-of-duplication-in-code\/#primaryimage"},"image":{"@id":"https:\/\/simpleprogrammer.com\/types-of-duplication-in-code\/#primaryimage"},"thumbnailUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2012\/05\/duplicate-content-1_thumb.jpg","datePublished":"2012-05-27T19:10:16+00:00","dateModified":"2018-01-11T22:50:23+00:00","author":{"@id":"https:\/\/simpleprogrammer.com\/#\/schema\/person\/1abc70edfb189184827740310672de67"},"description":"One of the biggest reasons to refactor is to eliminate code duplication. It is pretty easy to introduce duplication in our code either unintentionally or because we don\u2019t know how to prevent or get rid of it.","breadcrumb":{"@id":"https:\/\/simpleprogrammer.com\/types-of-duplication-in-code\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/simpleprogrammer.com\/types-of-duplication-in-code\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/simpleprogrammer.com\/types-of-duplication-in-code\/#primaryimage","url":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2012\/05\/duplicate-content-1_thumb.jpg","contentUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2012\/05\/duplicate-content-1_thumb.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/simpleprogrammer.com\/types-of-duplication-in-code\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/simpleprogrammer.com\/"},{"@type":"ListItem","position":2,"name":"Types of Duplication in Code"}]},{"@type":"WebSite","@id":"https:\/\/simpleprogrammer.com\/#website","url":"https:\/\/simpleprogrammer.com\/","name":"Simple Programmer","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/simpleprogrammer.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/simpleprogrammer.com\/#\/schema\/person\/1abc70edfb189184827740310672de67","name":"John Sonmez","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/dc2f18dfa76e017566ce607de002d7abe4acfd5ec19a6db82c180b00867b8d94?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dc2f18dfa76e017566ce607de002d7abe4acfd5ec19a6db82c180b00867b8d94?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dc2f18dfa76e017566ce607de002d7abe4acfd5ec19a6db82c180b00867b8d94?s=96&d=mm&r=g","caption":"John Sonmez"},"url":"https:\/\/simpleprogrammer.com\/author\/jsonmez\/"}]}},"_links":{"self":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts\/1539","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/comments?post=1539"}],"version-history":[{"count":0,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts\/1539\/revisions"}],"wp:attachment":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/media?parent=1539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/categories?post=1539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/tags?post=1539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}