Bookmarks

Bookmarks

49642 bookmarks
Custom sorting
15 Reasons I Love Go
15 Reasons I Love Go
Should you choose Go four your next projects? Here are 15 reasons why Go excels for writing backend apps and CLI tools
·appliedgo.net·
15 Reasons I Love Go
Preventing accidental struct copies in Go
Preventing accidental struct copies in Go
By default, Go copies values when you pass them around. But sometimes, that can be undesirable. For example, if you accidentally copy a mutex and multiple goroutines work on separate instances of the lock, they won’t be properly synchronized. In those cases, passing a pointer to the lock avoids the copy and works as expected. Take this example: passing a sync.WaitGroup by value will break things in subtle ways: func f(wg sync.WaitGroup) { // ... do something with the waitgroup } func main() { var wg sync.WaitGroup f(wg) // oops! wg is getting copied here! } sync.WaitGroup lets you wait for multiple goroutines to finish some work. Under the hood, it’s a struct with methods like Add, Done, and Wait to sync concurrently running goroutines.
·rednafi.com·
Preventing accidental struct copies in Go
No nonsense guide to Go projects layout
No nonsense guide to Go projects layout
It’s a recurring question on gopher slack and discord: «How should I set up my go project repository?». Unfortunately, there are a lot of both outdated and o...
·laurentsv.com·
No nonsense guide to Go projects layout
Ten commandments of Go — Bitfield Consulting
Ten commandments of Go — Bitfield Consulting
I spend a lot of time working with students to help them write clearer, better, and more useful Go programs, using a fairly small set of general principles, and here they are. The first is “be boring”, and I’ve tried to follow that advice.
·bitfieldconsulting.com·
Ten commandments of Go — Bitfield Consulting
Using Signals With Go - Calhoun.io
Using Signals With Go - Calhoun.io
In this article we explore what signals are and how we can listen for them in Go programs. We also explore some common pitfalls, like forgetting to stop listening for a signal once we are done with it.
·calhoun.io·
Using Signals With Go - Calhoun.io
Understanding Ruby’s `tap` — A Powerful Debugging and Configuration Tool
Understanding Ruby’s `tap` — A Powerful Debugging and Configuration Tool
Ruby’s Object#tap is a small but powerful method that often goes unnoticed. It allows you to “tap into” a method chain, perform some operation, and return the original object—regardless of what the block inside returns. This makes it particularly useful for debugging, configuration, or inserting side effects without breaking the flow of your code. A Simple Use Case: Debugging Take the following example: 1 n = [1,2,3].map { _1 % 2 }.map { _1 * 10 } This returns [10, 0, 10]. But what if that’s not what you expected? You might want to inspect the result of the first map: 1 2 3 4 n = [1,2,3].map { _1 % 2 } puts n.inspect n = n.map { _1 * 10 } puts n.inspect Using tap, we can make this more elegant: 1 2 3 4 n = [1, 2, 3].map { _1 % 2 } .tap { puts _1.inspect } .map { _1 * 10 } .tap { puts _1.inspect }
·hsps.in·
Understanding Ruby’s `tap` — A Powerful Debugging and Configuration Tool
The Unexpected DB Connection Pool Leak in Our Rails App
The Unexpected DB Connection Pool Leak in Our Rails App
Everything looked fine — until it wasn’t. Out of nowhere, our worker tier started throwing this error: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use We weren’t doing anything wild. Our RAILS_MAX_THREADS matched
·build.betterup.com·
The Unexpected DB Connection Pool Leak in Our Rails App
Memoizing components in React: a case for useMemo
Memoizing components in React: a case for useMemo
React.memo is often used to optimize component rendering, but useMemo offers more control and transparency. This article explains why useMemo could be a solution too to memoize components in React applications until the React Compiler take care of it for us.
·gabrielpichot.fr·
Memoizing components in React: a case for useMemo
sokmesakhiev/ai_localizer
sokmesakhiev/ai_localizer
Contribute to sokmesakhiev/ai_localizer development by creating an account on GitHub.
·github.com·
sokmesakhiev/ai_localizer
Striping Postgres data volumes - a free lunch?
Striping Postgres data volumes - a free lunch?
A small follow up on my previous post on various Postgres scale-up avenues in my preferred order. The post received quite a bit of interest - meaning people at least still “wish” performant databases :) And - the ones who are willing to put in a bit of effort with...
·kmoppel.github.io·
Striping Postgres data volumes - a free lunch?
Git Rebase Squash | Alchemists
Git Rebase Squash | Alchemists
A collective devoted to the craft of software engineering where expertise is transmuted into joy.
·alchemists.io·
Git Rebase Squash | Alchemists
Supercharging Rails Development with Cursor AI
Supercharging Rails Development with Cursor AI
At RapidRuby, I’m always exploring tools that help Rails developers build faster, ship cleaner code, and stay in flow. One of the best tools for that is [Cursor](https://cursor....
·rapidruby.com·
Supercharging Rails Development with Cursor AI