Tuesday, May 26, 2009

Choose a Life - Choose Your Future (Trainspotting)


Choose Life. Choose a job. Choose a career. Choose a family.
Choose a fucking big television, choose washing machines, cars,
compact disc players and electrical tin openers. Choose good
health, low cholesterol, and dental insurance. Choose fixed
interest mortage repayments. Choose a starter home. Choose your
friends. Choose leisurewear and matching luggage. Choose a
three-piece suite on hire purchase in a range of fucking fabrics.
Choose DIY and wondering who the fuck you are on a Sunday morning.
Choose sitting on that couch watching mind-numbing, spirit-crushing
game shows, stuffing fucking junk food into your mouth. Choose
rotting away at the end of it all, pishing your last in a miserable
home, nothing more than an embarrassment to the selfish, fucked up
brats you spawned to replace yourself.

Choose your future.

Choose life.

Log Javascript Errors using AJAX

A lot of users were complaining lately that some core functionalities are not working for them any more.
The problem here was that for me there was no problems what so ever, and couldn't recreate the issue in any way.

Emailing the users and waiting for their response is also quite problematic. (Especially if one of them is 80years old and doesn't really understand what's going on.

The first solution for these kind of situations that came into my mind, was to create a system that will catch all errors and will pass it to the server for logging using Ajax.

It seems that everything you can think about is already out there:

http://www.dotnetheaven.com/UploadFile/sundaramkumar/LogJavascriptErrors02272008002456AM/LogJavascriptErrors.aspx

Of course we can tweak these methods and say X limit errors can be sent to server (to avoid flooding), or use a variable to turn it on/off (especially after new deploys or when we are getting a lot of complaints from users)
:popular_tags => [ruby, rails, ruby-on-rails, רובי-און-ריילס, console,,tricks, youtube, links, screeshots, toturials],
:email_me => 'shmuel@ahdut.com',
:subscribe_to_rss => ,
:sites => [pawst.com, urlazy.com],
:sponsored_by =>