Codeminer42's Engineering Blog
The Miners

A Quest for Better Specs: Prefer Self-Containment
Test suites all over Ruby land are frequently riddled with a bad obsession: one liner spec examples. No matter what level of complexity a particular piece of code may intrinsically…
Prevent a force pushing to master with ruby
Yeah, everyone knows, it’s the mor law of versioned systems, NEVER do a git push -f on the default branch, never, even when you know what you’re doing, bad things…
Controller Best Practices: Don’t Hide Instance Variables
This is something I often mention in code reviews, and it’s also mentioned in some Rails guidelines elsewhere without further explanation: please, don’t hide instance variables. Everyone who has dealt…
Using ActiveRecord to create atomic transactions
Imagine the following situation: You were asked to create a new wallet feature to an application. This wallet must allow money transfer between users. Basically, you take money from an…
Data Bugs on Rails
Bugs are commonplace artifacts in any kind of software system. Most applications are filled with lots of bugs, for so many reasons that can’t even be accounted for in a…