{"id":11857,"date":"2024-08-13T21:04:00","date_gmt":"2024-08-13T19:04:00","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=11857"},"modified":"2024-08-13T12:08:53","modified_gmt":"2024-08-13T10:08:53","slug":"huge-chances","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2024\/08\/13\/huge-chances\/","title":{"rendered":"Huge chances?"},"content":{"rendered":"\n<p>I know I know the Observer Pattern. I just wanted to be sure what was the best practice in Python. I found this:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>Risky Implementations: <\/strong>If the pattern is not implemented carefully, there are huge chances that you will end up with large complexity code.<\/p>\n<cite>From <a href=\"https:\/\/www.geeksforgeeks.org\/observer-method-python-design-patterns\/\">https:\/\/www.geeksforgeeks.org\/observer-method-python-design-patterns\/<\/a><\/cite><\/blockquote>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"510\" height=\"415\" data-attachment-id=\"11296\" data-permalink=\"https:\/\/monodes.com\/predaelli\/2024\/01\/29\/cestinato\/the-what\/\" data-orig-file=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2024\/01\/The-what.webp?fit=635%2C517&amp;ssl=1\" data-orig-size=\"635,517\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"The-what\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2024\/01\/The-what.webp?fit=300%2C244&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2024\/01\/The-what.webp?fit=510%2C415&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2024\/01\/The-what.webp?resize=510%2C415&#038;ssl=1\" alt=\"\" class=\"wp-image-11296\" style=\"width:395px;height:auto\" srcset=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2024\/01\/The-what.webp?resize=510%2C415&amp;ssl=1 510w, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2024\/01\/The-what.webp?resize=300%2C244&amp;ssl=1 300w, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2024\/01\/The-what.webp?w=635&amp;ssl=1 635w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/figure><\/div>\n\n\n<p>With all the complex code out there having &#8220;risky implementations&#8221; the observer pattern is one of the mildest. <\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">I know I know the Observer Pattern. I just wanted to be sure what was the best practice in Python. I found this: Risky Implementations: If the pattern is not implemented carefully, there are huge chances that you will end up with large complexity code. From https:\/\/www.geeksforgeeks.org\/observer-method-python-design-patterns\/ With all the complex code out there having&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2024\/08\/13\/huge-chances\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":11296,"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":"federated","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":[105,113],"tags":[],"class_list":["post-11857","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-fun","category-python"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2024\/01\/The-what.webp?fit=635%2C517&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-35f","jetpack-related-posts":[{"id":9512,"url":"https:\/\/monodes.com\/predaelli\/2022\/07\/25\/design-patterns-with-python-for-machine-learning-engineers-abstract-factory\/","url_meta":{"origin":11857,"position":0},"title":"Design Patterns with Python for Machine Learning Engineers: Abstract Factory","author":"Paolo Redaelli","date":"2022-07-25","format":false,"excerpt":"Photo by Omar Flores on\u00a0UnsplashLearn how you can structure your code by adopting design\u00a0patternsIntroductionA pattern describes a frequently recurring problem and proposesa possible solution in terms of class\/object organization thatgenerally found to be effective in solving the problem itself.Design Patterns are characterized by four main elements:Name: mnemonic reference that allows\u2026","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":3299,"url":"https:\/\/monodes.com\/predaelli\/2017\/08\/25\/micropython-python-for-microcontrollers\/","url_meta":{"origin":11857,"position":1},"title":"MicroPython &#8211; Python for microcontrollers","author":"Paolo Redaelli","date":"2017-08-25","format":false,"excerpt":"MicroPython is a lean and efficient implementation of the Python 3 programming language that includes a small subset of the Python standard library and is optimised to run on microcontrollers and in constrained environments. Sorgente: MicroPython - Python for microcontrollers Well, pretty neat, as they deliver it in 256k of\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/monodes.com\/predaelli\/category\/python\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":12976,"url":"https:\/\/monodes.com\/predaelli\/2025\/03\/15\/codon-high-performance-python-compiler\/","url_meta":{"origin":11857,"position":2},"title":"Codon: high-performance Python compiler","author":"Paolo Redaelli","date":"2025-03-15","format":false,"excerpt":"Codon: high-performance Python compiler Codon is a high-performance Python implementation that compiles to native machine code without any runtime overhead. Typical speedups over vanilla Python are on the order of 10-100x or more, on a single thread. Codon's performance is typically on par with (and sometimes better than) that of\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/monodes.com\/predaelli\/category\/python\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9674,"url":"https:\/\/monodes.com\/predaelli\/2022\/09\/28\/10-powerful-python-one-liners\/","url_meta":{"origin":11857,"position":3},"title":"10 Powerful Python One-Liners.","author":"Paolo Redaelli","date":"2022-09-28","format":false,"excerpt":"I shall Eiffellize those, one day or another: 10 Powerful Python One-Liners. Python one-liners can be just as\u2026 | by Ishaan Gupta | Sep, 2022 | Python in Plain English 10 Powerful Python One-Liners Python one-liners can be just as powerful as a long and tedious program written in another\u2026","rel":"","context":"In &quot;Agenda&quot;","block_context":{"text":"Agenda","link":"https:\/\/monodes.com\/predaelli\/category\/agenda\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2022\/09\/1jLSxNQvNqsYr02VB_wr96A.jpeg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2022\/09\/1jLSxNQvNqsYr02VB_wr96A.jpeg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2022\/09\/1jLSxNQvNqsYr02VB_wr96A.jpeg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1456,"url":"https:\/\/monodes.com\/predaelli\/2016\/04\/28\/sfepy-simple-finite-elements-in-python\/","url_meta":{"origin":11857,"position":4},"title":"SfePy: Simple Finite Elements in Python","author":"Paolo Redaelli","date":"2016-04-28","format":"link","excerpt":"That's pretty impressive \u00abSfePy: Simple Finite Elements in Python \u2014 Gallery of Examples\u00bb SfePy: Simple Finite Elements in Python SfePy is a software for solving systems of coupled partial differential equations (PDEs) by the finite element method in 1D, 2D and 3D. It can be viewed both as black-box PDE\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/monodes.com\/predaelli\/category\/python\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6318,"url":"https:\/\/monodes.com\/predaelli\/2019\/12\/15\/eiffels-conditional-expressions\/","url_meta":{"origin":11857,"position":5},"title":"Eiffel&#8217;s conditional expressions","author":"Paolo Redaelli","date":"2019-12-15","format":false,"excerpt":"The ternary conditional operator is a short-hand method for writing an if\/else statement. Does Python Have a Ternary Conditional Operator? Yes, it does. This remids me that Eiffel, at least \"ISE Eiffel\" does actually have conditional expressions that are the same: answer := if time < noon then \"Good morning\"\u2026","rel":"","context":"In &quot;Eiffel&quot;","block_context":{"text":"Eiffel","link":"https:\/\/monodes.com\/predaelli\/category\/eiffel\/"},"img":{"alt_text":"Jonathan Hsu","src":"https:\/\/i0.wp.com\/miro.medium.com\/fit\/c\/58\/58\/2%2A_KGzadiy9s83D4vzhsCyyg.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/11857","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=11857"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/11857\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media\/11296"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=11857"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=11857"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=11857"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}