Join the Next Gen force. Sokrati is Hiring…

Sokrati is looking for hiring aggressively in this month and coming ones. Please contact at ritu@sokrati .com if you are looking for a change of environment, and you have a zeal to flow with the transition from creating good to better to best.

Sokrati, a leader in digital advertising, provides a technology solution to efficiently + effectively manage search campaigns using a unique, integrated platform. The platform auto-generates keywords and bids + optimizes on behalf of the clients while dealing with 10M impressions a day. The platform is provided as a service tailored to be intuitive and fault-tolerant guaranteeing 99.99% uptime. For more visit

At Sokrati we promise it not be a painless journey. We squeeze our brains, grind our hearts and scrap mercilessly to carve the best softwares.

So respond asap as we are looking for people in every domain of a software development,,be it QA, Development or front-end.

Session updates During concurrent requests

So this has always been a problem with Rails SessionStore. The problem is that if your app is sending concurrent requests and one of them is updating a session then depending on which request wins in the race you might get the stale session variables instead on the updated one. The problem is better explained at other places like and the solution is a plugin smart_session_store by Frederick Cheung.

It might not seem a very informative post to you, but I am still posting it as this has taken me quite a bit of time to find out. And after finding it, I am astonished to see why Rails still can not deal with this issue.


Note: I am talking about Rails 2.3.8 here. Not sure if Rails 3 has a fix for it or not.


Websockets ?

Just today have seen some buzz around websockets of HTML 5. After exploring a little, I thought this is sharable so here it is in a small description.

So websockets is a two way communications channel that operates over a single socket and is exposed via a JavaScript interface. So unlike Ajax, which needs 2 bi-directional streams on up-stream and one down-stream it serves over just one stream. And this is the latest additions to web 2.0 apps via HTML 5 implementations. The server can then “push” information through the WebSocket, directly to the browser, without the browser having to go out and request it.

So you ll wonder as HTML 5 is just supported by few browsers and very few versions, then how feasible is it to use. Well… for that There are several Websocket servers available that provides JavaScript library that can support almost any browser of any version.

For example : Kaazing supports all major browsers (Firefox version 1.5 and higher, Internet Explorer version 5.5 and higher, Safari version 3.0 and higher, Opera version 9.5 and higher, and Google Chrome version 0.2 and higher).

Where as Pusherapp (widely used by ruby community) doesnt provide support for all browser but provide a flash based fallback solutions for remaining browsers.

Later might come more as I explore more. Or you guys explore before me and update me alsoūüėČ But that sure worth a shot.

Learning Java now :O

hmmm so my resume says, I know java but that was the java we did in a small course during the academics. Hence you can say that I dont know much java apart from the OO part of it which I knew from Ruby. At this stage when I am already spoilt by Ruby, it will be very hard for me to just go through Java’s classes and compilers. I am looking forward to understand and write java webservices which will feed rails apps with SOAP.

Lets see how it goes. Any suggestions if any of you guys¬† have?? Apart from the general Ruby community comment “You gone mad kya??? ;)”

We All Like to Reblog (via News)

I really like this new feature from wordpress. And this post is just to try it. Thats the reason even after hundreds of available blogging tools I feel wordpress is the bestūüėČ

We All Like¬†to¬†Reblog Have you ever come across a blog post that you enjoyed so much you wanted to easily share it with the readers of your own blog? Sure, you can copy and paste the link and perhaps even a snippet of text with your own comments, but overall it's not a particularly enjoyable experience. We wanted to change this and make sharing other posts with your readers as easy as posting to your blog. Today we're introducing a new like and reblog feature enabled … Read More

via News

Move towards optimization now…

If you are looking to do the query optimization of your rails apps, I can suggest using few tools that does it.

1. First I want to suggest BULLET– A rails plugin/gem to kill N+1 queries and unused eager loading.

Bullet helps in finding the space for eager loading. It has a beautiful way of telling where should you add the eager loading for certain association. Whenever you try to run the code in development browser, it pops up a js alert and tells you exaclty where and what includes you have to add in you finder queries. It also tells you to remove the extra unnecessary eager loading handled in you app.

To add more beauty to it flyerhzm added growl notification as well for the Mac based developers.

2. Second suggested tool will be Slim-Scrooge: SlimScrooge heavily optimises your database interactions

Slim-Scrooge works for optimizing the sql queries by monitoring the required columns for the model and changing inline the queries to fetch only selective columns. So with slim_scrooge working in background you don’t have to worry about giving the options to :select in you find. Instead slim_scrooge will itself¬†analyze¬†what are the columns needed to run your code for the first time and second call to the same action it itself puts the necessary column in select removing the¬†asterisk(*).

I am still skeptical about using it. As it might make the developers lazy(just blindly putting * in queries) and increasing the processing time in slim_scrooge inline query modifier. Though I think it could be a good tool if used once in a while to analyze what are the missing selects in our code. Whatever be the case you might wanna give it a try, its kinda lucraitve.

3. Last but not the least I try to add is rack-bug: Debugging toolbar for Rack applications implemented as middleware.

Remember rails-footnotes? Well Rack-bug is kinda same but seems better and provide more. Better, because its rack based. Provides more with the toolbar giving following info:

  • Rails Info
  • Resource Usage
  • Rack Env
  • SQL
  • AR Objects
  • Memcached
  • Templates
  • Log
  • Memory Usage

I kind of loved it at first sight. So if you already have footnotes. Give it a try. If you dont, then again give it a try to optimize better. Watch the screencast by brynary for more info.

If you have tried any of those feel free to give your opinions. I will be happy to learn how everybody is approaching the technique of optimization.

Must See for all: Amazing video on good management practices

Inspired by John Spence’s Awesomely Simple¬†, A 10 mins video on the 6 points mentioned in the book that helps in good project management and building a better future of a company… Amazingly Comprehensive

I am looking forward for reading the book now…


Get every new post delivered to your Inbox.