Push ifs up and fors down
A short note on two related rules of thumb.
matklad's Arts&Crafts
Visit matklad.github.io → RSS feedOn Hacker News Jul 2019 – Oct 2026
Software Engineering 40Systems & Performance 11Tools & Productivity 10Programming Languages 10Web & Frontend 4Math & Algorithms 3
A short note on two related rules of thumb.
LSP (language server protocol) is fairly popular today. There's a standard explanation of why that is the case. You probably have seen this picture before:
Which is better for code reviews, a unified diff or a split diff?
Many command line utilities support short form options (-f) and long form options (--force). Short form is for interactive usage. In scripts, use the long form.
We talk about programming like it is about writing code, but the code ends up being less important than the architecture, and the architecture ends up being less important than social issues.
Up Enter Up Up Enter Up Up Up Enter
Zig is a very interesting language from an IDE point of view. Some aspects of it are friendly to IDEs, like a very minimal and simple-to-parse syntax (Zig can even be correctly lexed line-by-line, very cool!), the absence of syntactic macros, and ability to do a great deal of semantic analysis on a file-by-file basis…
I already have a dedicated post about a hypothetical Zig language server. But perhaps the most important thing I've written so far on the topic is the short note at the end of Zig and Rust.
A grab bag of less frequently talked about git adjacent points.
I want a better shell.