<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Rails on @zhisme :: signal over noise</title><link>https://zhisme.com/tags/rails/</link><description>Recent content in Rails 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/rails/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><item><title>Ruby IO buffering</title><link>https://zhisme.com/articles/ruby-io-buffering/</link><pubDate>Fri, 16 Jan 2026 00:00:00 +0000</pubDate><guid>https://zhisme.com/articles/ruby-io-buffering/</guid><description>&lt;p>Your Kibana/Cloudwatch/Grafana have different timestamps, you don&amp;rsquo;t see recent logs from your application. Why is that? You may ask. Some QA reports that your application is not working/was not deployed, asking you to review the deploy process. Or even worse: asking your devops colleagues to &amp;ldquo;something went wrong&amp;rdquo; with last deployment could you check?&lt;/p>
&lt;p>You login into your shell running &lt;code>kubectl get pods&lt;/code> to verify timestamps update or checking Helm releases &lt;code>helm ls&lt;/code>. But everything seems fine, everything deployed. CI/CD is green, all timestamps updated. But yet. QA does not see the logs. Where have they gone?&lt;/p></description></item></channel></rss>