<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Code-Review on Brian Faust</title><link>https://vacua.dev/tags/code-review/</link><description>Recent content in Code-Review on Brian Faust</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Mon, 01 Jan 0001 00:00:00 +0000</lastBuildDate><atom:link href="https://vacua.dev/tags/code-review/rss.xml" rel="self" type="application/rss+xml"/><item><title>A Code Review Should Test the Decision, Not the Author</title><link>https://vacua.dev/thoughts/a-code-review-should-test-the-decision-not-the-author/</link><pubDate>Thu, 01 Aug 2019 00:00:00 +0000</pubDate><guid>https://vacua.dev/thoughts/a-code-review-should-test-the-decision-not-the-author/</guid><description>&lt;p&gt;One booking flow could trigger the same automatic wallet refill twice. The
first refill happened while booking. A later debit event ran the ordinary
refill check again.&lt;/p&gt;
&lt;p&gt;The retained correction wrote a short-lived marker per account containing the
pending amount. When a matching shipment debit arrived, it consumed the marker
and skipped one refill. Focused tests covered the expected sequence.&lt;/p&gt;
&lt;p&gt;That is enough to begin a review, not finish one. The decision is not “is this
cache helper elegant?” It is:&lt;/p&gt;</description></item><item><title>A Small Change Limits the States a Reviewer Must Hold</title><link>https://vacua.dev/thoughts/a-small-change-limits-the-states-a-reviewer-must-hold/</link><pubDate>Mon, 01 Jul 2019 00:00:00 +0000</pubDate><guid>https://vacua.dev/thoughts/a-small-change-limits-the-states-a-reviewer-must-hold/</guid><description>&lt;p&gt;A table needed four columns, a self-referencing constraint, and an index. The
first migration added everything in one schema callback. That was concise, but
production could already contain any subset of those objects.&lt;/p&gt;
&lt;p&gt;The repair was longer. Each column, constraint, and index became a separate
guarded migration. The constraint waited for its column. The index waited for
both of its columns. Rollback deliberately removed nothing because some schema
objects might predate the repair.&lt;/p&gt;</description></item></channel></rss>