Who is talking?


Dont forget to do your year end personal retro!

almost 12 years ago | Biju Bhaskar: Thoughts on enterprise application development and more...

Its that time of the year again .... time for delivering year end evaluations. I am almost done with delivering evals,except for one. Plan to complete that by tomorrow. Then I am done for the year.This is also the right time for each one of us to look back and assess how the year has been professionally and personally for us. I call it the time for personal retro (retrospective).  Obviously enjoy your holidays, but make sure that you find some time to reflect upon your performance as an individual this year ...preferably  across four domains Work/Career, Home/Family, Community/Society, Self:mind, body, spirit (as defined by Dr. Friedman). The year end performance evaluation you received is just one input. Think about these two questions...- What went well for you in 2009- What could have been improvedAlso, ask yourself .... have you grown this year,  or has this year helped you in moving toward your long term personal vision. Irrespective of whether your answer being either yes or no .... ask why? Do you think you should change your personal vision based on the new circumstances and/or things you learned?Doing a retrospective of your performance this year and then prioritizing the areas of improvement, will help you figure out what you should focus on next year.

The newest addition to our family has arrived!

almost 12 years ago | Biju Bhaskar: Thoughts on enterprise application development and more...

God has blessed us with a new baby boy!Tarun BhaskarArrived on December 13th,2009 at 4:29 AM6 pounds and 12 ounces, 20 inches

Windows Skydrive vs Google Docs

almost 12 years ago | Lalita Chandel: My View

Following up on my previous post, here is a link to an article comparing the features of Skydrive and Google Docs.http://nlafranc215.wordpress.com/2009/09/19/windows-skydrive-vs-google-docs/My preference would be to use Skydrive as an online storage spot on the cloud, but for all import, export and emailing work, Google docs would be my first choice.

Google Docs Finally Makes It Easy to Download All Your Documents

almost 12 years ago | Lalita Chandel: My View

Google docs has now expanded the export feature with a new download "Export All" option. Using this functionality, we can download our entire library of Google Docs documents to the harddrive as a zipped file. This feature will be very handy if we ever want to move from a standard Gmail account to Google Apps (with our own domain).To download Google Documents, select "Export" under the "More Actions" drop-down menu and then select the "Export All" checkbox. You can export up to 2 GB of files but if your account has more data, you’ll see a message with a list of files that aren’t included in the zip file.

Encounter with fascinating JQgrid plugin

almost 12 years ago | Gourav Tiwari: easy_software = Agile.find(ruby_on_rails)

In one of my earlier projects, there was a requirement from product owners, to show data in grid format. It was way back in summar of 2008. We had to load the whole data by hand-coding the trs and tds in table and shown the results in html table's grid format.Back to the current project, I did a little research and found jquery-grid-rails-pluginI found it pretty useful and up to the mark as far as results are being displayed on the Grid (AJAX calls). You can look at the Demo as well (http://github.com/ahe/jqgrid_demo_app/tree/master), also a detailed explanation on installation and usage mentioned here -> http://www.2dconcept.com/jquery-grid-rails-pluginThe response is pretty quick, from 1000 records in DB to fetch 25 on one page it took around 500 ms. Also, you can use various JQuery themes if you do not like the default look and feel: http://jqueryui.com/themerollerLets take a very small example and see how to use JQgrid:I have User controller's index method to write logic to display all users.User model has attributes as:id : integer (row id)name : stringcreated_at : dateI have User's view (users/index.html.erb file) to display the grid with above attributes.Steps:1. Install plugin: $ ./script/plugin install git://github.com/ahe/2dc_jqgrid.git2. In layout include JS and CSS for grid:<%= jqgrid_stylesheets %><%= jqgrid_javascripts %>3. In User controller:def indexusers = User.find(:all) do if params[:_search] == "true" name =~ "%#{params[:name]}%" if params[:name].present? created_at =~ "%#{params[:created_at]}%" if params[:created-at].present? end paginate :page => params[:page], :per_page => params[:rows] order_by "#{params[:sidx]} #{params[:sord]}"endrespond_to do |format| format.html format.json { render :json => users.to_jqgrid_json([:id, :name, :created_at], params[:page], params[:rows], users.total_entries) } # total entries will get User.all.sizeendend4. In view:<%= jqgrid("All users", "users", users_url, # my recommendation as putting /users sometimes does not work in all cases [ { :field => "id", :label => "ID", :width => 35, :resizable => false }, { :field => "name", :label => "User Name" }, { :field => "created_at", :label => "Created on" } ]) %>Now everything is fine, it should work fine and show us the grid with name and created at time.Problem that I faced: When you have to show any attribute of model with formatting , there was nothing mention on the blog, like I would like to Capitalize the name here in the grid (First letter is capital).So, I dug into the code and found my solutionSolution: In index I have to change the format.json in index method like this:render :json => users.to_jqgrid_json([:id, "name.capitalize", :created_at], params[:page], params[:rows], users.total_entries)and in view I need to change following line as :{ :field => "name.capitalize", :label => "User Name" },and it works!Another problem: If I need to change the format of the created_at, can I do this in controller and view?Controller:render :json => users.to_jqgrid_json([:id, "name.capitalize", 'created_at.strftime("%Y-%m-%d")'], params[:page], params[:rows], users.total_entries)View:{ :field => "name.capitalize", :label => "User Name" },{ :field => 'created_at.strftime("%Y-%m-%d")', :label => "Created on" } Answer is NO.Because, the way jqgrid ruby plugin written, you cannot use method with parameters.Solution: I used instance method.In model, I wrote:def formatted_created_atcreated_at.strftime("%Y-%m-%d")enddef capitalized_namename.capitalizeendIn controller:render :json => users.to_jqgrid_json([:id, :capitalized_name, :formatted_created_at], params[:page], params[:rows], users.total_entries)In view:{ :field => "capitalized_name", :label => "User Name" },{ :field => "formatted_created_at", :label => "Created on" } That's it!