{"id":5297,"date":"2015-06-15T16:15:40","date_gmt":"2015-06-15T13:15:40","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=5297"},"modified":"2015-06-12T03:05:39","modified_gmt":"2015-06-12T00:05:39","slug":"strategy-pattern-sans-objects-functions","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/","title":{"rendered":"Strategy Pattern Sans Objects and Functions"},"content":{"rendered":"<p>As many of my readers will likely know, my favorite design pattern is the Decorator Pattern, but I don\u2019t think I\u2019ve mentioned what my second favorite pattern is. This is understandable, as I have a difficult enough time picking favorites usually, let alone second favorites.<\/p>\n<p>Well, my second favorite is sort of a toss up between the Factory Pattern and the Strategy Pattern. I almost HAVE to choose the Strategy Pattern though, since the Factory Pattern is essentially a specialization of the Strategy Pattern.<\/p>\n<p>Today, I am going to present an interesting idea about implementing the Strategy Pattern in Python that doesn\u2019t involve making instances of a class or using functions as the strategy object.<\/p>\n<h2><b>The Spark<\/b><\/h2>\n<p>This idea came to me because of <a href=\"http:\/\/www.yegor256.com\/2014\/11\/20\/seven-virtues-of-good-object.html\">this article about \u201cVirtues of a Good Object\u201d<\/a>. While I don\u2019t agree very much with what he has said, his third point about objects being unique got me thinking. The Strategy Pattern is usually implemented with stateless objects and that\u2019s a little bit of a bad thing, since creating more instances of that is pointless. It seems like the only good use for the Singleton Pattern. But Python, I realized, has an even better way.<\/p>\n<h2><b>Classes are Objects<\/b><\/h2>\n<p>In Python, classes are another kind of object, derived from metaclasses. You can pass classes around just like you can pass object and functions. Heck, you can even pass metaclasses around. And you can call the class methods and static methods on a class just like you can call normal methods on an object. So that gave me an idea. If a Strategy can be implemented without requiring any state, it should be done so as an uninstantiable class.<\/p>\n<p>Here\u2019s an example of such a Strategy class.<\/p>\n<pre class=\" brush:php\">class Strategy:\r\n    @classmethod\r\n    def run(cls):\r\n        print(\"Strategy was run\")<\/pre>\n<p>The example could have used <code>@staticmethod<\/code> instead of <code>@classmethod<\/code>, too, allowing you to remove the <code>cls<\/code> parameter.<\/p>\n<h2><b>Aside: Strategy Pattern in Python<\/b><\/h2>\n<p>This is a terrible example, though, since it only uses one method, and a stateless one at that. If a method\/function accepts a Strategy that only has one method to call, it should not be required to be a method.<\/p>\n<p>For (a terrible, oversimplified) example, if you have a method\/function like this:<\/p>\n<pre class=\" brush:php\">def strategy_user(strategy):\r\n    strategy.run()<\/pre>\n<p>You are required to pass an object that has a <code>run()<\/code> method. But why do we need to force that? If there\u2019s only one method being called, it might as well be the <code>__call__()<\/code> method that is run implicitly.<\/p>\n<p>So, you\u2019d remake the previous snippet into<\/p>\n<pre class=\" brush:php\">def strategy_user(strategy):\r\n    strategy()<\/pre>\n<p>Now, instead of requiring a class to follow a certain protocol, you need only accept a callable, which could be an object that implements <code>__call__()<\/code>, a function, or a reference to a method. You can use any one of these options:<\/p>\n<pre class=\" brush:php\">def strategy_one():\r\n    print(\"strategy_one called\")\r\n\u00a0\r\nclass Strategy_Two:\r\n    def __call__(self):\r\n        print(\"Strategy_Two called\")\r\n\u00a0\r\nclass Strategy_Three:\r\n    def run(self):\r\n        print(\"Strategy_Three called\")\r\n\u00a0\r\n# our Strategy class from earlier using a static method instead\r\nclass Strategy_Four:\r\n    @staticmethod\r\n    def run():\r\n        print(\"Strategy_Four called\")\r\n\u00a0\r\n# using each of the Strategy types\r\nstrategy_user(strategy_one)\r\nstrategy_user(Strategy_Two())\r\nstrategy_user(Strategy_Three().run)\r\nstrategy_user(Strategy_Four.run)<\/pre>\n<p>Obviously, you can replace <code>Strategy_Two()<\/code> and <code>Strategy_Three()<\/code> with already-created instances of those classes.<\/p>\n<h2><b>Back to Strategy Classes<\/b><\/h2>\n<p>So, what\u2019s the point of the strategy class when a function works just fine? The point is that it can implement multiple methods instead of just one. If a strategy definition requires more than one step of strategy, then you either have to accept multiple functions in or a strategy object with multiple methods. The second way is usually easier.<\/p>\n<p>The greatest advantage of using a strategy class instead of strategy object is that you will only ever have and need one instance, which is the class itself. You don\u2019t need to make instance objects from the class.<\/p>\n<p>Again, though, you only should use strategy classes if the strategy stores no state. Otherwise, you\u2019re creating global state which can be altered in a different location unknowingly, changing the meaning of the strategy when you don\u2019t want it to.<\/p>\n<h2><b>Notes On Design<\/b><\/h2>\n<p>If you want to enforce the idea of the only instance being the class itself, you can give it an <code>__init__()<\/code> method that simply raises some sort of exception. I haven\u2019t put a lot of thought into is, and I\u2019m not sure if any of the built-in exceptions are good for this.<\/p>\n<p>Prefer static methods over class methods, since it makes it \u201charder\u201d to access class attributes for potential mutation, since class methods can use <code>cls<\/code> instead of the actual class name. It simply discourages using the idea for situation that it isn\u2019t meant for.<\/p>\n<h2><b>Other Languages<\/b><\/h2>\n<p>For other languages that can\u2019t use classes as if they\u2019re objects the way Python can, you can simply use the Singleton Pattern on the class, as mentioned earlier.<\/p>\n<h2><b>Outro<\/b><\/h2>\n<p>That\u2019s my new idea. If it\u2019s not so new, someone tell me, please.<\/p>\n<p>What do you think? Does it have merit? Or does it break from the norms of OO enough that it should generally be ignored instead?<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/programmingideaswithjake.wordpress.com\/2015\/06\/06\/strategy-pattern-sans-objects-and-functions\/\">Strategy Pattern Sans Objects and Functions<\/a> from our <a href=\"http:\/\/www.webcodegeeks.com\/wcg\/\">WCG partner<\/a> Jacob Zimmerman at the <a href=\"http:\/\/programmingideaswithjake.wordpress.com\/\">Programming Ideas With Jake<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>As many of my readers will likely know, my favorite design pattern is the Decorator Pattern, but I don\u2019t think I\u2019ve mentioned what my second favorite pattern is. This is understandable, as I have a difficult enough time picking favorites usually, let alone second favorites. Well, my second favorite is sort of a toss up &hellip;<\/p>\n","protected":false},"author":51,"featured_media":1651,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53],"tags":[],"class_list":["post-5297","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Strategy Pattern Sans Objects and Functions - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"As many of my readers will likely know, my favorite design pattern is the Decorator Pattern, but I don\u2019t think I\u2019ve mentioned what my second favorite\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Strategy Pattern Sans Objects and Functions - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"As many of my readers will likely know, my favorite design pattern is the Decorator Pattern, but I don\u2019t think I\u2019ve mentioned what my second favorite\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2015-06-15T13:15:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jacob Zimmerman\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/jacobz_20\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jacob Zimmerman\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/\"},\"author\":{\"name\":\"Jacob Zimmerman\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/f54a53cfb8523f4ef6012aa63f075c39\"},\"headline\":\"Strategy Pattern Sans Objects and Functions\",\"datePublished\":\"2015-06-15T13:15:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/\"},\"wordCount\":809,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/\",\"name\":\"Strategy Pattern Sans Objects and Functions - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"datePublished\":\"2015-06-15T13:15:40+00:00\",\"description\":\"As many of my readers will likely know, my favorite design pattern is the Decorator Pattern, but I don\u2019t think I\u2019ve mentioned what my second favorite\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/python\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Strategy Pattern Sans Objects and Functions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/f54a53cfb8523f4ef6012aa63f075c39\",\"name\":\"Jacob Zimmerman\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2dfdd9e2d35ed2224faf73968f8c597b5489fc345287e06e2571d3935a6bcc86?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2dfdd9e2d35ed2224faf73968f8c597b5489fc345287e06e2571d3935a6bcc86?s=96&d=mm&r=g\",\"caption\":\"Jacob Zimmerman\"},\"description\":\"Jacob is a certified Java programmer (level 1) and Python enthusiast. He loves to solve large problems with programming and considers himself pretty good at design.\",\"sameAs\":[\"https:\/\/programmingideaswithjake.wordpress.com\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/jacobz_20\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/jacob-zimmerman\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Strategy Pattern Sans Objects and Functions - Web Code Geeks - 2026","description":"As many of my readers will likely know, my favorite design pattern is the Decorator Pattern, but I don\u2019t think I\u2019ve mentioned what my second favorite","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:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/","og_locale":"en_US","og_type":"article","og_title":"Strategy Pattern Sans Objects and Functions - Web Code Geeks - 2026","og_description":"As many of my readers will likely know, my favorite design pattern is the Decorator Pattern, but I don\u2019t think I\u2019ve mentioned what my second favorite","og_url":"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2015-06-15T13:15:40+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","type":"image\/jpeg"}],"author":"Jacob Zimmerman","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/jacobz_20","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Jacob Zimmerman","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/"},"author":{"name":"Jacob Zimmerman","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/f54a53cfb8523f4ef6012aa63f075c39"},"headline":"Strategy Pattern Sans Objects and Functions","datePublished":"2015-06-15T13:15:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/"},"wordCount":809,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/","url":"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/","name":"Strategy Pattern Sans Objects and Functions - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","datePublished":"2015-06-15T13:15:40+00:00","description":"As many of my readers will likely know, my favorite design pattern is the Decorator Pattern, but I don\u2019t think I\u2019ve mentioned what my second favorite","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/python\/strategy-pattern-sans-objects-functions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Python","item":"https:\/\/www.webcodegeeks.com\/category\/python\/"},{"@type":"ListItem","position":3,"name":"Strategy Pattern Sans Objects and Functions"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/f54a53cfb8523f4ef6012aa63f075c39","name":"Jacob Zimmerman","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2dfdd9e2d35ed2224faf73968f8c597b5489fc345287e06e2571d3935a6bcc86?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2dfdd9e2d35ed2224faf73968f8c597b5489fc345287e06e2571d3935a6bcc86?s=96&d=mm&r=g","caption":"Jacob Zimmerman"},"description":"Jacob is a certified Java programmer (level 1) and Python enthusiast. He loves to solve large problems with programming and considers himself pretty good at design.","sameAs":["https:\/\/programmingideaswithjake.wordpress.com\/","https:\/\/x.com\/https:\/\/twitter.com\/jacobz_20"],"url":"https:\/\/www.webcodegeeks.com\/author\/jacob-zimmerman\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/5297","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/51"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=5297"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/5297\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/1651"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=5297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=5297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=5297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}