Archive

Archive for the ‘General’ Category

My First Switch

June 29, 2009 Ritu 3 comments

This is the second last day of mine at Vinsol. And right now I am trying to write a post defining that I am leaving Vinsol tomorrow and going to join another promising startup SapnaSolutions at Pune very soon. 

 

I spent more then 4 years in Vinsol. The time here was good, filled with different kind of experiences.  I am looking forward to a great experience at SapnaSol as well. SapnaSolutions is also devoted to RoR development and also deals in mobile app. Lets see if I can also get some exposure of Mobile app there.  

While I am switching I have decided to set some goals for me.

  • I will try to post more techy code stuffed posts of my daily encounters which I sometimes try to escape from sometime.
  • Learn 4-Wheeler Driving and own a Driving License.
  • I would work in refining my skills as the Product Owner/Project Manager.
  • I always wanted to develop a product of my own I have several ideas in mind. By next year I ll have to decide which could be the most feasible and promising idea and work over it . Also have to work on finding finances.

    I hope in next year I will be writing some posts updating everyone on these points. Keep in touch…

    Monitoring Passenger

    May 22, 2009 Ritu Leave a comment

    I have recently made some changes in my staging server to get 3 times better response. Would like to share the points with everyone so that other don’t have to do so much of googling that I did.

    So, I have my staging(256MB) and production server(2GB). On staging when I had MaxPoolSize of 6(default: Max number of threads spawned by passenger). My server gets killed in 10 consecutive requests coz of use of lots of swap. So I had to make it to 2 as passenger doc suggests to make it 2-3 for 256 MB server.

     

    But now one more problem arise, that response time for the request after long time(which could be anything > 10mins) was very high around 30s. Which is quite unacceptable. I found the reason being the MaxPoolTime(Max time in which the threads got killed if no request encountered). And once all the threads got killed and then comes a request  it takes whole lot of time to start these:

    1. Framework Spawner

    2. Application Spawner

    3. Then Spawn a new thread

     

    The solution to this problem  was not letting one of the thread get killed. I have searched a lot for this but got noway by which this can be implemented. So I have to find a work around. Which was… to set the Application Spawner not getting killed. This can be achieved by setting APP_SPAWNER_MAX_IDLE_TIME to very large(say 999999). 

    I have received amazing improved performance by applying this. Would you like to try???

    The open Friday @Vinsol

    May 22, 2009 Ritu Leave a comment

    From today we are going to start the open fridays @vinsol. That means the second half of Fridays will be open for anything. One can do anything except work. Discuss, play, watch movies.

    So today we are all scheduled to watch a famous movie Aardvark’d: 12 Weeks with Geeks (2005), the movie about the development of Copilot at Joel Spolsky’s company, Fog Creek Software.

    Lets see how it goes…

    Categories: General Tags: , , , ,

    More papers @ Vinsol

    December 30, 2008 Ritu Leave a comment

    We at Vinsol have been trying to find the best suitable strategy which merge transparently in Vinsol work environment. Manik calls it XPrum, which sounds kewl. Its our extract of practices from Scrum and XP.

    Extreme Programming (XP) is a little different approach towards agile programming what we usually follow at Vinsol. It focuses on simplicity basically to an extent that it advocate use of paper more than any technical tools. We realized its much more handy and visible to notice so we adopted it immediately. We liked the workboard for ticktes idea of SCRUM so we have applied them for our XP stories.

    The scene at vinsol can be seen in these pics…

    Constant feedback & communication is key for both strategies so our major focus is that. And our goal is to estimate better and accurately and deliver the best code.

    Coming year our focus will be more on BDD, Quality of Code and Developer’s satisfaction. If we achieve these three, I hope the clients will ultimately encounter better experience with Vinsol.

    The 2 men in my life

    August 13, 2008 Ritu 7 comments

    Oh it could be so hectic to manage 2 men at the same time… I have been so busy due to both of them thatI was not able to post anything for such a long time. They consumed most of my time and i do not get anytime for myself at all…

    The amazing part is they both know about each other and both are fine with my two-timing. Only that they both are doing awkward things most of the time to grab my attention from another…

    In fact, one of them (who also happens to be my hubby too) is very considerate and understands that I am very busy so helps me in day to day work. But the other one is real devil. He doesnt want to share me with anyone … This other one is naughty but most lovable man i have ever meet. He is my son, Hriday aka Harry aka Kitu.

    Hriday's pic

    Hriday

    Oh yes i have been proud mother of 5 months old Hriday(means Heart). Firstly the pregnancy harmones then my son, were the main reason behind my absence from blog. But I think I will be back with these post today and will try to keep my train run fast and smooth on Rails.

    :)

    Categories: General

    Vinsol:Spreading Wings

    April 5, 2007 Ritu 5 comments

    Few weeks before Vinsol has stepped into new a new phase of ROR encouragement. We had our first ever workshop on Ruby On Rails in an Institute. Vinsol organised an elaborated presentation on 17th March followed by a one day workshop the very next day.
    The institute in picture here is DEI ie Dayalbagh Educational Institute, Agra, India. It was supposed to be such an overwhelming moment for me to present ROR in DEI as this institute has special place in my life.Yes i am a product of DEI itself and just luv everything about it like i do about Rails.
    After completing my B.Sc+ M.Sc. from DEI, I always wished to stay in contact somehow. And recently when i visited My Dissertation Project Guide Dr.Gursaran and talked about Ruby On Rails I can see my dream turn into reality. He was so much interested when i proposed the idea of a presentation on ROR that he himself made it a point to organize it. Thanks a lot to him for making it a success.
    I was not able to go there due to preparations of another major event of my life ‘My Wedding’ :D . Even though i am happy as Akhil ,Sur and Hemant made a point to make it a success. They did a great job. With at lest 35 people attending the workshop and showing great interest i believe the future of Rails in DEI is bright.

    We are getting tremendous response from the students the people are floored by capacity of Ruby+Rails and yes Sur’s charm also(he s getting lots of response from gals there ;)    ).

    Barcamp Delhi 2

    December 10, 2006 Ritu 2 comments

    Hmmm … my first Barcamp at delhi. And i feel great :) . I enjoyed all the sessions there.Actually was expecting some more technical ones. Still was gr8 being there sharing new ideas and analysing different approaches.

    I have taken some fotos for yesterday’s event .They are on flickr right now. Visit them now

    m looking forward to see more. :)

    Categories: BarcampDelhi2, General

    Strange behaviour of respond_to in IE

    December 10, 2006 Ritu 4 comments

    In recent days i have monitored a very strange behaviour of respond_to in IE.I am sharing my experience in hope that somebody might explain it to me. As i cudnt find anything related to this from my best teacher google :(

    I am using edge rails in one of my projects. some where in that i have used respond_to in following way…


    def show
    respond_to |format| do
    format.js {render :partial=>'show'}
    format.html {}
    end
    end

    When i checked the response in firefox for html and xml both requests type, it was perfect. But when i checked html response in IE 6 creates a blunder :O.It was returning a js file with the javascript response.

    But when i changed the code and placed the html call first and then checked xml call it worked fine in IE too.

    def show
    respond_to |format| do
    format.html {}
    format.js {render :partial=>'show'}
    end
    end

    Now can somebody tell me why is this happening and anyone else faced this issue ever?

    Categories: General, Ruby on Rails, rails

    Simple star rating in Rails

    August 14, 2006 Ritu 19 comments

    Those who wants to include simple 5 star rating mechanism in their ROR application.Can include a couple of functions in their helper to provide a form a rating field and display the result.Of course no 1/2 ratings can be achieved through this way. One needs to include the below given two function to some helper. And in view inside form tag call…

    
      star_rating_field("object", "fieldname", options)
    

    Options are location, prefix, active_img, grey_img, hover_img…

    For displaying the result of the rating in star images format…call from view

    
      img_tag_for_star_rating(rating_value,options)
    

    Options are location, active_img, grey_img, hover_img…

    Download the function to include in helper from here …I am finding it very difficult to put the code in wordpress without tampering so better to put it somewhere else ;)

    Update: the file gets removed everytime.I m trying to out the code here only...
    
    
      #General function for star rating
      # Use these function as helpers
      # No half ratings are handled here
      # options can hav ...
      # location=>location of images( you need to have star_active.gif, star_grey.gif, star_hover.gif in this directory or provide names of image file in options)
      # prefix => prefix to append to each ids in DOM for descrimination of more then one star rating in the same page
      # grey_img => name of inactive/grey image of star
      # active_img => name of active image of star
      # hover_img => name of hover image of star
      def star_rating_field(obj_name, field_name, options={:location=>'/images',:hover_img=>"star_hover.gif", :active_img=>"star_active.gif", :grey_img=>"star_grey.gif"})
    
        # append a hidden field to store value of viz system field
        # this field is to be changed as hidden after testing
        hid = text_field(obj_name, field_name)
        hid_id = "#{obj_name}_#{field_name}"
        pref_id = options[:prefix].nil? ? 'star' : options[:prefix]+'_star'
        img_location = options[:location]
        # set initial value by javascript
        jscript = ""
        jscript += "var a; var v = parseInt($('#{hid_id}').value); for(var i = 1;i"
        img = ''
    
        # add images to field
        for i in 1..5
          img += ""+' '
        end
          return  img + hid + jscript
      end
    
      def jscript_for_star_rating(pref_id, img_location)
        jscript = " function set_star_status(n, id)    {  if( $(id).value != n){ for(var j=1; j"star_active.gif", :grey_img=>"star_grey.gif"})
        image = ''
        for i in 1..5
          if i "
          else
            image += ""
          end
        end
        return image
      end
    

    Note:Do remember to include prototype library from script.aculo.us in your page.

    UPDATE2:phew…finally trying to add the file again.Hope it work fine this time :( try this=>Star Rating functions

    I discovered my true luv-ROR

    August 6, 2006 Ritu 5 comments

    I went to PHP Meetpup last week… there were some very good presentations ..one on Drupal by Saswata, which was more like a comparison between different Open source CMS. Then there was Prasun’s presentation on “Open Source business Models”. The third presentation was very technical one on Ruby on Rails By Manik (MJ).

    When MJ was giving his presentation on ROR, someone asked “Why do you want to adopt ROR in place of PHP, when PHP is easy to code? What we need is get our work done and we can do that in PHP very easily. So why use ROR?”

    At that particular moment I discovered my true love for Ruby On Rails. From my opinion coding is not only typing some software on keyboard …I think Programming == Logic. For the people who love to code “It’s all about doing it with Logic”. Following the same old tradition sucks your passion for coding and what you are left with is thousands of lines of code written without any interest just to get your job done. The best part of ROR is that it provides coders the ability to think. Instead of writing each and every query in PHP I can spend time on thinking the best way to design the application because I have ActiveRecord methods to protect me from writing those queries. For ROR its like, if you know about web programming you need not worry about basic things… what is needed is, ‘The Logic’ and the zest to learn all the time. So for those who wants a satisfied client… its ok to use whatever that suits them but for those who wants a “More then satisfied client” and an “even more then satisfied programmer “ the best thing I could suggest is Ruby On Rails.

    What else I can say…I love ROR and very soon I am going to wear ROR (planning to get ROR T-shirts;)). I wish I could eat ROR also…Hey that’s a gr8 idea I am next going to invent a dish called Ruby On Rails :D