{"id":5086,"date":"2018-12-26T10:50:16","date_gmt":"2018-12-26T09:50:16","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=5086"},"modified":"2018-12-26T10:50:16","modified_gmt":"2018-12-26T09:50:16","slug":"to-test-a-system-isolate-side-effects-fagner-brack-medium","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2018\/12\/26\/to-test-a-system-isolate-side-effects-fagner-brack-medium\/","title":{"rendered":"To Test A System, Isolate Side-Effects \u2013 Fagner Brack \u2013 Medium"},"content":{"rendered":"<blockquote><p>Taking out side-effects is one of the best ways to build testable code<\/p><\/blockquote>\n<p>Source: <em><a href=\"https:\/\/medium.com\/@fagnerbrack\/how-to-mock-the-network-with-nock-and-javascript-to-test-parts-of-a-system-you-need-a-good-design-9432c9c05a30\">To Test A System, Isolate Side-Effects \u2013 Fagner Brack \u2013 Medium<\/a><\/em><\/p>\n<p>Stick to the Command-Query Separation principle and your life will be easier.<\/p>\n<p><!--more--><!--nextpage--><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">Taking out side-effects is one of the best ways to build testable code Source: To Test A System, Isolate Side-Effects \u2013 Fagner Brack \u2013 Medium Stick to the Command-Query Separation principle and your life will be easier.<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2018\/12\/26\/to-test-a-system-isolate-side-effects-fagner-brack-medium\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"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,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-5086","post","type-post","status-publish","format-standard","hentry","category-senza-categoria"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-1k2","jetpack-related-posts":[{"id":6316,"url":"https:\/\/monodes.com\/predaelli\/2019\/12\/15\/the-7-habits-of-highly-ineffective-programmers-young-coder-medium\/","url_meta":{"origin":5086,"position":0},"title":"The 7 Habits of Highly Ineffective Programmers &#8211; Young Coder &#8211; Medium","author":"Paolo Redaelli","date":"2019-12-15","format":"link","excerpt":"Are you committing crimes against code? From: The 7 Habits of Highly Ineffective Programmers - Young Coder - Medium The 7 Habits of Highly Ineffective Programmers Are you committing crimes against code? Matthew MacDonald Dec 5 \u00b7 4 min read Adapted from Pixabay It\u2019s always good to refactor old code,\u2026","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"Matthew MacDonald","src":"https:\/\/i0.wp.com\/miro.medium.com\/fit\/c\/58\/58\/1%2AsSR_cfRyUkBoM7L1pUYoYA.jpeg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":11473,"url":"https:\/\/monodes.com\/predaelli\/2024\/03\/13\/multi-threading-is-always-the-wrong-design\/","url_meta":{"origin":5086,"position":1},"title":"Multi-threading is always the wrong design","author":"Paolo Redaelli","date":"2024-03-13","format":false,"excerpt":"\u201cWe\u2019ll just do that on a background thread\u201d Source: Multi-threading is always the wrong design Well, really? Multi-threading is always the wrong design \u201cWe\u2019ll just do that on a background thread\u201d uNetworking AB Say what you want about Node.js. It sucks, a lot. But it was made with one very\u2026","rel":"","context":"In &quot;Tricks&quot;","block_context":{"text":"Tricks","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/tricks\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8536,"url":"https:\/\/monodes.com\/predaelli\/2021\/06\/25\/write-on-medium-no-thanks-youre-proprietary\/","url_meta":{"origin":5086,"position":2},"title":"Write on Medium? No thanks, you&#8217;re proprietary","author":"Paolo Redaelli","date":"2021-06-25","format":false,"excerpt":"Today I found this flashing notice on the daily mail I get from Medium.com: Let me be cristal clear: Write on Medium? No thanks, you're proprietary While I appreciate some tech blogs hosted by Medium, in the improbable event that I will become a tech-blog-star I will never rely on\u2026","rel":"","context":"In &quot;Ethics&quot;","block_context":{"text":"Ethics","link":"https:\/\/monodes.com\/predaelli\/category\/ethics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2021\/06\/write-on-medium.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2021\/06\/write-on-medium.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2021\/06\/write-on-medium.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2021\/06\/write-on-medium.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":6659,"url":"https:\/\/monodes.com\/predaelli\/2020\/02\/07\/why-most-code-sucks-better-programming-medium\/","url_meta":{"origin":5086,"position":3},"title":"Why Most Code Sucks &#8211; Better Programming &#8211; Medium","author":"Paolo Redaelli","date":"2020-02-07","format":"link","excerpt":"Why Most Code Sucks - Better Programming - Medium And what you can do to improve yours","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9329,"url":"https:\/\/monodes.com\/predaelli\/2022\/04\/30\/machine-learning-algorithms-cheat-sheet-by-anthony-barrios-accel-ai-medium\/","url_meta":{"origin":5086,"position":4},"title":"Machine Learning Algorithms Cheat Sheet | by Anthony Barrios | Accel.AI | Medium","author":"Paolo Redaelli","date":"2022-04-30","format":false,"excerpt":"Source: Machine Learning Algorithms Cheat Sheet | by Anthony Barrios | Accel.AI | Medium","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6512,"url":"https:\/\/monodes.com\/predaelli\/2020\/01\/25\/webassembly-modules-in-rust-an-introduction-ross-bulat-medium\/","url_meta":{"origin":5086,"position":5},"title":"WebAssembly Modules in Rust: An Introduction &#8211; Ross Bulat &#8211; Medium","author":"Paolo Redaelli","date":"2020-01-25","format":"link","excerpt":"How to generate & build a Wasm module, and import it into a React project Source: WebAssembly Modules in Rust: An Introduction - Ross Bulat - Medium","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/5086","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=5086"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/5086\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=5086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=5086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=5086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}