<?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 @zhisme :: signal over noise</title><link>https://zhisme.com/tags/debugging/</link><description>Recent content in Debugging on @zhisme :: signal over noise</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 10 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://zhisme.com/tags/debugging/index.xml" rel="self" type="application/rss+xml"/><item><title>The Constant Frozen at Boot Bug: A Ruby Exercise For An Interview</title><link>https://zhisme.com/articles/ruby-constant-frozen-at-boot/</link><pubDate>Wed, 10 Jun 2026 00:00:00 +0000</pubDate><guid>https://zhisme.com/articles/ruby-constant-frozen-at-boot/</guid><description>&lt;p>I like interview questions that come from real incidents instead of a puzzle book. You can&amp;rsquo;t google your way out of them, and the candidate&amp;rsquo;s reasoning maps directly onto the job. This one came from a payment service. It looks trivial. It is not.&lt;/p>
&lt;p>I&amp;rsquo;ve stripped the production code and rebuilt the same shape around a fake payment router. The bug is identical; the names are not.&lt;/p>
&lt;h2 id="the-question">The Question&lt;/h2>
&lt;blockquote>
&lt;p>Here is a class that routes payments to a gateway. Occasionally a charge is&lt;br>
written to the database with &lt;code>method_id = NULL&lt;/code>, even though the payment method&lt;br>
clearly exists in the &lt;code>payment_methods&lt;/code> table. No exception is raised. The only&lt;br>
thing that reliably fixes it is restarting the process. Find the bug.&lt;/p></description></item></channel></rss>