TypeScript basically uses structural typing, which is conceptually quite similar to duck typing, but with static compile-time type checking...
I use the Gemini web chat interface quite extensively. One thing that is tedious is giving it all the context...
Sometimes you have a maintenance script where you want to iterate over all ActiveRecord models. Rails provides this out of...
When you query the browser for DOM elements, there are some footguns you should know about. Some lists are synchronized...
Mise manages Ruby, Node.js and pnpm versions. It replaces tools like rbenv and nvm. Mise can install precompiled Ruby binaries...
Compatibility: Angular 20+ with Jasmine 5.x and Karma 6.x As a default Angular CLI auto-generates test bootstrap...
You want to prevent input to a form field, but all the solutions have side effects: The [readonly] attribute is...
Full-text search can reach its limits in terms of flexibility and performance. In such cases, trigram indexes (pg_trgm...
Quick reference for passing data from Rails to JavaScript via Unpoly compilers. Haml Attribute Syntax # Ising hash rockets and string...
Quick guide for frequently used compiler selector patterns of Unpoly. 1. BEM Component Pattern When: Reusable UI components with multiple...
When RSpec sets out to print any given object to the console, it will never print more than 200 characters...
GoodJob and ActiveJob rescue exceptions internally, preventing exception_notification from triggering. This can cause silent job failures.To get notified, subscribe...
prettier calls itself an opinionated code formatter. I recommend using it for your JavaScript and TypeScript code. prettier only concerns...
If you run a Rails app that is using Turbo, you might observe that your integration tests are unstable depending...
Most of the time, when you are interested in any log output, you see the logs directly on your console...
The linked MDN article is quite informative of a neat feature supported by all major browsers: Unicode character class escape...
RSpec examples can get quite long, especially in feature specs. This makes them hard to read & understand. Also, when executing...
Modern CSS offers the field-sizing property to allow elements to automatically adjust size (width and/or height) to fit their...
When you repeat complex assertions in your tests multiple times, it might be a good idea to extract a custom...
We usually ship applications that self-host webfonts to comply with GDPR. Many popular web fonts are available as NPM...
Say you wrap your index view in a form to apply different filters like pagination or a search query. On...
To apply transparency to an element, you can use opacity in CSS. However, sometimes you don't want to make...
The currentColor CSS keyword references the current text color and can be used to apply an element's text color...
When you want to filter records in a model where a string column roughly matches a given term, you can...