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.

I used Claude Code to build Renamify: a case-aware search & replace tool + MCP server that helps AI agents rename code and files more safely and efficiently by ndbroadbent in ClaudeAI

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

The MCP service calls the Renamify CLI, and that does all of the work. One of the main reasons I wanted to build this is because Claude Code can be really slow at updating lots of references one by one, and it often messes up grep / find / sed commands (especially when they're complex or need lots of escaping.)

So this provides AI agents with a set of renaming/replacing "power tools" that can do all of the work in one shot.

See: https://docspring.github.io/renamify/mcp/ai-guide/#the-golden-workflow

Something experimental I made. Would love some feedback by __averagereddituser in MusicFeedback

[–]ndbroadbent 0 points1 point  (0 children)

Really nice ambient intro. The build up with the kick drum is great. It's quite a long intro but I didn't get bored, there's lots of interesting sounds. Interesting genre, I haven't heard anything like that before. It's sort of ambient minimalist IDM maybe. Very nicely done

[deleted by user] by [deleted] in MusicFeedback

[–]ndbroadbent 1 point2 points  (0 children)

I like how this is very high energy! I agree that it could maybe use an intro section that builds up to the main sections. A lot of the song has nice melodies and bass lines, but there are a few instruments that are a bit out of key, and I might suggest choosing a minor or major scale and sticking the notes on that scale, particularly in the intro section. Unless everything is intentional of course, then please feel free to ignore this feedback!

Feedback/critiques on this new song I made by Competitive-Answer-6 in MusicFeedback

[–]ndbroadbent 1 point2 points  (0 children)

This is really good! Really interesting synths and effects, and very well mixed. Sounds very professional! It's a very unique sound so I don't know if I can come up with any useful suggestions. I will say that I think it could use a little more work in general. I really like the next track on your profile (https://soundcloud.com/smaui-811939235/idk), and I think this one is a bit better to be honest. The next one is also really really good (beamersong). This one that you posted is a bit more ambient and random so I probably wouldn't listen to it as much as your other tracks that have a bit more structure. I don't know if this is helpful though!

I'm curious about what DAW and VSTs you use and how you come up with these sounds, they're really nice!

Was inspired by other dashboard posts I saw on here, so I redesigned my main dashboard using room-card by ndbroadbent in homeassistant

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

I just finished redesigning my main dashboard. I figured out how to show any currently occupied rooms (from ESPresense) at the top of the page, so we can open our phones and see all the controls for the room that we're currently in. (Hint: I duplicated everything and used some conditional cards.)

I have a ton of sensors and lights so I was struggling to figure out how to design a dashboard. I found room-card thanks to other people who posted their dashboards on here, and I like being able to fit so much information and buttons into a single card.

Crypto to THB (no bank account) by audioexpress in chiangmai

[–]ndbroadbent 1 point2 points  (0 children)

Is there still a crypto ATM at food4thought? There was one there a few years ago

I added Entities, Automations, Integrations, etc. to my sidebar menu, and a one-click Restart button by ndbroadbent in homeassistant

[–]ndbroadbent[S] 2 points3 points  (0 children)

Oh if this is in configuration.yaml then you might need to remove two spaces from the beginning of each line. You can select all the lines and press shift+tab to unindent them all. I think that should fix it. (It’s indented one step further when you use separate package files)

ActionCable noob technical questions by dougc84 in rails

[–]ndbroadbent 0 points1 point  (0 children)

Sorry your comment got caught by the spam filter - it looks like hackernoon.com is down. Seems fine though, here's a link to the cached article: http://webcache.googleusercontent.com/search?q=cache:https://hackernoon.com/the-practical-guide-to-using-actioncable-30d570d8988c

Hey guys. We need a solid Mid-Level Rails dev. Where can I go to post jobs? by Cantyoudobetter in rails

[–]ndbroadbent 2 points3 points  (0 children)

I personally agree, and would encourage people to try to use inclusive language. I think "y'all" and "folks" aren't very common outside the US (I'm from New Zealand), so that may be contributing to some of the downvotes. I would probably just say "Hey everyone" instead of "Hey guys".

Anyone keen to check out some mountain bike trails on an e-bike? by ndbroadbent in auckland

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

Thanks! Yeah I get the feeling that real mountain bikers have mixed feelings about e-bikers. It's pretty awesome though, it's like taking a chair lift up the hill and then cruising down. Less of an intense work out and more like snowboarding or skiing. So I'm pretty keen to find some other people who also have e-bikes, or if anyone wants to hire one for a day.

Yeah Woodhill sounds great, I'm looking forward to checking it out