We all know that ruby is different from all the other object oriented programming languages. But in what context? One of the differences lies in how ruby handles the protected and public methods and how other languages like c++ handle them.
(This has been reblogged from Sanjiv's Blog post) I am starting a series of blog posts where we can learn Ruby through Rails. We will take a deep dive into Rails source code and learn about how Rails works -- and learn a lot of Ruby constructs through that! Which command is more efficient - … Continue reading Ruby Through Rails – Part 1
MongoDB introduced the aggregation framework since Version 2.2 but the power of the aggregation framework has only been tapped in Mongoid only since 3.1.0. Even today in the latest version (currently v4.0.0), the aggregation framework is used only for some basic functionality - :sum, :count, :avg, :min and :max. While this is much better than running … Continue reading Mongoid and the MongoDB Aggregation Framework
"Why do we use map reduce in MongoDB? Cos it doesn't support joins." - And everybody believes that now! I decided that it was time to try something different. I was amazed to see how little there is on the net about map re-reduce. And there is even lesser information about how to work with multiple … Continue reading MongoDB Map Re-Reduce and joins – performance tuning
Sometimes, we prefer using Amazon EC2 directly for our Rails stack. No offense to Heroku but we need a more controlled environment; and no offense to EngineYard as they don't support MongoDB on their environment as yet. We were faced with several problems that we wanted to solve Control our environment without MongoDB hogging all … Continue reading Amazon EC2 and MongoDB configuration for great performance
One of the common requirements we face across many Rails project is to convert HTML pages to PDF i.e. convert reports, tickets or any other page for that matter into the PDF format 'as is'. What has made our job easier is the number of gems out there but every gem is different from another … Continue reading Converting HTML to PDF
I often teach Ruby at corporates, take some classes at colleges and speak at some events. Its great when I encounter aggressive and passionate programmers who question and counter question me at every step. These are some of the questions that I have often encountered regarding modules How do I know from an object which … Continue reading Ruby back to basics – Modules and more de-mystified