<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Debugging on Joseph Hale</title>
    <link>https://thehale.dev/topics/debugging/</link>
    <description>Recent content in Debugging on Joseph Hale</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    
    
    
    
      <lastBuildDate>Thu, 09 Jan 2025 12:00:00 -0700</lastBuildDate>
    
    <atom:link href="https://thehale.dev/topics/debugging/index.xml" rel="self" type="application/rss+xml" />
      <item>
        <title>Solving a Tricky Email Invoicing Bug</title>
        <link>https://thehale.dev/essays/email-invoicing-debugging/</link>
        <pubDate>Thu, 09 Jan 2025 00:00:00 +0000</pubDate>
        <guid>https://thehale.dev/essays/email-invoicing-debugging/</guid>
        <description>&lt;p&gt;Solved a really involved bug today&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;Some of our B2B customers were unable to email invoices to their clients, delaying incoming payments.&lt;/p&gt;&#xA;&lt;p&gt;My coworker traced the problem to the built-in Python function &lt;code&gt;email.utils.getaddresses&lt;/code&gt;, which was being used to extract email addresses from some text. In a test environment the function was returning the expected email addresses, but in production no emails were found.&lt;/p&gt;&#xA;&lt;p&gt;Adding to the confusion, Python&amp;rsquo;s &lt;code&gt;sys.version&lt;/code&gt; and &lt;code&gt;sys.implementation&lt;/code&gt; reported identical Python versions and builds in each environment. Additionally, scans of our code and our dependencies&amp;rsquo; code found no monkey-patches of the email parsing function. How could a built-in language function behave differently between apparently identical environments?&lt;/p&gt;</description>
      </item>
      <item>
        <title>Unit Tests: How to Fix a Lamp Without Bulldozing Your Hometown</title>
        <link>https://thehale.dev/essays/unit-testing-bulldozing-lamps/</link>
        <pubDate>Sat, 23 Sep 2023 00:00:00 +0000</pubDate>
        <guid>https://thehale.dev/essays/unit-testing-bulldozing-lamps/</guid>
        <description>&lt;h2 id=&#34;a-short-story-of-debugging-desperation&#34;&gt;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#a-short-story-of-debugging-desperation&#34; aria-hidden=&#34;true&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;&#xA;  A Short Story of Debugging Desperation&#xA;  &lt;a class=&#34;hash&#34; href=&#34;#a-short-story-of-debugging-desperation&#34; aria-label=&#34;Link to this heading&#34; title=&#34;Link to this heading&#34; data-copy-title=&#34;Copy a link to this heading&#34;&gt;&lt;/a&gt;&#xA;&lt;/h2&gt;&lt;p&gt;In &lt;em&gt;97 Things Every Programmer Should Know&lt;/em&gt;, &lt;a href=&#34;https://www.linkedin.com/in/thomasguest?utm_source=thehale.dev&amp;amp;utm_medium=newsletter&amp;amp;utm_campaign=unit-testing-bulldozing-lamps&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34;&gt;&lt;span&gt;Thomas Guest&lt;/span&gt;&lt;span aria-hidden=&#34;true&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 512 512&#34;&gt;&lt;!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --&gt;&lt;path d=&#34;M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l82.7 0L201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3l0 82.7c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160c0-17.7-14.3-32-32-32L320 0zM80 32C35.8 32 0 67.8 0 112L0 432c0 44.2 35.8 80 80 80l320 0c44.2 0 80-35.8 80-80l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-320c0-8.8 7.2-16 16-16l112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 32z&#34;/&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt; recounts a moment when he had identified a problematic piece of code in a large application, but had lost hours in recompilation time trying to experiment with the erring edge case.&lt;/p&gt;</description>
      </item>
  </channel>
</rss>
