Scary that this is widely accepted.
Scary that this is widely accepted.
UNIX sockets are underestimated. They can be used for connections between programs on a local machine (e.g. a CLI program for a server, or a controller and its workers) the same way as a TCP socket, but with the advantage of being actual files with permissions for access control.
UNIX sockets are underestimated. They can be used for connections between programs on a local machine (e.g. a CLI program for a server, or a controller and its workers) the same way as a TCP socket, but with the advantage of being actual files with permissions for access control.
I'm investing time to do it the right way for Boulevard and for other projects. Worth it.
I'm investing time to do it the right way for Boulevard and for other projects. Worth it.
Obviously it's longer, but it is more readable to me, especially for nested handlers. I'm not 100% convinced though, maybe I'm missing something.
What do you think?
Obviously it's longer, but it is more readable to me, especially for nested handlers. I'm not 100% convinced though, maybe I'm missing something.
What do you think?
This is starting to look good:
This is starting to look good:
Average tenure in tech companies is ~2y. Enough said.
Average tenure in tech companies is ~2y. Enough said.
There's a serious problem with encoding/json in #Go: DisallowUnknownFields is useless. When set, the decoder will reject objects with unknown fields, but
1/ the error cannot be identified because it has no specific type (fmt.Errorf);
There's a serious problem with encoding/json in #Go: DisallowUnknownFields is useless. When set, the decoder will reject objects with unknown fields, but
1/ the error cannot be identified because it has no specific type (fmt.Errorf);
HTTP is a huge mess. Let us take range requests:
- Ranges are closed interval: "3-8" includes byte 8. Makes every calculation harder and defies all conventions.
- A server can send back any subset of the requested ranges. Ask for A, get B, yup that makes total sense.
HTTP is a huge mess. Let us take range requests:
- Ranges are closed interval: "3-8" includes byte 8. Makes every calculation harder and defies all conventions.
- A server can send back any subset of the requested ranges. Ask for A, get B, yup that makes total sense.
The problem with most static linters —here staticcheck for #Go— is that they mix useful diagnostics (e.g. detecting calls to deprecated functions) with pure opinion (noooo you cannot early return with a branch, you have to use the full expression in a single return statement!).
The problem with most static linters —here staticcheck for #Go— is that they mix useful diagnostics (e.g. detecting calls to deprecated functions) with pure opinion (noooo you cannot early return with a branch, you have to use the full expression in a single return statement!).
First day is just a warm-up as usual. A good time to remember that MAP & co. support multiple input lists, so there is no need to code a ZIP function.
First day is just a warm-up as usual. A good time to remember that MAP & co. support multiple input lists, so there is no need to code a ZIP function.
I've settled on HTTP over UNIX sockets for the control API of Boulevard. It simple and secure (UNIX sockets are files, you can enforce ownership and permissions) and the #Go standard library supports it. Great.
I've settled on HTTP over UNIX sockets for the control API of Boulevard. It simple and secure (UNIX sockets are files, you can enforce ownership and permissions) and the #Go standard library supports it. Great.
Being aware of the difference for your own work is critical. And it's hard.
Being aware of the difference for your own work is critical. And it's hard.