Top all-time · #22971
Questionable Services
Personal blog · elithrar.github.io/articleprogrammingwebsystems
Questionable Services is a personal blog at elithrar.github.io about programming, web and systems. Since 2014, 3 different Hacker News readers have linked it 6 times, most often “Custom Handlers and Avoiding Globals in Go Web Applications”. The last post was in 2020, but the archive is still widely read.
Too few sampled comments (2) to say how often HN recommends it.?
Why HN links it
HN commenters cite Matt Silverlock's Go posts on building HTTP services with net/http and on handler design, such as passing an app or context type to constructors instead of using dependency injection or globals.
Summarised by Claude from a sample of 2 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Writings about computing, agents, and the Internet.
Most-linked posts?
- Custom Handlers and Avoiding Globals in Go Web Applications2 people · 2 mentions · first linked 2014-07-17
What Hacker News says?
I would choose Go. It comes with an excellent built-in package net/http ( https://godoc.org/net/http ) that quickly allows you to setup a web service. An Go's mechanic (?) of implicit satisfaction of interfaces allows you to do some really cool things. One of the gripes about Go seems to be error handling, and your code ends up with a whole bunch of 'if err != nil { stuff }'. Matt Silverlock ( http://elithrar.github…
Comment linking /article/http-handler-error-handling-revisited/
on “First chapter of Kernighan and Donovan's new Go book [pdf]”Submitted Windows Subsystem for Linux with zsh and tmux as a story · 3 points
HN discussion> I discovered there are better and more idiomatic ways to do this type if thing without resorting to dependency injection. Agreed. Write a constructor[1] for your "app" or "context" type, and pass it around as needed. You both get to avoid globals and any magic dependency injection. As a bit of shameless self-promotion, I wrote an article about how to achieve this when writing HTTP handlers in Go: http://elithrar.g…
Comment linking /article/custom-handlers-avoiding-globals/
on “Dependency Injection with Go”Submitted From Vim to Visual Studio Code as a story · 3 points
HN discussionSubmitted Windows Subsystem for Linux with Zsh, Tmux and Docker as a story · 2 points
HN discussionSubmitted Custom Handlers and Avoiding Globals in Go Web Applications as a story · 2 points
HN discussion