<?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 Vitalii on Medium]]></title>
        <description><![CDATA[Stories by Vitalii on Medium]]></description>
        <link>https://medium.com/@boxemailforwork?source=rss-9a58740539d4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*OCaO-6l3MATDtjHlCc3eiQ.jpeg</url>
            <title>Stories by Vitalii on Medium</title>
            <link>https://medium.com/@boxemailforwork?source=rss-9a58740539d4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 13:30:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@boxemailforwork/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[I automated everything and then stopped checking if it worked]]></title>
            <link>https://medium.com/@boxemailforwork/i-automated-everything-and-then-stopped-checking-if-it-worked-06ada5f983ce?source=rss-9a58740539d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/06ada5f983ce</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cronjob]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Vitalii]]></dc:creator>
            <pubDate>Tue, 06 Oct 2026 12:00:55 GMT</pubDate>
            <atom:updated>2026-10-06T12:00:55.078Z</atom:updated>
            <content:encoded><![CDATA[<p>There was a period where I was really proud of my setup. Every repetitive task had a script. Backups, deployments, health checks, certificate renewals, database cleanup, even Slack reminders for standup. All automated. All scheduled. All running on three servers without any human intervention.</p><p>I felt like I had reached devops nirvana.</p><p>Then my coworker asked me a simple question: “When was the last time you actually verified any of these are working?”</p><p>I opened my mouth to answer and nothing came out.</p><p>The honest answer was: I had no idea. Some of these scripts had been running for months. I assumed they were working because I wasnt getting errors. But I wasnt getting errors because most of them were configured to fail silently. Stderr went to /dev/null. Exit codes werent checked. Logs rotated into oblivion.</p><p>So I spent a Saturday auditing everything. Out of 23 scheduled tasks across three servers:</p><ul><li>19 were running fine</li><li>2 had been silently failing for weeks (a Python dependency broke after an OS update)</li><li>1 was running but producing empty output (the API it called changed its auth scheme)</li><li>1 had never run at all (typo in the cron expression — I wrote 0 2 * * 0–6 with an en-dash instead of a hyphen)</li></ul><p>Four out of 23. Thats a 17% failure rate. On tasks I trusted completely.</p><p><strong>The automation paradox</strong></p><p>The better your automation works, the less you look at it. The less you look at it, the longer failures go undetected. The longer failures go undetected, the more damage they cause.</p><p>Its a trap. You automate to save time, then you lose more time to undetected failures than you saved in the first place.</p><p><strong>What actually helps</strong></p><p>The answer isnt “check everything manually every day.” That defeats the purpose of automation.</p><p>The answer is monitoring that expects proof of success. Not “did the script start” but “did the script finish, and did it finish correctly.”</p><p>The simplest version of this: each script pings an external URL when it completes successfully. If the ping doesnt arrive on schedule, you get an alert. Takes about 30 seconds to add to an existing script.</p><p>The more sophisticated version: the script sends metadata with the ping. How long it took, how many records it processed, whether the output file is non-empty. The monitoring service can then alert on anomalies, not just absence.</p><p><strong>The uncomfortable truth</strong></p><p>Most developers I talk to have at least one critical scheduled task running without any monitoring. They know about it. They keep meaning to fix it. Its been on the todo list for months.</p><p>If thats you, go add monitoring to one job today. Just one. Pick the most important one — probably your database backup. It will take five minutes and you will sleep better tonight.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=06ada5f983ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Screenshot Problem Nobody Talks About: Consistency]]></title>
            <link>https://medium.com/@boxemailforwork/the-screenshot-problem-nobody-talks-about-consistency-427f1e39fd00?source=rss-9a58740539d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/427f1e39fd00</guid>
            <dc:creator><![CDATA[Vitalii]]></dc:creator>
            <pubDate>Fri, 02 Oct 2026 13:48:40 GMT</pubDate>
            <atom:updated>2026-10-02T13:48:40.877Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve been generating automated screenshots for about three years now, and the problem that cost me the most time isn’t rendering quality or speed. It’s consistency.</p><p>Take the same screenshot of the same URL twice, one minute apart, and you might get slightly different results. Font rendering varies with system load. Animations might be at different frames. Lazy-loaded images might or might not have loaded depending on timing. Cookie banners, chat widgets, notification bars — all nondeterministic.</p><p>This matters a lot when screenshots are part of your pipeline. If you’re doing visual regression testing, false positives from rendering inconsistency waste everyone’s time. If you’re generating social preview images, slight variations mean your cache never hits.</p><p>The approaches that actually helped me get consistent results:</p><p><strong>Disable animations.</strong> Inject CSS that sets * { animation: none !important; transition: none !important; } before capturing. This alone eliminated about 30% of my inconsistency issues.</p><p><strong>Block third-party scripts.</strong> Chat widgets, analytics, ad networks — all load at different speeds and inject different content on each page load. Block them via request interception if they’re not relevant to your screenshot.</p><p><strong>Wait explicitly, not implicitly.</strong> Instead of “wait 3 seconds and hope everything loaded,” wait for specific conditions: a particular element visible, a specific network request completed, a JavaScript variable set.</p><p><strong>Control the viewport precisely.</strong> Not just width and height — also device pixel ratio, timezone, locale, and color scheme preference (light/dark mode). All of these affect rendering.</p><p><strong>Use a fixed browser version.</strong> Chrome auto-updates can subtly change rendering between versions. Pin your Chromium version in CI or use a screenshot service that maintains consistency across captures.</p><p>The last point is what eventually pushed me toward using an API instead of managing my own browser instances. Maintaining a consistent rendering environment across deployments, server migrations, and OS updates was a constant tax. Every Chrome update was a potential “why do all the screenshots look slightly different” investigation.</p><p>Consistency in screenshots is one of those unsexy problems that eats time quietly. You don’t notice the cost until you add it up — hours spent investigating false diffs, re-running failed captures, debugging rendering differences that turned out to be environmental.</p><p>If you’re building anything that depends on predictable screenshot output, invest in consistency early. It only gets harder to retrofit.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=427f1e39fd00" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why My Screenshots Looked Different on Every Machine]]></title>
            <link>https://medium.com/@boxemailforwork/why-my-screenshots-looked-different-on-every-machine-4db7cfb5578c?source=rss-9a58740539d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/4db7cfb5578c</guid>
            <dc:creator><![CDATA[Vitalii]]></dc:creator>
            <pubDate>Wed, 16 Sep 2026 14:22:41 GMT</pubDate>
            <atom:updated>2026-09-16T14:22:41.204Z</atom:updated>
            <content:encoded><![CDATA[<p>I spent a full day convinced our screenshot pipeline had a rendering bug. The same URL, same viewport size, same browser version — and three different machines produced three visually different screenshots.</p><p>Turned out there was no bug. The machines were just… different.</p><h3>The font problem nobody warns you about</h3><p>Machine A ran Ubuntu with the default font packages. Machine B was a Mac with the full Apple font stack. Machine C was a Docker container with almost no fonts installed at all.</p><p>When a page specifies font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, sans-serif, each machine picks a different font from that list. Different fonts have different metrics — character widths, line heights, kerning. A heading that fits on one line on Mac wraps to two lines on Linux.</p><p>The screenshots were all “correct.” They were just rendering the page the way that machine would render it.</p><p>The fix wasn’t complicated but it took a while to figure out: install a consistent font set on every machine that runs screenshots. I went with Google’s Noto fonts — they cover most scripts and produce consistent metrics across platforms.</p><pre>apt-get install fonts-noto fonts-noto-cjk fonts-noto-color-emoji</pre><p>For Docker containers, this goes in the Dockerfile. Jumped from 12MB to 300MB image size, but the screenshots finally matched.</p><h3>Display scaling is invisible until it isn’t</h3><p>Next surprise: one machine was running at 2x device pixel ratio (Retina) and the others at 1x. A 1280×800 screenshot at 2x is actually 2560×1600 pixels. Same content, same layout, four times the pixels.</p><p>In Puppeteer or Playwright, this is controlled by deviceScaleFactor. If you don&#39;t set it explicitly, it defaults to whatever the host system uses. On a developer&#39;s Mac, that&#39;s usually 2. On a CI server, it&#39;s 1.</p><p>I now set it explicitly in every screenshot config:</p><pre>const context = await browser.newContext({<br>  viewport: { width: 1280, height: 800 },<br>  deviceScaleFactor: 1  // always explicit<br>});</pre><p>2x screenshots look sharper but quadruple your storage costs. Pick one and stick with it across all environments.</p><h3>The timezone that moved a chart</h3><p>This one was subtle. A dashboard page showed a line chart with dates on the x-axis. The data was the same, but the chart looked different because one machine was in UTC and another in America/New_York.</p><p>The chart library was formatting axis labels in local time. So the UTC machine showed data points at different positions on the x-axis than the Eastern time machine. Same data, different visual layout.</p><p>Fixed it by setting TZ=UTC in the environment before launching the browser. For Puppeteer:</p><pre>const browser = await puppeteer.launch({<br>  env: { ...process.env, TZ: &#39;UTC&#39; }<br>});</pre><h3>The locale that changed number formatting</h3><p>Similar to the timezone issue: one machine formatted numbers as 1,234.56 and another as 1.234,56 because of different locale settings. A pricing page screenshot showed different number formats on different machines.</p><pre>const context = await browser.newContext({<br>  locale: &#39;en-US&#39;,<br>  timezoneId: &#39;UTC&#39;<br>});</pre><p>Playwright makes this easy with context options. Puppeteer needs --lang flag on the browser launch.</p><h3>The GPU rendering lottery</h3><p>Headless Chrome can use GPU acceleration or software rendering depending on what’s available. GPU-rendered pages can have subtle anti-aliasing differences compared to software rendering. On most pages you’d never notice, but for pixel-perfect comparison tests it matters.</p><p>I force software rendering everywhere:</p><pre>--disable-gpu<br>--disable-software-rasterizer</pre><p>This makes rendering slightly slower but completely deterministic. Worth the tradeoff for any pipeline where you’re comparing screenshots.</p><h3>What I check now before trusting a screenshot</h3><p>After getting burned enough times, I have a mental checklist:</p><ul><li><strong>Fonts</strong>: Same set installed? Noto or whatever you standardize on.</li><li><strong>Device scale</strong>: Explicitly set, not inherited from host.</li><li><strong>Timezone</strong>: Explicitly set to UTC.</li><li><strong>Locale</strong>: Explicitly set to en-US (or whatever your target is).</li><li><strong>GPU</strong>: Disabled for consistency.</li><li><strong>Browser version</strong>: Pinned, not “latest.”</li></ul><p>That last one caught me recently. Chrome 126 changed how it rendered certain CSS gradients compared to 125. My screenshots shifted overnight because the CI server auto-updated Chrome.</p><h3>The uncomfortable truth</h3><p>Screenshots are not deterministic by default. The same URL in the same browser can produce different visual output depending on dozens of environmental factors. Most of the time the differences are tiny — a pixel here, a font metric there. But they compound, and if you’re doing visual regression testing, they’ll drive you crazy.</p><p>I’ve started treating screenshot environments like build environments: pin everything, control everything, trust nothing that runs on “whatever’s installed.” It’s more setup work upfront, but I stopped spending days debugging phantom visual diffs.</p><p>For my current projects, I run all captures through ScreenshotRun so the environment is always the same regardless of which machine triggers the job. But even with a managed service, I still set viewport, locale, and timezone explicitly in every request. Defaults are the enemy of consistent screenshots.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4db7cfb5578c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Weekend Project Ran Unmonitored for Five Months]]></title>
            <link>https://medium.com/@boxemailforwork/my-weekend-project-ran-unmonitored-for-five-months-f8497636efd8?source=rss-9a58740539d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8497636efd8</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[side-project]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Vitalii]]></dc:creator>
            <pubDate>Wed, 09 Sep 2026 13:49:40 GMT</pubDate>
            <atom:updated>2026-09-09T13:49:40.690Z</atom:updated>
            <content:encoded><![CDATA[<p>I shipped a side project last November. Small thing — a tool that pulls data from three APIs every hour, merges it into a report, and emails it to about 40 subscribers.</p><p>Took a weekend to build. Laravel, a scheduled command, a cheap VPS. Worked perfectly.</p><p>Fast forward to April. I get a DM on Twitter: “Hey, haven’t gotten your report in a while.” Checked my inbox — last email went out February 12th. Two and a half months of silence.</p><p>The cause? One of the three APIs changed their auth flow. My requests started returning 401s. The command threw an exception, Laravel’s scheduler caught it, logged it to a file I never check, and moved on. Next hour, same thing. For 73 days straight.</p><p>Seventy-three days. Nobody else complained. Either they forgot about it or quietly unsubscribed from something they thought I’d abandoned.</p><h3>The “it’s just a side project” trap</h3><p>Here’s what I told myself when I launched: “It’s small, I’ll notice if it breaks.” I did not notice. I had a full-time job, two other projects, and exactly zero monitoring on this one.</p><p>The frustrating part is I <em>know</em> better. At work we have alerting for everything — queue depth, error rates, response times. But for my own stuff? Nothing. Because setting up monitoring felt like overkill for a cron job that runs once an hour.</p><p>It wasn’t overkill. It was the one thing I needed.</p><h3>What I actually did about it</h3><p>After the February incident I set up dead man’s switch monitoring. The concept is almost embarrassingly simple: my scheduled command pings an endpoint when it finishes successfully. If the ping doesn’t arrive within the expected window, I get an alert.</p><p>I use WatchCron for this. Took about 5 minutes — added a single HTTP call at the end of my command, configured the expected schedule, done. When the command fails or hangs or the server goes down, the ping never arrives and I get a notification.</p><pre>// End of my scheduled command<br>Http::get(&#39;https://ping.watchcron.com/my-check-id&#39;);</pre><p>That’s literally it. One line.</p><h3>The part I got wrong initially</h3><p>My first instinct was to add error reporting — catch exceptions, send myself an email when something fails. The problem with that approach: if the <em>server</em> dies, or the cron daemon stops, or the scheduler process crashes before reaching my try/catch — no email gets sent. You can’t rely on a broken system to tell you it’s broken.</p><p>Monitoring by absence — expecting a ping and alerting when it <em>doesn’t</em> come — catches every failure mode. Crash, hang, network issue, OOM kill, misconfigured crontab after a server migration. All of them result in the same thing: no ping arrives.</p><h3>Three things I check on every side project now</h3><p>I keep a mental checklist before I consider something “shipped”:</p><p><strong>Does it tell me when it stops working?</strong> Not when it errors — when it <em>stops</em>. These are different. An error might get caught and logged. A process that never starts produces no errors at all.</p><p><strong>Will I notice within 24 hours?</strong> If the answer is “probably not,” I add monitoring. Doesn’t matter how small the project is. The five minutes it takes to set up a ping check saves me from discovering a two-month outage through a user complaint.</p><p><strong>Am I checking the logs?</strong> If I’m honest with myself — no, I’m not checking the logs on my side project at 11 PM on a Tuesday. So I need something that checks for me.</p><p>None of this is complicated. The hard part was admitting that my side project deserved the same basic monitoring I’d set up at work without thinking twice.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8497636efd8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Website Change Nobody Approved]]></title>
            <link>https://medium.com/@boxemailforwork/the-website-change-nobody-approved-8757a0d5fc83?source=rss-9a58740539d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/8757a0d5fc83</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[website-monitoring]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Vitalii]]></dc:creator>
            <pubDate>Tue, 25 Aug 2026 12:31:29 GMT</pubDate>
            <atom:updated>2026-08-25T12:31:29.850Z</atom:updated>
            <content:encoded><![CDATA[<p>Last quarter our marketing team ran a redesign of the company homepage. New hero image, updated copy, refreshed testimonials section. Standard stuff. The design went through three rounds of review, got signed off by the VP, and shipped on a Tuesday.</p><p>By Friday, the page looked different from what was approved.</p><p>Not dramatically different. The kind of different that makes you squint and say “wait, was that always like that?” A padding change here, a font weight shift there, a testimonial card that was definitely not in the mockup.</p><p>Turned out three separate people had pushed small “fixes” to the page after launch. A developer adjusted spacing to match a grid system. A content editor swapped a testimonial for a newer one. And someone in the design team updated an image asset that cascaded into a slightly different crop.</p><p>Each change was minor. Each person thought they were improving things. Nobody told anyone else. And nobody compared the live page to the approved version.</p><h3>The approval gap</h3><p>This is the part that bugs me. We have approval workflows for code deploys. We have staging environments for QA. We have design reviews before anything ships. But once a page is live, we essentially stop looking at it with the same rigor.</p><p>Content management systems make this worse. They’re designed to make editing easy — which means any authorized user can change copy, swap images, reorder sections. Those changes don’t go through git, don’t trigger CI/CD, don’t show up in deploy logs. They just happen.</p><p>I’ve seen a pricing page get quietly edited by a sales manager who thought the monthly price “looked too high next to the annual option.” No ticket, no approval, no record of the change. We only discovered it because a prospect asked about a discrepancy between the website and a proposal.</p><h3>What we actually wanted was a paper trail</h3><p>After the homepage incident, we started taking automated screenshots of key pages on a daily schedule. Not for monitoring uptime or catching errors — for having a visual record of what the page looked like on any given day.</p><p>Think of it like version control for your website’s appearance. You can scroll back through captures and see exactly when something changed. No relying on memory, no “I think it looked different before.”</p><p>We ran this through SnapshotArchive for about a dozen pages — homepage, pricing, product pages, the main landing pages running paid traffic. Daily captures, stored with timestamps.</p><p>First useful catch came within a week. Someone updated a hero banner on the pricing page but used an image that was 40% larger than the original. Page load time jumped, Lighthouse score dropped. Without the visual history, we’d have spent time debugging performance before even thinking to check if the page content had changed.</p><h3>The uncomfortable pattern</h3><p>Once you start looking at daily snapshots, you notice something uncomfortable: your website changes more than you think it does.</p><p>Third-party scripts update their UI. Chat widgets change their positioning. Cookie consent banners get new styling from the vendor. Ad network code shifts layout. Analytics tags occasionally inject visible elements during slow loads. CDN edge nodes serve slightly different asset versions.</p><p>Most of these changes are invisible in monitoring dashboards. The page loads, the status code is 200, Core Web Vitals stay within range. But the page doesn’t look like what your design team approved.</p><p>I’m not saying every change matters. Most don’t. But the ones that do matter — a broken form, a missing CTA, a compliance banner that disappeared — those are exactly the ones you want to catch the same day, not three weeks later when someone happens to notice.</p><h3>Making it practical</h3><p>A few things I learned from running visual monitoring on production pages for a while:</p><p><strong>Start with money pages.</strong> Homepage, pricing, checkout, sign-up. If a visual change on the page could cost you revenue, monitor it. Everything else can wait.</p><p><strong>Daily is enough for most pages.</strong> Hourly captures generate noise without much additional insight unless you’re monitoring pages with third-party integrations that change frequently. Start daily, increase frequency only where you’ve seen problems.</p><p><strong>Diff thresholds matter.</strong> A 0.5% pixel difference is probably a font rendering variance between captures. A 5% difference is probably a real change. Tune your threshold to avoid alert fatigue. I settled on 3% for most pages after a couple weeks of calibration.</p><p><strong>Keep captures for at least 90 days.</strong> You’d be surprised how often someone asks “when did this change?” about something that happened six weeks ago. Having the visual history available makes that a 30-second lookup instead of a forensic investigation through deploy logs and CMS audit trails.</p><p><strong>Loop in your legal team.</strong> Depending on your industry, having a timestamped visual record of your website can be genuinely useful for compliance. Regulated industries — finance, healthcare, gambling — often have requirements around documenting what was displayed to users and when. Screenshots with timestamps are evidence that’s hard to argue with.</p><h3>The real takeaway</h3><p>Your website is not a static artifact. It changes constantly — through deploys, CMS edits, third-party updates, and sometimes just through the browser itself rendering things differently after an update.</p><p>Most teams only notice changes when something breaks badly enough that a customer complains. Visual monitoring closes that gap. Not perfectly, not for every edge case, but enough that you stop being surprised by changes you didn’t know about.</p><p>The homepage incident from last quarter? Wouldn’t have been prevented by any amount of code review or staging testing. The changes happened after the approved deploy, through legitimate channels, by people with good intentions. The only way to catch it was to actually look at the page — or have something look at it for you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8757a0d5fc83" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Cron Job That Broke Every March and Nobody Knew Why]]></title>
            <link>https://medium.com/@boxemailforwork/the-cron-job-that-broke-every-march-and-nobody-knew-why-a0ba425ff135?source=rss-9a58740539d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0ba425ff135</guid>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[system-administration]]></category>
            <category><![CDATA[cronjob]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Vitalii]]></dc:creator>
            <pubDate>Fri, 07 Aug 2026 11:57:44 GMT</pubDate>
            <atom:updated>2026-08-07T11:59:41.621Z</atom:updated>
            <content:encoded><![CDATA[<p>We had a backup job that ran at 2:30 AM every night. Worked flawlessly for eleven months. Then March hit, and it just… vanished from the logs for one night. Every year. Same night.</p><p>Took us three years to connect the dots. Three. Years.</p><p>At 2:00 AM on the second Sunday of March, clocks jump to 3:00 AM. The 2:30 slot doesn’t exist. Cron doesn’t reschedule it — it just skips. No error, no warning, no retry. The job simply doesn’t fire.</p><p>And because this was a backup job, nobody noticed until someone actually needed a restore. By then the daily backups had overwritten everything useful anyway.</p><h3>The fix isn’t what you think</h3><p>Most people hear “DST problem” and immediately go “just use UTC everywhere.” And yeah, that works for servers. But here’s the thing — if your cron daemon is running in the system timezone (which it probably is unless someone explicitly changed it), switching to UTC means all your jobs shift by an hour twice a year from the perspective of your business operations.</p><p>That 6 AM report that lands in inboxes before the morning standup? Now it arrives at 5 AM or 7 AM depending on the season. Your ops team will love that.</p><p>What actually works better:</p><p><strong>For critical jobs</strong>: run them at times that exist in every timezone shift. Avoid the 2:00–3:00 AM window entirely. Move them to 1:30 AM or 3:30 AM. Boring advice, but it eliminates the problem completely.</p><p><strong>For everything else</strong>: the real issue isn’t DST — it’s that nobody notices when a job doesn’t run. If you had a “this didn’t execute when expected” alert, you’d have caught it on year one instead of year three.</p><h3>The autumn problem is worse</h3><p>Everyone talks about the spring-forward skip, but fall-back is sneakier. At 2:00 AM, clocks rewind to 1:00 AM. If your job runs at 1:30 AM, it now runs twice. Two backup snapshots. Two report emails. Two invoice generation runs.</p><p>For idempotent jobs, no big deal. For anything that sends emails or charges credit cards? Yeah.</p><p>We had a monitoring notification that fired at 1:45 AM. One November Sunday, every on-call engineer got paged twice for the same non-issue. The Slack channel was not amused.</p><h3>My checklist now</h3><p>Every time I set up scheduled tasks on a new project, I run through this:</p><ol><li>What timezone is the cron daemon using? (Check, don’t assume.)</li><li>Does anything run between 1 AM and 3 AM? If so, can it move?</li><li>Are the jobs idempotent? If they run twice, does anything break?</li><li>Is<em> </em>there a “didn’t run” detection? Something like <a href="https://watchcron.com/">WatchCron</a> that pings when an expected job goes missing?</li></ol><p>Number four is the one that actually matters long-term. DST is just one of a dozen reasons a job might not fire — server reboots, full disks, stale credentials, OOM kills. The specific failure mode is less important than knowing it happened.</p><p>That backup job? It runs at 3:30 AM now. Hasn’t missed a night since. Not because 3:30 is magic — because we also added monitoring that tells us within 15 minutes if it doesn’t start. The schedule change fixed DST. The monitoring fixed everything else.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0ba425ff135" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lazy Loading Broke My Automation and I Blamed the Wrong Thing for Two Days]]></title>
            <link>https://medium.com/@boxemailforwork/lazy-loading-broke-my-automation-and-i-blamed-the-wrong-thing-for-two-days-ba0dd1018253?source=rss-9a58740539d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba0dd1018253</guid>
            <dc:creator><![CDATA[Vitalii]]></dc:creator>
            <pubDate>Mon, 27 Jul 2026 13:15:00 GMT</pubDate>
            <atom:updated>2026-07-27T13:15:00.437Z</atom:updated>
            <content:encoded><![CDATA[<p>I had a visual regression pipeline that screenshotted product pages after every deploy. Worked great for months. Then one Tuesday, every single screenshot came back with grey placeholder boxes where the product images should be.</p><p>My first instinct was the CDN. We’d migrated image hosting the week before, so obviously that was the problem. Spent most of Tuesday checking CDN configs, cache headers, SSL certs on the new domain. Everything looked fine. Images loaded perfectly in the browser.</p><p>Wednesday morning I opened DevTools, throttled the connection, and watched the page load frame by frame. The images had loading=&quot;lazy&quot; on them. They always had. But our old CDN served images fast enough that by the time Puppeteer captured the screenshot, most images had already loaded — even the ones below the fold. The new CDN was about 200ms slower per image. Not enough for humans to notice. Enough for headless Chrome to capture the page before the lazy-loaded images triggered.</p><p>The bug wasn’t the CDN. The bug was that my automation had been accidentally working this whole time.</p><h3>The loading=”lazy” trap</h3><p>Native lazy loading tells the browser: don’t fetch this image until it’s near the viewport. “Near” is intentionally vague — each browser decides its own threshold. Chrome starts loading images roughly 1250px below the fold on fast connections, closer to 2500px on slow ones.</p><p>In a headless browser with a 800px viewport, that means any image more than about 2000px down the page simply won’t load. The browser hasn’t decided it needs them yet.</p><pre>&lt;!-- these load --&gt;<br>&lt;img src=&quot;hero.jpg&quot; loading=&quot;eager&quot;&gt;<br>&lt;img src=&quot;product-1.jpg&quot; loading=&quot;lazy&quot;&gt;  &lt;!-- if within threshold --&gt;</pre><pre>&lt;!-- these probably don&#39;t --&gt;<br>&lt;img src=&quot;product-47.jpg&quot; loading=&quot;lazy&quot;&gt;  &lt;!-- way below fold --&gt;</pre><p>The fix seems obvious: scroll down. And yeah, that works — programmatically scroll to the bottom of the page, wait for images to load, scroll back up, take the screenshot. But it’s slower than you’d think, especially on pages with hundreds of images. Each scroll triggers a batch of image loads, and you need to wait for each batch to complete.</p><h3>IntersectionObserver makes it worse</h3><p>loading=&quot;lazy&quot; is the simple case. The real mess starts with custom lazy loading implementations using IntersectionObserver.</p><p>Some libraries unload images when they scroll <em>out</em> of view. So you scroll down, images load, you scroll back up, and the images you passed are gone again. Replaced with placeholders. I’ve seen this on e-commerce sites that aggressively optimize memory usage on mobile.</p><p>Other implementations use a fade-in animation triggered by the observer. Your screenshot catches images mid-fade at 40% opacity, and now your visual diff tool flags every single image on the page as changed.</p><pre>// this kind of thing is everywhere<br>observer = new IntersectionObserver((entries) =&gt; {<br>  entries.forEach(entry =&gt; {<br>    if (entry.isIntersecting) {<br>      entry.target.src = entry.target.dataset.src;<br>      entry.target.classList.add(&#39;fade-in&#39;); // 300ms animation<br>    }<br>  });<br>});</pre><p>You either wait for the animation to finish or you disable animations entirely via CSS. I usually inject a style tag that kills all transitions and animations before capturing. Not elegant but it handles 90% of cases.</p><h3>srcset and the resolution lottery</h3><p>srcset lets browsers pick the best image for the current viewport and pixel density. Sounds great for users. For automation, it means the same page serves different image files depending on your viewport settings.</p><p>Your headless browser at 1280px with 1x DPR gets product-medium.jpg. Your retina MacBook preview shows product-large.jpg. The images look slightly different — different compression artifacts, different sharpening. Your visual diff flags them as mismatches.</p><p>Ran into this when a designer reported “the images look blurry in our QA screenshots.” They weren’t blurry — they were the correct images for the viewport we’d configured. We just hadn’t matched the DPR to what the design team was using for review.</p><h3>picture element with format fallbacks</h3><p>The &lt;picture&gt; element with WebP/AVIF sources adds another layer. Headless Chrome supports WebP and AVIF, so it grabs the optimized format. But if you&#39;re comparing screenshots taken by different browser versions, or comparing headless vs headed mode, they might pick different source formats.</p><p>I had a case where Chrome 120 headless picked the AVIF source and Chrome 118 headed picked WebP for the same page. Visually almost identical, but the pixel-level diff was noisy enough to make the report useless.</p><p>Not much you can do about this besides pinning your browser version and being explicit about your comparison baseline.</p><h3>What actually works</h3><p>After burning enough time on this, my setup for pages with heavy lazy loading:</p><p>Set the viewport tall — 1280×4000 or whatever covers the full page length. This forces most loading=&quot;lazy&quot; images into the browser&#39;s loading threshold without scrolling. Not memory-efficient, but reliable.</p><p>For IntersectionObserver-based loaders, I scroll in increments and wait for networkidle0 at each step. Slow but catches everything.</p><p>Kill all CSS animations before capture. One injected style tag: *, *::before, *::after { animation: none !important; transition: none !important; }.</p><p>Pin the DPR and viewport to exact values, document them, and make sure everyone on the team knows what the “reference” configuration is.</p><p>None of this is hard individually. The problem is that lazy loading interacts with viewport size, pixel ratio, network speed, browser version, and custom JavaScript in ways that aren’t obvious until something breaks. And when it breaks, it looks like the images are broken, not your test setup.</p><p>That Tuesday I spent blaming the CDN? Could’ve been thirty minutes if I’d checked the obvious thing first. But loading=&quot;lazy&quot; was so normal, so standard, that it didn&#39;t even register as a possible cause. Sometimes the most ordinary code is the hardest to suspect.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba0dd1018253" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Font Rendering Broke Half Our Screenshot Tests]]></title>
            <link>https://medium.com/@boxemailforwork/font-rendering-broke-half-our-screenshot-tests-bf0f58232683?source=rss-9a58740539d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf0f58232683</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[screenshots]]></category>
            <category><![CDATA[visual-regression]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Vitalii]]></dc:creator>
            <pubDate>Tue, 21 Jul 2026 19:33:44 GMT</pubDate>
            <atom:updated>2026-07-21T19:33:44.998Z</atom:updated>
            <content:encoded><![CDATA[<p>We ran visual regression tests on a dashboard for about four months. Green across the board, every single run. Then we migrated our CI from Ubuntu 20.04 to 22.04.</p><p>Forty-seven tests failed overnight.</p><p>Nobody changed the app. Nobody touched the CSS. The diff images showed text shifting by one or two pixels in basically every component that rendered custom fonts. Buttons looked fine. Icons looked fine. Every piece of text looked slightly wrong.</p><h3>The actual problem</h3><p>Ubuntu 22.04 ships a newer version of FreeType with different subpixel hinting defaults. The font rasterizer produces marginally different glyph shapes at the same point size. To a human eye — identical. To a pixel-diff tool — catastrophe.</p><p>Here’s what made it worse: we’d been loading Google Fonts via @import in CSS, which meant the CI runner was fetching fonts from Google&#39;s CDN on every test run. Sometimes it got woff2, sometimes woff, depending on the user-agent the headless browser reported. Different font formats render differently. Not by much. By enough.</p><h3>What we tried first</h3><p>Bumped the diff threshold from 0.1% to 0.5%. That fixed most failures but introduced a new problem — actual regressions started slipping through. A misaligned label at 3px offset? Below threshold. Invisible to the test suite, visible to anyone with eyes.</p><p>Tried pinning the FreeType version. Got halfway through the Dockerfile changes before realizing that approach was going to haunt us on every OS upgrade forever.</p><h3>What actually worked</h3><p>Self-hosted the fonts. Downloaded the exact woff2 files, committed them to the repo, loaded them from disk. No CDN variability, no format negotiation.</p><p>Then — and this is the part most guides skip — we set explicit font rendering flags in the headless browser config:</p><pre>--font-render-hinting=none<br>--disable-lcd-text</pre><p>That eliminated subpixel rendering entirely. Fonts look marginally less crisp in the test screenshots but the output is deterministic across OS versions. Ran it for two months now, zero false positives from font differences.</p><h3>The fonts nobody thinks about</h3><p>System fonts. Your app probably renders some UI element using -apple-system or system-ui somewhere. On macOS that&#39;s San Francisco. On Ubuntu it&#39;s... Noto? DejaVu? Depends on what&#39;s installed. Running screenshot tests locally on a Mac and comparing against CI on Linux? You&#39;re comparing two completely different typefaces.</p><p>We just didn’t notice because the fallback chain happened to pick fonts that were close enough at our original threshold.</p><h3>Broader point</h3><p>Screenshot testing is deterministic only when you control every rendering input. Most teams control the viewport size and the page content. Few control the font loading, the text rasterizer, the GPU compositing mode, or the animation timing.</p><p>I’ve seen teams waste weeks chasing “flaky screenshot tests” that were actually environment differences. The tests weren’t flaky — they were accurately reporting that two environments render things differently.</p><p>Not a satisfying answer, but there it is. Pin your fonts, disable hinting, and run your baseline and comparison screenshots on the same exact OS image. Fixes about 80% of screenshot test instability in my experience.</p><p>The other 20% is usually animation timing. But that’s a different rant.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf0f58232683" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Real Cost of Silent Failures in Scheduled Tasks]]></title>
            <link>https://medium.com/@boxemailforwork/the-real-cost-of-silent-failures-in-scheduled-tasks-e9987b0fdbb0?source=rss-9a58740539d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9987b0fdbb0</guid>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cronjob]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Vitalii]]></dc:creator>
            <pubDate>Wed, 15 Jul 2026 13:08:50 GMT</pubDate>
            <atom:updated>2026-07-15T13:08:50.291Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Espi2QIhnO27-XH7VLS6jg.png" /></figure><p>A cleanup script ran out of memory at 3 AM on a Tuesday. Nobody got paged. The disk filled up by 4 AM. By morning, the queue processor, invoice sender, and two reporting jobs had all silently skipped their runs. Six hours of cascading damage — from one failed cron job that nobody was watching.</p><p>I’ve seen variations of this exact scenario play out more times than I’d like to admit.</p><h3>The problem isn’t failure. It’s silence.</h3><p>Stuff breaks. That’s fine — that’s expected. The real issue is when something breaks and your system just… doesn’t tell anyone. Cron is especially bad at this because it was designed in an era where “monitoring” meant someone physically checking a terminal.</p><p>The default behavior of cron on failure? Send an email to the local system user. In 2026, that effectively means: do nothing.</p><p>So your nightly backup script starts failing on June 3rd. You find out on July 9th when you actually need a restore. A month of backups, gone. That’s not a hypothetical — a friend of mine lived through exactly this last year.</p><h3>Where teams usually go wrong</h3><p>Most teams I’ve worked with fall into one of three traps:</p><p><strong>Trap 1: “We’ll just check the logs.”</strong> Sure, you will. For the first week. Then someone goes on vacation, and the daily log review habit dies. Logs are great for debugging after the fact, but they’re terrible as a monitoring strategy.</p><p><strong>Trap 2: “The application handles errors.”</strong> Maybe it does. But what about when the script doesn’t even start? Cron syntax typos, permission changes after a deploy, a moved binary path — the job never runs, so your error handling code never executes either.</p><p><strong>Trap 3: “We have uptime monitoring.”</strong> Uptime monitoring checks if your server is responding to HTTP requests. Your cron job that prunes old database records has absolutely nothing to do with HTTP. Different systems, different failure modes.</p><h3>The cascade effect</h3><p>What gets people isn’t the single failure. It’s the chain reaction.</p><p>Here’s a real pattern I’ve seen:</p><ol><li>Temp cleanup job fails (OOM kill)</li><li>Disk fills up over the next few hours</li><li>Log rotation can’t write — starts dropping logs</li><li>Database connection pool exhausts because the connection cleanup job can’t run</li><li>API starts returning 500s</li><li>NOW your uptime monitor fires</li></ol><p>You get an alert for the API being down. Cool. But the root cause was a cron job failure six hours ago, and good luck figuring that out from the HTTP 500 error.</p><h3>What actually works</h3><p>After dealing with this enough times, I’ve landed on a few things that actually hold up.</p><p><strong>Heartbeat monitoring over exit-code checking.</strong> Instead of parsing whether a job succeeded, just have the job ping an endpoint when it finishes. If the ping doesn’t arrive within the expected window, something’s wrong. Dead simple, and it catches the “job didn’t run at all” case that exit-code monitoring misses entirely.</p><p><strong>One alert channel, not five.</strong> I used to set up email + Slack + PagerDuty for critical jobs. You know what happens? Alert fatigue. Pick one channel for cron alerts and actually pay attention to it.</p><p><strong>Timeouts that make sense.</strong> If your report generation usually takes 8 minutes, set a timeout at 15. Not 60. Not “unlimited.” When a job hangs instead of crashing, an aggressive timeout is the only thing that’ll catch it.</p><p><strong>Separate monitoring from the thing being monitored.</strong> If your monitoring runs on the same server as your cron jobs, guess what happens when that server goes down? Right. Monitor from outside.</p><h3>The math nobody does</h3><p>Here’s something worth actually calculating: what does one missed cron run cost you?</p><p>For a backup job: potentially everything. For an invoice sender: delayed revenue, maybe angry customers. For a data sync: stale reports, bad decisions made on old data. For a cleanup job: not much — until the disk fills up and takes down production.</p><p>Most teams never sit down and do this math. They treat all cron jobs equally (which means: ignore them equally) instead of putting real monitoring on the ones that matter.</p><h3>The honest truth</h3><p>You don’t need a fancy setup. You don’t need a complex observability stack for your cron jobs. You need two things:</p><ol><li>Know which jobs exist and when they’re supposed to run</li><li>Get told when they don’t</li></ol><p>That’s it. Everything else is optimization. But those two things? Most teams don’t even have that, and it shows up as a 3 AM surprise about once a quarter.</p><p>I’d rather spend 30 minutes setting up alerts than spend a weekend recovering from a failure nobody caught. But that’s just me — maybe you enjoy the adrenaline rush of a Sunday incident response.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9987b0fdbb0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Deploy That Looked Fine Until a Customer Sent a Screenshot]]></title>
            <link>https://medium.com/@boxemailforwork/the-deploy-that-looked-fine-until-a-customer-sent-a-screenshot-e58ca6d2c0d1?source=rss-9a58740539d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/e58ca6d2c0d1</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-testing]]></category>
            <dc:creator><![CDATA[Vitalii]]></dc:creator>
            <pubDate>Mon, 13 Jul 2026 17:29:02 GMT</pubDate>
            <atom:updated>2026-07-13T17:29:02.855Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BUtwnXE-WdkeBrLlaRqGtg.jpeg" /></figure><p>We shipped a frontend update on a Thursday. Everything passed — unit tests, integration tests, staging QA. Lighthouse scores actually went up. We were feeling pretty good about it.</p><p>Monday morning, support forwarded an email from a customer. Attached was a screenshot of our pricing page showing every plan at $0/mo. Not a billing bug — a JavaScript error in the price rendering component that only triggered with a specific locale setting. The page loaded fine, returned 200, looked perfect on our machines.</p><p>The prices had been showing $0 for three days. Over a weekend. On the one page that matters most.</p><h3>Why tests didn’t catch it</h3><p>Our test suite checked that price elements existed in the DOM. They did. It checked that the API returned correct values. It did. What nobody tested was whether the rendered output — the thing a human actually sees — matched what we expected.</p><p>This is the gap between functional testing and visual testing, and it’s wider than most teams realize.</p><p>Functional tests answer “does the code work?” Visual tests answer “does the page look right?” Those are very different questions. A button can pass every functional test while being completely hidden behind another element. A table can render correctly in Chrome and break in Safari. An image can load on staging and 404 in production because the CDN path differs.</p><h3>What we changed after that</h3><p>We added automated screenshots to our CI pipeline. Not the complicated kind — no AI-powered visual recognition or pixel-perfect comparison engines. Just: take a screenshot of these 12 pages after every deploy, diff them against the previous version, flag anything that changed by more than a threshold.</p><p>First week, it caught three things we would’ve missed:</p><p>A font that fell back to Times New Roman because the Google Fonts import got removed during a CSS refactor. Nobody noticed in code review.</p><p>A “Sign Up Free” button that shifted 40px down on mobile because someone added a banner above it. Still visible, still clickable, but now below the fold on shorter screens.</p><p>A footer that straight up disappeared on one page. A conditional render that evaluated wrong after a state management change. Page still loaded, tests still passed.</p><h3>The part nobody talks about</h3><p>The hardest thing about visual testing isn’t the tooling. It’s deciding what counts as a meaningful change.</p><p>You take screenshots every deploy, you’re going to see diffs constantly. A date changes, an ad rotates, dynamic content shifts things around. If you alert on every pixel change you’ll get paged ten times a day and start ignoring alerts within a week.</p><p>What worked for us: separate the pages into tiers. Critical pages (pricing, checkout, login) get tight thresholds — anything over 2% diff triggers a review. Content pages (blog, docs) get looser thresholds or just weekly checks. Marketing pages with dynamic content get excluded from automated diffing entirely.</p><p>Start with your three most important pages. Just three. Take before/after screenshots on deploy. That’s it. You can get fancy later.</p><h3>Screenshots vs snapshot tests</h3><p>Worth clarifying because people mix these up. Jest snapshot tests compare serialized DOM output — they catch structural changes in your component tree. Screenshot tests capture what the browser actually renders — they catch visual issues that survive DOM comparisons.</p><p>A snapshot test wouldn’t have caught our $0 pricing bug. The DOM was correct. The JavaScript that processed the locale and formatted the price was the problem, and it only manifested visually.</p><p>Both are useful. They test different layers. Don’t skip one thinking the other covers it.</p><h3>The boring truth</h3><p>Visual bugs are boring. Nobody writes post-mortems about a misaligned button or a missing image. They just quietly erode trust. A customer sees a broken layout and doesn’t file a bug report — they just leave. You never hear about it.</p><p>Automated screenshots aren’t exciting. Setting them up doesn’t feel like real engineering work. But they catch the stuff that slips through every other safety net, and that makes them worth the thirty minutes it takes to set up.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e58ca6d2c0d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>