How I Became Lazy and Became More Productive
Sep 8, 2026 · 5 min · Automation · CLI · Productivity
The most productive thing I ever did was stop doing the same task twice. Not because I found a better tool or a smarter schedule — because I got honest about how much of my day was repetition wearing a productivity costume.
The confession goes back to a project where I maintained a task system for a small team. Every morning I opened the task list, scanned for anything due that day, and pinged each person about their items. Twenty minutes, every day, forever. One morning it occurred to me that I was performing this ritual more reliably than any cron job — so I wrote the cron job.
# tasks due today → one digest email per user, every morning 0 7 * * * php /var/www/app/yii email-notification
The controller is thirty lines of honest code: find today's open tasks, group them per user, send one email each. It has never missed a morning. My twenty daily minutes became zero, and the team stopped forgetting tasks, because a machine reminding politely at 07:00 outperforms a distracted developer doing it at 10:30.
The image pipeline nobody asked for
Then there were images. Clients upload phone photos straight off the camera — 6000 pixels wide, 8 MB a piece — and every batch arrived exactly when the site needed to feel fast. For a while I did the responsible handcrafted thing: open editor, resize, export, compress, upload. That is an afternoon per client. The lazy version grew in three stages.
First, a downscaler: walk the uploads folder, resize anything past a safe maximum with GD. The first version crashed on a 60-megapixel panorama — out of memory, mid-batch. The fix taught me more than the feature: estimate the needed memory per image, raise the limit just for that one, collect garbage after every file, and skip anything beyond 25 megapixels instead of pretending it will work.
Second, real compression — locally, with the usual suspects and a fallback chain for whichever binary is missing:
php yii image/resize --maxWidth=2500 --maxHeight=2500 php yii image/optimize # mozjpeg/pngquant, jpegoptim/optipng fallbacks php yii tinify # cloud compression, multi-key quota cycling
Third, the cloud tier. Free compression quotas run out at 500 images per key per month, so the command cycles through keys, records a checksum for every file it has already squeezed, and skips everything it has seen before — re-runs cost nothing and finish in seconds. Nobody notices the pipeline. That is the review it deserves.
One command for the deploy dance
Every deploy had a little ceremony: clear published assets, rebuild bundles, strip comments, eyeball the sizes, clear runtime junk. It took fifteen minutes and it was always performed slightly wrong — the "wrong" being whatever step I skipped that day. Collapsing a ceremony into php yii build did not just save time; it made the outcome identical every time. The same laziness produced the housekeeping command: sweep stale asset bundles and runtime directories, plus an orphaned-image sweep for uploads whose rows were deleted. That one got a --dryRun flag after it taught me the difference between "orphaned" and "I built the path wrong." Lazy people make the best safety switches — we delete exactly one wrong folder per career and then never again.
The laziest thing I ever built
The prize goes to a one-time script. We had to migrate a codebase from Bootstrap 3 and 4 to Bootstrap 5: every widget import, every helper reference, across several hundred PHP files. Weeks of find-and-replace, or an afternoon of scripting. I wrote a codemod with a mapping table, a dry-run mode that reports every planned replacement per file, and an --apply switch:
php yii upgrade/bootstrap5 # dry run: what would change php yii upgrade/bootstrap5 --apply=1 --core=1 # apply, incl. core helpers
The dry run flagged the files where a widget needed manual review — the 20% that automation should not touch. Total migration: one afternoon, plus a review pass. The script itself was used exactly twice. That is not waste; that is the entire point. Automation for a single event still beats doing it by hand when the event is big enough.
Midnight surgery, retired
The last clerical habits to die were user and permission management. Creating a support account used to mean opening the database console at whatever hour the request arrived and performing SQL surgery from memory. Now it is php yii user/create, php yii user/status alice inactive, and an RBAC hierarchy — admin, manager, client, lead — that can be rebuilt from scratch with one command because it is declared as data, not grown by hand in a GUI. The 23:50 version of me, who does not have to remember a column layout, is the real beneficiary of all of this.
What laziness actually taught me
- Automate on the third repetition. Once is exploration, twice is pattern, three times is a habit — and habits should be code.
- Dry-run everything destructive. If a command can delete a folder, it must be able to promise before it acts.
- Make re-runs free. Checksums, logs, idempotency — the mark of a good automation is that running it twice is cheaper than checking whether you ran it once.
- Automate the 80%, review the 20%. The codemod pattern — report, apply, manually review the flagged residue — scales to almost anything.
- Write for the 23:50 version of you. A command you can run without thinking beats a clever tool you have to rediscover.
Laziness, done right, is not the absence of effort — it is effort with a memory. I still work the same hours. But the hours go to problems that change, not chores that repeat. The computer does the repetition; it is astonishingly good at it and never gets bored. The productive part was never working faster. It was finally admitting I did not want to do it again.