Alex Chan

alexwlchan.net · Personal blog · on HN since 2014

Alex Chan, a software developer, writes about Git, personal archiving, static sites, macOS tools, and small programming problems.

What HN saysCommenters admire the site's look and link its practical posts on webarchive files, SQLite copying, and working with large S3 objects.
60HN people shared it
18linked it in comments
110stories submitted
4.0Kstory points
2 months agolast shared
2014people per year2026

Most-shared posts

  1. 1
    A Plumber’s Guide to Git (2018)
    4 people · 3 points · first shared 2022 · discussion on HN
  2. 2
    Using static websites for tiny archives
    3 people · 395 points · first shared 2024 · 78 comments on HN
  3. 3
    The Internet forgets, but I don't want to
    3 people · 12 points · first shared 2025 · 1 comments on HN
  4. 4
    When square pixels aren't square
    3 people · 7 points · first shared 2025 · discussion on HN
  5. 5
    Documenting My DNS Records
    3 people · 6 points · first shared 2024 · 1 comments on HN
  6. 6
    Take More Screenshots (2022)
    3 people · 6 points · first shared 2023 · 1 comments on HN
  7. 7
    Dreaming of a Ten-Year Computer
    3 people · 5 points · first shared 2026 · 1 comments on HN
  8. 8
    Watching for File Changes on macOS
    3 people · 4 points · first shared 2026 · discussion on HN
  9. 9
    A faster way to copy SQLite databases between computers
    2 people · 507 points · first shared 2025 · 196 comments on HN
  10. 10
    Can you take an ox to Oxford?
    2 people · 37 points · first shared 2025 · 72 comments on HN
  11. 11
    Linking to text fragments with a bookmarklet
    2 people · 29 points · first shared 2025 · 8 comments on HN
  12. 12
    Detecting AV1-encoded videos with Python
    2 people · 21 points · first shared 2025 · 19 comments on HN
  13. 13
    Cut the Cutesy Errors
    2 people · 16 points · first shared 2023 · 11 comments on HN
  14. 14
  15. 15
    Drawing Truchet Tiles in SVG
    2 people · 5 points · first shared 2025 · discussion on HN

What HN people wrote when they linked it

andrewfromx · 2025-05-01
man this post got zero up votes. And we are the only two here. I was so inpsired by the look and feel of https://alexwlchan.net/2025/copying-sqlite-databases/ which is on the homepage right now I thought, if I just make a story look that good, it will also get a lot of votes...
paulcapewell · 2024-07-05
See also: 'look for (nearly) empty directories and delete them' - https://alexwlchan.net/2024/emptydir/
Vegenoid · 2024-06-04
The author considered the proprietary nature of the webarchive format, and determined that it was readable without Apple software, and that it wouldn't be too difficult to create a tool to view or transform webarchive files if Safari were to disappear: https://alexwlchan.net/til/2024/whats-inside-safari-webarchive/ Of course, without a working implementation, there could be hidden obstacles.
toomuchtodo · 2024-03-23
Are you able to seek and selectively extract from squashfs archives using range headers if stored in object storage systems like S3? Example: https://alexwlchan.net/2019/working-with-large-s3-objects/
alexwlchan · 2024-01-05
> I think that all "photos" or "videos" are just a view of the underlying "photo or video object". If you crop a video, the full-size video will remain. Only if you export the video, it will be cropped and the smaller file size will manifest. Yup, the Photos app keeps the unmodified original file, and then any edits/crops are stored separately. You can always revert to the original file and redo your edits. So they might be storing multiple copies of the same image, with and without edits. Which API were you looking at for "file size"? I was able to get the size data from Photos.app with the PhotoKit API [1]. I've only tested it with my library of ~26k items, but it was useful for getting an indicator of the biggest items. (Although I didn't think to check whether exporting a 1GB video caused my iCloud usage to drop by 1GB.) [1]: https://alexwlchan.net/2023/finding-big-photos/
bloopernova · 2023-11-10
Try this tutorial: https://alexwlchan.net/a-plumbers-guide-to-git/ It helped me to more fully understand Git.
sillysaurusx · 2023-09-14
I encourage everyone to read A Plumber's Guide to Git: https://alexwlchan.net/a-plumbers-guide-to-git/ It's not a book, just a series of five short blog posts. Part 1 explains precisely where files live: https://alexwlchan.net/a-plumbers-guide-to-git/1-the-git-object-store/ $ mkdir animals $ cd animals $ git init $ echo "Big blue basilisks bawl in the basement" > animals.txt $ git hash-object -w animals.txt b13311e04762c322493e8562e6ce145a899ce570 $ find .git/objects -type f .git/objects/b1/3311e04762c322493e8562e6ce145a899ce570 $ rm animals.txt $ git cat-file -p b13311e04762c322493e8562e6ce145a899ce570 > animals.txt Congratulations, you just did a `git restore animals.txt` manually. Parts 2 through 5 are equally illuminating.
slaymaker1907 · 2023-08-10
Sadly, you are not correct about slashes. They are allowed in filenames for Macs https://alexwlchan.net/2021/slashes/
ad404b8a372f2b9 · 2023-02-15
It's the sequel to playful error messages (https://alexwlchan.net/2022/no-cute/), this past decade my hate for malfunctioning software has started transcending the machine and reaching far away to the people who mock me for it.
vmurthy · 2022-12-02
As it turns out, I have been having fun with the plumbers guide to git [0]. While it's not a book, it is a way to understand the inner workings of Git . Think of it as first principles. The book "Pro Git" linked by @kgodey has a few chapters related to this "plumbing" [1] [0]https://alexwlchan.net/a-plumbers-guide-to-git/ [1] https://git-scm.com/book/en/v2/Git-Internals-Git-Objects
TheRealPomax · 2022-08-04
This was a twitter thread, so not too surprising, but the concluding tweet went there too: "Good error messages explain what’s gone wrong, and give clear instructions for what to do next – and being cutesy rarely helps." and there's a link to https://alexwlchan.net/2020/10/the-importance-of-good-error-messages as the dedicated writeup (also from tweets) for that specific point.
andrewzah · 2021-02-06
Removing drm from .azw3 is easy. [0] All you need is the ID of your kindle, since it's tied to your device. There is also a plugin for Calibre, although I haven't tested this myself. I'm not sure if it requires a device ID or not. [1] [0]: https://alexwlchan.net/2019/08/removing-the-drm-from-my-kindle-books/ [1]: https://github.com/apprenticeharper/DeDRM_tools/wiki/Exactly-how-to-re…
ignoranceprior · 2020-11-09
Depending on the parser, YAML can be used for execution of arbirtrary code: https://alexwlchan.net/2019/12/yaml-impossible/
goatsi · 2020-04-01
You can download a complete archive of all the bookmarks and pages: https://alexwlchan.net/2017/07/backing-up-pinboard-archives/
drifkin · 2014-07-10
Exactly, Pinboard has a pretty good API, so you can handle the backups yourself without too much trouble. I came across a post [1] with a backup script. It refers to another link [2] that shows you can just use a simple curl and get all of your data. [1] http://alexwlchan.net/2013/03/pinboard-backups/ [2] http://supersoju.com/blog/2013/04/01/pinboard-backups-in-1-line/

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close