{"id":1466,"date":"2015-09-30T21:29:38","date_gmt":"2015-09-30T20:29:38","guid":{"rendered":"https:\/\/www.entropywins.wtf\/blog\/?p=1466"},"modified":"2015-09-30T21:29:38","modified_gmt":"2015-09-30T20:29:38","slug":"phpmd-toomanypublicmethods-and-allow-underscores","status":"publish","type":"post","link":"https:\/\/www.entropywins.wtf\/blog\/2015\/09\/30\/phpmd-toomanypublicmethods-and-allow-underscores\/","title":{"rendered":"PHPMD: TooManyPublicMethods and allow-underscores"},"content":{"rendered":"<p>Earlier this month, <a href=\"http:\/\/phpmd.org\">PHPMD<\/a> <a href=\"http:\/\/phpmd.org\/download\/release\/2.3.0\/changelog.html\">2.3<\/a> was released. It contains several new features, including two that I added primarily for use in <a href=\"http:\/\/wikiba.se\/\">Wikibase<\/a>, the software behind <a href=\"https:\/\/www.wikidata.org\/\">Wikidata<\/a>. For a more general post on PHPMD and style checks in PHP, see <a href=\"https:\/\/www.entropywins.wtf\/blog\/2015\/02\/20\/phpcs-and-phpmd-my-experiences\/\">PHPCS and PHPMD: my experiences<\/a>.<\/p>\n<p><strong>New rule: TooManyPublicMethods<\/strong><\/p>\n<p>When I first tried out PHPMD, I found that I had to either disable its <a href=\"http:\/\/phpmd.org\/rules\/codesize.html#toomanymethods\">TooManyMethods<\/a> rule, or increase the limit significantly. The reason being that when you have your methods do only one thing, you can easily end up with many private methods. And while having 15 private methods is not suspicious, especially if they are small, having as many public methods (excluding getters and setters of course) is definitely a smell. The new <a href=\"http:\/\/phpmd.org\/rules\/codesize.html#toomanypublicmethods\">TooManyPublicMethods<\/a> rule added in 2.3 now allows setting different limits for public and non-public methods. This release also changed the default limit of TooMnyMethods from 10 to 25, to avoid encouraging people to not properly split their methods.<\/p>\n<p><strong>Support for underscores in test methods<\/strong><\/p>\n<p>In the Wikibase codebase, we use cameCaseMethodsNames in our production code. For this the <a href=\"http:\/\/phpmd.org\/rules\/controversial.html#camelcasemethodname\">CamelCaseMethodName<\/a> rule is great. In our tests we also follow this naming pattern, with one exception, we allow a single underscore when writing test methods such as testGivenNegativeValue_setAwesomenessThrowsException. The underscore separates the &#8220;given&#8221; and the &#8220;then&#8221; parts of the specification. The CamelCaseMethodName rule already had a <span class=\"blob-code-inner\"><span class=\"pl-s1\"><span class=\"pl-s\">allow-underscore<\/span><\/span><\/span> option that we could have used here. It is however not ideal for our use case, as it would allow underscores in non-test methods, and not restrict the location of the underscore, or indeed, the number of underscores.<\/p>\n<p>PHPMD 2.3 adds a new &#8220;allow-underscore-test&#8221; option to the CamelCaseMethodName rule, which allows for a single underscore in methods that start with &#8220;test&#8221;.<\/p>\n<p>Of course, this is still rather permissive. The naming convention I follow is much stricter: there need to be at least two words between &#8220;test&#8221; and the first undesrcore and at least two words after the underscore. Plus the first word after the underscore must start with a lowercase letter. You cannot restrict this yet with any released version of PHPMD, though I have\u00a0 <a href=\"https:\/\/github.com\/phpmd\/phpmd\/pull\/313\">new TestMethodName rule<\/a> submitted as a pull request.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Earlier this month, PHPMD 2.3 was released. It contains several new features, including two that I added primarily for use&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7,8],"tags":[363,195,361,364,317,336],"class_list":["post-1466","post","type-post","status-publish","format-standard","hentry","category-programming","category-software","tag-code-quality","tag-php","tag-phpmd","tag-quality-assurance","tag-wikibase","tag-wmde"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PHPMD: TooManyPublicMethods and allow-underscores - Blog of Jeroen De Dauw<\/title>\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.entropywins.wtf\/blog\/2015\/09\/30\/phpmd-toomanypublicmethods-and-allow-underscores\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHPMD: TooManyPublicMethods and allow-underscores - Blog of Jeroen De Dauw\" \/>\n<meta property=\"og:description\" content=\"Earlier this month, PHPMD 2.3 was released. It contains several new features, including two that I added primarily for use&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.entropywins.wtf\/blog\/2015\/09\/30\/phpmd-toomanypublicmethods-and-allow-underscores\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog of Jeroen De Dauw\" \/>\n<meta property=\"article:published_time\" content=\"2015-09-30T20:29:38+00:00\" \/>\n<meta name=\"author\" content=\"Jeroen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/JeroenDeDauw\" \/>\n<meta name=\"twitter:site\" content=\"@JeroenDeDauw\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeroen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2015\\\/09\\\/30\\\/phpmd-toomanypublicmethods-and-allow-underscores\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2015\\\/09\\\/30\\\/phpmd-toomanypublicmethods-and-allow-underscores\\\/\"},\"author\":{\"name\":\"Jeroen\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"headline\":\"PHPMD: TooManyPublicMethods and allow-underscores\",\"datePublished\":\"2015-09-30T20:29:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2015\\\/09\\\/30\\\/phpmd-toomanypublicmethods-and-allow-underscores\\\/\"},\"wordCount\":360,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"keywords\":[\"Code Quality\",\"PHP\",\"PHPMD\",\"Quality Assurance\",\"Wikibase\",\"WMDE\"],\"articleSection\":[\"Programming\",\"Software\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2015\\\/09\\\/30\\\/phpmd-toomanypublicmethods-and-allow-underscores\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2015\\\/09\\\/30\\\/phpmd-toomanypublicmethods-and-allow-underscores\\\/\",\"url\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2015\\\/09\\\/30\\\/phpmd-toomanypublicmethods-and-allow-underscores\\\/\",\"name\":\"PHPMD: TooManyPublicMethods and allow-underscores - Blog of Jeroen De Dauw\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#website\"},\"datePublished\":\"2015-09-30T20:29:38+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2015\\\/09\\\/30\\\/phpmd-toomanypublicmethods-and-allow-underscores\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2015\\\/09\\\/30\\\/phpmd-toomanypublicmethods-and-allow-underscores\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2015\\\/09\\\/30\\\/phpmd-toomanypublicmethods-and-allow-underscores\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHPMD: TooManyPublicMethods and allow-underscores\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/\",\"name\":\"Entropy Wins\",\"description\":\"A blog on Software Architecture, Design and Craftsmanship\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\",\"name\":\"Jeroen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"caption\":\"Jeroen\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/jeroendedauw\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/JeroenDeDauw\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHPMD: TooManyPublicMethods and allow-underscores - Blog of Jeroen De Dauw","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.entropywins.wtf\/blog\/2015\/09\/30\/phpmd-toomanypublicmethods-and-allow-underscores\/","og_locale":"en_US","og_type":"article","og_title":"PHPMD: TooManyPublicMethods and allow-underscores - Blog of Jeroen De Dauw","og_description":"Earlier this month, PHPMD 2.3 was released. It contains several new features, including two that I added primarily for use&hellip;","og_url":"https:\/\/www.entropywins.wtf\/blog\/2015\/09\/30\/phpmd-toomanypublicmethods-and-allow-underscores\/","og_site_name":"Blog of Jeroen De Dauw","article_published_time":"2015-09-30T20:29:38+00:00","author":"Jeroen","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/JeroenDeDauw","twitter_site":"@JeroenDeDauw","twitter_misc":{"Written by":"Jeroen","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.entropywins.wtf\/blog\/2015\/09\/30\/phpmd-toomanypublicmethods-and-allow-underscores\/#article","isPartOf":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2015\/09\/30\/phpmd-toomanypublicmethods-and-allow-underscores\/"},"author":{"name":"Jeroen","@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"headline":"PHPMD: TooManyPublicMethods and allow-underscores","datePublished":"2015-09-30T20:29:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2015\/09\/30\/phpmd-toomanypublicmethods-and-allow-underscores\/"},"wordCount":360,"commentCount":0,"publisher":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"keywords":["Code Quality","PHP","PHPMD","Quality Assurance","Wikibase","WMDE"],"articleSection":["Programming","Software"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.entropywins.wtf\/blog\/2015\/09\/30\/phpmd-toomanypublicmethods-and-allow-underscores\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.entropywins.wtf\/blog\/2015\/09\/30\/phpmd-toomanypublicmethods-and-allow-underscores\/","url":"https:\/\/www.entropywins.wtf\/blog\/2015\/09\/30\/phpmd-toomanypublicmethods-and-allow-underscores\/","name":"PHPMD: TooManyPublicMethods and allow-underscores - Blog of Jeroen De Dauw","isPartOf":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#website"},"datePublished":"2015-09-30T20:29:38+00:00","breadcrumb":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2015\/09\/30\/phpmd-toomanypublicmethods-and-allow-underscores\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.entropywins.wtf\/blog\/2015\/09\/30\/phpmd-toomanypublicmethods-and-allow-underscores\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.entropywins.wtf\/blog\/2015\/09\/30\/phpmd-toomanypublicmethods-and-allow-underscores\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.entropywins.wtf\/blog\/"},{"@type":"ListItem","position":2,"name":"PHPMD: TooManyPublicMethods and allow-underscores"}]},{"@type":"WebSite","@id":"https:\/\/www.entropywins.wtf\/blog\/#website","url":"https:\/\/www.entropywins.wtf\/blog\/","name":"Entropy Wins","description":"A blog on Software Architecture, Design and Craftsmanship","publisher":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.entropywins.wtf\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7","name":"Jeroen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","caption":"Jeroen"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g"},"sameAs":["https:\/\/www.linkedin.com\/in\/jeroendedauw\/","https:\/\/x.com\/https:\/\/twitter.com\/JeroenDeDauw"]}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p74TBF-nE","jetpack-related-posts":[{"id":1401,"url":"https:\/\/www.entropywins.wtf\/blog\/2014\/09\/02\/wikibase-datamodel-1-0\/","url_meta":{"origin":1466,"position":0},"title":"Wikibase DataModel 1.0","author":"Jeroen","date":"2014-09-02","format":false,"excerpt":"I'm happy to announce the 1.0 release of Wikibase DataModel.\u00a0Wikibase DataModel is the canonical PHP implementation of the Data Model at the heart of the Wikibase software. This is a big release which has been some time in the making, even though many additions have been split of and included\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1488,"url":"https:\/\/www.entropywins.wtf\/blog\/2015\/11\/14\/entitystore-and-termstore-for-wikibasewikidata\/","url_meta":{"origin":1466,"position":1},"title":"EntityStore and TermStore for Wikibase\/Wikidata","author":"Jeroen","date":"2015-11-14","format":false,"excerpt":"I'm happy to announce the public release of two new PHP libraries that provide services around Wikibase, the software behind Wikidata. They are called QueryR EntityStore and QueryR TermStore. Both these libraries provide persistence and lookup services for specific Wikibase data. These services are build on top of Doctrine DBAL,\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1421,"url":"https:\/\/www.entropywins.wtf\/blog\/2015\/02\/20\/phpcs-and-phpmd-my-experiences\/","url_meta":{"origin":1466,"position":2},"title":"PHPCS and PHPMD: my experiences","author":"Jeroen","date":"2015-02-20","format":false,"excerpt":"PHPCS (PHP Code Sniffer) detects violations against a specified coding standard. PHPMD (PHP Mess Detector) is a similar tool, though with more of a focus on metrics. In this post I'll go over how I started using them, and what I learned in the process. They are both very useful\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1306,"url":"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/14\/wikibase-datamodel-0-7-3-released\/","url_meta":{"origin":1466,"position":3},"title":"Wikibase DataModel 0.7.3 released","author":"Jeroen","date":"2014-04-14","format":false,"excerpt":"I am happy to announce the 0.7.3 release of Wikibase DataModel. Wikibase DataModel is the canonical PHP implementation of the Data Model at the heart of the Wikibase software. It is primarily used by the Wikibase MediaWiki extensions, though has no dependencies whatsoever on these or on MediaWiki itself. This\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/dm-complexity.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1484,"url":"https:\/\/www.entropywins.wtf\/blog\/2015\/11\/08\/wikidata-wikibase-json-dump-reader\/","url_meta":{"origin":1466,"position":4},"title":"Wikidata\/Wikibase Json Dump Reader","author":"Jeroen","date":"2015-11-08","format":false,"excerpt":"I've created a small PHP library to read from, and iterate through, Wikidata\/Wikibase JSON dumps. Wikidata is the free knowledge base that anyone can edit, and serves as a central data repository for Wikipedia and associated projects. Wikibase is a set of free open source software that powers Wikidata. You\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1327,"url":"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/","url_meta":{"origin":1466,"position":5},"title":"Wikibase DataModel: Entity v2","author":"Jeroen","date":"2014-04-30","format":false,"excerpt":"In a recent blog post I introduced the new Term classes introduced in Wikibase DataModel 0.7.3. It also outlined plans for making some big changes to the Entity class and it's derivatives. We have now taken the most difficult step in the process, which is already resulting in much nicer\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"dm-complexity","src":"https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/dm-complexity.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/1466","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/comments?post=1466"}],"version-history":[{"count":1,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/1466\/revisions"}],"predecessor-version":[{"id":1467,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/1466\/revisions\/1467"}],"wp:attachment":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/media?parent=1466"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/categories?post=1466"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/tags?post=1466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}