Michael Hansson

tech.davis-hansson.com · Personal blog · on HN since 2019

Michael Hansson writes about software engineering, covering GNU Make, CI, databases and backups, plus essays comparing Congress to a stack machine.

What HN saysHN commenters repeatedly point to his opinionated GNU Make guide as a good way to use make, and also cite his post on CI infrastructure.
15HN people shared it
5linked it in comments
13stories submitted
868story points
12 months agolast shared
2019people per year2026

Most-shared posts

  1. 1
    An opinionated approach to GNU Make
    9 people · 612 points · first shared 2019 · 194 comments on HN
  2. 2
  3. 3
  4. 4
  5. 5
    Adwords is being used to spoof news headlines
    1 people · 3 points · first shared 2022 · 1 comments on HN
  6. 6
    The United States Congress is an elegant stack machine
    1 people · 3 points · first shared 2019 · discussion on HN
  7. 7
  8. 8
    Ci offgrid
    1 people · first shared 2025
  9. 9
    Price wars
    1 people · first shared 2022

What HN people wrote when they linked it

h4l · 2022-08-12
I've found these guidelines for Makefiles make for a pretty good experience using make: https://tech.davis-hansson.com/p/make/ The advice on output sentinel files for rules creating multiple files helps keep rebuilding dependencies reliable. Avoiding most of the cryptic make variables also helps Makefiles to remain easily understandable when you're not frequently working on them. And using .ONESHELL to allow multi-line statements (e.g. loops, conditional etc) is great. No need to contort things into one line. or escape line breaks. Seems like you could even use a more serious programming language instead of sh/bash by setting SHELL to Python or similar. That may be a road to madness though...
jakewins · 2025-11-19
Yeah agreed, CI infra provides tons of value. Ended up expanding this little quip into a blogpost to refer to in the future, feedback welcome! https://tech.davis-hansson.com/p/ci-offgrid/
jchw · 2022-09-27
There's lots of different opinions on how to use Make, but here's one. https://tech.davis-hansson.com/p/make/
hardwaresofton · 2022-09-18
Hey HN, I built randomneo.city since people didn't like my comment on the randomgeo.city post[0]. Clearly I don't take downvotes well. That said, the code is powered by SvelteKit, SQLite and open source: https://gitlab.com/mrman/randomneocity I have to say, I'm really starting to like building everything with SvelteKit -- I'm a huge 3-tier architecture fan, and it just doesn't make sense these days to add an API repo for most small projects now. Node + TS + SvelteKit does most (to be fair, so would Nuxt or Next). It's been a fantastically productive stack for me. Things I still need to do: - Add automatic scraping of neocities' sites so the site can stay up to date - Filter out sites which aren't done (they all have the same text) - Add chat/social features (???) This was also a great chance to try out Just[1] which strives to replace make[2] -- it's been nice! In classic distracted style I use just[3], make with good defaults[4][5] and my usual flavor of makefile[6][7] in the repo. [0]: https://news.ycombinator.com/item?id=32305300 [1]: https://github.com/casey/just [2]: https://www.gnu.org/software/make/ [3]: https://gitlab.com/mrman/randomneocity/-/blob/main/Justfile [4]: https://tech.davis-hansson.com/p/make/ [5]: https://gitlab.com/mrman/randomneocity/-/blob/main/infra/Makefile [6]: https://vadosware.io/post/setting-up-mailtrain-on-k8s/#step-1-figure-o… [7]:…
charlesdaniels · 2020-06-09
* AWK - I read "The Awk Programming Language"[0] cover to cover. It's a very well written text, and it not all that long. The examples are very impressive. In terms of bang-for-the-buck of learning tools, AWK has definitely given me the most mileage. I probably use it at least a dozen times a day just for little things. However, you can wield it to write some very powerful scripts in very short amounts of time. * Make - I use Make for almost every project I write, even if the rules are just .PHONY shortcuts. Make solves a huge set of problems relating to the order in which things need to be run/built very well. There are arguable better tools, but Make is widely deployed, widely used, widely understood, and solve the problem well enough for a lot of small to medium projects (and some large ones too!). I got asked about it enough that I wrote an introductory guide for it[1] (disclaimer: self promotion of my own site, but I don't have any ads or make any money). If you feel like Make has a lot of legacy crust built up over the years, you should read[2]. * Graphviz[3] - a huge number of ad-hoc data structures that you will build for your projects can be hard to visualize, Graphviz makes it easier. One tactic I've found useful is to loop over nested structs using their memory address as the identifier in Graphviz, struct fields as text annotations, and nested struct pointers as outgoing links. This might sound fancy, but you can probably write an export_to_graphviz() function…

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