Image
optimizations,
lazy-loading

Recently I joined a company that Thrillophilia a tours and activities company in India, and where I need to solve a problem of lazy loading of images, cause the site is image heavy. I came across a lot of lazy loading javascript plugins, but finally came to know about Layzr plugin simple, lightweight and works like charm.

Featured

ruby-on-rails,
caching,
scaling-rails

It’s pretty good to use active record in ruby on rails, relationships, find_by methods, where queries everything makes your
life much simpler as a developer but sooner or later your application becomes slow. At that time you need to work on optimizations.
There are a lot of work around for optimizations and one of them in caching the queries. The company I work for is StudyPad and we have a product
ie splashmath and that has over 9 millions users using it across multiple platforms. The amount of traffic that
we get is pretty huge and caching one of the things that helped us to solve out scaling problems. Here is a quick idea to cache your queries in Memcache.

Featured

ruby-on-rails

Last month I joined a new job after a break of almost 4 months. You can check out the product and there we had a small problem that our seed file was growing very fast. So we did a small thing to maintain our seed file. Here is a small tip if you are having a massive seed file and it’s pretty easy to implement.

migrations
ruby-on-rails

In Rails 2 in migrations, there were only 2 methods: up and down. They are called on running migrations up and down respectively with rake tasks rake db:migrate and rake db:rollback.

Rails 3 produced us great method change which allowed us to write the code which creates a table and drops the table automatically on rolling migration back. But unfortunately there was a problem - you didn’t have the opportunity to say “don’t run this piece of code on down but run this only on up”. So the solution was just to use old syntax. Since Rails 4 has released there is a feature to fix this situation.