Tutorials
Transpiling Go and Java to Ruby using GPT-4o and Claude 3.5 Sonnet
The project was to extend our DevQualityEval LLM LLM code generation benchmark with a new language: Ruby. We successfully used LLMs to transpile existing Java and Go code (tasks and test cases) to Ruby. The workflow of this project and our experie...
The Thread API : Concurrent, colorless Ruby - JP Camara
We’re going to break down threads into three parts:The Thread API - All the tools available to you in the Ruby runtime to manage threads, and how they workInterrupting Threads - How threads get stuck, and how to shut them down safelyThread and its...
How to save a recently viewed list of pages with Stimulus and localStorage
Creating a "recently viewed pages" list can significantly enhance the user experience by providing easy navigation and a history of recently accessed content. Seeing how we are already using Rails, we are going to leverage Stimulus. Also, instead ...
Structure Your ERb and Partials for more Maintainable Front-end Code in Rails
When should we use a partial or a helper–or a partial rendered using a helper? Which elements should be extracted into partials or helpers? When can we use a simple helper and skip the partial file? When should we use the built-in tag helpers inst...
Conditionally render a Turbo Frame shared between multiple views
The Turbo Frames API requires that a request made from within a turbo-frame must receive a response containing a corresponding turbo-frame of the same id.Because Rails encourages the reuse of partials and views, this can lead to situations where y...