DEV Community

Cover image for The Only Productivity Hack That Actually Worked for Me
Dan-J-D
Dan-J-D

Posted on

The Only Productivity Hack That Actually Worked for Me

The Only Productivity Hack That Actually Worked for Me

I've tried every website blocker in existence. They all have the same flaw: one click and they're off. That settings toggle might as well not exist when the urge to procrastinate hits.

I needed something I couldn't override. So I built the opposite.

The Problem

Every blocker follows the same pattern: it blocks, you unblock, you procrastinate. The issue isn't discipline — it's that your future self and your present self want different things. And that future self will happily undo anything you set up.

What I needed was a system where both selves agreed on the rules upfront and then neither could break them.

The Solution

kblocker is a Linux kernel module that hooks into netfilter and drops TCP connections to whatever sites I configure. The key feature isn't the blocking — it's how you turn it off.

When blocking is enabled, kblocker generates a 128-bit key. With PGP mode, it automatically encrypts that key to people I trust and then erases it from kernel memory. The raw key no longer exists anywhere on my system.

To disable the blocker, one of those people has to decrypt it and send it back to me.

I outsourced my willpower.

When I want to focus, I run:

sudo kblockerctl enable 120
Enter fullscreen mode Exit fullscreen mode

Two hours of blocked distractions. If I feel the urge to procrastinate, I can't — I'd have to text a friend, explain why, wait for them to decrypt it, and paste the result. By then the urge is gone.

The Result

I've gone from losing entire afternoons to YouTube to actually finishing things. The blocker has caught me mid-reflex to type youtube.com more times than I can count.

It's free if anyone wants it: github.com/Dan-J-D/kblocker

If you keep breaking your own focus tools, this is for you.

Top comments (0)