Saturday, November 28, 2009

Life in a metro

Saw the movie again today on TV and fell in love again with it.

The first time I had watched the movie, it soo knocked me out.
True Emotions, shown in such a practical manner are bound to touch your heart.
People struggling to make ends meet often forget the true reason for which they go to work.
This reminds of these lines from munnabahi :

Shaher ki is daud me daud ke karna kya hai?

Jab yehi jeena hai dosto to phir marna kya hai?

Paheli barish me train late hone ki fikr hai

Bhul gaye bhigte hue tahelna kya hai?

Serials ke kirdaaro ka saara haal hai malum

par maa ka haal puchhne ki fursat kaha hai?

Ab ret pe nange pao tahelte kyu nahi?

108 hai chanel phir dil bahelte kyu nahi?

Internet se duniya ke to touch me hai,

lekin pados me kon raheta hai jaante tak nahi.

Mobile, Landline sab ki bharmaar hai,

Lekin jigri dost tak pahuche aise taar kaha hai?

Kab dubte hue suraj ko dekha tha, yaad hai?

Kab jaana tha shaam ka guzarna kya hai?

To Dosto Shaher ki is daud me daud ke karna kya hai

Jab yahi jeena hai to phir Marna kya hai?




And
Blogged with the Flock Browser

Wednesday, October 21, 2009

Google Chrome love

I am missing the google chrome browser in linux. Yesterday I was in windows and just fell in love with the Google Chrome browser and its themes. Themes in flock are not available for linux. I even tried setting up my development environment in Windows, but Damm!! Aptana and github private repos wont work.

 
Blogged with the Flock Browser

Thursday, October 01, 2009

I love to run!!

It feels I've found a passion.
The one that gets the best out me.
The one that thrills me.
Today in the gym, 8Km, 60 minutes and 750 Calories.
Yo Baby!!

Monday, September 28, 2009

View and edit deleted records with acts_as_paranoid

We at intinno use acts_as_paranoid so as not to permanently remove any data from the mysql tables. This also helps in restoring deleted data, if required.

Situation:

In Naarad(our erp solution for coaching institutes) users add teaching logs, which is basically a log book of which teacher taught which subject from what to what time. However your clients employ teachers which come and go. So teachers get added and deleted all the time. But if the teachers are deleted, then the logs refering to them would throw an error , saying the record doesn't exist.

Solution:

If we dont find the record, then try find_with_deleted first. If find with deleted fails, then render nil or blank

Basically instead of using

I now used

and force_find is defined as


Situation:

Ok now I can view the deleted record. But the logs can also be edited. So now the deleted records shoould be edited. But editing a deleted record sounded wierd.

Solution:

But there was a catch. In my case, logs corresponded to dates. So if a record is deleted, then it makes sense to edit its log entries before it was deleted. So in my app subjects had teachers and i defined a new method



Now while assigning teachers to log, all the teachers present on the system at a particular day are fetched.

Note: The above method in the application helper has been extracted out into a plugin. Read the details here.

Sunday, September 27, 2009

My Desktop

My Desktop


and I intend it to keep it this way. :)

Friday, September 25, 2009

Thursday, September 17, 2009

Why I hate anything except ruby

Yes I really want to exit!!! you stupid fool.

Tuesday, September 15, 2009

Anything except rails

Its really difficult for me to do anything that doesn't involve ruby OR rails.  I have a pending work in python which has been procrastinated beyond imagination. Time to roll up the sleeves and get it done. 


Blogged with the Flock Browser

Sunday, September 13, 2009

Back after a long time

I had left this blog a long time ago and went for the wordress blog. Then I switched over to my self hosted blog. Wordpess blog was very difficult to update due to the heavy interface. The self managed blog ran really slow due to the dreamhost.com hosting.

Now Finally I'am back and I hope to post more frequently here due to the fact:

I am back to blogspot, from where I started.
Switched to flock and it should easily integrate to the blogspot.

Hope to see u here more frequently. :-)
Blogged with the Flock Browser