News
Comments for Ruby Code (Usage, Single, and Multi-Line)
Comments in your Ruby code are notes and annotations meant to be read by other programmers. The comments themselves are ignored by the Ruby interpreter, so the text inside the comments isn't subject to any restrictions.It's usually good form to pu...
Leverage Regular Instance Variable to Resolve Thread-Safety Issue on Rails ActiveRecord model
Owing to the superpowers of the Rails ActiveRecord module, developers can sometimes forget that, under the hood, our AR models are just regular Ruby objects. This allows us to make use of standard instance variables on the objects to adapt their b...
Advanced CLI tools with Ruby and dry-cli! | Hanami Mastery
Recently I watched an amazing tutorial from GoRails, made by Collin Jilbert, about writing simple ruby scripts for console tools.It was a great introduction to CLI in Ruby, and it inspired me to write a follow-up on this topic because I also use r...
Evaluating More Coverage in Ruby 3.2 - Kevin Murphy
As I mentioned in my prior post, Ruby 3.2.0 has some changes to the Coverage module. Now the module can measure the coverage of a Ruby expression in a string passed to the eval method.This is important because of templates. ERB, when we ask for th...
Gemfile of dreams: the libraries we use to build Rails apps
From time immemorial, the Evil Martians team has worked on dozens of Ruby on Rails projects every year. Naturally, this process involves a lot of Ruby gems. Some reflect our desire to be cutting-edge and to use modern tools (or build our own!) Oth...
Episode 7: Ruby on Wasm: Is This The Future? | Fullstack Ruby
Ruby can now run on Wasm! WebAssembly (abbreviated Wasm) is a binary instruction format for a stack-based virtual machine. Wasm is designed as a portable compilation target for programming languages, enabling deployment on the web for client and s...
Effective and easy strategies to hate bugs a little less
What is your program supposed to do when attempting X? What are its required inputs? Its outputs? Are there any validation constraints? Can you do this and that logged in as well as logged out? […]If your project is weak on the specs side of thing...