I’m Blake. I write about probability, stochastic processes, Python tooling, and the practical side of building things with code. More about me →

  • Information addiction, and less time wasted on the internet

    A recent post on explorator.dev hasn’t left my mind since I came across it recently on Hackernews: “I’m not addicted to the internet or my smartphone. I’m addicted to information”

    Internet addiction is a widespread concern — particularly with social media. While I’ve long since abandoned Facebook and my Reddit account, I still occasionally find myself in a spiral/relapse, often browsing the main page of Reddit in a private browsing tab.

    What leads to this? Personalisation of algorithms magnifies this cycle of addition, often pushing people down rabbit holes and relying on our in-built bias for negativity and outrage to colonise every waking minute so platforms can serve ad space. “Attention is all you have” by Alice GG writes about this topic eloquently in more depth than I do

    While I’ve opted out of personalisation where I can (for example YouTube settings allows disabling recommendations), anxiety is a big part of this. If I were to plot this over time, I hypothesize my “relapses” line up with “high-activity” news cycles. News media preys on the same impulses and biases, and most people (including myself) turn more to social media to get this information, which is a problem worthy of its own discussion.

    Even if I’m not trying to get the latest news updates or on Reddit playing the meme slot machine, I’m otherwise several pages deep on Hackernews. I’m chasing a different high, and justified it by telling myself it’s healthy

    While there’s a degree of truth to that, it’s still problematic that I fill gaps in time with a reflex response of tapping the Firefox app on my phone. Once it gets a hold, it doesn’t let go easily. Like what follows a chocolate binge, I have a variable sense of regret that skews in the higher ranges. Why did I let myself waste time like that? This roll of the dice on the internet left me empty handed — or I’m turning over rocks I’ve already read several times that day. Why didn’t I do something better with that time?


    Framing this as “internet addition” rather than “phone addiction” has been a surprisingly good way to reframe my problem of constantly scratching an itch by filling time with scrolling message boards or otherwise wasting time

    The internet is clearly not the only source of information, there are quite a few non-fiction books that can also be picked up for a bit and put down at a moments notice I still have yet to read. I have side projects I feel guilty for neglecting. I have movies I want to watch, and games I want to play.

    I’ll remove the web browser from the Home Screen, adding a bit more friction. I’ll also re-implement my tailored Reddit blocker to avoid that sinkhole. Hackernews is a habit I want to keep — it’s clearly had a positive influence on my life. But I need to diversify where I spend my time so I avoid feeling empty after the time passes.

    My history shows adding frictions and blocks don’t always work for me in the long term. But perhaps with this new approach, it’ll at least stick for a bit longer.

    To change a habit, keep the stimulus and the outcome, but change the path between them

  • Vim spellcheck mappings I use

    Using :set spell gives basic spellcheck for what you write in Vim and Neovim. It’s far from perfect — and there’s other plugins that probably do a better job of this — but I’ve found this is sufficient for my usage.

    I’ve adopted using <C-s> as a “leader” for interacting with spellchecking so I can accept corrections, undo bad corrections, and add exceptions to the previous misspelled word without needing to navigate my cursor to the word in question, and also to make actions undoable with u.

    These mappings behave the same in insert mode and

    <C-s><C-s> : Correct last misspelled word, retaining current curor position
    <C-s><C-x> : Undo last correction, pop-up selection for selecting other correction
    <C-s><C-a> : Exempt last misspelled word, retaining current curor position
    <C-s><C-d> : Undo last exemption

    Here’s the snippets for these for init.lua / vimrc:

    vim.keymap.set('i', '<C-s><C-s>', '<C-g>u<Esc>[s1z=`]i<C-g>u', { remap = false }),
    vim.keymap.set('i', '<C-s><C-x>', '<C-r>u<C-r>z=', { remap = true }),
    vim.keymap.set('i', '<C-s><C-a>', '<Esc>[szg`]i', { remap = false }),
    vim.keymap.set('i', '<C-s><C-d>', '<C-r>zug', { remap = false }),
    
    vim.keymap.set('n', '<C-s><C-s>', 'i<C-g>u<Esc>[s1z=`]i<C-g>u<Esc>', { remap = false }),
    vim.keymap.set('n', '<C-s><C-x>', 'uz=', { remap = true }),
    vim.keymap.set('n', '<C-s><C-a>', '[szg`]', { remap = false }),
    vim.keymap.set('n', '<C-s><C-d>', 'zug', { remap = false }),
    inoremap <C-s><C-s> <C-g>u<Esc>[s1z=`]i<C-g>u
    imap <C-s><C-x> <C-r>u<C-r>z=
    inoremap <C-s><C-a> <Esc>[szg`]i
    inoremap <C-s><C-d> <C-r>zug
    
    nnoremap <C-s><C-s> i<C-g>u<Esc>[s1z=`]i<C-g>u<Esc>
    nmap <C-s><C-x> uz=
    nnoremap <C-s><C-a> [szg`]
    nnoremap <C-s><C-d> zug

    As a bonus, map z= to a nicer UI for selecting corrections. I use fzf-lua in nvim with this configuration:

    vim.keymap.set('n', 'z=', [[v:count ? v:count . 'z=' : ':FzfLua spell_suggest<CR>']], { expr = true })

    So my mappings (and any invocation of z=) pops up a fuzzy spellcheck suggestion list in the place of the last incorrect word.

    See :help spell for more details on how this system works, you might find other mappings that work more for you.

  • How I set up my Home Server to Replace Dropbox

    Setting up a home server to replace Dropbox is a project I’ve wanted to tackle for a while. I wanted to learn more about system administration and decouple my setup from platforms like Dropbox. While I don’t have anything against backing up files on someone else’s machine, the payment contract can change over time. If payments increase too much, your data becomes a hostage that can be deleted if you unsubscribe.

    So: let’s try Syncthing!

    There’s other projects I want to explore (which I’ll document in the coming months), but for now I want to replace Dropbox and use a home server as a dedicated node so that all frequent files can be kept in sync

    First, I built a server out of old PC parts I had lying around. Parts list:

    • Motherboard: MSI B450-A PRO MAX
    • CPU: AMD Ryzen 7 3700X 8-Core
    • RAM: 32GB DDR4 (4x8GB, 3200MHz)
    • GPU: NVIDIA GeForce RTX 3090
    • Boot drive: Kingston SUV400S 120GB SSD
    • Storage drives: 2x Synology HAT3300 4TB (RAID1)
    • PSU:: Corsair RM750x ATX Power supply

    Second, I installed an OS. I chose Ubuntu 24.04 LTS because it’s stable and I wanted to keep the option of using a GUI interface available while learning the ropes

    Third: I configured my two scavenged hard drives in a RAID1 setup. This will provide a bit of resilience to a single drive failure (which had happened to me before — it absolutely sucks)

    # 1. Partition both drives (repeat for /dev/sdb)
    sudo fdisk /dev/sda
    #   - n (new partition)
    #   - p (primary)
    #   - 1 (partition number)
    #   - accept defaults for first/last sector
    #   - w (write changes)
    
    # 2. Create RAID1 array
    sudo mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
    
    # 3. Wait for sync (check with)
    cat /proc/mdstat
    
    # 4. Create filesystem
    sudo mkfs.ext4 /dev/md0
    
    # 5. Mount
    sudo mkdir -p /srv/storage
    sudo mount /dev/md0 /srv/storage
    
    # 6. Get UUID
    sudo blkid /dev/md0
    
    # 7. Add to fstab (edit /etc/fstab)
    UUID=your-uuid-here /srv/storage ext4 defaults,noatime 0 0
    
    # 8. Save RAID config (so it reassembles on boot)
    sudo mdadm --detail --scan | sudo tee -a /etc/mdadm/mdadm.conf

    Then it was time to make sure I had a stable ssh method. I first made sure I could communicate with it on my local network by giving the server a reserved address in the DHCP settings on my router.

    ifconfig | grep 'inet ' | grep -v 127.0.0.1

    To enable global access, I used Tailscale for a neat existing solution I had already set up

    # Install Tailscale
    curl -fsSL https://tailscale.com/install.sh | sh
    
    # Start and authenticate
    sudo tailscale up

    Then finally, time to install syncthing and configure it!

    To install Syncthing on the server, use Docker instead of installing directly on the system.

    First, install Docker on the server:

    # Install Docker Engine
    curl -fsSL https://get.docker.com | sh
    
    # Add your user to the docker group (optional)
    sudo usermod -aG docker $USER

    Create a directory for Syncthing’s configuration and make sure the data folder is accessible:

    sudo mkdir -p /var/lib/syncthing
    sudo chown -R $USER:$USER /var/lib/syncthing

    Run the Syncthing container:

    docker run -d \
      --name=syncthing \
      --restart=unless-stopped \
      -p 8384:8384 `# GUI` \
      -p 22000:22000/tcp `# sync protocol` \
      -p 22000:22000/udp `# sync protocol QUIC` \
      -p 21027:21027/udp `# discovery` \
      -v /srv/storage:/data:rw \
      -v /var/lib/syncthing:/config \
      syncthing/syncthing

    Now access the GUI. Since port 8384 is published, you can either open http://server-ip:8384 directly (if your firewall allows) or use SSH port forwarding:

    ssh -L 8384:localhost:8384 user@server

    Then open http://localhost:8384. Continue with adding folders, setting file versioning (e.g., 30 days), and installing Syncthing on the client.

    For the client, install natively as before:

    sudo apt-get install syncthing

    Then share folders as described. And that does it!

  • AI Coding and Review Fatigue

    Past month or two I’ve made an interesting observation:

    • The more I use AI agents to write code, the more review fatigue I experience

    My solution: inspired by Ankur’s recent blog post (see references) no more AI writing code for me (unless its boilerplate) — I’ll be using it as a personal “stack overflow”, but I’ll be manually typing in any suggestion it proposes in a chat (in a sense, avoiding copy-pasting random snippets in this new chapter)

    I have no doubt that there’s an aspect of a skill issue on my end when wielding these tools. Do we have different goals? Do we have different levels of paranoia? Do we have too much understanding of the systems we work on, and therefore can afford to offload additional coding to LLMs? Perhaps we all have different experiences that shape our overall interactions with them.

    The time sink and cognitive cliff

    For every minute I save writing code with AI, I seem to spend ~1.5 more minutes reviewing AI output, putting me in a counter-intuitive productivity deficit, despite the appearance of more PRs and more features. This fatigue leads to my PRs containing more sub-standard code, as well as missing things when reviewing other peoples PRs

    Non-technical stakeholders especially love the appearance of more productivity. More features, more PRs, more metrics, line goes up! But they don’t see the real work that happens behind the code, and how the long-term sustainability is at risk of collapsing

    In the previous chapter of engineering, I was limited by how fast I could type. Despite my obsession with mechanical keyboards, I’m a relatively slow typer compared to many others. Perhaps I underappreciated this as a trait which helped me think through problems as I write them that allowed me to adapt my approach on-the-fly (instead of straying down the wrong path too far)

    The hidden work compounds elsewhere

    On top of my crucial review workload for colleagues, I’m needing to review the AI output constantly to get back the understanding that I inadvertently skip when leaning on these tools. When AI reviewing slips, I get sent too far down the wrong path, which grinds everything to a halt

    So as a result, for every perr review I do, I feel like I’m doing 10x more AI code reviews for my own features instead of hitting the mythical 10x productivity that the AI evangelists promise

    This is taking much more energy than I anticipated, and as a result my review standards are subconsciously slipping. My AI coding audits start to slip, and my exhaustion results in lower quality reviews for peers — leading to more bugs slipping through the cracks. The effort taken to re-construct the justification for AI’s decisions in writing code isn’t sustainable for me personally

    A new/old workflow

    To adapt to this, I’ve added the following to my AGENTS.md:

    # Agent Guidelines
    
    AI Agents amplify judgment --- Always ask the developer if they could write
    this code themselves. Challenge them to answer honestly about implementation
    details. If they're unsure, focus on teaching rather than providing answers
    straight away.
    
    The developer makes the decisions and writes the implementation. **Do not write
    features for them.** Do not scaffold a module, fill in a function body, or
    "just get it working" **unless explicitly asked**. If a task is ambiguous, ask
    which part they want to do themselves rather than assuming.
    
    When the developer is working on something, default to:
    
    * **Discussing** the approach, trade-offs, and alternatives
    * **Explaining** concepts, patterns, or libraries they're learning
    * **Reviewing** code they've written and giving feedback
    * **Answering** specific, scoped questions
    
    If the developer specifically asks for it, only then may you implement code
    
    **Golden rule**: When unsure about implementation details or requirements,
    ALWAYS consult the developer rather than making assumptions.
    
    ## What AI Must NEVER Do
    
    1. **Never modify test files** --- Always get human approval with the intended
        changes to test cases
    2. **Never change API contracts** --- Breaks real applications
    3. **Never add dependencies or run mutating commands** --- Always ask
    4. **Never refactor large modules without guidance** --- Always plan and ask
    5. **Never assume business logic** --- Always ask
    6. **Never stray from the current task** --- Inform the dev if it'd be better
        to start afresh.
    7. **Never remove AIDEV- comments** --- They're there for a reason
    
    Remember: We optimize for maintainability over cleverness. When in doubt,
    choose the boring solution.
    
    In order to keep the developer at the wheel:
    
    * Do not write feature implementations, modules, or function bodies unprompted.
    * Do not refactor, "clean up," or reorganise code the developer has written
        unless asked.
    * Do not make architectural decisions on the developer's behalf --- surface the
        options and let them choose.
    * Do not complete a task the developer is mid-way through, even if the
        remainder is obvious.
    
    ### What AI may do
    
    * **Provide feedback** on code the developer has written --- point out bugs,
        edge cases, better patterns, or simpler approaches. Explain *why*, don't
        just rewrite.
    * **Annotate code with comments** where it aids understanding --- but only code
        the developer has already written, and prefer comments that explain *why*
        over comments that restate *what*.
    * **Add logging statements** where genuinely helpful for debugging or
        observability, on code the developer has written.
    * **Explain** how a library or pattern works, with small illustrative snippets
        if asked --- but keep snippets as *examples*, not as code to drop into the
        project.
    * **Read, explore, and describe** files, the plan, or the codebase to help the
        developer orient.
    
    ## Shared artifacts
    
    If present `PLAN.md` and `TODO.md` are the sources of truth regarding project
    direction.
    
    * **Keep up to date with `PLAN.md`** --- it is the source of truth and the shared
        artifact between the developer and AI for communicating and iterating on
        the project. Always consult it before giving advice or feedback so your
        guidance aligns with what's been decided. AI should only *update* PLAN.md
        when the developer specifically asks for it.
    * **Track progress via `TODO.md`** --- it holds the actionable checklists,
        organised by chapter. This file is maintained **manually by the developer
        only**; AI must not add, tick, or reorder items in it. Use it to orient on
        what's done, in progress, or blocked. This may be updated if and only if
        the developer specifically asks for it.
    
    ## How to be helpful
    
    When the developer asks "how should I do X?", treat it as a teaching moment:
    lay out the options, explain the trade-offs, recommend an approach, then **let
    them write it**. If they ask you to write it, do --- but the default is
    guidance, not code.
    
    When in doubt about whether to act or to wait, **wait and ask.**

    Will I still be productive with this? I certainly won’t be able to keep up with the pace required for the appearances of a 10x engineer. However, taking the path of quality over quantitiy is a clear win for the long-term health of the system under design (as well as my long-term health). This is what it takes for me to be the best damn engineer I can be.

    Conclusion

    Ultimately, I think we have different takes on what it means to be a great engineer, and the paths we take to get there. But one thing is certain: there’s many prices to be paid for this apparent “silver bullet”.

    That being said, I’m very happy to let AI write the monotonous boilerplate and logging statements!

    References

    I found these references on this topic interesting to read: