Schedule unique jobs in Sidekiq

In one of the projects I work, there was a requirement to schedule only one job for a record at a time. If someone wants to schedule another one for the same record, the system should clear the old schedule for it and schedule the new one.

1 min read

Git - delete local branches

After working on a project for a while, we normally end up having too many branches locally.

~1 min read

React state validation hook using Yup

In this blog, we will create a state validation hook in react using Yup. I am also going to use ramda a functional library (if you are not using it already, do give it a try).

2 min read

Struct class in Ruby

Struct is a collection of attributes with accessor methods, without having to write the class explicitly.

2 min read

Dig method in Ruby

#dig method was added in Ruby 2.3 to Array and Hash classes. It makes digging the Array and Hash easy while making the code readable.

~1 min read

Zero-Downtime migrations in Rails

Often, we rename a column and deploy to find out the Honeybadger screaming at us with the errors accessing column with the old name!

1 min read

Hash With Indifferent Access in Rails

When I found out how the params could be accessed using both symbol and string as keys, I dived deep to figure out about ActiveSupport::HashWithIndifferentAccess class in Rails.

1 min read