{"id":1712,"date":"2012-10-21T17:22:18","date_gmt":"2012-10-22T00:22:18","guid":{"rendered":"https:\/\/simpleprogrammer.com\/?p=1712"},"modified":"2023-02-13T22:15:22","modified_gmt":"2023-02-14T03:15:22","slug":"there-are-only-two-roles-of-code","status":"publish","type":"post","link":"https:\/\/simpleprogrammer.com\/there-are-only-two-roles-of-code\/","title":{"rendered":"The Purpose of Code"},"content":{"rendered":"<p>All code can be classified into two distinct roles; code that does work (algorithms) and code that coordinates work (coordinators).\\n\\nThe real complexity that gets introduced into a code bases is usually directly related to the creation of classes that group together both of these roles under one roof.\\n\\nI\u2019m guilty of it myself &#8211; even though I <a href=\"https:\/\/simpleprogrammer.com\/better-software-engineer-tips\/\">try my best to code at expert level<\/a>. I would say that 90% of the code I have written does not nicely divide my classes into algorithms and coordinators.\\n\\n<\/p>\n<h2><\/h2>\n<p>\\n\\n<\/p>\n<h2>Defining things a bit more clearly<\/h2>\n<p>\\n\\nBefore I dive into why we should be dividing our code into clear algorithmic or coordinating classes, I want to take a moment to better define what I mean by algorithms and coordinators.\\n\\nMost of us are familiar with <a href=\"http:\/\/www.amazon.com\/gp\/product\/032157351X\/ref=as_li_ss_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=032157351X&amp;linkCode=as2&amp;tag=makithecompsi-20\">common algorithms in Computer Science<\/a> like a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Bubble_sort\">Bubble Sort<\/a> or a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Binary_search_algorithm\">Binary Search<\/a>, but what we don\u2019t often realize is that all of our code that does something useful contains within it an algorithm.\\n\\nWhat I mean by this is that there is a clear distinct set of instructions or steps by which some problem is solved or some work is done.\u00a0 That set of steps does not require external dependencies, it works solely on data, just like a Bubble Sort does not care what it is sorting.\\n\\nTake a moment to wrap your head around this.\u00a0 I had to double check myself a couple of times to make sure this conclusion was right, because it is so profound.\\n\\nIt is profound because it means that <strong>all the code we write is essentially just as testable, as provable and potentially as dependency free as a common sorting algorithm if only we can find the way to express it so.<\/strong>\\n\\nWhat is left over in our program (if we extract out the algorithms) is just glue.\\n\\nThink of it like a computer.\u00a0 Computer electronics have two roles: doing work and binding together the stuff that does the work.\u00a0 If you take out the CPU, the memory and all the other components that actually do some sort of work, you\u2019ll be left with coordinators.\u00a0 Wires and busses that bind together the components in the system.\\n\\n<\/p>\n<h2>Why dividing code into algorithms and coordinators is important.<\/h2>\n<p>\\n\\nSo now that we understand that code could potentially be divided into two broad categories, the next question of course is why?\u00a0 And can we even do it?\\n\\nLet\u2019s address why first.\\n\\nThe biggest benefit to pulling algorithmic code into separate classes from any coordinating code is that it allows the algorithmic code to be free of dependencies.\u00a0 (Practically all dependencies.)\\n\\nOnce you free this algorithmic code of dependencies you\u2019ll find 3 things immediately happen to that code:\\n\\n<\/p>\n<ol>\\n    <\/p>\n<li>It becomes easier to unit test<\/li>\n<p>\\n    <\/p>\n<li>It becomes more reusable<\/li>\n<p>\\n    <\/p>\n<li>Its complexity is reduced<\/li>\n<p>\\n<\/ol>\n<p>\\n\\nA long time ago before mocks were widely used and IoC containers were rarely used, TDD was hard.\u00a0 It was really hard!\\n\\nI remember when I was first standing on the street corners proclaiming that all code should be TDD with 100% code coverage.\u00a0 I was thought pretty crazy at the time, because there really weren\u2019t any mocking frameworks and no IoC containers, so if you wanted to <a href=\"https:\/\/simpleprogrammer.com\/9-steps-to-approach-development-task\/\">write all your code using TDD approaches<\/a>, you\u2019d actually have to separate out your algorithms.\u00a0 You\u2019d have to write classes that had minimal dependencies if you wanted to be able to truly unit test them.\\n\\nThen things got easier by getting harder.\u00a0 Many developers started to realize that the reason why TDD was so hard was because in the real world we usually write code that has many dependencies.\u00a0 The problem with dependencies is that we need a way to create fake versions of them.\u00a0 The idea of mocking dependencies became so popular that entire architectures were based on the idea and IoC containers were brought forth.\\n\\n<a href=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2012\/10\/mp900175522.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; margin: 0 10px 0 0; padding-left: 0; padding-right: 0; display: inline; float: left; padding-top: 0; border-width: 0;\" title=\"MP900175522\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2012\/10\/mp900175522_thumb.jpg\" alt=\"MP900175522\" width=\"161\" height=\"240\" \/><\/a>We, as a development community, essentially swept the crumbs of difficult unit testing under the rug.\u00a0 TDD and unit testing in general became ubiquitous with writing good code, but one of the most important values of TDD was left behind, the forced separation of algorithmic code from coordinating code.\\n\\nTDD got easier, but only because we found a way to solve the problems of dependencies interfering with our class isolation by making it less painful to mock out and fake the dependencies rather than getting rid of them.\\n\\n<\/p>\n<h2><\/h2>\n<p>\\n\\n<\/p>\n<h2><\/h2>\n<p>\\n\\n<\/p>\n<h2>There is a better way!<\/h2>\n<p>\\n\\nWe can still fix this problem, but we have to make a concerted effort to do so.\u00a0 The current path of least resistance is to just use an IoC container and write unit tests full of mocks that break every time you do all but the most trivial refactoring on a piece of code.\\n\\nLet me show you a pretty simple example, but one that I think clearly illustrates how code can be refactored to remove dependencies and clearly separate out logic.\\n\\nTake a look at this simplified calculator class:\\n\\n<\/p>\n<div id=\"scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:072f8465-9898-4d8a-a4ce-7782228c4e10\" class=\"wlWriterEditableSmartContent\" style=\"margin: 0; display: inline; float: none; padding: 0;\">\\n\\n<script src=\"https:\/\/gist.github.com\/simpleprogrammer-shared\/e6d5aa40ac5a2d8e7e85d174a4a0f048.js\"><\/script>\\n\\n<\/div>\n<p>\\n\\nThis class does simple add calculations and stores the results in a storage service while keeping track of the adding session.\\n\\nIt\u2019s not extremely complicated code, but it is more than just an algorithm.\u00a0 The Calculator class here is requiring a dependency on a storage service.\\n\\nBut this code can be rewritten to extract out the logic into another calculator class that has no dependencies and a coordinator class that really has no logic.\\n\\n<\/p>\n<div id=\"scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:af8e2c06-42b5-433b-8dd2-d7f02be30d88\" class=\"wlWriterEditableSmartContent\" style=\"margin: 0; display: inline; float: none; padding: 0;\">\\n\\n<script src=\"https:\/\/gist.github.com\/simpleprogrammer-shared\/684d36574d38e67b984203ab23585696.js\"><\/script>\\n\\n<\/div>\n<p>\\n\\nNow you can see that the BasicCalculator class has no external dependencies and thus can be easily unit tested.\u00a0 It is also much easier to tell what it is doing because it contains all of the real logic, while the Calculator class has now become just a coordinator, coordinating calls between the two classes.\\n\\nThis is of course a very basic example, but it was not contrived.\u00a0 What I mean by this is that even though this example is very simple, I didn\u2019t purposely create this code so that I could easily extract out the logic into an algorithm class.\\n\\n<\/p>\n<h2>Parting advice<\/h2>\n<p>\\n\\n<strong>I\u2019ve found that if you focus on <\/strong><a href=\"https:\/\/simpleprogrammer.com\/back-to-basics-mock-eliminating-patterns\/\"><strong>eliminating mocks<\/strong><\/a><strong> or even just having the mindset that you will not use mocks in your code, you can produce code from the get go that clearly separates algorithm from coordination.<\/strong>\\n\\nI\u2019m still working on mastering this skill myself, because it is quite difficult to do, but I believe the rewards are very high for those that can do it.\u00a0 In code where I have been able to separate out algorithm from coordination, I have seen much better designs that were more maintainable and easier to understand.\\n\\nI\u2019ll be talking about and showing some more ways to do this in my talk at the Warm Crocodile conference next year.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>All code can be classified into two distinct roles; code that does work (algorithms) and code that coordinates work (coordinators).\\n\\nThe real complexity that gets introduced into a code bases is usually directly related to the creation of classes that group together both of these roles under one roof.\\n\\nI\u2019m guilty of it myself &#8211; even though&#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":[162232877],"tags":[],"class_list":["post-1712","post","type-post","status-publish","format-standard","hentry","category-better-software-engineer"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>The Purpose of Code - Simple Programmer<\/title>\n<meta name=\"description\" content=\"The purpose of code can be classified into two distinct roles; code that does work (algorithms) and code that coordinates work (coordinators).\" \/>\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\/there-are-only-two-roles-of-code\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The Purpose of Code - Simple Programmer\" \/>\n<meta property=\"og:description\" content=\"The purpose of code can be classified into two distinct roles; code that does work (algorithms) and code that coordinates work (coordinators).\" \/>\n<meta property=\"og:url\" content=\"https:\/\/simpleprogrammer.com\/there-are-only-two-roles-of-code\/\" \/>\n<meta property=\"og:site_name\" content=\"Simple Programmer\" \/>\n<meta property=\"article:published_time\" content=\"2012-10-22T00:22:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-14T03:15:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2012\/10\/mp900175522_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=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/there-are-only-two-roles-of-code\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/there-are-only-two-roles-of-code\\\/\"},\"author\":{\"name\":\"John Sonmez\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#\\\/schema\\\/person\\\/1abc70edfb189184827740310672de67\"},\"headline\":\"The Purpose of Code\",\"datePublished\":\"2012-10-22T00:22:18+00:00\",\"dateModified\":\"2023-02-14T03:15:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/there-are-only-two-roles-of-code\\\/\"},\"wordCount\":1188,\"commentCount\":20,\"image\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/there-are-only-two-roles-of-code\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/mp900175522_thumb.jpg\",\"articleSection\":[\"Better Software Engineer\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/simpleprogrammer.com\\\/there-are-only-two-roles-of-code\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/there-are-only-two-roles-of-code\\\/\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/there-are-only-two-roles-of-code\\\/\",\"name\":\"The Purpose of Code - Simple Programmer\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/there-are-only-two-roles-of-code\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/there-are-only-two-roles-of-code\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/mp900175522_thumb.jpg\",\"datePublished\":\"2012-10-22T00:22:18+00:00\",\"dateModified\":\"2023-02-14T03:15:22+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#\\\/schema\\\/person\\\/1abc70edfb189184827740310672de67\"},\"description\":\"The purpose of code can be classified into two distinct roles; code that does work (algorithms) and code that coordinates work (coordinators).\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/there-are-only-two-roles-of-code\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/simpleprogrammer.com\\\/there-are-only-two-roles-of-code\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/there-are-only-two-roles-of-code\\\/#primaryimage\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/mp900175522_thumb.jpg\",\"contentUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/mp900175522_thumb.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/there-are-only-two-roles-of-code\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/simpleprogrammer.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The Purpose of 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":"The Purpose of Code - Simple Programmer","description":"The purpose of code can be classified into two distinct roles; code that does work (algorithms) and code that coordinates work (coordinators).","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\/there-are-only-two-roles-of-code\/","og_locale":"en_US","og_type":"article","og_title":"The Purpose of Code - Simple Programmer","og_description":"The purpose of code can be classified into two distinct roles; code that does work (algorithms) and code that coordinates work (coordinators).","og_url":"https:\/\/simpleprogrammer.com\/there-are-only-two-roles-of-code\/","og_site_name":"Simple Programmer","article_published_time":"2012-10-22T00:22:18+00:00","article_modified_time":"2023-02-14T03:15:22+00:00","og_image":[{"url":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2012\/10\/mp900175522_thumb.jpg","type":"","width":"","height":""}],"author":"John Sonmez","twitter_card":"summary_large_image","twitter_misc":{"Written by":"John Sonmez","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/simpleprogrammer.com\/there-are-only-two-roles-of-code\/#article","isPartOf":{"@id":"https:\/\/simpleprogrammer.com\/there-are-only-two-roles-of-code\/"},"author":{"name":"John Sonmez","@id":"https:\/\/simpleprogrammer.com\/#\/schema\/person\/1abc70edfb189184827740310672de67"},"headline":"The Purpose of Code","datePublished":"2012-10-22T00:22:18+00:00","dateModified":"2023-02-14T03:15:22+00:00","mainEntityOfPage":{"@id":"https:\/\/simpleprogrammer.com\/there-are-only-two-roles-of-code\/"},"wordCount":1188,"commentCount":20,"image":{"@id":"https:\/\/simpleprogrammer.com\/there-are-only-two-roles-of-code\/#primaryimage"},"thumbnailUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2012\/10\/mp900175522_thumb.jpg","articleSection":["Better Software Engineer"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/simpleprogrammer.com\/there-are-only-two-roles-of-code\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/simpleprogrammer.com\/there-are-only-two-roles-of-code\/","url":"https:\/\/simpleprogrammer.com\/there-are-only-two-roles-of-code\/","name":"The Purpose of Code - Simple Programmer","isPartOf":{"@id":"https:\/\/simpleprogrammer.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/simpleprogrammer.com\/there-are-only-two-roles-of-code\/#primaryimage"},"image":{"@id":"https:\/\/simpleprogrammer.com\/there-are-only-two-roles-of-code\/#primaryimage"},"thumbnailUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2012\/10\/mp900175522_thumb.jpg","datePublished":"2012-10-22T00:22:18+00:00","dateModified":"2023-02-14T03:15:22+00:00","author":{"@id":"https:\/\/simpleprogrammer.com\/#\/schema\/person\/1abc70edfb189184827740310672de67"},"description":"The purpose of code can be classified into two distinct roles; code that does work (algorithms) and code that coordinates work (coordinators).","breadcrumb":{"@id":"https:\/\/simpleprogrammer.com\/there-are-only-two-roles-of-code\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/simpleprogrammer.com\/there-are-only-two-roles-of-code\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/simpleprogrammer.com\/there-are-only-two-roles-of-code\/#primaryimage","url":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2012\/10\/mp900175522_thumb.jpg","contentUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2012\/10\/mp900175522_thumb.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/simpleprogrammer.com\/there-are-only-two-roles-of-code\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/simpleprogrammer.com\/"},{"@type":"ListItem","position":2,"name":"The Purpose of 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\/1712","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=1712"}],"version-history":[{"count":0,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts\/1712\/revisions"}],"wp:attachment":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/media?parent=1712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/categories?post=1712"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/tags?post=1712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}