In the 500k-ish lines of go code for my project at work, we have 4 fallthrough statements.
One was used incorrectly.
Two fell through to default and probably should have the default logic moved outside the switch.
Just one was arguably necessary.
@natefinch.bsky.social
Gopher at GitHub working on Copilot. Author of Mage. Dungeon Master and Magic player. Used to be NateTheFinch on the Bird Site that shall not be named.
In the 500k-ish lines of go code for my project at work, we have 4 fallthrough statements.
One was used incorrectly.
Two fell through to default and probably should have the default logic moved outside the switch.
Just one was arguably necessary.
#golang pro-tip:
Fallthrough literally falls through to the *next* case statement, no matter what the next `case xxxx` statement checks.
Fallthrough does not continue checking case statements and it doesn't jump to the `default:` statement.
In case you were looking for something to wear on a night around town.
29.01.2026 14:42 β π 1 π 0 π¬ 0 π 0Yas
bsky.app/profile/nate...
my grandmother, an Auschwitz survivor, was Anne Frankβs neighbor in Amsterdam, and Oma thinks this comparison is perfectly apt
28.01.2026 02:37 β π 7857 π 1952 π¬ 114 π 38In the world of professional cryptographers, the question is a settled matter: as of early 2026, Signal is the best encrypted messaging app for all but the most utterly pathological of edge cases.
27.01.2026 05:07 β π 70 π 25 π¬ 1 π 0You can't hand thousands of people guns, immunity from prosecution, and a power fantasy culture, and expect anything other than a bunch of trigger happy terrorists.
This is what our system explicitly encourages.
If I can't shoot pepper balls at the police, they shouldn't be able to shoot them at me (without having to prove to a judge that it was self defense without other recourse).
No officer should be able to murder someone on video and walk away any more than I could.
All of these ICE and CBP mf'ers deserve to be in jail. Congress needs to end qualified immunity. Being a state or federal officer does not *lower* the bar for your actions, it *raises* it. You are supposed to be trained. You are supposed to defend our rights, not violate them.
28.01.2026 00:03 β π 1 π 0 π¬ 1 π 0Great post! Talking about YAGNI is the real sign of an experienced engineer in my opinion.
27.01.2026 22:31 β π 0 π 0 π¬ 0 π 0One of the most important powers of a senior engineer is the ability to say "No", and have people actually listen.
Do not hesitate to use this power to protect your team and your project.
Many people will ask "how" to accomplish something, but few will ask *if* this is a thing that should be done.
Meme of Ron Swanson in which the top image has an officer challenging Ron in a park. The meme text at the top says "You can't just ignore the 4th ammendment!" The subtitles for the scene have Ron saying "Not to worry, I have a permit." The second image is a piece of printer paper that just has "I can do what I want" printed on it. The meme text on the image says - This is just a memo that says "I can do what I want"
ICE, evidently
22.01.2026 21:00 β π 2 π 0 π¬ 0 π 1Having data objects as interfaces w/ logic tends to cause you to add unrelated logic into each of the implementation types. This means you end up with parts of your logic for X feature spread across a bunch of other packages/files, which makes it hard to keep that code consistent and understandable.
22.01.2026 17:42 β π 0 π 0 π¬ 0 π 0#golang hot tip - if an interface is 95% Getters, you should probably instead use plain old struct fields, and use logic at creation time to populate the fields differently for different types.
Separating logic and data will make your code easier to maintain and understand.
Today's task: Trying to convince product that we don't need special logic to mark a particular category of requests as free... when those requests only amount to 0.2% of the average user's costs anyway.
This is like buying a $10 meal and worrying about whether they charge you 2 cents for the straw.
I have had to take this card out of *the 99* of bracket 3 decks because it's so gross. Sure, people should run more removal, but still....
16.12.2025 15:57 β π 1 π 0 π¬ 0 π 0*from Afghanistan, geez.
03.12.2025 22:17 β π 1 π 0 π¬ 0 π 0Subscribing as this is relevant to my interests. ICE has been doing their gestapo impression in our area, and among other things, two of my daughter's best friends are from Afghani and their parents are some of the same ones brought to the US after they helped US troops.
03.12.2025 22:16 β π 1 π 0 π¬ 1 π 0I really liked it when I was looking at it back several years. I should poke at it again and see how it has changed over the years.
Adding the ability to write (safe) runtime-executable scripts to a statically compiled program is pretty cool IMO.
I even wrote a little wrapper back in the day to make it easier to give starlark access to your program's data. No idea if it's still necessary in the current iteration (back then, it was pretty cumbersome to pass a struct value to a starlark script, for example, so my library did it for you).
01.12.2025 14:51 β π 1 π 0 π¬ 0 π 0It's like they implemented "Python: just the good stuff".
I really like it as a way to give end-users safe ways to programmatically extend your software (even though that's not really what it's designed for... it's designed more as "smart config").
Lol omg slightly shorter π
19.11.2025 13:22 β π 0 π 0 π¬ 0 π 0Without unique error codes, all the client can do is display your error message and give up in the dumbest manner possible.
With error codes, the client can behave more intelligently - maybe show a dialog to request access to the directory, maybe show the list of trade-restricted countries, etc.
For example, maybe you return 403 forbidden - is that because the user made a request from a Trade Restricted country, or because they tried to read a directory they don't have permission for, or because they tried to delete a file they have read-only access to?
10.11.2025 17:39 β π 0 π 0 π¬ 1 π 0Responding with json allows you to definite any number of unique error codes to fit your service's specific needs. This is exactly like returning well-known error types in Go. Clients can programmatically handle known errors, rather than just displaying an error message and giving up.
10.11.2025 17:39 β π 0 π 0 π¬ 1 π 0Define a standard json body schema that *all* endpoints implement, so that clients can build that into their response handling logic. This makes their error handling logic a lot more robust, and means the API authors have a lot more flexibility in how you can communicate errors to clients.
10.11.2025 17:39 β π 1 π 0 π¬ 1 π 0If a client gets a 400, they need to know *how* the request was bad, so they can convey it to the user. They should get a body something like this:
{
"error" : {
"code" : "invalid_filename_characters",
"field" : "filename",
"message" : "filenames cannot contain emoji"
}
}
The most important thing you can do when building an HTTP API is to define a json error response body and unique response codes.
HTTP status codes are *not* sufficient.
Clients need more detail to provide a good UX for users.
There are a million things that can cause a 400 Bad Request, for example.
This is not the post apocalyptic RPG I was promised.
04.11.2025 01:35 β π 0 π 1 π¬ 0 π 0Yep. π€·ββοΈ. I'm not on the infra team. They're aware of the problem. There are some solutions like this being bandied about.
31.10.2025 14:46 β π 1 π 0 π¬ 0 π 0