benjamin rothOrganize your Ruby code using blocksWhile working on a code review, I noticed I had difficulty figuring out how this code was performing the following specification:Dec 13, 20192Dec 13, 20192
benjamin rothDebug with Metaprogramming in RubyHave you ever been unable to reproduce a bug in development?Apr 10, 2018Apr 10, 2018
benjamin rothEnough with leaked logic alreadySometimes Service Objects, while extremely useful, actually hurt your OOP design.Nov 14, 2017Nov 14, 2017
benjamin rothTransactions & Connections in ActiveRecordYou may have notice you can create databases transactions in all classes inheriting from ApplicationRecord. What is the point? Are they all…Sep 22, 20171Sep 22, 20171
benjamin rothWatch out for Ruby blocks scope gotchaBlocks are probably one of the best parts of Ruby. They bring much of its flexibility and power.Sep 19, 20173Sep 19, 20173
benjamin rothinRuby InsideForget conditionals, use the Rail wayMost of the time, with growing uncertainty, code goes rightwards. Nested conditions are difficult to read and error prone. The real intent…Sep 11, 20172Sep 11, 20172
benjamin rothWhy I do not use strong parameters in RailsStrong parameters have supposedly been an improvement in Rails 4. Yet, it feels to me, they were more a marketing trick after Github’s…Aug 29, 20174Aug 29, 20174
benjamin rothinRuby InsideActiveRecord’s queries tricksMy favourite part of Rails is clearly ActiveRecord’s scopes. Their expressiveness and their reusability is simply great.Aug 21, 20176Aug 21, 20176
benjamin rothWhat if? Perpetual question cycles of responsible developersWe all love it when a plan comes together, yet let’s face it, 💩 happens…Jul 27, 2017Jul 27, 2017