For the past year and a half, I’ve been re-writing the renderer for ProseMirror, the popular rich text editing library. This new renderer has finally been marked as stable and published as part of @handlewithcare/react-prosemirror, a library that integrates React and ProseMirror. Here’s a very deep dive into the journey I took, and why it led me where it did!
How to Implement Relationship-Based Access Control (ReBAC) in a Ruby On Rails API? | Auth0
The way to implement an authorization system depends on your application's needs. Let's explore Relationship-Based Access Control (ReBAC) and implement it in a Rails API using OpenFGA.
I'll show you how I built a markdown blog with Go. From choosing markdown for its simplicity to leveraging Go's powerful libraries, this blog shares insights into modern web development without the headaches of complex frameworks.
Why does Go's io.Reader have such a weird signature?
I’ve always found the signature of io.Reader a bit odd:
type Reader interface {
Read(p []byte) (n int, err error)
}
Why take a byte slice and write data into it? Wouldn’t it be simpler to create the slice
inside Read, load the data, and return it instead?
// Hypothetical; what I *thought* it should be
Read() (p []byte, err error)
This felt more intuitive to me—you call Read, and it gives you a slice filled with data,
no need to pass anything.
OpenTelemetry: A Guide to Observability with Go | Blog
Modern applications are often complex, distributed systems. Debugging them is not fun: you have to follow requests across services, logs get lost, and metrics are often hard to correlate. It's like looking for a needle in a haystack - except the haystack is on fire, and the needle keeps moving. This is where OpenTelemetry (OTel) can help.
Just like any other dynamically growable container structure, Go slices come with a few
gotchas. I don’t always remember all the rules I need to be aware of. So this is an attempt
to list some of the most common mistakes I’ve made at least once.
Slices are views over arrays
In Go, a slice is a lightweight wrapper around an array. Instead of storing data itself, it
keeps track of three things: a pointer to an underlying array where the data is stored, the
number of elements it currently holds, and the total capacity before it needs more space.
The Go runtime defines it like this:
Quickly create stunning screenshots for social media with customizable backgrounds, browser frames, aspect ratios, borders, and more. Enhance your posts in just a few clicks!