I’ve received an email from a fellow software developer inquiring about a bit of code where I use Ruby’s splat operator in two different ways. One is for consuming all parameters in as one array variable, and the other is to consume all entries out of one array as parameters.
If you've worked with Ruby's exceptions before, you know you can specify which exceptions get rescued and which are not and you probably know that when you rescue a "parent" you rescue all of its "children" as well.
Ruby 2.4 will have the feature to introduce a REPL session, using IRB, in between your code execution for better debugging. IRB, which stands for Interactive Ruby, is the standard REPL which is bundled along with ruby.
When I first began implementing background jobs I found myself moving my code into an appropriate background class whether it was in app or lib somewhere. I found it frustrating that I needed to shift code around based only on the decision to run it in the background.
I recently started a new project with Rails 5, and at some point I found out the code was not behaving as expected. The initial scenario was quite simple, Admins can have many Phones, as this code suggests
On stackoverflow and elsewhere I stumbled over questions about inheritance in PostgreSQL a couple of times.1 People are confused about how this feature is related to inheritance in object oriented programming (OOP) and how to use it.