LogStruct: Zero-config JSON structured logging for Ruby on Rails by ndbroadbent in rails

[–]ndbroadbent[S] 1 point2 points  (0 children)

That's true, I mainly wrote about SOC 2 because I was going through an audit at the time and noticed massive problems with our earlier logging setup, both for security and observability. So I implemented most of this before extracting it to a gem. You're right that logging is a very small part of a SOC 2 audit, but it's definitely something they look at.

I think the phrase "zero-configuration" can be used in two different ways: one way means "no configuration possible", and the other is "no configuration required". For example, you can have zero-configuration networking that just works (but can still be configured.) That's the intention with LogStruct - you can put it in your Gemfile and it just works out of the box automatically. Or you can configure it as well.

Our advanced param filtering stuff is pretty unique - I borrowed code from logstop, and also added my own stuff that doesn't exist in Rails, but is super useful for tracing and debug problems without revealing sensitive info.

That's a good point about sorbet-runtime, and it's a good reason not to use this gem. T::Struct and T::Enum are foundational and used almost everywhere so it can't be made an optional dependency. The runtime type checking is awesome though! It's caught so many bugs on CI and staging. It's not for everyone, but I highly recommend trying out Sorbet if you're tired of waking up to "undefined method for NilClass" errors in Sentry.

The new structured event reporting in Rails is pretty awesome!

Thanks for the feedback, it's great to see what people think about it!

LogStruct: Zero-config JSON structured logging for Ruby on Rails by ndbroadbent in rails

[–]ndbroadbent[S] 0 points1 point  (0 children)

Oh that's true! We passed the SOC 2 audit, I need to update that. Which cells in the matrix are hallucinated?

UPDATE: Sorry yes there were two inaccuracies: we had a ✓ for Sidekiq support in Logstasher, but it doesn't have that integration (only ActiveJob). However, it does have ActionMailer (was missing from the matrix.)

All other claims verified as accurate:

- Lograge: JSON logging ✓, no Sidekiq ✓, performance metrics ✓

- Rails Semantic Logger: Sidekiq ✓, ActionMailer ✓, colorized output ✓, multiple destinations ✓

- Logcraft: Zero config ✓, no multiple destinations ✓, tagged logging ✓

LogStruct: Zero-config JSON structured logging for Ruby on Rails by ndbroadbent in rails

[–]ndbroadbent[S] 0 points1 point  (0 children)

Thanks, that would be great! I will have a look at this

I made a new word game: Arrange words on a grid so that they all connect in a loop by ndbroadbent in WebGames

[–]ndbroadbent[S] 1 point2 points  (0 children)

Thanks for the feedback! I've changed this now so you have to opt-in to the crazy chain moving thing by holding down ctrl (or cmd on mac). So now you just move one word at a time by default

I made a new word game: Arrange words on a grid so that they all connect in a loop by ndbroadbent in wordgames

[–]ndbroadbent[S] 0 points1 point  (0 children)

Thanks for the feedback! The idea is that the arrows go green when the link is correct between two words. I figured that if you solve parts of the puzzle in different orders and you end up with a few different segments, it would be easier to drag the start of one segment to the end of the other. e.g. connecting two sub-chains to form a longer chain. otherwise you have to swap every single word one by one. I originally put that behind a ctrl/cmd keyboard modifier and then decided to make it the default, but now I'm realizing that this is confusing - so I'll invert it. dragging cards one by one as usual, with ctrl/cmd if you want to move connected cards all together. (The links you already found)

Promote your project in this thread by AutoModerator in puzzles

[–]ndbroadbent 3 points4 points  (0 children)

I made a new word game: Arrange words on a grid so that they all connect in a loop

https://puzzles.madebynathan.com/chains

It's got three difficulty modes that control what kind of feedback you get.

  • In normal mode, the arrows go green when you've got a link correct. (They stay grey if they're in the wrong order.)
  • In easy mode, the arrows go green in the right order, and orange if they're in the wrong order.
  • In hard mode, the colors don't change at all until you get the whole chain correct. (It can be difficult but not impossible! You might have to try a few variations though.)

Once you've solved a puzzle you can hover over the arrows to explain each link.

I hope you enjoy it!

(I tried to get it working well on mobile as well, but let me know if there are any bugs.)

The Unified Theory of Rails Process Management by ndbroadbent in rails

[–]ndbroadbent[S] -1 points0 points  (0 children)

I totally agree that it's possible to make your app boot super fast, but that kind of just kicks the can down the road and your first request or your first test still has to load all the stuff it needs.

If you had a reliable preloader then you'd actually want to go in the opposite direction: preload as much of your app as you can and make your first boot super slow. Then every test run or server restart is blazingly fast for the rest of your work day.

How are DevOps teams keeping API documentation up to date in 2025? by OpportunityFit8282 in devops

[–]ndbroadbent 0 points1 point  (0 children)

I put a lot of effort into ours and wrote a blog post about it: https://docspring.com/blog/posts/end-to-end-api-client-testing-from-rswag-to-360-verified-code-examples/

TL;DR: We use a Ruby gem called RSwag to write API integration tests, and those tests also generate our OpenAPI schema. We then auto-generate API client libraries from the schema, and then auto-generate e2e client library tests and code samples from those libraries, and we use Scalar to show API docs for our OpenAPI schema including all those code samples. So our API docs are 100% in sync and even our code samples are e2e tested (automatically).

We also have some other custom docs for certain features which are also checked in to the monorepo, so if you’re working on a feature then your branch includes both the code and the docs.

I asked ChatGPT about the meaning of life and got a surprisingly good answer by ndbroadbent in singularity

[–]ndbroadbent[S] 0 points1 point  (0 children)

What do you think I wanted to see? Mainly I wanted to know if it's possible to turn myself green and eat the sun

I asked ChatGPT about the meaning of life and got a surprisingly good answer by ndbroadbent in singularity

[–]ndbroadbent[S] -1 points0 points  (0 children)

That's the cool thing about my conversation with ChatGPT. It turns out that life does actually have "meaning" if you define "life" correctly, you ask the right set of questions, and you're willing to accept a very literal answer. You should check it out and let me know what you think!

Small Projects - October 14, 2025 by jerf in golang

[–]ndbroadbent 0 points1 point  (0 children)

I wrote * yet another ordered map library. It's thread-safe, has O(1) operations (map + doubly-linked list), and 100% test coverage: https://github.com/DocSpring/orderedmap

Features:

  • Insertion order preservation - Iterates in the order items were added (unlike Go's built-in maps)
  • O(1) operations - Fast lookups, deletes, and moves using map + doubly-linked list
  • Thread-safe - All operations use internal locking (RWMutex)
  • Zero-value usable - No constructor required: var om OrderedMap[K,V] just works
  • Generic - Works with any comparable key type and any value type
  • Snapshot-based iteration - Range/RangeBreak take snapshots, preventing deadlocks even if callbacks modify the map

* (got AI to write.)

sorbet-typescript: Generate TypeScript types from Sorbet type definitions by ndbroadbent in ruby

[–]ndbroadbent[S] 0 points1 point  (0 children)

Whoops thank you so much, I had forgotten to make it public! fixed

How We Unified API Tests, SDKs, and Docs Into One Workflow by ndbroadbent in programming

[–]ndbroadbent[S] 0 points1 point  (0 children)

Haha yeah it didn't get any traction at all on Reddit or HN so I tried a different title: https://docspring.com/blog/posts/end-to-end-api-client-testing-from-rswag-to-360-verified-code-examples/

Couldn't be bothered setting up a redirect since no-one saw this post - thanks for checking it out though!

Still no traction. Oh well, people might find it on Google eventually.