The key to unlocking the full potential of LLMs in coding lies in crafting precise prompts. The main challenge is...

Here is a bash script that I use to auto-configure displays on Ubuntu 24.04 with Xorg. Background

When debugging slow SQL queries, it’s helpful to understand the database engine's query plan. Whenever you execute a...

Rails wraps your parameters into an interface called StrongParameters. In most cases, your form submits your data in a nested...

github.com

The new params.expect method in Rails 8 improves parameter filtering, addressing issues with malformed input and enhancing security. It provides...

makandra dev
impactahead.com

Also see the list of IRB commands. Switching the context Changes the "default receiver" of expressions. Can be used to...

In development, we store files using ActiveStorage's disk service. This means that stored files are served by your Rails...

evilmartians.com

Some key highlights and points from the linked article TestProf II: Factory therapy for your Ruby tests. The Problem with...

makandra dev

A lesser known fact about PG enums is that they are ordered. This can be really handy when values have...

We recently migrated a Rails application from yarn to npm. We decided to go this step instead of upgrading to...

masilotti.com

Slow test suites are a major pain point in projects, often due to RSpec and FactoryBot. Although minitest and fixtures...

While the main goal always is to prevent long-running queries in the first place, automatic timeouts can serve as...

On our Ubuntu machines we have nautilus file manager with nautilus-extension-gnome-terminal installed. This adds an entry to...

Starting with ChromeDriver 127, if your application displays a beforeunload confirmation dialog, ChromeDriver will immediately close it. In consequence, any...

I recently stumbled upon the Rails feature composed_of. One of our applications dealt with a lot of addresses and...

You can improve your LIKE / ILIKE search queries in PostgreSQL by adding a GIN index with an operate class ("opclass...

Recently I needed to benchmark an Active Record query for performance measurements. I wrote a small script that runs each...

testing-library are widely used testing utilities libraries for javascript dependent frontend testing. The main utilities provided are query methods...

You are given two CSS selectors that you do not control. How can you build a new selector that matches...

Reacting on a class getting added can be done with a mutation observer. Example: const items = document.querySelectorAll('.item') const expectedClass...

makandra dev
github.com

I was recently asked to optimize the response time of a notoriously slow JSON API endpoint that was backed by...

makandra dev

While most Rails Apps are tied to at least one external REST API, machine-to-machine communication via GraphQL is...

chrisboakes.com

Debouncing a method call delays its execution until after a specified time has passed. If it's called again before...

This card is a short summary on different ways of assigning multiple attributes to an instance of a class.