Nothing makes Anjana happier than writing down her experience and being appreciated for it. An ardent lover of coffee, books and series like Gossip Girls, Vampire Diaries. She is always on a stroll writing code while listening to classic Sonu Nigam/Anirudh tracks. Presently working as a RoR Developer at Red Panthers, she is a regular at the Ruby Meetups in town as well.

Observer Design Pattern in Ruby

Observer design pattern (also known as Publish/Subscribe) is a software design pattern, used when we are building a system where the state of one object affects the state of other objects. It is a key part of model-view-controller architectural pattern. In a traditional MVC ( Model-View-Controller ) architecture, a model is a subject and a view is an observer.…

Rails Generators

Rails generators are used to create many files for models, controllers, views, unit tests, migrations and more. It will do some of the manual work for us. So it saves time. They can also be used to set up some basic specs for the application test suite. Running rails generate(or rails g) by itself gives…

PostgreSQL 9.6 new features

POSTGRESQL is an open-source object-relational database system. It is not controlled by any corporation or other private entity. The source code is available free of charge. PostgreSQL supports transactions, subselects, triggers, views, foreign key referential integrity, and sophisticated locking. New features in Postgres are: Parallel execution of sequential scans, joins and aggregates. Avoid scanning pages unnecessarily during…

Concurrent-Ruby

Concurrent-ruby is a gem that was brought my attention during Anil Wadghule’s talk in RubyConf India 2017. Concurrency is the ability of a program to make progress on a task that is spread out over different slices of time. It allows us to run multiple “threads” at the same time. As one thread may be sleeping or…

Custom Loggers

Custom loggers are useful if you wish to have a separate log file for different moving parts of your Rails application. This would make your logging more efficient and readable. (Eg: a file to record all the API request you received). Let’s have a look on them! Note: This could cause an issue of log files…

Spice up your boring IRB (Irbtools)

IRB stands for interactive ruby, it is a tool for interactively executing ruby expressions read from a standard input. To invoke it, type irb at the shell or command prompt, and begin entering Ruby statements and expressions. But it has some limitations. A solution to this is called ‘irbtools‘, which make using irb easier and…

Disabling transaction block during migration

Migrations are used to modify your database. By default, all migrations run inside a transaction. You can disable the transaction during migration. Let’s have a look on how to disable transaction block! Migrations can manage the evolution of a schema used by several physical databases. It’s a solution to the common problem of adding a…