<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Pavel Akhrameev on Medium]]></title>
        <description><![CDATA[Stories by Pavel Akhrameev on Medium]]></description>
        <link>https://medium.com/@p.akhrameev?source=rss-dbad72d5e2f7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ohaTm-Y-ulvK4msk.</url>
            <title>Stories by Pavel Akhrameev on Medium</title>
            <link>https://medium.com/@p.akhrameev?source=rss-dbad72d5e2f7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 03:23:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@p.akhrameev/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The SIGKILL That Made No Sense]]></title>
            <link>https://medium.com/@p.akhrameev/the-sigkill-that-made-no-sense-bbf4b9e816bc?source=rss-dbad72d5e2f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbf4b9e816bc</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[macos]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Pavel Akhrameev]]></dc:creator>
            <pubDate>Thu, 12 Nov 2026 14:30:29 GMT</pubDate>
            <atom:updated>2026-11-12T14:30:29.028Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>What macOS’s code-signature check was actually telling me</em></h4><figure><img alt="Medium article cover for ‘The SIGKILL That Made No Sense.’ Title text reads ‘The SIGKILL That Made No Sense,’ with SIGKILL in red. Eyebrow tag reads ‘DART · DART-LANG/SDK · RACE CONDITION.’ A circular photo of the author is connected by thin dashed and solid lines to five labeled terms: DartWorker, dlopen, plugin.aot, dart-lang/sdk, and SIGKILL (highlighted in red), tracing the crash’s causal chain. Byline: Pavel Akhrameev." src="https://cdn-images-1.medium.com/max/1024/1*9qm3E5iUFxF_6OOabVya2w.png" /></figure><p>`<strong>dart analyze</strong>` kept crashing. Not every time. Not on a schedule I could see.</p><p>Just often enough, while I was working on a <a href="https://github.com/bancolombia/dart-code-linter">dart-code-linter plugin</a>, that I’d stop what I was doing, retry, watch it pass, and move on without an answer.</p><pre>Analyzing example…<br>Bad state: The analysis server crashed unexpectedly</pre><p>That’s the whole message. No stack trace, no file name, nothing.</p><p>Retrying almost always worked, which is exactly the kind of bug that’s easiest to ignore and hardest to actually fix, because there’s no pressure forcing you to look closer.</p><blockquote>I looked closer anyway.</blockquote><h3><strong>The first thing I ruled out</strong></h3><p>My first guess was memory pressure. The analysis server is not a small process, and “crashed unexpectedly” is the kind of message a process gives when something kills it from outside rather than failing on its own terms. One report from someone hitting the same issue measured free RAM at the moment of the crash: about 68% free.</p><blockquote>Not memory pressure.</blockquote><p>So I went looking for the thing that actually kills a process from outside without it getting a say: the operating system itself. On macOS, that means crash reports, and macOS writes one every time.</p><h3><strong>What the crash reports actually said</strong></h3><p>Every report had the same shape:</p><pre>EXC_BAD_ACCESS<br>SIGKILL (Code Signature Invalid)<br>Termination namespace: CODESIGNING<br>Faulting thread: DartWorker</pre><p>The whole stack sat inside `<strong>dyld</strong>` and the Dart runtime’s own native loading code, with nothing from the plugin’s actual Dart code anywhere on it. Whatever was going wrong, it was happening before any Dart script even got a chance to run. `<strong>SIGKILL (Code Signature Invalid)</strong>` is macOS’s code-signing enforcement killing a process that tried to map a file whose signature no longer matches its contents. Something was changing a file out from under a process that had it open.</p><p>Crash reports don’t record which file was mapped when the kill happens, only its size and where in memory it sat. That size kept matching one specific file: a 14.5 MB `<strong>plugin.aot</strong>`, the AOT-compiled snapshot the analysis server builds for each analyzer plugin and loads with `<strong>dlopen</strong>`. I couldn’t prove it from the crash report alone. I needed something that named the file directly, and crash reports weren’t going to give me that.</p><figure><img alt="MacOS Console.app crash report showing EXC_BAD_ACCESS with SIGKILL (Code Signature Invalid), triggered on the DartWorker thread, termination reason CODESIGNING Invalid Page." src="https://cdn-images-1.medium.com/max/1024/1*EmSOGqRebpPmvNcm0px1sg.png" /><figcaption>The real crash report from this reproduction: SIGKILL (Code Signature Invalid), thread DartWorker.</figcaption></figure><p><em>(Re-running this same setup weeks later to get a fresh crash report for this article, two separate crashes came back with two different signatures: one `SIGKILL (Code Signature Invalid)`, like the one above, and one plain `SIGABRT` with `KERN_MEMORY_ERROR` instead. Same file, same `dlopen` call, same `DartWorker` thread. Which one you get depends on exactly where the reader’s page-in lands relative to the writer’s rewrite, which is the kind of detail that a genuine race condition produces.)</em></p><h3><strong>The line that named the file</strong></h3><p>macOS’s kernel log is more talkative than the crash reporter. Querying it for the time window around a crash turned up this:</p><pre>CODE SIGNING: process N[dartaotruntime]: rejecting invalid page at address 0x... from<br>offset 0x0 in file &quot;.../.dartServer/.plugin_manager/&lt;hash&gt;/bin/plugin.aot&quot;<br>(cs_mtime:... != mtime:...)</pre><p>That’s the file, named directly, with the kernel explicitly comparing the signature’s recorded modification time against the file’s actual modification time and finding a mismatch. Something was rewriting `<strong>plugin.aot</strong>` while another process still had it mapped and was trying to read pages from it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IdyhZHBA6Uieb1J9J3WWmA.png" /><figcaption>The kernel log line that named the file: plugin.aot, rejected mid-read.</figcaption></figure><p>I checked the existing GitHub issues at that point, half expecting someone to have already found and fixed this. I found two related issues. One had already been closed by an earlier fix that added the SDK version into the plugin’s generated entrypoint. The other, filed later, said the crash still reproduced with that fix in place. A closed issue that isn’t actually fixed is its own kind of signal: it meant the earlier fix addressed a symptom, not the mechanism.</p><h3><strong>Proving it, not just suspecting it</strong></h3><p>A hunch backed by log lines is still a hunch. I needed to make the crash happen on demand, on purpose, so I could be sure I understood the trigger rather than just the symptom.</p><p>One analysis server running alone never crashed, not once across repeated runs. It took two servers, both touching the same plugin cache folder, one rewriting `<strong>plugin.aot</strong>` while the other was loading it. I wrote a small script: append a line to the plugin’s source so both servers would need to recompile, start two `<strong>dart analyze</strong>` runs at the same instant and count how many crashed.</p><iframe src="https://flo.uri.sh/visualisation/30894764/embed" width="700" height="575" frameborder="0" scrolling="no"><a href="https://medium.com/media/abb586bb97887dc7346b9a53b26f45de/href">https://medium.com/media/abb586bb97887dc7346b9a53b26f45de/href</a></iframe><p>The control run is the one that mattered most. Same two SDK versions, same everything, except each one got its own cache folder instead of sharing one. Zero crashes. That isolated the real cause: the shared folder, not the SDK version mismatch by itself. And the dev build with the earlier fix applied crashed <strong><em>more</em></strong><em> often than the original bug, not less</em>.</p><blockquote><em>The fix made servers notice a stale cached snapshot sooner. More rewrites followed, and more rewrites meant more chances to collide.</em></blockquote><h3><strong>Root cause</strong></h3><p>Two things had to both be true for the crash to happen:</p><ol><li><strong>The write wasn’t atomic.</strong> The server deleted `<strong>bin/plugin.aot</strong>` and compiled the new one straight into that path. Anything already holding the old file open could end up reading a half-written new one.</li><li><strong>Different SDKs shared one folder.</strong> The cache folder’s name was derived only from the project’s path, not from which Dart SDK was using it. Two SDKs working on the same project wrote into the exact same folder, so a rebuild triggered by one SDK could clobber the file a different SDK had already mapped.</li></ol><p>Put those together and the SIGKILL stops being mysterious. It’s two processes racing to use the same file, one of them mid-write, and the kernel’s code-signature check catching the collision and killing the reader rather than letting it run on corrupted memory.</p><h3><strong>The fix</strong></h3><p>All of it lived in one file, `<strong>plugin_manager.dart</strong>`:</p><ul><li><strong>Write to a temporary file, then rename it into place.</strong> A rename within the same folder is atomic on both the filesystems this runs on. A process that already has the old file mapped keeps reading a complete, consistent file, even while a new one is being built next to it.</li><li><strong>Publish the dependency file before the snapshot, never after.</strong> This way a reader can only ever see a new dependency file paired with an old (but complete) snapshot, never the reverse.</li><li><strong>Stop deleting the old snapshot before compiling a new one.</strong> There’s no reason to remove a working file before its replacement exists.</li><li><strong>Key the cache folder by SDK version, not just by project path</strong>, so different SDKs working on the same project get separate folders and stop racing each other entirely.</li><li><strong>Sweep stale temporary files</strong> left behind by a compile that got killed partway through.</li></ul><h3><strong>Testing it honestly</strong></h3><p>I wrote ten new unit tests before writing the fix, covering the temporary-file path, what happens if a compile fails partway through, and the per-SDK folder naming. I confirmed each one actually failed against the old code first, because a test that’s never seen red isn’t proof of anything.</p><p>Then the race script again, against the fixed build:</p><iframe src="https://flo.uri.sh/visualisation/30895237/embed" width="700" height="575" frameborder="0" scrolling="no"><a href="https://medium.com/media/49e3850d6091fb982bac70cb9b5fddf5/href">https://medium.com/media/49e3850d6091fb982bac70cb9b5fddf5/href</a></iframe><p>That last row is the one I like most. It isolates what each half of the fix actually buys you: the atomic rename alone cuts the crash rate from 37-in-50 down to 4-in-50, and the per-SDK folder closes the remaining gap to zero. Neither change on its own was the whole story.</p><p>The full `<strong>pkg/analysis_server</strong>` test suite, 22,604 tests, passed clean afterward.</p><h3><strong>Getting it upstream, and where it actually stands</strong></h3><p>I opened a <a href="https://github.com/dart-lang/sdk/pull/64582">pull request</a> against `<strong>dart-lang/sdk</strong>`. Dart’s infrastructure mirrors GitHub PRs into <a href="https://dart-review.googlesource.com/c/sdk/+/563680">Gerrit code reviews</a> automatically, so from there it went through the SDK team’s normal review process: two approvals, a CI dry run, then submission. Total time from opening the review to merge was about nineteen hours.</p><figure><img alt="Gerrit code review page for CL 563680, ‘DAS plugins: Compile plugin AOT snapshots atomically, per Dart version,’ showing status Merged, submitted Oct 14, author Pavel Akhrameev, two +1 approvals from Keerti Parthasarathy and Samuel Rawlins, and all four submit requirements (Code-Review, GitHub-PR-Review, Code-Owners, Review-Enforcement) satisfied with 7 passing checks." src="https://cdn-images-1.medium.com/max/1024/1*MCA9EikFHienGatQW2KZgg.png" /><figcaption>CL 563680, merged</figcaption></figure><p><em>As of this writing, the fix (plus three further AOT-plugin fixes other contributors landed on top of it) is live in the </em><strong><em>3.15 beta channel</em></strong><em>, not yet in stable. Dart’s stable channel is still on 3.14.0. If you’re reading this later and want to know whether it’s reached you yet, check your SDK’s channel before assuming it has.</em></p><figure><img alt="GitHub comment from maintainer srawlins thanking Akhrameev, noting three additional AOT-plugin-launch fixes landed on top and that the combined work shipped in Dart 3.15.0–118.1.beta, followed by the issue being closed as completed." src="https://cdn-images-1.medium.com/max/1024/1*1JTSTB6kLns7spyuYtIPyQ.png" /><figcaption>The maintainer’s own confirmation: shipped in 3.15 beta, issue closed.</figcaption></figure><h3><strong>What stuck with me</strong></h3><p>The error message itself was <strong>never going to help</strong>. “Crashed unexpectedly” is what a process says when it has no idea either, because something outside it pulled the plug. The operating system’s own crash reports and kernel log had the real answer the whole time; the application-level error message was just noise sitting on top of it.</p><p>And the closed issue mattering more than the open one is a habit worth keeping. A ticket getting marked resolved tells you what someone believed at the time, not what’s actually true now. The report that said “this still happens” was the one worth chasing, and a controlled experiment, not another guess, is what turned that report into a fix.</p><h3>Author</h3><p>Pavel Akhrameev, Senior mobile developer, 13+ years.</p><p>Contributor to flutter/flutter, dart-code-linter, dart-lang/dart_style, dart-lang/sdk, VLC for iOS and more.</p><p><a href="https://github.com/Akhrameev">GitHub</a> · <a href="https://linkedin.com/in/akhrameev">LinkedIn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbf4b9e816bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When Tournament Armor Fits in Figma but Fails in Flutter]]></title>
            <link>https://medium.com/@p.akhrameev/when-tournament-armor-fits-in-figma-but-fails-in-flutter-2ac46e3a9983?source=rss-dbad72d5e2f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ac46e3a9983</guid>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[typography]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Pavel Akhrameev]]></dc:creator>
            <pubDate>Wed, 11 Nov 2026 09:14:08 GMT</pubDate>
            <atom:updated>2026-11-11T09:14:08.785Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>A compact story about golden tests, font drift, and false confidence.</em></h4><figure><img alt="Pixel-art Sir Em and Lady Elin in a tournament-themed scene introducing Figma versus Flutter rendering mismatch." src="https://cdn-images-1.medium.com/max/1024/1*tVzlknXN_3iFiT1YvruFwA.png" /></figure><p>Sir Em is preparing for a tournament.</p><p>Lady Elin helps him take careful measurements. In their world, the numbers are clean, the silhouette is balanced, and the armor sketch looks perfect. We treat this as our design truth: clear inputs, precise intent.</p><p>Then the order reaches us: the engineers.</p><p>We build the armor, wire checks, and compare outputs. Everything looks disciplined. The process is reproducible. The screenshots are aligned. The tests run.</p><p>And yet, something still feels wrong.</p><p>But let’s slow down…</p><figure><img alt="Story transition panel showing the characters before the technical investigation begins." src="https://cdn-images-1.medium.com/max/1024/1*1-wEWjYCyIhDbYdkxXf_Dg.png" /></figure><h3><strong>The promise of a golden test</strong></h3><p>To reduce visual regressions, we add golden tests. This is the right instinct. A stable baseline prevents accidental UI drift and gives fast feedback during delivery.</p><p>But in this story, our quality gate has a hidden bias.</p><p>Its “expected body” behaves more like an intentionally wide ogre mannequin than the real Sir Em.</p><p>That metaphor matters: a check can be technically consistent and still misaligned with user-facing reality.</p><figure><img alt="Wide ogre mannequin representing an over-broad golden-test expectation compared with the intended character shape." src="https://cdn-images-1.medium.com/max/1024/1*3JcHzRMGcSh36KfGnl0ncA.png" /></figure><h3><strong>Building with confidence</strong></h3><p>I implemented the comparison flow and expected the three worlds to converge:</p><ol><li>Figma reference export</li><li>Flutter golden render (`flutter_test`)</li><li>iOS Simulator capture</li></ol><p>The setup is controlled and reproducible in <a href="https://github.com/Akhrameev/golden-font-weight-sample">this repository</a>, with fixed dimensions and scripts:</p><ul><li>`1080x900` assets in `out/`</li><li>`tools/measure_vs_figma.py`</li><li>`tools/side_by_side.py`</li><li>`tools/zoom_squares.py`</li></ul><p>At this point, confidence is high. The machinery works.</p><figure><img alt="Forge artisan (author-looking) working on implementation, symbolizing engineering setup and automated comparison pipeline." src="https://cdn-images-1.medium.com/max/1024/1*92PC1hKafr2Ts40NqMpNaA.png" /></figure><h3><strong>The split: same magnitude, opposite direction</strong></h3><p>When we inspect typography behavior, the story diverges:</p><ul><li>Golden vs Figma trends heavier.</li><li>Simulator vs Figma trends lighter.</li><li>Aggregate pixel diff appears almost equal.</li></ul><p>From `out/stems_vs_figma.json` in this setup:</p><ul><li>Golden vs Figma pixel diff: `7.796%`</li><li>Simulator vs Figma pixel diff: `7.827%`</li></ul><p>So the headline number says “<strong>almost the same</strong>.”</p><p>But the direction says “<strong>not the same at all</strong>.”</p><figure><img alt="Similar overall diff percentages increasing total difference of what we need and what we compare. Sad forge artisan (author) looks at result code." src="https://cdn-images-1.medium.com/max/1024/1*FivFIBbs7sW8rccDcHTdEg.png" /></figure><p>This is the exact trap: one metric reports magnitude, while your product experience depends on shape and direction.</p><figure><img alt="Side-by-side visual comparison of 3 renderings. With Sir Em asking whether he is represented as letter." src="https://cdn-images-1.medium.com/max/1024/1*jrrnwJCv1-GGNoq6rF0R_A.png" /></figure><h3><strong>What users actually feel</strong></h3><p>In golden space, Sir Em’s armor looks wider and heavier, so he adjusts for that expected fit.</p><p>In runtime, the fit shifts the other way — <strong>tighter</strong>, thinner, less forgiving.</p><p>Yes, the tournament still happens.</p><p>Yes, from far away, this can look like success.</p><p>But comfort, confidence, and visual fidelity are not fully restored. That is the real production state many teams recognize: shipped, compensated, still imperfect.</p><p>This is where “<strong>false confidence</strong>” appears.</p><p>The gate passed. The experience did not fully pass.</p><figure><img alt="Close comparison of letter weight showing opposite rendering direction between golden output and simulator output." src="https://cdn-images-1.medium.com/max/1024/1*NYfP0NNu-bCXR7_uaxRKuA.png" /><figcaption>I am sure you also see the difference. At least in “weights”.</figcaption></figure><h3><strong>The engineer’s emotional tax</strong></h3><p>There is also a human layer in this workflow.</p><p>You do the right things: define baselines, automate checks, keep deterministic assets, investigate diffs. Then you discover that a clean result in one environment can hide discomfort in another.</p><p>That gap creates friction: not chaos, not failure — but persistent, low-grade uncertainty.</p><h3><strong>What changed in our practice</strong></h3><p>We did not abandon golden tests.</p><p>We changed what “good enough” means.</p><h4><strong>Current working rules</strong></h4><ul><li>Keep aggregate pixel diff.</li><li>Add directional text-focused metrics.</li><li>Validate in runtime context (simulator/device), not only test raster.</li><li>Track typography by weight tiers for text-heavy UI.</li><li>Keep language bounded: “observed in this setup,” not universal claims.</li></ul><p>This shifts goldens from a final judge to one signal in a stronger evidence set.</p><h3><strong>Closing</strong></h3><p>Sir Em still enters the tournament. Lady Elin still stands beside him.</p><p>The release still goes out.</p><p>But now we read our evidence differently.</p><p>A single “acceptable” diff can hide opposite typography behavior.</p><p>And when typography carries meaning, that difference is not cosmetic.</p><p>Golden tests remain valuable.</p><p>They just become far more trustworthy when paired with directional analysis and runtime validation.</p><figure><img alt="Sir Em and Lady Elin in a calm outdoor ending scene after the investigation." src="https://cdn-images-1.medium.com/max/816/1*bQQL0GYdAm7SmvadbsAO2g.png" /></figure><h4>Scope note</h4><p>This article reports behavior observed in <a href="https://github.com/Akhrameev/golden-font-weight-sample/tree/main">this repository</a>’s controlled setup.</p><p>It does not claim universal behavior across all fonts, platforms, devices, or Flutter engine versions.</p><p>It is not a global law.</p><blockquote>That’s exactly my face when I realize something still can’t be made right.</blockquote><figure><img alt="Author with sad posture representing the emotional cost of unresolved rendering mismatch." src="https://cdn-images-1.medium.com/max/1024/1*Xts60jVdzmhnxoQxSVjPpA.png" /><figcaption>Figma ≠ Flutter. When you know why.</figcaption></figure><p>Investigation is inspired by an <a href="https://medium.com/bancolombia-tech/cutting-test-cycles-from-days-to-hours-lessons-from-scaling-golden-tests-at-bancolombia-7f4c8a46a08e?sharedUserId=p.akhrameev">article</a> by <a href="https://medium.com/u/e09c9322790b">Juan Diego Campuzano</a> about <a href="https://pub.dev/packages/bc_golden_plugin">bc_golden_plugin</a>.</p><p>Additional comprehensive typography verification is still needed.</p><p>In this setup, “Figma ≠ Flutter” still holds for typography rendering.</p><blockquote>Golden tests are valuable — but for typography-heavy UI, they are most reliable when paired with directional analysis and runtime validation.</blockquote><h3>References</h3><ul><li><a href="https://github.com/Akhrameev/golden-font-weight-sample">My repository to reproduce exact numbers</a></li><li><a href="https://medium.com/bancolombia-tech/cutting-test-cycles-from-days-to-hours-lessons-from-scaling-golden-tests-at-bancolombia-7f4c8a46a08e?sharedUserId=p.akhrameev">Article about bc_golden_plugin</a></li><li><a href="https://github.com/flutter/flutter/issues/164146">Open issue in flutter repo about typography mismatch</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ac46e3a9983" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What _CADisplayLinkAssertion Taught Me About iOS 27]]></title>
            <link>https://medium.com/@p.akhrameev/what-cadisplaylinkassertion-taught-me-about-ios-27-af7f64dea8d6?source=rss-dbad72d5e2f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/af7f64dea8d6</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Pavel Akhrameev]]></dc:creator>
            <pubDate>Mon, 13 Jul 2026 16:17:03 GMT</pubDate>
            <atom:updated>2026-07-13T21:51:34.158Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Article cover for “What _CADisplayLinkAssertion Taught Me About iOS 27.” Dark background with a faint memory graph on the right; the node labeled _CADisplayLinkAssertion is highlighted in amber. Title in white text, author Pavel Akhrameev." src="https://cdn-images-1.medium.com/max/1024/1*U97i0-E3aTknkGwx7d-P3w.png" /><figcaption>The private class that kept a test failing on iOS 27 and passing everywhere else.</figcaption></figure><p>Last week a PR I submitted was merged into Flutter. I’m now an official contributor to the framework, which sounds more significant than it is, and less significant than the investigation behind it deserves.</p><p>It wasn’t a typo fix or a comma in a README. The investigation involved memory dumps compared across four iOS simulator versions and took more time than I’ll admit. The final change was two lines removed from a test file. Hours of digging for a two-line fix. That ratio is the part worth writing about.</p><p>What the fix does concretely: every developer running Flutter’s iOS unit tests against an iOS 27 simulator will no longer hit a false failure in <strong><em>VSyncClientTest</em></strong>. They won’t spend an afternoon chasing it. They won’t open a duplicate issue. They stay focused on whatever they were actually trying to build. That’s the value of fixing a broken test: it’s invisible by design.</p><p>Here’s how I found it.</p><p>A test was passing on iOS 18. Passing on iOS 26. Failing reproducibly on iOS 27.</p><p>No code changed between runs. No new public APIs. The <strong><em>CADisplayLink</em></strong> documentation said nothing. The answer was in a memory dump, in a class name that starts with an underscore.</p><h3>How I got here</h3><p>I wasn’t looking for this problem. I was working on a different Flutter issue, a <a href="https://github.com/flutter/flutter/pull/186028">UIKit rendering drift specific to iOS 26.0 and 26.0.1</a>. To track it reliably I built a small test harness: a Python script that rebuilds the Flutter engine and runs the iOS Objective-C unit tests against a matrix of simulator runtimes (iOS 18.6, 26.0, 26.0.1, 26.1, and 27.0), then prints a summary table.</p><pre>  OS           Tests    Failures   Skipped  Status<br>  ------------ -------- ---------- -------- ------<br>  iOS 26.0     147      0          0        PASS<br>  iOS 26.0.1   147      0          0        PASS<br>  iOS 26.1     147      0          0        PASS<br>  iOS 27.0     147      1          0        FAIL<br>  iOS 18.6     147      0          0        PASS</pre><p>Once I had that table, I couldn’t ship the iOS 26 fix and honestly say “no known issues.” So I looked at what was failing on iOS 27.</p><h3><strong>The test and what it was verifying</strong></h3><p>The failing test was <strong><em>testDisplayLinkIsDeallocatedOnTaskRunnerThread</em></strong> in <strong><em>VSyncClientTest</em></strong>. To understand it, a bit of context.</p><p>An <a href="https://github.com/flutter/flutter/pull/187164">earlier PR</a> fixed a retain cycle in <strong><em>VSyncClient</em></strong>. The original code had <strong><em>CADisplayLink</em></strong> targeting <strong><em>VSyncClient</em></strong> directly, a strong reference that kept both alive past their intended lifetime. The fix introduced <strong><em>VSyncClientRelay</em></strong> as a weak-proxy target, breaking the cycle.</p><p>The test verified the fix with two assertions after deallocation:</p><pre>XCTAssertNil(weakClient)       // VSyncClient is gone<br>XCTAssertNil(weakDisplayLink)  // display link is gone too</pre><p>Both passed on iOS 18 and iOS 26. On iOS 27, the first passed and the second did not. <strong><em>weakDisplayLink</em></strong> remained non-nil indefinitely. The test timed out.</p><h3><strong>The dead ends</strong></h3><p>My first instinct was the threading model. <strong><em>CADisplayLink</em></strong> must be invalidated on the thread where it was registered; violate that and the run loop keeps a strong reference. I worked through every invalidation sequence I could construct:</p><ul><li><strong>remove + invalidate</strong> on the task runner thread → permanent hold</li><li><strong>remove + invalidate</strong> on the main run loop → permanent hold</li><li><strong>isPaused = false + remove + invalidate</strong> in the same synchronous block → permanent hold</li></ul><p>The display server is out-of-process. There is no synchronous call sequence from the app side that forces it to release its references immediately. I checked the public API surface for <strong><em>CADisplayLink</em></strong> across iOS versions. Nothing new introduced that would explain the behavioral change.</p><p>That’s when I stopped reading code and started reading memory.</p><h3><strong>What the memory dump showed</strong></h3><p>Comparing memory graphs between iOS 26 and iOS 27 with the same test case, a new object appeared on iOS 27 in the reference chain holding <strong><em>CADisplayLink</em></strong> alive: <strong><em>_CADisplayLinkAssertion</em></strong>.</p><figure><img alt="Xcode memory graph debugger on iOS 26. The selected CADisplayLink node (highlighted in blue, right side) is referenced by the run loop infrastructure on the left: CFRunLoopSource and NSMachPort feeding into CADisplayTimer, which connects through CA::DisplayLink internals to CADisplayLink. TestViewController and UIWindow also hold references. No _CADisplayLinkAssertion node is present anywhere in the graph." src="https://cdn-images-1.medium.com/max/1024/1*aSV6CCwhJYkYOMcZ2oF-gw.png" /><figcaption><em>iOS 26: CADisplayLink held by the run loop and the test view controller. The reference chain is exactly what you’d expect from the public API.</em></figcaption></figure><figure><img alt="Xcode memory graph debugger on iOS 27 showing the complete CADisplayLink reference graph. An orange arrow added in annotation points to the _CADisplayLinkAssertion node in the lower half of the graph. The upper half shows familiar run loop references: CFRunLoopSource, NSMachPort, CADisplayTimer, and TestViewController. The lower half shows a new chain: BSMutableIntegerMap and VM QuartzCore __DATA feeding through NSMapTable and NSMapTable Storage into _CADisplayLinkAssertion and CADisplayLink." src="https://cdn-images-1.medium.com/max/1024/1*JgK_KQ_mYtJu8Y14IscZpw.png" /><figcaption><em>iOS 27, full graph: the run loop references are still there (top). The orange arrow marks _CADisplayLinkAssertion — a private QuartzCore class that does not appear in this graph on iOS 26.</em></figcaption></figure><figure><img alt="Xcode memory graph debugger on iOS 27 after Flutter has released all its managed objects. CADisplayLink (highlighted in blue, right side) is still alive, held by a chain running left to right: BSMutableIntegerMap and VM QuartzCore __DATA feeding through NSMapTable, NSMapTable Storage, _CADisplayLinkAssertion, NSMutableArray, and NSMutableArray Storage into CADisplayLink, which still points to CA::DisplayLinkItem. No Flutter objects appear in the graph." src="https://cdn-images-1.medium.com/max/1024/1*8h7CUV_pi4C6pRaOKb7egw.png" /><figcaption><em>After Flutter releases VSyncClient and all related objects, _CADisplayLinkAssertion remains in the reference chain. The display server holds this reference on its own timeline, with no public API to release it from application code.</em></figcaption></figure><p><strong><em>_CADisplayLinkAssertion</em></strong> is a private <strong><em>QuartzCore</em></strong> class new to iOS 27. It doesn’t appear in any header file or documentation, and there’s no public API to interact with it. But it’s visible in Xcode’s memory graph debugger as a named node in the reference chain holding <strong><em>CADisplayLink</em></strong> alive, and it holds that reference until an internal display server event arrives. There is no public API to trigger that event from application code.</p><p>The display link in the test was created, registered, and then immediately deallocated without ever being unpaused. On iOS 18 and iOS 26, the test passed. Whatever the display server did internally, it didn’t leave a named object holding the link in the memory graph. On iOS 27, <strong><em>_CADisplayLinkAssertion</em></strong> sits in the reference chain, waiting for an event that never comes.</p><p>This is not a leak in the application’s object graph. <strong><em>VSyncClient</em></strong> itself is correctly released on all iOS versions: <strong><em>weakClient == nil</em></strong> passes everywhere. The display server is doing its own internal bookkeeping on its own timeline, and there’s no API for the app to synchronize with it.</p><h3><strong>The fix</strong></h3><p>Once I understood what <strong><em>_CADisplayLinkAssertion</em></strong> actually represents, the fix was straightforward: the test was asserting the wrong thing.</p><p><strong><em>weakDisplayLink == nil</em></strong> was testing iOS-internal display server cleanup timing, not the retain cycle the test was designed to catch. The retain cycle is in Flutter’s object graph: between <strong><em>VSyncClient</em></strong>, <strong><em>VSyncClientRelay</em></strong>, and <strong><em>CADisplayLink</em></strong>. That cycle is broken by the <a href="https://github.com/flutter/flutter/pull/187164">weak-proxy pattern</a>, and <strong><em>weakClient == nil</em></strong> is the assertion that verifies it.</p><p>The fix removes the <strong><em>weakDisplayLink</em></strong> check, renames the test to <strong><em>testDeallocatesAfterRegistrationCompletes</em></strong>, and updates the documentation comment to explain why <strong><em>CADisplayLink</em></strong> may outlive <strong><em>VSyncClient</em></strong> on iOS 27+. The <strong><em>weakClient</em></strong> assertion is retained.</p><pre>// Before: two assertions<br>XCTAssertNil(weakClient)<br>XCTAssertNil(weakDisplayLink)  // ← removed: testing OS-internal timing<br><br>// After: one assertion, documenting the invariant being tested<br>XCTAssertNil(weakClient)       // ← the actual retain-cycle check</pre><p>Result:</p><pre>  OS           Before   Now<br>  iOS 18.6     Pass     Pass<br>  iOS 26.0     Pass     Pass<br>  iOS 26.0.1   Pass     Pass<br>  iOS 26.1     Pass     Pass<br>  iOS 27.0     Fail     Pass</pre><h3><strong>Why private class names matter</strong></h3><p>A lot of developers see <strong><em>_CADisplayLinkAssertion</em></strong> in a memory graph and skip past it. It starts with underscore, it’s not in any SDK header, there’s nothing to call on it.</p><blockquote>“Why does Apple show us this?”</blockquote><p>Because Apple changes behavior between OS versions, and the private object graph is sometimes the only record of what actually changed.</p><p>The pattern comes up more often than you’d expect:</p><p>The pattern predates iOS 27. Or even iOS. During the MRC-to-ARC transition around 2013, I was paying careful attention to retain counts: who owns what, how to avoid losing control of an object’s lifetime when <strong><em>autorelease</em></strong> pools could defer releases in non-obvious ways. I used <strong><em>retainCount</em></strong> calls to verify that objects weren’t held longer than expected.</p><p><em>What I kept finding:</em> CoreData would return objects whose retain count was higher than the code suggested, because private internal classes had registered them for their own bookkeeping, on their own timeline. It was easy to mistake that for a bug in your own code. The insight that era forced: a higher-than-expected retain count doesn’t always mean you have a leak. Sometimes the OS has registered your object with a private system and holds references you didn’t ask for and can’t control. That doesn’t mean memory is broken. It means you need to distinguish between what you can measure and what you can control. Don’t try to assert the latter when the API surface doesn’t support it.</p><p>In 2017, before Siri Shortcuts was publicly available, Apple invited some developers to implement it early. Yandex.Navigator (a C++/Swift/Obj-C++ hybrid, not a simple app) failed where others succeeded. The stack traces included underscored method names that pointed to the Apple-side bug. We patched Xcode locally, confirmed the fix, and reported it upstream. The feature launched on time.</p><p>In both cases, the private names weren’t noise. They were the signal.</p><h3><strong>What to do with this</strong></h3><p>If you have a test that passes on one iOS version and fails on another, and public APIs give you no explanation:</p><p>1. <strong>Compare memory graphs</strong> across the failing and passing versions. Look for objects that appear in one dump and not the other.</p><p>2. <strong>Read the class names.</strong> Even if you can’t call anything on them, their presence tells you where the OS is holding references.</p><p>3. <strong>Distinguish between “my object graph has a leak” and “the OS is holding a reference.”</strong> They require different responses: one is a bug fix, the other may be a test assumption that needs updating.</p><p><strong><em>_CADisplayLinkAssertion</em></strong> doesn’t appear in the memory graph on iOS 18 or iOS 26. On iOS 27, it does. And it stays. That’s the kind of behavior shift that doesn’t make it into release notes, that no static analysis tool will catch, and that a memory dump will show you in under a minute.</p><p>References:</p><p><a href="https://github.com/flutter/flutter/pull/188627"><em>The merged MR</em></a><em> and t</em><a href="https://github.com/flutter/flutter/pull/186028"><em>he MR I am still working on</em></a><em> (approved, waiting for being merged as well).</em></p><p>Author:</p><p><strong>Pavel Akhrameev</strong>, Senior mobile engineer. Contributor to flutter/flutter, dart-code-linter, dart-lang/dart_style, VLC for iOS.</p><p><a href="https://github.com/Akhrameev">GitHub</a> · <a href="https://linkedin.com/in/akhrameev">LinkedIn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af7f64dea8d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Grayscale Paradox: How I Solved an Impossible 62 MB to 4 MB File Size Problem]]></title>
            <link>https://medium.com/@p.akhrameev/the-grayscale-paradox-how-i-solved-an-impossible-62-mb-to-4-mb-file-size-problem-71aa4a0a3da4?source=rss-dbad72d5e2f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/71aa4a0a3da4</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[immigration]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Pavel Akhrameev]]></dc:creator>
            <pubDate>Wed, 03 Dec 2025 09:27:02 GMT</pubDate>
            <atom:updated>2025-12-03T09:27:02.312Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Grayscale Paradox: How I solved an impossible 62 MB to 4 MB file size problem</h3><h4>A deep dive into extreme PDF compression using Ghostscript, Python, and a surprising lesson in data science — all driven by a Canadian immigration application.</h4><figure><img alt="A side-by-side comparison of a color vs. a grayscale passport scan. The color version is labeled ‘3.86 MB’ with a green checkmark of success. The grayscale version is labeled ‘4.13 MB’ with a red cross of failure, visually demonstrating the Grayscale Paradox." src="https://cdn-images-1.medium.com/max/1024/0*QJgeRKbXowaUKtif" /><figcaption>he final, counter-intuitive result of my compression tests on a passport scan. (Image by author, using a public domain passport from Wikimedia Commons)</figcaption></figure><h3>Introduction: The Immigrants Digital Nightmare</h3><p>It all started with a problem familiar to anyone navigating modern immigration: a mountain of documents and a tiny digital doorway. For my family’s application for permanent residence in Canada through the <strong>Express Entry</strong> system, I had to combine two 31 MB passport scans into a single file under a brutally strict 4 MB limit.</p><p><strong>My mission:</strong> compress over 60 MB of essential color data by 94% without losing a single readable detail.</p><p>My first, logical attempt failed spectacularly. The solution was a journey into a bizarre technical mystery.</p><figure><img alt="The ‘Distracted Boyfriend’ meme humorously illustrates the author’s flawed initial choice. The man, labeled ‘Me’, is tempted by ‘Weirdly efficient Color Compression’ while ignoring the seemingly logical path of ‘Converting to Grayscale’." src="https://cdn-images-1.medium.com/max/750/1*OtkVVXmfZy2WpHik9_pVFw.jpeg" /><figcaption>My initial, flawed assumption personified. The logical path (grayscale) was tempting, but the data pointed elsewhere. (Meme created by author)</figcaption></figure><h3>The Silent Question That Haunts Every Applicant</h3><p>Before we dive into the data, let’s address the elephant in the room. As I battled with command-line tools and obscure compression settings, a single question echoed in my mind:</p><blockquote><strong>How does a non-technical person possibly get through this?</strong></blockquote><p>The portal felt designed for failure. The “Other Documents” category was a single 4 MB slot for multiple critical files. It would <strong><em>randomly disappear and reappear</em></strong>. The whole process felt less like an application and more like a Kafkaesque video game.</p><figure><img alt="The ‘Woman Yelling at a Cat’ meme depicts the author’s frustration. The yelling woman is labeled ‘Express Entry Portal,’ and the calm cat at the dinner table is labeled ‘My 3,000-dpi scans compressed to 180 KB each’." src="https://cdn-images-1.medium.com/max/680/1*Z1cw40OZfFqJNA0dtp-aMg.jpeg" /><figcaption>A fairly accurate representation of my emotional state while battling the portal’s illogical file size limits. (Meme created by author)</figcaption></figure><h3>The Paradox: A Surprising Failure, A Shocking Success</h3><p>My solution for the passports was a painstaking process of trial and error. Simple online tools just gave me blurry, oversized files. Apple’s Preview “Reduce file size” <strong><em>increased</em></strong> pdf size dramatically. To get the surgical precision I needed, I turned to a powerful open-source tool called <strong>Ghostscript</strong>. I ended up writing a <strong>Python</strong> script to automate the tests, allowing me to experiment with different settings rapidly.</p><p>The core of the solution was finding the magic number for the resolution. Here is the key snippet from my Python script that builds the final, successful command:</p><pre># The &#39;dpi_value&#39; is the magic number (e.g., 107)<br>command = [<br>    &#39;gs&#39;,<br>    &#39;-sDEVICE=pdfwrite&#39;,<br>    &#39;-dCompatibilityLevel=1.4&#39;,<br>    f&#39;-dColorImageResolution={dpi_value}&#39;, # the key!<br>    &#39;-dDownsampleColorImages=true&#39;,<br>    &#39;-dNOPAUSE&#39;, &#39;-dQUIET&#39;, &#39;-dBATCH&#39;,<br>    f&#39;-sOutputFile={output_path}&#39;,<br>    input_path<br>]<br><br># Then, run the command using Python&#39;s subprocess module<br>subprocess.run(command, check=True)</pre><p>The crucial parameter was <strong>-dColorImageResolution</strong>. For my 62 MB of scans, the magic number that got me just under the 4.1 MB limit with perfect clarity was a DPI of <strong>107</strong> . This is the kind of granular control that simple online converters just don’t offer.</p><blockquote><em>After all that work, I later discovered the ‘4 MB’ limit was actually closer to 4.1 MB, but at that point, I wasn’t taking any chances!</em></blockquote><p>But this process revealed a baffling discovery when I tested it at a standard 150 DPI setting:</p><ul><li><strong>Color Compression at 150 DPI:</strong> The result was a crystal-clear, full-color PDF at <strong>3.86 MB</strong>. ✅ A success.</li><li><strong>Grayscale Conversion at 150 DPI:</strong> The result was a sharp, black-and-white PDF that was <strong>4.13 MB</strong>. ❌ A failure.</li></ul><blockquote><em>How could a file with more information be smaller?</em></blockquote><blockquote>This made no sense</blockquote><h3>The Investigation: A Tale of Two Images</h3><p>To find out, I ran a controlled experiment on two very different images: a “clean” passport scan from Wikimedia and a “noisy” real-world photo I took of a sunrise in Yerevan. The results were stunning and provided the final answer.</p><figure><img alt="A vibrant photograph of the sun rising through the silhouette of the Church of Saint Sarkis in Yerevan, Armenia. The photo serves as the ‘noisy’ real-world test subject in the compression experiment." src="https://cdn-images-1.medium.com/max/1024/1*Dw-87ixU7QZuVQq5G_F1Eg.jpeg" /><figcaption>My ‘noisy’ test subject: a sunrise over Saint Sarkis Church in Yerevan. Its real-world complexity helped prove that the Grayscale Paradox isn’t a universal rule. (Image by author)</figcaption></figure><p>The data was clear. For the clean passport scan, the <strong>Grayscale Paradox</strong> was powerful. For the noisy sunrise photo, the opposite was true.</p><p>Here is the definitive data from my final test on a <strong>single passport page</strong>:</p><figure><img alt="A data graphic titled ‘Passport Page Analysis’ summarizing the experiment’s results. It shows the ‘Clean Brightness Channel’ is 773.8 KB and the ‘Artificial Grayscale’ is 1070.3 KB. The conclusion states: ‘PARADOX OBSERVED: The clean channel was 27.7% smaller!’" src="https://cdn-images-1.medium.com/max/1024/1*t-4nByrMrCFvgirtGj9JUA.png" /><figcaption>he definitive data from the passport page experiment. For this clean, scanned document, the ‘clean’ brightness channel was a stunning 27.7% smaller than the artificial grayscale version. (Image by author)</figcaption></figure><h3>The Why: The Secret Superpower of Color JPEG</h3><p>The answer lies in a clever trick in color JPEG compression called <strong>Chroma Subsampling</strong>. Because our eyes are less sensitive to color than to brightness, the algorithm saves a high-fidelity map of the brightness (the detail) and a very low-fidelity, heavily compressed map of the color. It’s a huge, “free” saving.</p><p>When you force a conversion to grayscale, you forfeit this superpower. Worse, the conversion can create subtle digital patterns that are actually less efficient to compress than the original smooth color data was.</p><h3>The Final Takeaway: Fighting the Digital Gatekeepers</h3><p>My journey left me with a final thought. I doubt that most paid online services could have navigated this. They offer simple presets. They don’t give you the surgical precision to find that perfect — — <strong><em>dpi 107</em></strong> setting. The open-source tool, while more complex, was ultimately more powerful.</p><blockquote>So how do non-technical people manage?</blockquote><p>My guess is they are forced to submit blurry, over-compressed files, hoping for the best.</p><p>The ultimate lesson is this: In the world of bureaucratic portals, the rules are not always logical. The content of your data is king, and the only way to find the truth is to <strong>test, test, and test again</strong>.</p><h3>Clarity Through Complexity</h3><p>In the end, my journey through immigration applications and digital sunrises taught me a valuable lesson.</p><blockquote><em>Sometimes, the clearest path isn’t the most logical one.</em></blockquote><p>Whether you’re chasing the sun through the Yerevan winter smog or wrestling a 60 MB file into a 4 MB box, the solution is rarely simple. It’s found in questioning assumptions, diving into the details, and sometimes, in discovering that a little more color can lead to a lot more clarity.</p><h3>Your Toolkit for the Fight</h3><p>For those interested in solving their own extreme PDF compression challenges, I’ve posted the full, reusable Python script on a public GitHub Gist. This command-line tool gives you the surgical precision that simple online converters lack.</p><figure><img alt="A screenshot of a computer terminal showing the command ‘brew install ghostscript’ being run. The output includes a warning message: ‘ghostscript 10.06.0 is already installed and up-to-date’." src="https://cdn-images-1.medium.com/max/1024/1*AAeIgO2XK0Bk7ZKOHp_bbA.png" /><figcaption>The first step for anyone wanting to replicate this process: installing the powerful open-source tool, Ghostscript, via Homebrew on macOS. (Image by author)</figcaption></figure><p><a href="https://gist.github.com/Akhrameev/ea90d61f003256ef0ad4fc00c273a8d0"><strong>▶️ Get the Full Python Script on GitHub Gist</strong></a><br><em>This Gist contains the complete, commented </em><strong><em>compress_pdf.py</em></strong><em> tool discussed in this article, ready for you to use in your own projects.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*go70Np0e2-KDI16FDDimHA.jpeg" /><figcaption>My final lesson on compression, from the top of Mount Arailer in Armenia. Some things, like this inflatable flamingo costume, shrink with remarkable success. (Photo by Sergey Shagalov)</figcaption></figure><p>My final lesson on compression, from the top of Mount Arailer: some things, like this inflatable flamingo costume, shrink with remarkable success. PDFs, on the other hand, require a bit more work. <strong>Happy shrinking!</strong></p><p><em>What’s the most absurd </em><strong><em>technical challenge</em></strong><em> you’ve had to overcome in a professional or personal project? Share your own “battle story” in the comments below!</em></p><p><em>Originally published at </em><a href="https://www.linkedin.com/pulse/grayscale-paradox-how-i-solved-impossible-62-mb-4-file-akhrameev-hxipe"><em>https://www.linkedin.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71aa4a0a3da4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Case of the Impossible Sudoku: How a LinkedIn Post, a Faulty AI, and My Notepad Uncovered a…]]></title>
            <link>https://medium.com/@p.akhrameev/the-case-of-the-impossible-sudoku-how-a-linkedin-post-a-faulty-ai-and-my-notepad-uncovered-a-df48e1728ec0?source=rss-dbad72d5e2f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/df48e1728ec0</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[critical-thinking]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[problem-solving]]></category>
            <dc:creator><![CDATA[Pavel Akhrameev]]></dc:creator>
            <pubDate>Fri, 21 Nov 2025 21:25:08 GMT</pubDate>
            <atom:updated>2025-11-21T21:34:01.270Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Case of the Impossible Sudoku: How a LinkedIn Post, a Faulty AI, and My Notepad Uncovered a 491-Solution Mystery</h3><p><strong><em>A single LinkedIn post, one confused AI, a Python script, and a shocking discovery of 491 solutions. This is the full story.</em></strong></p><figure><img alt="A banner image showing an unsolved Sudoku puzzle on the left and a solved version on the right. A large magnifying glass is in the center, bridging the two puzzles. Inside the lens of the magnifying glass is the text “A LinkedIn Mystery.”" src="https://cdn-images-1.medium.com/max/1024/0*xg-r-h3cggBCC27Q" /><figcaption>It all started here: the case that landed on my desk this morning via a LinkedIn post. A baffling puzzle with a hidden secret. Image by author.</figcaption></figure><blockquote><strong>Editor’s Note (November 2025):</strong> The following article is a real-time detective story that took place on a single afternoon, based on the AI models available at the time. It was a fascinating case that uncovered a Sudoku puzzle with a staggering 491 unique solutions. The original post went viral on LinkedIn, and I’ve imported it here to preserve that moment.</blockquote><blockquote>Of course, the world of AI moves at lightning speed. Just days after this investigation, Google released the even more powerful <strong>Gemini 3 Pro</strong> — a model that delivers significantly stronger reasoning performance, <a href="https://blog.google/products/gemini/gemini-3/">scoring 37.5% on Humanity’s Last Exam compared to 21.6% for Gemini 2.5 Pro</a>.</blockquote><blockquote>This begs the question: Would a more advanced AI partner have cracked the case differently? Or would it have fallen into the same logical traps?</blockquote><blockquote><strong>Consider this “Case File #1.”</strong> The sequel investigation is coming soon.</blockquote><p>This morning, my <strong>LinkedIn</strong> feed served up the perfect <a href="https://www.linkedin.com/posts/24oles_i-love-sudoku-but-recently-i-got-stuck-on-activity-7395258191053459456-N_5K?utm_source=share&amp;utm_medium=member_desktop&amp;rcm=ACoAAA-cLhwBpOEX9GniM6H4gDg8bt1-XVqfclI">case</a>.</p><p><a href="https://www.linkedin.com/in/24oles?trk=article-ssr-frontend-pulse_little-mention">Oles Skakalskyi </a>posted about a Level 8 Sudoku puzzle that had completely stumped both him and <strong>ChatGPT</strong>. The post was fresh, the mystery was live. As an AI enthusiast, I saw a challenge. Could I, partnered with Google‘s powerful <strong>Gemini Pro</strong>, crack the case in a single afternoon? The game was afoot.</p><h3>Chapter 1: The First Interrogation (1:00 PM)</h3><p>I presented the Sudoku to my new partner, <strong>Gemini Pro 2.5</strong>. The AI was fast and confident, but its testimony was full of holes. When I pressed for logic, it would offer proofs that relied on leaps of faith or simple, glaring errors, like confusing one part of the grid with another.</p><p>I dutifully followed its instructions, trying to make sense of its logic. My desk started to look like a real detective’s workspace, covered in notes, dead-end theories, and crossed-out contradictions.</p><figure><img alt="A photo of a piece of paper covered in handwritten notes and attempts to solve a Sudoku puzzle. An overlaid text box reads: “Exhibit A: The evidence of a flawed investigation. Each path the AI suggested led to a dead end.”" src="https://cdn-images-1.medium.com/max/1024/1*-CaagFj0MlWMLJlVYZeunQ.png" /><figcaption>Following the AI’s flawed logic led to a desk full of dead ends. The first piece of evidence was clear: the investigation itself was on the wrong track. Photo by author.</figcaption></figure><h3>Chapter 2: The Conspiracy Board (2:00 PM)</h3><p>After an hour of this, I was getting nowhere. Every lead was cold. Every theory had a broken alibi. The feeling was overwhelming. I was drowning in contradictory clues, and the only logical conclusion was that the case itself was illogical.</p><figure><img alt="The “Pepe Silvia” meme, showing a frantic Charlie Day from “It’s Always Sunny in Philadelphia” in front of a conspiracy board. The text reads: “Me trying to follow the AI’s ‘unbeatable logic’ to prove a single solution exists.”" src="https://cdn-images-1.medium.com/max/1024/1*sp6-cjxfin4UaDMwz0kWDA.png" /><figcaption>This was the moment the investigation started to feel less like a logical puzzle and more like a full-blown conspiracy.</figcaption></figure><p>This was the epiphany. We had been asking the wrong question. Our entire investigation was based on the premise of finding the single culprit, the one true path.</p><blockquote>What if there wasn’t just one?</blockquote><h3>Chapter 3: To the Forensics Lab (2:30 PM)</h3><p>It was time to bring in the heavy machinery. I switched roles from detective to forensic analyst and wrote a Python script to run a full analysis-an exhaustive, brute-force search for every possible valid solution. This tool would analyze the evidence without bias and give me the hard data.</p><figure><img alt="A screenshot of a Python code function named “backtrack” designed to find and count all possible Sudoku solutions, styled to look like a professional developer’s tool." src="https://cdn-images-1.medium.com/max/1024/1*TqAxM4YN3C_u1wHhuz2X7A.png" /><figcaption>When the witness is unreliable, you turn to the forensics lab. I built my own tool to stop theorizing and start analyzing the hard data. Image by author (adjusted result form <a href="https://carbon.now.sh/"><strong>https://carbon.now.sh/</strong></a>)</figcaption></figure><h3>The Verdict: A Conspiracy of Hundreds (2:45 PM)</h3><p>The forensics report came back, and the result was stunning. The case wasn’t just a simple mystery. It was a full-blown conspiracy. The puzzle didn’t have one solution. It didn’t have two.</p><figure><img alt="A graphic showing the number “491” in large, bold font on a textured background. Below it, smaller text reads: “Unique, Valid Solutions.”" src="https://cdn-images-1.medium.com/max/1024/1*BVsBDpQb7q8VFaPGYORxcQ.png" /><figcaption>The forensics report is in. The case wasn’t just flawed. It was a conspiracy. This is the number that explains everything. Image by author.</figcaption></figure><p>The mystery was solved. Neither <strong>ChatGPT</strong> nor <strong>Gemini Pro</strong> could solve it because it’s unsolvable by pure, step-by-step logic. An AI trying to deduce a single correct path is completely lost in a problem with this level of ambiguity.</p><h3>The Detective’s Final Report (3:00 PM)</h3><p>This investigation taught me something vital about working with AI. Our true value as human partners is to be wiser-to know when to stop, question the premise, and run a different kind of test.</p><p>So, to <a href="https://www.linkedin.com/in/24oles?trk=article-ssr-frontend-pulse_little-mention">Oles Skakalskyi </a>and everyone else who has felt frustrated by an AI’s nonsensical answer: you’re not going crazy. Sometimes, the tool isn’t failing. It’s telling you, in its own confusing way, that the problem you’ve given it is impossible. And that might be the most valuable answer of all.</p><p><strong>#AI #Gemini #ChatGPT #ProblemSolving #CriticalThinking #DataScience #Python</strong></p><h4>About the author</h4><p><em>If you enjoyed this investigation, </em><a href="http://www.linkedin.com/in/akhrameev"><em>let’s connect</em></a><em>! I’m passionate about diving deep into data, solving complex problems, and exploring the fascinating partnership between human intuition and artificial intelligence.</em></p><figure><img alt="A portrait of Pavel Akhrameev wearing an edited-on detective cap, with the text “Pavel Akhrameev, The Data Detective” below." src="https://cdn-images-1.medium.com/max/1024/1*8DsdYc0Bkgngc91Oq4uqLQ.png" /><figcaption><em>Putting on my detective hat to solve the next data mystery. </em><a href="http://www.linkedin.com/in/akhrameev"><em>Let’s connect!</em></a><em> </em>Image by author.</figcaption></figure><pre>Every mystery has its detective.<br>If you&#39;re passionate about uncovering the truth in complex data,<br>I&#39;d love to connect.</pre><p><em>Originally published at </em><a href="https://www.linkedin.com/pulse/case-impossible-sudoku-how-linkedin-post-faulty-ai-my-pavel-akhrameev-vnm5e"><em>https://www.linkedin.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df48e1728ec0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My AI Tester Snubbed a Marathon Champion — And Revealed the Future of QA]]></title>
            <link>https://medium.com/@p.akhrameev/my-ai-tester-snubbed-a-marathon-champion-and-revealed-the-future-of-qa-d30a03210e32?source=rss-dbad72d5e2f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/d30a03210e32</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[test-automation]]></category>
            <dc:creator><![CDATA[Pavel Akhrameev]]></dc:creator>
            <pubDate>Tue, 11 Nov 2025 12:12:19 GMT</pubDate>
            <atom:updated>2025-11-11T12:12:19.358Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>My AI Tester Snubbed a Marathon Champion — And Revealed the Future of QA</strong></h3><h4><strong>Moving beyond rigid, deterministic scripts to a more resilient, goal-oriented approach in mobile testing.</strong></h4><figure><img alt="Hero image for a tech article. Text reads: “An AI, a Marathon Champion, and the Future of Mobile Testing”. The logos for Strava and Qalti are shown on either side of an icon representing a decision path." src="https://cdn-images-1.medium.com/max/1024/1*CAHSby8uAnrNHRTryppZVQ.jpeg" /><figcaption>A surprising moment during a routine test revealed a profound shift in how we should think about mobile QA. Image by author.</figcaption></figure><blockquote>You can’t make this stuff up.</blockquote><p>I was running a simple validation test on the Strava app using an AI-powered automation tool <a href="https://qalti.com/">Qalti</a>. The goal was straightforward: open the app, scroll the feed, find any activity that hadn’t received a “kudo,” and tap the button to give one.</p><p>The test begins, the app opens, and the feed starts scrolling. And then, a new activity from the phenomenal Russian runner <a href="https://worldathletics.org/athletes/russia/iskander-yadgarov-14560334"><strong>Iskander Yadgarov</strong></a> pops into view. If you’re in the running world, you know him — Moscow Marathon winner, elite athlete, and famous for his viral videos of running <a href="https://www.instagram.com/reel/DQUN8R6COuo/">half-marathons at blistering speeds in Crocs</a>.</p><p>The AI correctly identifies his activity as a valid target. It scrolls to his kudos button, pauses for a moment… and then proceeds to completely ignore him, scrolling down to the <em>next</em> activity in the feed and giving the kudo to that person instead.</p><p>For a man with a legendary string of 2nd place finishes, the AI’s comedic timing was almost too perfect.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FMbpfrPgMm9M%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DMbpfrPgMm9M&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FMbpfrPgMm9M%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a4fac484b63ed612fa348949dc3f85ed/href">https://medium.com/media/a4fac484b63ed612fa348949dc3f85ed/href</a></iframe><h3>The Predictable Script vs. The Goal-Oriented AI</h3><p>My first reaction was laughter. My second, as a senior developer, was analysis.</p><p>Any experienced engineer knows that a well-written, deterministic script would have handled this differently. It would have predictably executed its instruction: “Find the <em>first</em> available kudos button and tap it.” Iskander would have gotten his kudo. The script would have passed, and the behavior would have been 100% repeatable.</p><figure><img alt="Meme depicting a person confidently pressing one button, and then smiling with a thumbs-up gesture. One button is labeled “Iskander” and the other “Sergey.” The caption below the buttons reads: “Decision, not dilemma.”" src="https://cdn-images-1.medium.com/max/500/1*hS3CInEfk3tS6dmubQL1wQ.jpeg" /><figcaption>For a goal-oriented AI, there’s no conflict, just multiple valid paths to a successful test. Meme by author.</figcaption></figure><p>But what I saw wasn’t a failure or a bug. It was a fundamentally different approach to automation.</p><p>The AI wasn’t operating on a rigid set of instructions; it was operating on a <em>goal</em>.</p><ul><li><strong>A traditional script thinks:</strong> “My instruction is to find element <strong><em>strava.kudos_button_white</em></strong> and then <strong><em>tap()</em></strong>. I will execute this on the first one I find.”</li><li><strong>The AI thinks:</strong> “My goal is to ‘give a kudo.’ I see two valid targets on the screen that match this goal. Both are acceptable outcomes. I will choose one to accomplish my goal.”</li></ul><p>This subtle distinction is everything. It’s the difference between a brittle, instruction-following machine and a resilient, problem-solving one.</p><h3>Why This Matters for Every Mobile Team</h3><p>We’ve all been there. You have a suite of perfectly written end-to-end tests. Then, a minor UI refresh ships. A button’s ID changes, a container view is refactored, or an A/B test shifts the layout. Suddenly, half of your “perfect” scripts are broken.</p><p>The maintenance burden of traditional test automation is a constant drag on velocity. This is because scripts are tied to the <em>implementation</em> of the UI, not the <em>intention</em> of the user.</p><p>A goal-oriented system, by contrast, is far more resilient. Because it perceives the screen visually, like a human, it’s not dependent on fragile selectors. It understands that a button is a button, regardless of what it’s named in the codebase. It can handle unexpected pop-ups, find its way around a changed layout, and, as my test showed, even choose between multiple valid options to achieve its objective.</p><p>It was a funny moment, but it was also a profound demonstration of a more intelligent, resilient way to ensure our apps work as intended. That’s the future of testing.</p><figure><img alt="Qalti logo" src="https://cdn-images-1.medium.com/max/1024/1*7HSMLl4roZ6v8dtKYF_TZg.png" /><figcaption>The test in this article was performed using Qalti. Learn more about their approach to resilient, goal-oriented iOS testing. Company logo.</figcaption></figure><p>This entire test was specified in plain English and run by <a href="https://qalti.com/"><strong>Qalti</strong></a>. It’s a powerful look at where the industry is heading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d30a03210e32" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Most Interesting Job I’ve Seen All Year (For a Trail Runner in Tech)]]></title>
            <link>https://medium.com/@p.akhrameev/the-most-interesting-job-ive-seen-all-year-for-a-trail-runner-in-tech-7f384b4d4ab2?source=rss-dbad72d5e2f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f384b4d4ab2</guid>
            <category><![CDATA[trailrunning]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[jobs]]></category>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[sports]]></category>
            <dc:creator><![CDATA[Pavel Akhrameev]]></dc:creator>
            <pubDate>Fri, 15 Aug 2025 19:38:50 GMT</pubDate>
            <atom:updated>2025-08-15T19:38:50.896Z</atom:updated>
            <content:encoded><![CDATA[<h4>It’s not just about AWS and AI; it’s about the rare and powerful intersection of passion and profession.</h4><figure><img alt="The author, Pavel Akhrameev, running on a trail at sunrise during the Cappadocia Ultra Trail in Turkey, with hot air balloons filling the morning sky behind him." src="https://cdn-images-1.medium.com/max/1024/1*-QjHtBmcUWqNPIDKgl9EcQ.jpeg" /><figcaption>My first race officially registered on ITRA — the Cappadocia Ultra Trail. A morning that reminded me what it feels like to be part of a global community. Photo by author.</figcaption></figure><blockquote>That photo is from a moment I felt a deep connection to the global trail running community. That sense of connection doesn’t happen by accident. It’s built on a digital foundation — the very results, rankings, and infrastructure this ITRA role is designed to manage and grow. It’s the code that stitches our individual efforts on the trail together.</blockquote><p>This isn’t just an abstract concept for me; I’m a user and a part of that digital foundation. The ITRA platform is what gives runners like me a place in the global community, turning a personal effort into a measurable, shared experience.</p><figure><img alt="A screenshot of Pavel Akhrameev’s public profile on the International Trail Running Association (ITRA) website, displaying his name, photo, and ITRA Performance Index score." src="https://cdn-images-1.medium.com/max/1024/1*i0r64qLEqn70GFuPFjaLuw.png" /><figcaption><em>My public ITRA profile. The score isn’t about being the fastest; it’s proof of participation and a testament to the platform that this role will help build. Screenshot by author.</em></figcaption></figure><p>Every so often, a job description pops up on my LinkedIn feed that gives me a jolt of recognition. Not just “Oh, I can do that,” but “Oh, I <em>get</em> that.” This week, it was a posting for a Digital Technology &amp; IT Manager at the <strong>International Trail Running Association (ITRA)</strong>.</p><p>As a developer who spends his weekends on the trails, this role is fascinating. It’s a leadership position that isn’t just about managing vendors and cloud partners; it’s about shaping the future of a sport I <strong><em>love</em></strong>.</p><p>It’s the details that make it special:</p><ul><li><strong>The Mission:</strong> You’re not optimizing a sales funnel; you’re supporting the infrastructure for a global community of trail runners.</li><li><strong>The Tech:</strong> It’s a modern stack — driving initiatives across AWS, data systems, and AI tools (they even mention <strong><em>DeepSeek</em></strong>).</li><li><strong>The “Plus”:</strong> The job description explicitly states, “Passion for trail running and outdoor sports is a strong plus.” <strong><em>This is the key</em></strong>. They aren’t just hiring a skillset; they are looking for a kindred spirit.</li></ul><figure><img alt="A screenshot of the job description for the Digital Technology &amp; IT Manager role at the International Trail Running Association (ITRA), outlining responsibilities in project management, technical leadership, and digital performance." src="https://cdn-images-1.medium.com/max/595/1*5QxbwUygkKeYnTK1jfVYqQ.png" /><figcaption>The official job summary. It’s rare to see AWS, AI, and “passion for trail running” in the same description.</figcaption></figure><p>Now, I’ll be the first to admit my background is more hands-on development than the 3+ years of IT management they’re looking for. But I know that perfect candidate is out there — someone who can architect an AWS solution and also appreciates the feeling of a pre-dawn start on a mountain trail.</p><blockquote>This is the kind of career path where work stops feeling like work.</blockquote><p>If that person is you, or someone you know, don’t wait. The application deadline is <strong>August 24th</strong>. This is a rare opportunity to merge a demanding technical career with a deep personal passion.</p><p>You can find the full details and application link here: <a href="https://form.typeform.com/to/TBc7FEAB">https://form.typeform.com/to/TBc7FEAB</a></p><p><em>Good luck. I’ll be cheering you on from the trails.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f384b4d4ab2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Put 4 LLMs Through an Engineering Bootcamp: A Pragmatic Guide to Professional Prompting]]></title>
            <link>https://medium.com/@p.akhrameev/i-put-4-llms-through-an-engineering-bootcamp-a-pragmatic-guide-to-professional-prompting-c869afb27676?source=rss-dbad72d5e2f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/c869afb27676</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Pavel Akhrameev]]></dc:creator>
            <pubDate>Thu, 14 Aug 2025 11:36:34 GMT</pubDate>
            <atom:updated>2025-08-14T11:36:34.656Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qz_ZO4wWmLw812t6" /><figcaption>My approach to code is forged on tracks like this one in Artashat, Armenia. It’s all about disciplined, structured effort. Image by author.</figcaption></figure><p>I discovered a principle at a 5km parkrun that I now apply to every engineering project I touch. While the photo below shows a successful run with both my daughters, my first attempt wasn’t so smooth.</p><figure><img alt="Two photos: The left shows a group of runners in a snowy Timiryazevsky Forest. The right shows the author running in the same park with two daughters — the younger in a baby carrier and the older in a running stroller." src="https://cdn-images-1.medium.com/max/1024/1*YZka_RBwJRcpyd8LkVxIng.png" /><figcaption>Parkrun Timiryazevskiy, March, 2022. Image by author.</figcaption></figure><p>When my daughter Kira was just 1.5 years old, we’d gone to a local 5km parkrun event, and running late, I made a snap decision. I left my son with the volunteers, scooped my daughter into my arms, and started running, determined to catch the last participants.</p><p>I thought I was fit enough. I was wrong. I missed the turnaround point, got completely exhausted, and ended up walking back to the finish line having run only 2km. The next week, we tried again, but this time with a strategy: we stayed with the event’s “tail walker” volunteer. <strong><em>We finished, and it was a joy.</em></strong></p><p>That experience taught me a fundamental truth: <strong>enthusiasm without a plan is just a fast path to exhaustion</strong>. Raw capability, whether it’s a father’s strength or a powerful AI’s processing power, is useless without the right strategy.</p><p>I see people making the same mistake with Large Language Models (LLMs). Their strategy is “just prompt it.” They treat these powerful AIs like a magic black box, get frustrated by the inconsistent output, and conclude it’s all hype.</p><p>They are wrong. An LLM is not a magic box; it’s a world-class athlete waiting for a good coach. My “coaching” playbook for this experiment comes directly from the excellent whitepaper on Prompt Engineering by Lee Boonstra and a team at Google. It’s a fantastic, no-nonsense guide that provides the theoretical foundation for what I wanted to test in the real world.</p><figure><img alt="The book cover with a title “Prompt Engineering”, Author: Lee Boonstra. Google logo on it." src="https://cdn-images-1.medium.com/max/1024/1*TXlT1aD3cvDqdolKP7Iq8w.png" /><figcaption>The “training manual” for this experiment: the Prompt Engineering white paper from Google, which provided the framework for these drills. Book cover edited by author.</figcaption></figure><p>So, armed with this playbook, I decided to become that coach. I took four AI “athletes”-the powerful cloud models <strong>Gemini 2.5 Pro</strong>, <strong>ChatGPT</strong> <em>(already GPT-5)</em>, and <strong>Claude Sonnet 4</strong>, along with a capable offline model running locally on my Mac, <strong>DeepSeek</strong>-and put them through a rigorous bootcamp. My goal was to measure the real-world impact of seven specific “coaching” techniques from the guide.</p><p>The results weren’t just improvements; they were transformations. Here’s the playbook.</p><h3>Drill #1: The Expert Persona (Role Prompting)</h3><p><em>A junior developer needs more than a textbook definition; they need a mentor.</em></p><ul><li><strong>The Simple Way:</strong> Explain the git rebase command.</li><li><strong>The Coached Way:</strong> Act as a Senior iOS Tech Lead mentoring a junior developer. Explain… using a simple analogy… and warn them about the one biggest ‘gotcha’.</li><li><strong>The Coach’s Verdict:</strong> Never ask for a simple explanation. Give your AI a role and a target audience. You’ll get a response crafted with purpose and empathy.</li></ul><figure><img alt="A comparison table with results of all LLMs in test. Gemini, ChatGPT and Claude showed great results. DeepSeek is ranked only 1 of 10." src="https://cdn-images-1.medium.com/max/1024/1*4Llff2K5qAd1kXsgnC1Qag.png" /><figcaption>Comparison table for the drill #1. Image by author.</figcaption></figure><h3>Drill #2: The Pacer (Few-Shot Prompting)</h3><p><em>In a race, a pacer provides a perfect, consistent stride to follow. For an AI, an example does the same.</em></p><figure><img alt="Two dogs meme: left one is strong with caption “Here is an example. Match it.”, right one is weak and has a caption “Give me JSON”." src="https://cdn-images-1.medium.com/max/650/1*kO4cKIpWk5pYdmE4Xw9Bdg.jpeg" /><figcaption>Prompt enhancement as a meme. Meme created by author on imgflip.com</figcaption></figure><ul><li><strong>The Simple Way:</strong> Extract the ticket number, status, and developer… and write a JSON.</li><li><strong>The Coached Way:</strong> Providing one example of the exact JSON I wanted.</li><li><strong>The Coach’s Verdict:</strong> When you need structured data, don’t tell the AI the format. Show it. One example is worth a thousand instructions.</li></ul><figure><img alt="Comparison table for all LLMs in test. Gemini, ChatGPT and Claude are rated 10/10. DeppSeek is scored 4/10." src="https://cdn-images-1.medium.com/max/1024/1*tdLs0DVQobb39EXVZja6HA.png" /><figcaption>Comparison table for the drill #2. Image by author.</figcaption></figure><h3>Drill #3: The Race Log (Chain of Thought)</h3><p><em>A marathon finish time is good. The mile-by-mile split data is better-it shows how you got there.</em></p><ul><li><strong>The Simple Way:</strong> Asking a simple logic problem.</li><li><strong>The Coached Way:</strong> Adding the simple phrase, Let’s think step by step.</li><li><strong>The Coach’s Verdict:</strong> Always ask your AI to show its work. The answer might be right, but the process is what gives you confidence.</li></ul><figure><img alt="Comparison table of all LLMs in test. All models are scored 9+ out of 10." src="https://cdn-images-1.medium.com/max/990/1*aMZUHp_KHY96hfWdGcKrVQ.png" /><figcaption>Comparison table for the drill #3. Image by author.</figcaption></figure><h3>Drill #4: The Sculptors Chisel (Specificity)</h3><p><em>Asking for “pros and cons” is like getting a lump of clay. Asking for a structured table is like using a chisel to create a sculpture.</em></p><ul><li><strong>The Simple Way:</strong> List the pros and cons of using Flutter.</li><li><strong>The Coached Way:</strong> …The output must be a markdown table with three columns: ‘Feature’, ‘Pro’, and ‘Con’.</li><li><strong>The Coach’s Verdict:</strong> Your time is your most valuable resource. Don’t do work the AI can do for you. Be specific about the final shape of the output you need.</li></ul><figure><img alt="Comparison table for all LLMs in test. Gemini, ChatGPT and Claude are scored 10/10. DeepSeek is scored 1/10." src="https://cdn-images-1.medium.com/max/1024/1*Q45pEJy0y7Iu3HcZ0nXngA.png" /><figcaption>Comparison table for the drill #4. Image by author.</figcaption></figure><h3>Drill #5, #6, and #7: The Finer Points of Coaching</h3><p>We ran three more drills that reinforced the core lesson:</p><ul><li><strong>Instructions over Constraints (“Focus On” vs. “Don’t Mention”):</strong> Telling the AI to focus on “safety, performance, and syntax” produced far more precise and potent summaries than telling it to “not mention Objective-C.” A positive target is better than a negative boundary.</li><li><strong>Context (“Here’s my problem…”): </strong>Asking for “three iOS libraries” gave a generic list. Providing the context “for a social media app with heavy image loading” resulted in the top three models all converging on the exact same , perfect stack: Alamofire, Kingfisher, and SnapKit. Context turns a generalist into a specialist.</li><li><strong>Conciseness (“Explain in a tweet”):</strong> Forcing a character limit is the ultimate test of synthesis. The top models produced pithy, powerful, and even witty summaries, while the less capable model struggled.</li></ul><h3>A Word on Our Local Athlete: The Hallucination Hazard</h3><p>Throughout these drills, the offline model, DeepSeek, revealed a critical lesson. While fast and private, it consistently failed on complex instructions. It gave incorrect technical definitions, ignored schemas, and in the most alarming case, <strong>confidently invented fake libraries with fake code examples</strong>.</p><p>This isn’t a failure of the model; it’s a critical coaching moment for us. The Endurance Engineer’s first principle is <strong>trust, but verify</strong>.</p><blockquote><em>A local model can be a phenomenal tool, but it requires rigorous supervision. For complex, high-stakes tasks, the maturity and reasoning power of the major cloud models are, for now, in a different class.</em></blockquote><h3>The Final Playbook: A Pragmatic Debrief</h3><p>After running all the drills, it’s clear that not all “coaching” techniques are created equal. My goal wasn’t just to follow theory; it was to measure real-world impact. While most prompts gave a decent baseline, some simple changes yielded massive improvements, while others proved less critical or even counterproductive for certain models. Here’s the drill-by-drill breakdown of what actually worked.</p><h4>Drill #1: Role Prompting — Verdict:</h4><p>Essential This was a game-changer. The simple prompt gave a dry definition of git rebase. The coached prompt, asking the AI to act as a “Senior Tech Lead,” transformed the output into a memorable, safe, and practical lesson with analogies and critical warnings.</p><ul><li><strong>Impact:</strong> <em>From a textbook answer to actionable wisdom. This is a non-negotiable technique for any explanatory task.</em></li></ul><h4>Drill #2: Few-Shot Prompting (for JSON) — Verdict: Essential for Production</h4><p>The simple prompt asking for JSON gave us inconsistent schemas (“ticket”, “number”, “ticket_number”), which would break any real application. Providing a single example (one-shot) forced the top-tier models into perfect, predictable alignment.</p><ul><li><strong>Impact:</strong> <em>The difference between a fragile prototype and a robust, production-ready system. If you need reliable structured data, this is mandatory.</em></li></ul><h4>Drill #3: Chain of Thought (“Let’s think step by step”) — Verdict:</h4><p>Highly Recommended for Logic For our simple logic problem, every model got the right answer without coaching. However, adding the “step by step” phrase forced them to show their work.</p><ul><li><strong>Impact:</strong> <em>It didn’t change the correctness but dramatically improved transparency and trustworthiness. It turns a black box into a glass box. For any task involving calculation or reasoning, this is a huge win for a minimal effort.</em></li></ul><h4>Drill #4: Specificity (Requesting a Table) — Verdict:</h4><p>High-Value for Efficiency The simple prompt gave a “wall of text.” The specific request for a markdown table delivered a clean, scannable, and immediately usable asset from the top models.</p><ul><li><strong>Impact:</strong> <em>This technique is a massive time-saver. It delegates the hard work of synthesis and formatting to the AI.</em></li></ul><h4>Drill #5: Instructions over Constraints — Verdict:</h4><p>A Subtle Improvement Telling the AI to “focus only on” specific features produced slightly more concise and targeted answers than telling it “do not mention” a certain word.</p><ul><li><strong>Impact:</strong> <em>This was the most subtle improvement. The baseline was already good. This is a good “pro-level” refinement for polishing an output, but not as fundamentally transformative as the first four drill</em>s.</li></ul><h4>Drill #6: Contextual Prompting — Verdict:</h4><p>Essential for Relevance This was, alongside role prompting, the most dramatic success. Asking for “iOS libraries” gave a generic list. Providing the context of “a social media app” resulted in a perfect, expert-level recommendation stack from the top models.</p><ul><li><strong>Impact: </strong><em>The difference between a generalist’s guess and a specialist’s diagnosis. </em><strong><em>Context is the most powerful tool you have for unlocking relevant, high-quality answers.</em></strong></li></ul><h4>Drill #7: Conciseness (The Tweet) — Verdict:</h4><p>A Useful Skill Test Forcing a short format is less about improving a standard output and more about testing the AI’s ability to synthesize. It’s a great tool for generating summaries or social media content.</p><ul><li><strong>Impact:</strong> <em>A good technique for a specific use case, but not a general-purpose improvement strategy.</em></li></ul><h3>The Final Scorecard: What Really Matters</h3><figure><img alt="Prompt techniques rated as S, A, B, C tiers according to value" src="https://cdn-images-1.medium.com/max/1024/1*ZjaSNq5Go6y0ewGHo2vKFA.png" /><figcaption>The final verdict from the bootcamp. A few S-Tier techniques delivered an outsized impact, turning a generic tool into a specialized consultant. Image created by author.</figcaption></figure><p>From this bootcamp, a clear hierarchy of high-impact techniques emerged:</p><h4><strong>S-Tier (Game-Changing):</strong> Context &amp; Role Prompting</h4><p>These are the non-negotiables. They consistently provided the most significant leap in the relevance, quality, and utility of the answers. Giving the AI a specific problem to solve (Context) and a persona to adopt (Role) is the fastest way to go from a generic response to an expert-level one.</p><h4><strong>A-Tier (Essential for Production):</strong> Few-Shot Prompting &amp; Specificity</h4><p>This tier is all about reliability and efficiency. If you’re building software, these are your go-to tools. Providing an example (Few-Shot) is the only way to guarantee a reliable data schema. Demanding a specific format (Specificity) saves you time by forcing the AI to do the hard work of synthesis.</p><h4><strong>B-Tier (High-Value for Trust):</strong> Chain of Thought</h4><p>This is your key to building trust and verifying logic. While the models often got the right answer without it, asking them to “think step by step” transformed the output from an unverifiable claim into a transparent, auditable process.</p><h4><strong>C-Tier (Useful Refinements):</strong> Instructions &gt; Constraints &amp; Conciseness</h4><p>These techniques are valuable for polishing an already good output. Using positive instructions provides better focus, and enforcing conciseness is a great skill test for generating summaries. They are useful tools in the toolbox, but not as fundamentally transformative as the higher tiers.</p><figure><img alt="Meme with a Boss and three people. Boss says: “I need quick AI results. No time for some complex ‘training’ plan”. Person #1 says: “Random prompts”. Person #2 says: “One’s gotta work”. Person #3 says: “Or… we could train it like a marathon for consistent results.”. Third person is thrown out of the window after this speech." src="https://cdn-images-1.medium.com/max/500/1*n9zieRJv2gHOfJHrDGo40Q.jpeg" /><figcaption>Be the person they should have listen to. Meme created by author on imgflip.com</figcaption></figure><p>The “Endurance Engineer” knows that success isn’t about one heroic sprint; it’s about applying disciplined, proven strategies. This bootcamp showed that a few targeted prompts can turn a powerful but raw technology into a precise and trustworthy co-pilot on your engineering journey.</p><blockquote><em>It’s a marathon, not a sprint. Now, go start your training.</em></blockquote><p><em>Originally published at </em><a href="https://www.linkedin.com/pulse/i-put-4-llms-through-engineering-bootcamp-pragmatic-guide-akhrameev-6c5ye"><em>https://www.linkedin.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c869afb27676" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Terrifying Truth About git rebase (and why its cousin is even scarier)]]></title>
            <link>https://medium.com/@p.akhrameev/the-terrifying-truth-about-git-rebase-and-why-its-cousin-is-even-scarier-d90571d2fdfb?source=rss-dbad72d5e2f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/d90571d2fdfb</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Pavel Akhrameev]]></dc:creator>
            <pubDate>Mon, 11 Aug 2025 11:00:36 GMT</pubDate>
            <atom:updated>2025-08-11T11:00:36.205Z</atom:updated>
            <content:encoded><![CDATA[<h4>A senior developer’s journey into the core philosophies of Git and Mercurial, and why understanding them is the key to fearless development.</h4><figure><img alt="A meme with text: “I fear no man”, “But that thing…”, “GIT REBASE”, “it scares me.”" src="https://cdn-images-1.medium.com/max/1024/0*hWLBzIzSrZHZw1vm" /><figcaption>Inspirational meme from Telegram channel THINGS PROGRAMMERS DO (translated by author)</figcaption></figure><p>I saw the joke from the cover of the article scrolling online and that top comment after this article hit a little too close to home:</p><blockquote><em>hg rebase is even worse.</em></blockquote><p>Every developer who read that felt a little shiver. We’ve all been there: staring at a terminal, about to rewrite history, feeling like a time traveler who might accidentally erase their own existence from the timeline.</p><p>It threw me back to 2014. I was a student at the faculty of Computational Mathematics and Cybernetics of Lomonosov Moscow State University, and I was completely fascinated by Git. I organized a seminar for other students based on the “<strong>Pro Git</strong>” book (<a href="https://git-scm.com/book/en/v2">it is available online for free</a>), where we dug into the internals-the “why” behind the commands.</p><p>It turns out, the fear of rebase in both Git and Mercurial (hg) comes from not understanding their fundamentally different philosophies about history.</p><h3>The Goal of Rebase: A Clean Story</h3><p>First, what are we even trying to do? The goal of a rebase is to create a clean, linear history. Instead of a messy merge commit that says “I awkwardly combined my work with the main branch,” rebase tells a new story: “It’s as if I did all my work on top of the very latest version of the main branch.”</p><p>It’s the difference between a rough draft and a polished final essay. But achieving that polish feels like a daunting task.</p><figure><img alt="Boromir meme with text “One does not simply… git rebase”" src="https://cdn-images-1.medium.com/max/980/1*s5bKMStvMh3d5WyeyexLMw.png" /><figcaption>The feeling every developer has the first time they try to rewrite history.</figcaption></figure><h3>Git Rebase: The Pragmatic Time Traveler</h3><p>When you run <strong>git rebase</strong>, Git does something both powerful and dangerous. It unstacks your commits, moves the base to the new spot, and then creates brand-new copies of your commits on top of it.</p><p>Your old commits are now “unreachable.” If you don’t have a reference to them, Git’s garbage collector will eventually sweep them away forever. This is where the fear comes from. You have truly rewritten history, and the old version is gone.</p><p>This is Git’s philosophy: it is a pragmatic, powerful tool that trusts you, the developer, completely. It gives you the sharpest possible knife and assumes you know how not to cut yourself.</p><figure><img alt="Emperor from Start Wars meme with text “Unlimited power!”" src="https://cdn-images-1.medium.com/max/700/1*3ZtvHWjjRkSrsT7D8pZvcw.png" /><figcaption>Git, handling you the ability to force-push a rebased branch. Image from Star Wars movie.</figcaption></figure><pre>Before rebase:<br><br>master   A---B<br>         \<br>feature   C---D<br><br>After rebase:<br><br>master   A---B<br>             \<br>feature       C&#39;--D&#39;<br><br>(Original commits C and D are now unreachable and will be garbage-collected)</pre><p><em>In Git, the old commits are abandoned, and new commits are created.</em></p><h3>Hg Rebase: The Anxious Historian (with a Broom)</h3><p>So why is hg rebase considered “worse”? On the surface, it seems safer.</p><p>Mercurial’s core philosophy is that you should <strong>never destroy history</strong>. When you run hg rebase, it also moves your commits to the new base. But instead of deleting the old commits, it marks them as “<strong>obsolete</strong>.” They are hidden from your normal view, but they are still there, lurking in a sort of commit graveyard.</p><blockquote><em>This sounds great! A safety net is built-in!</em></blockquote><p>The “worse” part comes from the user experience. You wanted a clean, simple history. Instead, Mercurial gives you a clean history with a hidden, messy attic full of ghosts. This can be confusing and adds mental overhead. It’s the anxious historian who can’t bear to throw anything away.</p><p>Now, for the experts in the room, yes, you can clean out this attic. The command hg strip will permanently remove these obsolete “ghost” commits. But notice the difference: it’s a separate, deliberate, and destructive action you have to take after the fact. Git’s destruction is part of the core command; Mercurial’s requires a second step.</p><figure><img alt="Marie Kondo getting ready to clean up. With text “Does it spark JOY?”" src="https://cdn-images-1.medium.com/max/845/1*N3Xzrs3QuBQP5v7nDRV9SQ.jpeg" /><figcaption>Me, looking at my obsolete change sets before running hg strip. <a href="https://styleupgroup.com/marie-kondo-is-great-but-we-wont-ask-you-if-your-item-sparks-joy/">Marie Kondo</a></figcaption></figure><pre>Before rebase:<br><br>master   A---B<br>         \<br>feature   C---D<br><br>After rebase:<br><br>master   A---B<br>             \<br>feature       C&#39;--D&#39;<br><br>(Original commits C and D are preserved but hidden and marked as &#39;obsolete&#39;)</pre><p><em>In Mercurial, the old commits are preserved but marked as obsolete, waiting to be stripped.</em></p><h3>The Real Lesson: Understand Your Tools</h3><p>This isn’t a post about whether Git or Mercurial is better. It’s a story about why deep understanding matters.</p><p>The fear of rebase isn’t a fear of the command itself. It’s the fear of a tool whose underlying philosophy you don’t understand.</p><ul><li>Git trusts you to be a pragmatic author, even if it means burning the rough drafts.</li><li>Mercurial trusts you to be a responsible historian, even if it means keeping a cluttered archive that you have to clean up later.</li></ul><p>Once you understand that fundamental difference, the fear disappears and is replaced by intentionality. You’re no longer a scared time traveler; you’re an author, choosing exactly how you want your story to be told. And that is a powerful place to be.</p><p><em>Originally published at </em><a href="https://www.linkedin.com/pulse/terrifying-truth-git-rebase-why-its-cousin-even-pavel-akhrameev-yxnlf"><em>https://www.linkedin.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d90571d2fdfb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Rubber Duck is Now a Chief Architect]]></title>
            <link>https://medium.com/@p.akhrameev/my-rubber-duck-is-now-a-chief-architect-8800844f4430?source=rss-dbad72d5e2f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/8800844f4430</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[future-of-work]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[tech-trends]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Pavel Akhrameev]]></dc:creator>
            <pubDate>Fri, 08 Aug 2025 19:50:30 GMT</pubDate>
            <atom:updated>2025-08-08T19:50:30.410Z</atom:updated>
            <content:encoded><![CDATA[<h4>A response to the new AI economy of “Time vs. Compute,” and how the real disruption is changing our entire workflow.</h4><figure><img alt="On a clean developer’s desk, a simple yellow rubber duck sits on the left, while a glowing blue holographic blueprint of a futuristic spaceship hovers on the right. Text “My Rubber Duck is Now a Chief Architect” on it." src="https://cdn-images-1.medium.com/max/1024/1*s3emV90KUJY5ZfJUwxg8qg.png" /><figcaption>The evolution of a developer’s workflow. The passive sounding board has become an active architectural partner. Image generated by the author using Gemini Imagen 4 (Preview)</figcaption></figure><p>My online friend and fellow developer/ultra-runner, <a href="https://medium.com/u/d3a532a5b820">Dragos Roua</a>, recently published a brilliant piece, <a href="https://medium.com/@dragosroua/the-single-most-important-ai-disruption-time-compute-120510d8b3c8">“The Single Most Important AI Disruption: Time &lt; Compute”</a>. He argues that the core constraint in our work has fundamentally shifted from the hours on the clock to the tokens we can feed an AI.</p><p>He’s absolutely right. The paradigm has changed. And it sparked a further thought for me: what if this new scarcity of “compute” is already becoming a non-issue? What if the real, lasting disruption is something deeper?</p><h3>The Disappearing Scarcity</h3><p>Dragos rightly asks,</p><blockquote><em>“Do I have enough tokens to run this prompt through GPT-4 with a 128k context?”</em></blockquote><p>This was the crucial question of yesterday. Not only because new GPT-5 is already released.</p><p>But the answer is changing faster than we can ask.</p><p>I’ve been working with <strong>Google’s Gemini 2.5 Pro</strong>, which offers a <strong>one-million-token</strong> context window — often for <strong>free</strong> . To put that in perspective, you can drop an entire codebase or a lengthy technical novel into the prompt and start a conversation. The scarcity of context, a key constraint just months ago, is rapidly evaporating.</p><p>This is like meticulously planning a marathon training schedule based on your heart rate, only to be handed a map for a multi-day mountain stage race. The scale of the game has changed entirely.</p><h3>The Real Disruption: From Monologue to Dialogue</h3><p>This brings me to the true, seismic shift in my daily work with complex development tasks. For years, the developer’s most trusted partner was a rubber duck.</p><p>The process was a lonely monologue: you’d hit a wall, explain your problem out loud to an inanimate object, and hope that in the process of verbalizing it, you’d find your own solution. It was a slow, solitary loop of <strong>think -&gt; code -&gt; debug -&gt; rethink</strong>.</p><p>That rubber duck on my desk has now been replaced by a chief architect.</p><p>My process is no longer a monologue; it’s a <strong>dialogue</strong>. I don’t just ask an LLM to write boilerplate. I use it as a sparring partner. My prompts have shifted from “write this for me” to “challenge me on this”:</p><p>✅ <em>“Here’s my proposed architecture for this feature. What are the three biggest flaws you see?”</em></p><p><em>✅ “What are two alternative approaches to solving this problem that I haven’t considered?”</em></p><p><em>✅ “Act as a security specialist. Review this code snippet and identify potential vulnerabilities or edge cases I might have missed.”</em></p><p>The AI isn’t just a faster typist; it’s a force multiplier for ideation. It allows me to explore more possibilities, short-circuit dead-end ideas before I invest hours in them, and ultimately, improve the quality of my thinking before a single line of code is written.</p><p>This changes everything. The bottleneck is no longer the time it takes to type the code. It’s the quality of the questions I can ask my new architect.</p><p>Dragos was right about the shift from time to compute. But as the cost of compute plummets toward zero, the real, lasting disruption is the upgrade of our own creative process-from a solitary craftsman to the director of an AI-powered design team.</p><p><em>I’m curious-how has your own process changed?</em></p><p><em>Originally published at </em><a href="https://www.linkedin.com/pulse/my-rubber-duck-now-chief-architect-pavel-akhrameev-twgve"><em>https://www.linkedin.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8800844f4430" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>