Ruby Safe navigation operator in Ruby Ruby 2.3 has introduced safe navigation operator. Safe navigation operator returns nil if a method is called on a nil object. Before this, if a method is called on a nil object, it
Rails Use find_each instead of all.each in Rails In Rails, sometimes we need to iterate over all the records from a model. To achieve this people prefer to use all.each on a model. This can lead to usage of memory if
Ruby Array comparison in ruby I was working on a problem to check on a large array of integers to check whether it is a part of another array or not. Both the arrays have unique elements, but
Ruby Ruby do not use keys method on a hash in loop Today, I was looking at the internal working of a gem. While working on the same, I came across the code where the network calls were being made and it had to check
Devops Google Cloud HTTPs load balancing with Letsencrypt certificate To setup HTTPs load balancer on Google Cloud Platform , we need to create an SSL certificate beforehand. Letsencrypt can be used to create an SSL certificate free of cost. The SSL certificate
Ruby Asynchronous Programming in Ruby In traditional programming practice, I/O operations happen synchronously. The main thread will be blocked until I/O operation gets completed and CPU remains idle for the time I/O operation is getting completed. Consider the