{
    "archive_path": "archive/1789596243.57326",
    "base_url": "will-keleher.com/posts/small-programming-tricks-matter",
    "basename": "",
    "bookmarked_date": "2026-09-16 22:04",
    "canonical": {
        "archive_org_path": "https://web.archive.org/web/will-keleher.com/posts/small-programming-tricks-matter",
        "dom_path": "output.html",
        "favicon_path": "favicon.ico",
        "git_path": "git/",
        "google_favicon_path": "https://www.google.com/s2/favicons?domain=will-keleher.com",
        "headers_path": "headers.json",
        "htmltotext_path": "htmltotext.txt",
        "index_path": "index.html",
        "media_path": "media/",
        "mercury_path": "mercury/content.html",
        "pdf_path": "output.pdf",
        "readability_path": "readability/content.html",
        "screenshot_path": "screenshot.png",
        "singlefile_path": "singlefile.html",
        "warc_path": "warc/",
        "wget_path": "will-keleher.com/posts/small-programming-tricks-matter/index.html"
    },
    "domain": "will-keleher.com",
    "extension": "",
    "hash": "93HN7CNWFAAQ1WEY2KTG",
    "history": {
        "archive_org": [],
        "dom": [],
        "favicon": [
            {
                "cmd": [
                    "curl",
                    "--silent",
                    "--location",
                    "--compressed",
                    "--max-time",
                    "120",
                    "--output",
                    "favicon.ico",
                    "--user-agent",
                    "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.4 (+https://github.com/ArchiveBox/ArchiveBox/) curl/curl 8.14.1 (x86_64-pc-linux-gnu)",
                    "https://www.google.com/s2/favicons?domain=will-keleher.com"
                ],
                "cmd_version": "curl 8.14.1 (x86_64-pc-linux-gnu)",
                "end_ts": "2026-09-16T22:04:04.766002+00:00",
                "index_texts": null,
                "output": "favicon.ico",
                "pwd": "/data/archive/1789596243.57326",
                "schema": "ArchiveResult",
                "start_ts": "2026-09-16T22:04:04.056790+00:00",
                "status": "succeeded"
            }
        ],
        "git": [],
        "headers": [
            {
                "cmd": [
                    "curl",
                    "--silent",
                    "--location",
                    "--compressed",
                    "--head",
                    "--max-time",
                    "120",
                    "--user-agent",
                    "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.4 (+https://github.com/ArchiveBox/ArchiveBox/) curl/curl 8.14.1 (x86_64-pc-linux-gnu)",
                    "https://will-keleher.com/posts/small-programming-tricks-matter/"
                ],
                "cmd_version": "curl 8.14.1 (x86_64-pc-linux-gnu)",
                "end_ts": "2026-09-16T22:04:05.133858+00:00",
                "index_texts": null,
                "output": "headers.json",
                "pwd": "/data/archive/1789596243.57326",
                "schema": "ArchiveResult",
                "start_ts": "2026-09-16T22:04:04.776784+00:00",
                "status": "succeeded"
            }
        ],
        "htmltotext": [],
        "media": [],
        "mercury": [
            {
                "cmd": [
                    "/app/node_modules/@postlight/parser/cli.js",
                    "https://will-keleher.com/posts/small-programming-tricks-matter/"
                ],
                "cmd_version": "1.0.0",
                "end_ts": "2026-09-16T22:04:11.138121+00:00",
                "index_texts": null,
                "output": "mercury",
                "pwd": "/data/archive/1789596243.57326",
                "schema": "ArchiveResult",
                "start_ts": "2026-09-16T22:04:07.824475+00:00",
                "status": "succeeded"
            }
        ],
        "pdf": [],
        "readability": [
            {
                "cmd": [
                    "/app/node_modules/readability-extractor/readability-extractor",
                    "/tmp/tmp9m3ww7bh",
                    "https://will-keleher.com/posts/small-programming-tricks-matter/"
                ],
                "cmd_version": "0.0.11",
                "end_ts": "2026-09-16T22:04:07.809260+00:00",
                "index_texts": [
                    "Small Programming Tricks\nDay to day, I think a surprising amount of engineering productivity comes from small nuggets of knowledge: being aware that a language feature exists; knowing that an unexplained tcp delay is probably related to the TCP_NO_DELAY setting and Nagle\u2019s algorithm; knowing the right git incantation to get out of a pickle; or knowing a trick with sed to rewrite a file.\nIn one sense, this is self-evident: anything you know is going to be made up of smaller pieces of knowledge. Of course those smaller pieces of knowledge matter.\nBut I think there are some nuggets of knowledge that are particularly valuable and don\u2019t require a lot of supporting mental infrastructure. You don\u2019t need to know any python to use python3 -m http.server to start a simple server in a directory, but it might still make your work marginally easier. Let me share a few examples:\n\nYou probably know that ctrl + r allows searching your terminal\u2019s command history, but if you install fzf, you can set it up so that ctrl + r does a fuzzy search. If you want even more power, atuin replaces your shell history with a searchable SQLite database. per-directory-history lets you switch back and forth between searching for commands that have been run in a specific directory or searching all previous commands. Finally, you can configure how much history to store: stackoverflow question.\nYou can SELECT without a FROM. This can be useful for testing out how a function in your database actually works or reminding yourself how SELECT TRUE <> NULL works.1\nPostgresSQL and MySQL both support explain analyze which will actually run the query you\u2019re trying to optimize and give you a ton more information about its performance.\nIn regular expressions, \\b, the word boundary assertion, makes it easy to look for the beginnings or ends of words.\nYou can use logarithms with metrics to get a sense of the distribution of values for a field you\u2019re interested in:\nconst bucket = Math.floor(Math.log10(userInGroupCount))\nmetrics.increment(\"my_metric\", { bucket });\n\nModern JS now supports Array.flatMap, Object.entries, and Promise.withResolvers.\nIn NodeJS, you can keep a connection open to an external resource by creating an https.Agent and then providing it to your http requests: fetch(url, {method, agent}). This can have a dramatic impact on latency.\ngit log -S pattern (\u201dgit pickaxe\u201d) can give you all commits that added or removed a string in a codebase. It\u2019s amazingly useful especially with older codebases! (git log -G pattern is similar, but will also show when that line was moved)\nSimilar to cd -, you can use git checkout - to check out your previous HEAD.\nYou probably don\u2019t need find. A lot of find commands can be replaced with globs like **/*.md. Most shells support this out of the box, but with bash, you need to turn this on with shopt -s globstar.\nIn a similar vein, most folks will probably want to use rg (ripgrep) rather than grep, ack, or ag.\nzsh\u2019s advanced autocompletion features aren\u2019t turned on by default:\nif type brew &>/dev/null; then\n    FPATH=\"$(brew --prefix)/share/zsh/site-functions:${FPATH}\"\nfi\nautoload -Uz compinit\ncompinit\n\n\nYou might have already known all of these things! Or you might work in a domain that makes all of these little tricks totally useless. Even if this particular set of tricks isn\u2019t useful for you, I bet you have your own stash of tricks that you\u2019ve accumulated over the years that makes your work easier.\nAt a company, I think even more knowledge tends to be this sort of small high-leverage nugget:\n\nTo debug $PROBLEM, use $DATA_SOURCE.\n$PERSON knows a ton about $AREA and they\u2019re happy to help if you get stuck\nThere are good docs about $HARD_THING $OVER_HERE.\nWhen $THING happens, it means we should manually scale out.\nTo do a rolling restart of a service, run $THIS_COMMAND.\nThis $UTIL makes $THAT_PROBLEM easy to script.\n\nAt a previous company, I shared a trick on slack every day with the engineering team, both technical and company-specific, and folks found them pretty useful. Even if you knew 9/10 tricks, that 10th doc or technique might save you some time! And one trick per day was the right number to avoid overwhelming people with knowledge, and it could occasionally spark useful discussion. If you\u2019re a more senior engineer at your company, you might think about doing something similar."
                ],
                "output": "readability",
                "pwd": "/data/archive/1789596243.57326",
                "schema": "ArchiveResult",
                "start_ts": "2026-09-16T22:04:05.836768+00:00",
                "status": "succeeded"
            }
        ],
        "screenshot": [],
        "singlefile": [],
        "title": [
            {
                "cmd": [
                    "curl",
                    "--silent",
                    "--location",
                    "--compressed",
                    "--max-time",
                    "120",
                    "--user-agent",
                    "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.4 (+https://github.com/ArchiveBox/ArchiveBox/) curl/curl 8.14.1 (x86_64-pc-linux-gnu)",
                    "https://will-keleher.com/posts/small-programming-tricks-matter/"
                ],
                "cmd_version": "curl 8.14.1 (x86_64-pc-linux-gnu)",
                "end_ts": "2026-09-16T22:04:05.829947+00:00",
                "index_texts": null,
                "output": "Small Programming Tricks \u00b7 will keleher",
                "pwd": "/data/archive/1789596243.57326",
                "schema": "ArchiveResult",
                "start_ts": "2026-09-16T22:04:05.822423+00:00",
                "status": "succeeded"
            }
        ],
        "wget": [
            {
                "cmd": [
                    "wget",
                    "--no-verbose",
                    "--adjust-extension",
                    "--convert-links",
                    "--force-directories",
                    "--span-hosts",
                    "--no-parent",
                    "-e",
                    "robots=off",
                    "--reject=js,mjs,woff,woff2,ttf,otf,eot,mp4,m4v,mov,webm,ogv,mkv,avi,flv",
                    "--timeout=120",
                    "--restrict-file-names=windows",
                    "--page-requisites",
                    "--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 ArchiveBox/0.7.4 (+https://github.com/ArchiveBox/ArchiveBox/) wget/GNU Wget 1.21.3",
                    "--compression=auto",
                    "--timestamping",
                    "https://will-keleher.com/posts/small-programming-tricks-matter/"
                ],
                "cmd_version": "GNU Wget 1.21.3",
                "end_ts": "2026-09-16T22:04:05.813900+00:00",
                "index_texts": null,
                "output": "will-keleher.com/posts/small-programming-tricks-matter/index.html",
                "pwd": "/data/archive/1789596243.57326",
                "schema": "ArchiveResult",
                "start_ts": "2026-09-16T22:04:05.144145+00:00",
                "status": "succeeded"
            }
        ]
    },
    "icons": null,
    "is_archived": true,
    "is_static": false,
    "latest": {
        "archive_org": null,
        "dom": null,
        "favicon": "favicon.ico",
        "git": null,
        "media": null,
        "pdf": null,
        "screenshot": null,
        "singlefile": null,
        "title": "Small Programming Tricks \u00b7 will keleher",
        "warc": null,
        "wget": "will-keleher.com/posts/small-programming-tricks-matter/index.html"
    },
    "link_dir": "/data/archive/1789596243.57326",
    "newest_archive_date": "2026-09-16T22:04:07.824475+00:00",
    "num_failures": 0,
    "num_outputs": 6,
    "oldest_archive_date": "2026-09-16T22:04:04.056790+00:00",
    "path": "/posts/small-programming-tricks-matter/",
    "schema": "Link",
    "scheme": "https",
    "snapshot_id": "5c682b56-da1c-44b3-b579-a8693adccda6",
    "sources": [
        "/data/sources/1789596243-import.txt"
    ],
    "tags": null,
    "tags_str": "",
    "timestamp": "1789596243.57326",
    "title": "Small Programming Tricks \u00b7 will keleher",
    "updated": "2026-09-16T22:04:04.056256+00:00",
    "updated_date": "2026-09-16 22:04",
    "url": "https://will-keleher.com/posts/small-programming-tricks-matter/"
}