avatar

Sunil Arora

CoffeeScript with Backbone.js Example - Violet Hill

I have been spending sometime researching development strategies for building heavy Javascript application. I have been having some fun playing with backbone.js and coffeescript. I did not find some good tutorials that explains combine usage of these two awesome projects, so I thought of writing one myself. Before we start, here is a quick intro about Backbone.js and Coffee Script from from their main website itself. Backbone.js: Backbone supplies structure to JavaScript-heavy applications by providing modelswith key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing application over a RESTful JSON interface.

Facebook Python Library Documentation - Violet Hill

This weekend , I spent sometime in exploring documentation tools available in python. I think Sphinx is the best documentation project I have ever come across. Python Docs itself uses Sphinx for documenting Python. I thought of trying Sphinx for documenting official Facebook Python SDK. After spending some serious 4-5 hours, here it is: Hope you guys like it. I plan to keep it updated with more writeups. #cheers

Parsing signed_request parameter in Python based Facebook Canvas application

Recently Facebook announced a new way to passing user information who is viewing your Facebook canvas application using “signed_request” parameter which is implemented on top of new signature scheme based on OAuth2.0 proposal. Facebook documentation describes “signed_request” as The signed_request parameter is a simple way to make sure that the data you’re receiving is the actual data sent by Facebook. It is signed using your application secret which is only known by you and Facebook.

Pankhon ko... Hawa zara see lagne do....

Its been quite a while since I wrote my last blog post and for a change, this time I am not going to talk anything technical :). Actually, the idea of writing this blog post got triggered from the feeling that I had when I finished watching “Udaan -by Anurag Kashyap’s production house” at Inox today. Then, when I came home, 3 Idiots was being screened on TV. There’s been quite a few movies that I can count which shivered me from inside and forced me into thinking hard about life and whether I AM LIVING IT RIGHT ?

Why StackOverFlow hates Ruby and Loves C#

No wonder why stackoverflow folks decide to go with C#, the answer is simple because C# is going to make lot of money for them :) and it works really hard for them. If you are interested in economics of programming languages with StackOverFlow, you are going to find this one amusing. An hour back, just out of curiosity I thought of checking out popularity of programming languages on stackoverflow. I was looking for simple representative figures to compare engagement value of programming lanugages on stackoverflow.

7 things one can do to scale up a web application

Recently at work, we had to undertake a quick exercise of scaling up our web application which taught me a few things which I thought of sharing with the community. We are using following technology stack at work: Python as our primary language for most of our work at the backend Pylons (Webframework) MongoDB (NoSQL datastore) Redis (Cache) Lets jump in to the seven steps that worked for us and hope that most of them can be applied to any web application.

Database Backup from MongoDB to Amazon S3 and Restoring it Back.

Copyright: John Boston I couldn’t have asked for better picture for my blog entry. I am going to use John’s words straight from this photo page on flicker to set the ground for today’s blog post. This server was destroyed in the Choteau fire in NE Oklahoma on 11/27. This is why I stress to my clients the need for off-site backups. That’s a telephone on top. Any small business owners out there should ask themselves “What would I do tomorrow if none of my data was retrievable”.

Displaying date in user friendly format in Python

In this post, I am going to share a quick piece of code for a functionality which I think is required in almost every web application these days i.e. displaying date format in more user friendly format. Every application has objects in the system which have time-stamps associated with them i.e. user objects will have creation time or last activity time or a content publishing system will have content publishing time.

Shit happens, It does! - Violet Hill

Picture by Anant S. We’ve all had embarrassing moments in our carrer where they involved inadvertently wreaking havoc on a production system. When it happens; for a second you (so desperately) want to believe it didn’t. You will be so afraid to even cross-check that it actually happend. Github went through an outage yesterday and Chris was brave enough to reveal how it happend, then hacker news post generated a good buzz around the subject.

Serializable decorator for Python Class

I am going to describe a quick recipe for adding serializability to a Python Class. I was playing with Redis lately and needed a quick way to save python objects in Redis. I wanted objects to be saved in JSON format and found jsonpickle to be an appropriate module to use. Initially I thought of having a base class with serialize/deserialize functions which other class could simple inherit to add serialize functionality.