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

OpenStruct in Ruby

In Ruby, OpenStruct is a data structure, similar to Hash. With this, we can define attributes with values (key value pairs).