<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><description></description><title>Some Stuff.</title><generator>Tumblr (3.0; @mmurthy)</generator><link>http://mmurthy.com/</link><item><title>Daisy cutter in Beer jar/mug?</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lrlalr97wA1r1msx8o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Daisy cutter in Beer jar/mug?&lt;/p&gt;</description><link>http://mmurthy.com/post/10258805337</link><guid>http://mmurthy.com/post/10258805337</guid><pubDate>Thu, 15 Sep 2011 20:27:27 -0400</pubDate></item><item><title>Nexus one for existing customers</title><description>&lt;p&gt;If you are an existing t-mobile customer and are planning to get a nexus one, you probably know by now that you have to pay $279 and not $179 (which is for new customers only). I just can not understand the reasoning behind this. Anyway, since my contract has expired, I thought I can just get on a new plan with a new account if required and get the phone for $179. Guess what, you can&amp;#8217;t even do that. After researching on various forums and piecing together, I got my nexus one for just 20 bucks more instead of shelling out 100 bucks!&lt;/p&gt;

&lt;p&gt;So, what I did was, I called  tmobile and told them I want to cancel the account and go to another network for 3 months and come back as a new customer. That way I save 100 bucks. I was ok waiting for 3 months to get my hands on that phone. I am excited about that phone but not THAT desperate. It is after all just a phone. But guess what, tmobile was like, it anyway costs 35 bucks or so to activate when I come back as a new customer, so they agreed to give me $45 credit. So, I really put in only 20 bucks more and got the phone! Isn&amp;#8217;t that cool? :) Let&amp;#8217;s see when google will ship it to me.&lt;/p&gt;

&lt;p&gt;If you are an existing customer, try that and see if it works for you as well or if there is any other workaround, I will be curious to know! Well, not really, I already got mine ;)&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Mahesh Murthy!&lt;/p&gt;</description><link>http://mmurthy.com/post/45774400965</link><guid>http://mmurthy.com/post/45774400965</guid><pubDate>Sun, 10 Jan 2010 04:12:14 -0500</pubDate><category>JustMigrate</category></item><item><title>Beyond my understanding!</title><description>I had a bug in my application where the calculation was a little off from expected. After putting debug statements, I narrowed it down to an interesting behaviour in ruby. Fire up irb and try it out yourself!

  &lt;pre&gt;irb(main):001:0&amp;gt; (6.725*60*24).to_i
=&amp;gt; 9684
irb(main):002:0&amp;gt; (6.725*24*60).to_i
=&amp;gt; 9683
wtf?&lt;/pre&gt;</description><link>http://mmurthy.com/post/45774401904</link><guid>http://mmurthy.com/post/45774401904</guid><pubDate>Sat, 31 Oct 2009 06:20:03 -0400</pubDate><category>JustMigrate</category></item><item><title>Annoying rails date validation</title><description>I spent a good amount of time breaking my head over why a date field wasn&amp;#8217;t getting set in one of the model after retrieving it&amp;#8217;s value from a form. It turns out that if you pass a random string and not an actual date, rails will silently assign a nil to that field without complaining.

For example, I have a class Fact with date fields called from and to. Notice what is happening.

&lt;code&gt;
&lt;div style=""&gt;Loading development environment (Rails 2.3.3)&lt;/div&gt;
&lt;div style=""&gt;&amp;gt;&amp;gt; fact = Fact.new&lt;/div&gt;
&lt;div style=""&gt;=&amp;gt; #&amp;lt;Fact id: nil, from: nil, to: nil, timeToCount: nil, val: nil, remarks: nil, cp_detail_id: nil, created_at: nil, updated_at: nil&amp;gt;&lt;/div&gt;
&lt;div style=""&gt;&amp;gt;&amp;gt; fact.from = "foo"&lt;/div&gt;
&lt;div style=""&gt;=&amp;gt; "foo"&lt;/div&gt;
&lt;div style=""&gt;&amp;gt;&amp;gt; fact&lt;/div&gt;
&lt;div style=""&gt;=&amp;gt; #&amp;lt;Fact id: nil, from: nil, to: nil, timeToCount: nil, val: nil, remarks: nil, cp_detail_id: nil, created_at: nil, updated_at: nil&amp;gt;&lt;/div&gt;
&lt;div style=""&gt;&amp;gt;&amp;gt; fact.from = DateTime.now&lt;/div&gt;
&lt;div style=""&gt;=&amp;gt; Sun, 13 Sep 2009 09:53:29 -0600&lt;/div&gt;
&lt;div style=""&gt;&amp;gt;&amp;gt; fact&lt;/div&gt;
&lt;div style=""&gt;=&amp;gt; #&amp;lt;Fact id: nil, from: "2009-09-13 09:53:29", to: nil, timeToCount: nil, val: nil, remarks: nil, cp_detail_id: nil, created_at: nil, updated_at: nil&amp;gt;&lt;/div&gt;
script/console

Loading development environment (Rails 2.3.3)

&amp;gt;&amp;gt; fact = Fact.new

=&amp;gt; #&amp;lt;Fact id: nil, &lt;strong&gt;from: nil&lt;/strong&gt;, to: nil, timeToCount: nil, val: nil, remarks: nil, cp_detail_id: nil, created_at: nil, updated_at: nil&amp;gt;

&amp;gt;&amp;gt; fact.from = "foo"

=&amp;gt; "foo"

&amp;gt;&amp;gt; fact

=&amp;gt; #&amp;lt;Fact id: nil, &lt;strong&gt;from: nil&lt;/strong&gt;, to: nil, timeToCount: nil, val: nil, remarks: nil, cp_detail_id: nil, created_at: nil, updated_at: nil&amp;gt;

&amp;gt;&amp;gt; fact.from = DateTime.now

=&amp;gt; Sun, 13 Sep 2009 09:53:29 -0600

&amp;gt;&amp;gt; fact

=&amp;gt; #&amp;lt;Fact id: nil, &lt;strong&gt;from: "2009-09-13 09:53:29"&lt;/strong&gt;, to: nil, timeToCount: nil, val: nil, remarks: nil, cp_detail_id: nil, created_at: nil, updated_at: nil&amp;gt;

&lt;/code&gt;

When I assign a value foo, it doesn&amp;#8217;t complain but just assigns a nil.  Only if it had complained, I could have saved so much of my brain cells and time. Sigh &amp;#8230;

Now, you might ask why am I assigning a foo instead of date. Well, I am still developing and was just putting random values to get the form to work  :P

Anyway, I hope it will help some nOOb like me someday.

Have a good week,
Mahesh Murthy</description><link>http://mmurthy.com/post/45774403099</link><guid>http://mmurthy.com/post/45774403099</guid><pubDate>Sun, 13 Sep 2009 19:09:22 -0400</pubDate><category>JustMigrate</category></item><item><title>Upgrade your wordpress plugin</title><description>&lt;p&gt;If you use wordpress plugin for your website, make sure you are using the latest version of it. If you are lazy like me, chances are that sooner or later your site will be hacked. Yeah, mine was hacked because I had not upgraded in ages. Thankfully my database was intact, so I didn&amp;#8217;t lose anything. Here is a good read: &lt;a href="http://ocaoimh.ie/did-your-wordpress-site-get-hacked/"&gt;http://ocaoimh.ie/did-your-wordpress-site-get-hacked/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;have a good day,&lt;br/&gt;
Mahesh Murthy&lt;/p&gt;</description><link>http://mmurthy.com/post/45774403953</link><guid>http://mmurthy.com/post/45774403953</guid><pubDate>Wed, 08 Jul 2009 16:03:38 -0400</pubDate><category>JustMigrate</category></item><item><title>:cache =&gt; true</title><description>&lt;p&gt;That is all it took to take my site from F grade to B and make my site faster by 1 second almost! So, if you have a rails app, go ahead and add :cache =&amp;gt; true to your stylesheet_link_tag and javascript_include_tag in your view files. This is all I added into my application.html.erb&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;%= stylesheet_link_tag "home", :media =&amp;gt; "all", :cache =&amp;gt; true %&amp;gt;&lt;br/&gt;
&amp;lt;%= javascript_include_tag :all, :cache =&amp;gt; true %&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;All rails does is collapses all your javascript (and stylesheet) files into single file. I have 11 javascript files and 3 css files. With this, I reduced the number of calls by 12 and that gave a good one second improvement! Not bad ha? Also, that one second was pretty consistent with/without firefox caching.&lt;/p&gt;

&lt;p&gt;After this, I tried using asset_packager plugin to see if I get any more improvement. But, I didn&amp;#8217;t really see any. Basically, that minifies your files by combining everything into one file and removing new line character and stuff. &lt;/p&gt;

&lt;p&gt;The video tutorial had a few more suggestions like using &lt;a href="http://en.wikipedia.org/wiki/Content_Delivery_Network"&gt;CDN &lt;/a&gt; which clearly is not something I would like to explore at this point because it costs money.&lt;/p&gt;

&lt;p&gt;That&amp;#8217;s all for now. Stay tuned for more improvements as I go through next tutorials.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Mahesh Murthy&lt;/p&gt;</description><link>http://mmurthy.com/post/45774404775</link><guid>http://mmurthy.com/post/45774404775</guid><pubDate>Tue, 28 Apr 2009 04:13:43 -0400</pubDate><category>JustMigrate</category></item><item><title>How fast is your website?</title><description>&lt;p&gt;I was searching for rails caching tutorials and ran into &lt;a href="http://railslab.newrelic.com/scaling-rails"&gt;this&lt;/a&gt; really nice set of video tutorials about scaling rails applications on &lt;a href="http://newrelic.com"&gt;newrelic&lt;/a&gt;. I just watched the first video which has some neat tricks on how to improve the page load time. I ran some tests on &lt;a href="http://thecollegestuff.com"&gt;thecollegestuff.com&lt;/a&gt; and here are the stats.

1. According to &lt;a href="http://getfirebug.com/"&gt;firebug&lt;/a&gt;, the site load time is 3.5 seconds and the breakdown is as follows

&lt;/p&gt;&lt;div class="p_embed p_image_embed"&gt;
&lt;img alt="" src="http://mmurthy.com/wp-content/uploads/2009/04/firebug.jpg"/&gt;&lt;/div&gt;


2. Then the tutorial mentioned about &lt;a href="http://developer.yahoo.com/yslow/"&gt;yslow &lt;/a&gt;and how to use it to collect some stats. Here is the output from yslow.

&lt;div class="p_embed p_image_embed"&gt;
&lt;img alt="" src="http://mmurthy.com/wp-content/uploads/2009/04/yslow.jpg"/&gt;&lt;/div&gt;


Ugh .. my site has a rating F! 

Over the next few days, I will try to implement all the things suggested in the tutorials. Let&amp;#8217;s see how much improvement I will get out of it. 

Have a nice day!
Mahesh Murthy</description><link>http://mmurthy.com/post/45774405655</link><guid>http://mmurthy.com/post/45774405655</guid><pubDate>Wed, 15 Apr 2009 13:29:50 -0400</pubDate><category>JustMigrate</category></item><item><title>Note on page caching</title><description>&lt;p&gt;It turns out I can&amp;#8217;t use page caching like the way I did in the previous post. The way page caching works is that rails just saves the rendered html in the public directory and next time when the request comes in, if the page exists, it just fetches it. The problem is, if a user is logged in, his name shows up on the top right corner of the page. Now let&amp;#8217;s say on the first hit for user foo, rails caches the page. When someone else accesses the same url, rails happily fetches the cached page (with user name foo) to user bar. yikes! User bar is all confused now. Not good.&lt;/p&gt;

&lt;p&gt;Moral of the story: Page caching should be used for pages which don&amp;#8217;t have any customized information. &lt;/p&gt;

&lt;p&gt;What I really need is action caching. Back to the drawing board! I will blog about it when I am done.&lt;/p&gt;

&lt;p&gt;See you later,&lt;br/&gt;
Mahesh Murthy&lt;/p&gt;</description><link>http://mmurthy.com/post/45774406612</link><guid>http://mmurthy.com/post/45774406612</guid><pubDate>Sun, 12 Apr 2009 19:37:02 -0400</pubDate><category>JustMigrate</category></item><item><title>Go rails caching!</title><description>&lt;p&gt;I had no idea caching is SO simple in rails. I added some caching to &lt;a href="http://thecollegestuff.com"&gt;thecollegestuff.com&lt;/a&gt;. Two places where caching was clearly needed were the college page listing all its professors and the professor page with all the ratings. Majority of the people who land on these pages are only viewing these pages. They are not really adding content. So, it makes sense to fetch the page quickly (from the cache).&lt;/p&gt;

&lt;p&gt;For now the way my cache expires is when someone rates a professor in which case I expire that professor page. Similarly, I expire the college page when a new professor is added. Below is a code snippet which does the caching.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;br/&gt;
class ProfessorsController &amp;lt; ApplicationController&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;caches_page :show&lt;/p&gt;

&lt;p&gt;cache_sweeper :professor_sweeper,&lt;br/&gt;
:only =&amp;gt; [ :create ]&lt;/p&gt;

&lt;p&gt;caches_page is self explanatory. I have cached the show transaction.&lt;/p&gt;

&lt;p&gt;cache_sweeper is used to expire the cache when a create method is called on the professor. Below is the sweeper code.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;br/&gt;
class ProfessorSweeper &amp;lt; ActionController::Caching::Sweeper&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;observe Professor&lt;/p&gt;

&lt;p&gt;def after_create(professor)&lt;br/&gt;
expire_college_page(profesor.college_id)&lt;br/&gt;
end&lt;/p&gt;

&lt;p&gt;private&lt;/p&gt;

&lt;p&gt;def expire_college_page(collegeId)&lt;br/&gt;
expire_page :controller =&amp;gt; &amp;#8220;colleges&amp;#8221;, :action =&amp;gt; &amp;#8220;show&amp;#8221;, :id =&amp;gt; collegeId&lt;br/&gt;
end&lt;/p&gt;

&lt;p&gt;end&lt;/p&gt;

&lt;p&gt;That is all it takes to do a page caching! I am sure I can find more places in my code which can be cached. I will have to see if I can use some action caching or fragment caching somewhere. The home page has the top professor and college list which are database queries. I have to find a nice way to cache that part of the page. I will play around next weekend. Have a good week!&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Mahesh&lt;/p&gt;</description><link>http://mmurthy.com/post/45774407473</link><guid>http://mmurthy.com/post/45774407473</guid><pubDate>Tue, 31 Mar 2009 09:19:10 -0400</pubDate><category>JustMigrate</category></item><item><title>What are your 3 must read blogs everyday?</title><description>&lt;p&gt;I just noticed that there are a few blogs which I really look forward to reading everyday. Do you have any in your feed reader like that? If so, can you share it with me?&lt;/p&gt;

&lt;p&gt;Here are the 3 I read everyday without fail&lt;/p&gt;

&lt;p&gt;0. &lt;a href="http://sethgodin.typepad.com/"&gt;Seth&amp;#8217;s&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1. &lt;a href="http://www.avc.com/"&gt;Fred&amp;#8217;s&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2. &lt;a href="http://codinghorror.com"&gt;Jeff&amp;#8217;s&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feel free to add yours in the comments section.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Mahesh&lt;/p&gt;</description><link>http://mmurthy.com/post/45774408408</link><guid>http://mmurthy.com/post/45774408408</guid><pubDate>Wed, 18 Mar 2009 08:45:48 -0400</pubDate><category>JustMigrate</category></item><item><title>End of week 1 - thecollegestuff goes nowhere</title><description>&lt;p&gt;It&amp;#8217;s been a week since I put thecollegestuff.com up. There has been one registered user apart from me (ouch!). I think there are many reasons for it. I am just brainstorming here for myself. Feel free to add anything I have left out.
	&lt;/p&gt;&lt;li&gt;the site is just ordinary. No killer features, nothing&lt;/li&gt;
	&lt;li&gt;Look and feel is very average&lt;/li&gt;
	&lt;li&gt;There is no much content there&lt;/li&gt;
	&lt;li&gt;I haven&amp;#8217;t done a good job of marketing the site&lt;/li&gt;
Let&amp;#8217;s see what I can do to fix each of them

&lt;strong&gt;Point 1&lt;/strong&gt;: I will work on adding the features in my todo list.
&lt;strong&gt;Point 2&lt;/strong&gt;: Anyone out there who can clean up the interface a little bit? Leave a comment if you are interested!
&lt;strong&gt;Point 3&lt;/strong&gt;: This is a chicken and egg problem. Users will be motivated if there is content. But they are the ones who will have to add content. So, I don&amp;#8217;t know what to do here.
&lt;strong&gt;Point 4&lt;/strong&gt;: I will start bugging my friends to use the site and spread the word and will look up online for some marketing techniques ;)

That is the 3 point formula to win! I am sure I will laugh at myself looking back at this post sometime in the future. heh .. who cares. This is fun for now! The feelinig of starting a website is amazing even if it is crappy!

That is all for now. Have a good week ahead!

Cheers,
Mahesh</description><link>http://mmurthy.com/post/45774409418</link><guid>http://mmurthy.com/post/45774409418</guid><pubDate>Sun, 08 Mar 2009 19:23:39 -0400</pubDate><category>JustMigrate</category></item><item><title>My first rails application is out!</title><description>&lt;p&gt;I have been learning rails for past few months.  You probably know it if you read my blog because there were a few things I posted as I learnt new things. I think the best way to learn is to build something. So, I built something finally! It is a dirty clone of ratemyprofessors.com and it is catered for colleges in India. And the name of the site is (roll the drums)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="http://thecollegestuff.com"&gt; thecollegestuff.com&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yeah, I know. It is really simple with some very ordinary looks (there is a reason I do backend work for a living). But I feel good that atleast I have some product I can look at as a whole .  Anyway, I will work on my css skills and improve the look and feel.  I already have 20 more features lined up. The things I am more excited about are related to technologies and tools I want to try out like couchdb, memcached, some monitoring tools and so on. The whole idea of the site was for me to play with these things. If I get some users to my site, that will be a bonus!&lt;/p&gt;

&lt;p&gt;If you have any ideas, find bugs and so on feel free to let me know. I am totally excited about it! A big thanks to Naveen and Harini for all the help with the ideas and ironing out issues.&lt;/p&gt;

&lt;p&gt;Now, go ahead and play with the site and spread the word will ya? ;)&lt;/p&gt;</description><link>http://mmurthy.com/post/45774410309</link><guid>http://mmurthy.com/post/45774410309</guid><pubDate>Sun, 01 Mar 2009 05:49:42 -0500</pubDate><category>JustMigrate</category></item><item><title>Project ideas</title><description>&lt;p&gt;A couple of my friends were asking me about ideas for final semester engineering project. I thought I will document some of my ideas here so that it will help some student some day who is keen on actually doing a project which is not the same old railway booking system or the insurance management system (atleast those were the hot projects during my time).  The ideas are raw. So, feel free to fork, transform or do anything with it. If possible, post your own ideas in the comment section.&lt;/p&gt;

&lt;p&gt;Here goes my ideas:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;0. Efficient routing of buses&lt;/strong&gt;&lt;br/&gt;
If you travel by bus a lot, have you noticed that buses on some routes seem to be always empty and some are always full? Have you observed that buses just come one after another sometimes and there is none for a long time after that? Find a solution to that problem. Go to your local public transport authority and ask for the bus routes and maps. Figure out how to efficiently route the buses so that it covers more ground or gets you from point A to point B quicker or add more buses in areas which are identified crowded during peak hours. Just make it better than what it is now. Go ahead and implement that. That will be one heck of a project I tell you. You can start with lot of assumptions and then slowly start adding constraints.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Ugh, those traffic jams&lt;/strong&gt;&lt;br/&gt;
I am from Bangalore and I sure know what this means. If you are from any of the metros in India, I am pretty sure you know what I am talking about. During peak hours, you are stuck in the traffic for hours. Can you somehow fix this? Get the map of the city and come up with an algorithm to direct the traffic in different routes (don&amp;#8217;t care about the shortest distance from A to B because people are ok driving a few more kms instead of just idling there). Also, figure out where the bottle necks are, at what time they are and automatically generate an advisory for people (like suggesting the time at which people should go so that they hit less traffic and so on). I am being vague here because I can keep going with this but I just want you to run your imagination wild. Again, the goal is to make it atleast a little better than what it is now.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Sort the grocery store list&lt;/strong&gt;&lt;br/&gt;
So, there are two scenarios here I care about. One is the grocery store where you just pick up stuff and take it to the counter and another where you just give the shopkeeper the list and he does everything for you. I want you to collect the data of where each product is (which aisle, which section and so on). Then, based on that data you should sort the list so that it is easy to pick up all the things in order starting from one end of the aisle and going around in order. For the second part where shopkeeper does the work for you, he should be able to sort multiple lists such that he can service multiple customers efficiently (as against doing each list in order).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Car parking lot problem&lt;/strong&gt;&lt;br/&gt;
How often have you gone to a parking lot and have been looking for parking space. Last time I was in India and tried to park my car in the parking lot in the mall, there were literally 5 people managing it and they were so confused and disorganised, I sat their waiting for them to find me a spot. Seriously, how hard is it to come up with a solution where they know exactly how many spots are there to begin with and you assign numbers to each car which gets in so that the customer can just go there and park. And you basically recycle the number as and when people come in and out.&lt;/p&gt;

&lt;p&gt;There are some more I have in my mind but still needs work. I will update once I have something concrete. Until then, feel free to post your ideas in the comments section.&lt;/p&gt;

&lt;p&gt;Have a good day,&lt;br/&gt;
Mahesh Murthy&lt;/p&gt;</description><link>http://mmurthy.com/post/45774411083</link><guid>http://mmurthy.com/post/45774411083</guid><pubDate>Fri, 13 Feb 2009 17:30:34 -0500</pubDate><category>JustMigrate</category></item><item><title>The dip</title><description>&lt;p&gt;I just finished reading &amp;#8220;&lt;a href="http://www.amazon.com/Dip-Little-Book-Teaches-Stick/dp/1591841666/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1232804400&amp;amp;sr=8-1"&gt;The dip&lt;/a&gt;&amp;#8221;.  It is a really small book and the  material is light. You could finish reading the entire book  in 3 - 4  sittings if you want.  I think it is a good read but honestly, I was expecting more out of it.&lt;/p&gt;

&lt;p&gt;Here is what I got out of the book.&lt;/p&gt;

&lt;p&gt;1. You have to quit doing things which you know you can&amp;#8217;t be best at so that you can focus all your energy on something you can excel in.&lt;/p&gt;

&lt;p&gt;2. Majority of the people quit when they are in a dip. So, don&amp;#8217;t quit when you are having trouble staying afloat.&lt;/p&gt;

&lt;p&gt;3. If you keep quitting, it becomes a habit. Don&amp;#8217;t get into that mode. Think hard before even getting into something.&lt;/p&gt;

&lt;p&gt;At the end, I was still disappointed with this book. No doubt, it gives some good anecdotes about how people quit things to concentrate on something they badly wanted and how they succeeded  in it and stuff. But it never tells you how to recognise that you are in a culdesac and not a dip. You cut when you are in culdesac and you don&amp;#8217;t quit when you are in a dip. The million dollar question is,  when you are in the middle of something and you are having a hard time, how do you differentiate between the two?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: I forgot one big point he makes in the book. People who are experts in one thing are so much more valuable than generics (jack of all trades).  He gives some compelling examples for this. I completely agree with it. Quit everything else to become a master in one.&lt;/p&gt;

&lt;p&gt;If there is anyone out there who has read this book, you are welcome to answer my question.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://sethgodin.typepad.com/"&gt;Seth&lt;/a&gt; - If you happen to run into this blog post, feel free to answer my question ;)&lt;/p&gt;

&lt;p&gt;Have a good weekend!&lt;/p&gt;

&lt;p&gt;Mahesh Murthy&lt;/p&gt;</description><link>http://mmurthy.com/post/45774411908</link><guid>http://mmurthy.com/post/45774411908</guid><pubDate>Sat, 24 Jan 2009 16:56:10 -0500</pubDate><category>JustMigrate</category></item><item><title>Bug in my laundry swipe card</title><description>&lt;p&gt;So, I had a balance of  $0.75 in my laundry card and I went confidently to the laundry room to put my clothes go through the torturous dryer once again. The cost of dryer is $.50.  Any normal human being would think that 50 &amp;lt; 75 and so it should magically work. But guess what, I got a nice error message saying &amp;#8220;INSUF FUNDS&amp;#8221;!!!  zkupbneygouiegashab???????&lt;/p&gt;

&lt;p&gt;I am trying to think, what the engineer who wrote that piece of code was thinking? Or wait, may be it is configurable in which case what was the person who has control of configuring it thinking?? Seriously, what is it? Here are some things I can think of.&lt;/p&gt;

&lt;p&gt;1. &lt;code&gt; if(fundsInCard &amp;lt; 1.0) {&lt;/code&gt;&lt;br/&gt;
print &amp;#8220;INSUF FUNDS&amp;#8221;;&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;Seriously, if this is how it is coded, there is only one option. Fire that guy who wrote this.&lt;/p&gt;

&lt;p&gt;2.   Now, with inflation the costs go up. So, in the next 6 months the price for dryer might be $1.00. So, they just configured it for $1.00??? That doesn&amp;#8217;t make any sense. But hey, I am just brainstorming here.&lt;/p&gt;

&lt;p&gt;That is all I can think of. If you know what could have gone wrong, where the bug is, let me know. May be the owner of that card reader company will read my blog and post a comment. May be the guy who wrote the code or may be the person who configured it will post a comment.  hmm .. what are the chances of that happening.  Let&amp;#8217;s see. On average, there is one comment per post on my blog. That means, there might be a grand total of  &amp;#8220;1&amp;#8221; comment for this post. Now, taking into consideration that the owner, configurer, coder is just one out of say 5000000 people in this counry and the considering the chances of him reading blogs at the first place and then considering he bumps into my awesome blog, the probability is pretty close to &amp;#8220;ZERO&amp;#8221;.  Feel free to correct me if I am wrong.&lt;/p&gt;

&lt;p&gt;On that note, have a good day!&lt;/p&gt;

&lt;p&gt;Mahesh Murthy&lt;/p&gt;</description><link>http://mmurthy.com/post/45774412790</link><guid>http://mmurthy.com/post/45774412790</guid><pubDate>Wed, 14 Jan 2009 15:57:42 -0500</pubDate><category>JustMigrate</category></item><item><title>restful authentication rails</title><description>&lt;p&gt;I just followed the screencast for restful authentication and it is really straightforward. Even though it is for rails 1.x, it works for 2.x since the plugin is updated. The only problem I had was when I tried signin, it was giving me &amp;#8220;uninitialized constant SessionController&amp;#8221; error.  I had to change my  routes.rb file to add the controller name like below:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;map.resource :session, :controller =&amp;gt; 'session'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;rails by deafult assumes that the controller is sessions (plural) but I had to force it to be singular.&lt;/p&gt;

&lt;p&gt;It works like a charm now! I am going to tweak it fit my application now.&lt;/p&gt;

&lt;p&gt;In the process, I also learnt to add plugin repositories to your application so that it is easy to pull in plugins. Here is an example.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;script/plugin source &lt;a href="http://svn.techno-weenie.net/projects/plugins"&gt;http://svn.techno-weenie.net/projects/plugins&lt;/a&gt;&lt;br/&gt;
script/plugin install restful_authentication&lt;/code&gt;&lt;/p&gt;</description><link>http://mmurthy.com/post/45774413718</link><guid>http://mmurthy.com/post/45774413718</guid><pubDate>Sat, 10 Jan 2009 23:25:47 -0500</pubDate><category>JustMigrate</category></item><item><title>spam comments</title><description>&lt;p&gt;In the past few weeks, the number of spam comments posted on my site has increased. I wonder what happened recently. Not that I am posting some really good posts and the popularity of my site went up. I upgraded my wordpress recently. That&amp;#8217;s all. Nothing else.&lt;/p&gt;

&lt;p&gt;Anyway, I was reading the wikipedia article on &lt;a href="http://en.wikipedia.org/wiki/Spam_in_blogs"&gt;spam in blogs &lt;/a&gt;. It has some tips on how to combat it. I am sure there are tons of plugins out there to combat this menace. I am going to look for it today sometime. If you know of any popular wordpress plugin which does a good job, let me know.&lt;/p&gt;</description><link>http://mmurthy.com/post/45774414570</link><guid>http://mmurthy.com/post/45774414570</guid><pubDate>Wed, 07 Jan 2009 16:30:14 -0500</pubDate><category>JustMigrate</category></item><item><title>git-start </title><description>&lt;p&gt;I am using git on my hostmonster shared server for my personal rails projects. I have started liking it already. Well, the only other source control system I have really used is accurev (at work). So, not much to compare I guess. I like the idea of branching in git where you can kinda have two different workspaces in same place. It took a minute to digest that but in the end, I got it. It is so cool.&lt;/p&gt;

&lt;p&gt;As of now, I have only been doing the basic things. Hope to explore more of git soon.&lt;/p&gt;</description><link>http://mmurthy.com/post/45774415403</link><guid>http://mmurthy.com/post/45774415403</guid><pubDate>Tue, 06 Jan 2009 15:46:49 -0500</pubDate><category>JustMigrate</category></item><item><title>Welcome back me</title><description>&lt;p&gt;Happy new year to all! I am back from vacation to India. I shall start blogging seriously this time. The latest update is that I just ordered 2 more books on amazon.&lt;/p&gt;

&lt;p&gt;1. &lt;strong&gt;The Dip: A Little Book That Teaches You When to Quit (and When to Stick)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;2. &lt;strong&gt;Pragmatic Thinking and Learning: Refactor Your Wetware (Pragmatic Programmers)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The second one, I will be reading in the book club at work. The first one, I bought because I am a big fan of &lt;a href="http://sethgodin.typepad.com/"&gt;Seth Godin&lt;/a&gt;. If you don&amp;#8217;t read his blog, you are missing out seriously.&lt;/p&gt;</description><link>http://mmurthy.com/post/45774416290</link><guid>http://mmurthy.com/post/45774416290</guid><pubDate>Mon, 05 Jan 2009 16:59:36 -0500</pubDate><category>JustMigrate</category></item><item><title>What is your reading speed?</title><description>&lt;p&gt;Have you ever felt that there is so much stuff to read about (blogs, books, newspaper and what not)  but so little time? Have you ever wished to have that amazing power where you just gulp the entire page by just looking at it for few seconds? I feel it every day. I have 500 feeds sitting in my reader. How do I get to them? Is it humanly possible? Some people argue that you just have to peruse them and only read the exciting ones. Believe me, there are quite a few good ones there.&lt;/p&gt;

&lt;p&gt;So, I thought I will check what kind of a reader I am? I always knew I wasn&amp;#8217;t a fast reader but I just wanted to measure it. So, I went to my friend for advice. The friend who seems to have answers to all my questions. No money for right guess! google :) So, I found &lt;a href="http://www.bangor.ac.uk/~mas009/neurogym/exercises/speedread1.htm"&gt;this &lt;/a&gt;page which measures your reading speed? Go ahead and take it. Seriously. Go. Come back and then continue to read my blog.&lt;/p&gt;

&lt;p&gt;Ok, I scored 262 which puts me in average bracket :(  But you know what, that is good. I now know where I stand. If I go with what is mentioned in that page, excellent reading speed is somewhere between 500 - 750 words per minute. Can you belive that? If I can reach that level, I will literally be reading twice as much as I do.  OMG, I can&amp;#8217;t believe this. Isn&amp;#8217;t that awesome?&lt;/p&gt;

&lt;p&gt;What was your score? I will probably google for more information and tutorials to improve my reading speed. I will post next month same day (approx), how much improvement I have made. If you are interested in it, leave a comment. It would be nice to have a company :)&lt;/p&gt;

&lt;p&gt;Well, that&amp;#8217;s all I have for today. Happy reading! oh, if you have any tips for me on how to cover lot of material in short time, please let me know.&lt;/p&gt;

&lt;p&gt;On that note, I shall move to my next assignment for the day.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Mahesh Murthy&lt;/p&gt;</description><link>http://mmurthy.com/post/45774417136</link><guid>http://mmurthy.com/post/45774417136</guid><pubDate>Tue, 14 Oct 2008 05:52:22 -0400</pubDate><category>JustMigrate</category></item></channel></rss>
