Nate Finch's Avatar

Nate Finch

@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.

2,078 Followers  |  349 Following  |  120 Posts  |  Joined: 07.02.2024  |  2.0217

Latest posts by natefinch.bsky.social on Bluesky

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.

12.02.2026 19:42 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

#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.

12.02.2026 19:42 β€” πŸ‘ 5    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

In case you were looking for something to wear on a night around town.

29.01.2026 14:42 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Yas
bsky.app/profile/nate...

29.01.2026 01:12 β€” πŸ‘ 7    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

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    πŸ“Œ 38

In 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    πŸ“Œ 0

You 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.

28.01.2026 00:03 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

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.

28.01.2026 00:03 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

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    πŸ“Œ 0

Great post! Talking about YAGNI is the real sign of an experienced engineer in my opinion.

27.01.2026 22:31 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

One 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.

27.01.2026 21:33 β€” πŸ‘ 5    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
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"

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    πŸ“Œ 1

Having 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.

22.01.2026 17:42 β€” πŸ‘ 5    πŸ” 2    πŸ’¬ 2    πŸ“Œ 0

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.

09.01.2026 20:30 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

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    πŸ“Œ 0

Subscribing 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    πŸ“Œ 0

I 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.

01.12.2025 14:52 β€” πŸ‘ 5    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

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    πŸ“Œ 0

It'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").

01.12.2025 14:51 β€” πŸ‘ 5    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Lol omg slightly shorter πŸ˜‚

19.11.2025 13:22 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Without 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.

10.11.2025 17:39 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

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    πŸ“Œ 0

Responding 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    πŸ“Œ 0

Define 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    πŸ“Œ 0

If 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"
}
}

10.11.2025 17:39 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

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.

10.11.2025 17:39 β€” πŸ‘ 1    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0

This is not the post apocalyptic RPG I was promised.

04.11.2025 01:35 β€” πŸ‘ 0    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

Yep. πŸ€·β€β™‚οΈ. 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

@natefinch is following 20 prominent accounts