ruby

Writing Monkey Patches in Ruby

Introduction: Ruby is known for its flexibility and openness, allowing developers to customize and extend the language’s core functionality. One powerful way to do this is by using monkey patches. Monkey patching enables you to modify or add new behavior to existing Ruby classes or modules without changing their original source code. In this blog,…

ruby

Adding Caching Helper in Rails

When a particular API processing slow or performing a heavy calculation or have heavy DB queries. One of the solution to optimize the API that comes to our mind is to cache the response for appropriate amount of time. This will help us to improve the performance by overcoming the mentioned issues. It is also…

ruby

Reload in ruby and when to use it.

Consider we have a model student when we access data from this using the following command. The variable student contains the data of a student. Each student has enrolled in many courses, which is another model. On printing the student, we get the following data Consider if I update the course model, The expected behavior…

ruby

Send keyword in Ruby

Recently I have been introduced to ruby, while working on the project I saw this function is been used many times in our existing codebase. Let’s discuss what problem it solves. Consider you want to call a list of functions dynamically, eg. Consider an interaction to list animals data which takes the animal name as…

Database
database

Types of Databases

Over the years, there were many competing approaches to data storage and querying. The oldest and best-known database is a relational database, where the data is organized into relations called a table. To overcome the drawbacks of Relational Database like scalability, a document model database is introduced the term NoSql got famous. The term NoSQL…

database

An Introduction to Database

A database is a collection of data, arranged in such a way that you can access and manage it easily. The database is vast topic concepts like index, ACID, CAP theorem, types of databases, normalization, Sharding, Consistency, MapReduce, Eventual Consistency is some of the interesting topics in this field. This blog will be a series…