<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Blog</title><link>http://rageshkrishna.com:80/</link><description>You've reached The Infinite Loop, a blog about programming, entrepreneurship and other interesting things.</description><item><title>Demystifying Shippable's deployment keys</title><link>http://rageshkrishna.com:80/blog/demystifying-shippable-s-deployment-keys</link><description>&lt;p&gt;When you enable a project on Shippable, you can see that a key gets added to your repository's "Deployment Keys" on GitHub or BitBucket. However, when you visit your subscription dashboard on Shippable, there's another "Deployment Key" listed there that doesn't match what you see in your repository settings. I'm going to try and clear that up for you in this post.&lt;/p&gt;

&lt;h4&gt;tl;dr&lt;/h4&gt;

&lt;p&gt;Shippable uses two key pairs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;~/.ssh/project_rsa&lt;/code&gt; and &lt;code&gt;~/.ssh/project_rsa.pub&lt;/code&gt; for &lt;code&gt;git clone&lt;/code&gt;, &lt;code&gt;git pull&lt;/code&gt; and &lt;code&gt;git fetch&lt;/code&gt; operations&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~/.ssh/id_rsa&lt;/code&gt; and &lt;code&gt;~/.ssh/id_rsa.pub&lt;/code&gt; for &lt;code&gt;git submodule&lt;/code&gt; operations, and any other commands that use SSH which you include in your YML files&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;Project keys&lt;/h2&gt;

&lt;p&gt;Every time you enable a project, we generate an SSH key and sets that on GitHub as the deployment key for the project. This happens only for private projects because we uses the APIs to fetch the YML file and figure out what we need to build. This is the key you see when you go to the Deployment Keys settings for your project. During the build, this key pair is available at &lt;code&gt;~/.ssh/project_rsa&lt;/code&gt; and &lt;code&gt;~/.ssh/project_rsa.pub&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;We use this key to do two things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;All git clone/pull/fetch operations that happen in the &lt;code&gt;git_sync&lt;/code&gt; step of your build. Because the filenames are not standard key names, we use &lt;code&gt;ssh-agent&lt;/code&gt; so git will use these keys when talking to GitHub or BitBucket.&lt;/li&gt;
&lt;li&gt;We also use this key pair to encrypt and decrypt secure environment variables in your project. This means that if you ever disable and re-enable a project on Shippable, you will need to re-encrypt the secure environment variables in your YML file.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;Subscription keys (a.k.a "Deployment Keys")&lt;/h2&gt;

&lt;p&gt;We also generate a second set of keys for every subscription. This is what you see when you expand the "Deployment Keys" accordion on the subscriptions dashboard. We ask that you use this the "deployment key" when you want to integrate with services like Heroku, and also when you need to pull in submodules or dependencies from other private repositories. These keys are placed at &lt;code&gt;~/.ssh/id_rsa&lt;/code&gt; and &lt;code&gt;/.ssh/id_rsa.pub&lt;/code&gt; during the build. This way, when you do a &lt;code&gt;git push heroku&lt;/code&gt; or &lt;code&gt;git submodule update&lt;/code&gt; you don't need to worry about ssh-agent and the likes. Git will use &lt;code&gt;id_rsa&lt;/code&gt; by default and do the right thing.&lt;/p&gt;

&lt;h2&gt;Why do we use two key pairs?&lt;/h2&gt;

&lt;p&gt;If we didn't do this, you would never be able to pull submodules or other dependencies from other private repositories. On GitHub and BitBucket, a key pair can only be associated with a single project or user account. Once we set the project keys as the deployment key on your repository, you would not be able to re-use the same key on another user account to allow pulling code from other repositories. The only other alternative we had at the time was to add the key automatically to your user account, but we decided that this is too invasive and gives us far more permissions that we actually need. By managing two key pairs and making them both available to the build we're letting you decide when and how to grant the additional access required for submodules and dependencies from other private repositories.&lt;/p&gt;
</description><pubDate>Mon, 13 Oct 2014 08:25:00 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/blog/demystifying-shippable-s-deployment-keys</guid></item><item><title>Getting Composer to work with GitHub tokens on Shippable</title><link>http://rageshkrishna.com:80/blog/getting-composer-to-work-with-github-tokens-on-shippable</link><description>&lt;p&gt;Composer is a dependency manager for PHP. If you're using it in your projects and running builds on Shippable, you might notice that once in a while your builds fail with a dangerous looking error:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Could not fetch https://api.github.com/repos/twilio/twilio-php/zipball/51ab2929a66d4455ecb470eafdfe2bab798945ff, 
enter your GitHub credentials to go over the API rate limit

The credentials will be swapped for an OAuth token stored in /home/shippable/.phpenv/versions/5.4/composer/auth.json, 
your password will not be stored

To revoke access to this token you can visit https://github.com/settings/applications

Build timed out
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This can be a frustrating error to deal with, because Composer is waiting for user input and your build will just wait until it times out or you manually cancel it.&lt;/p&gt;

&lt;h3&gt;Wait, my build runs fine locally. Why does this happen only on Shippable?&lt;/h3&gt;

&lt;p&gt;Composer downloads dependencies directly from GitHub. By default it does this using unauthenticated requests and &lt;a href="https://developer.github.com/v3/#rate-limiting"&gt;GitHub currently allows only 60 unauthenticated requests per hour&lt;/a&gt;. Unless you're using dedicated hosts on Shippable, you're running on our shared hosts. It looks like GitHub applies the rate limit to an IP address so if other builds running on the same host have already made 60 calls to GitHub in the last hour, your build is going to fail.&lt;/p&gt;

&lt;h3&gt;OK, so how do I get this to work on Shippable?&lt;/h3&gt;

&lt;p&gt;Composer lets you configure a GitHub OAuth token. Once you do this, you'll be making authenticated requests to GitHub and your rate limit immediately shoots up to 5,000 requests per hour. Because this is done with your unique token, the rate limit is all yours to consume and doesn't get shared with any other builds that might be running. Let's get started with this.&lt;/p&gt;

&lt;h3&gt;Step 1: Create a GitHub token&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://help.github.com/articles/creating-an-access-token-for-command-line-use/"&gt;Generate a GitHub token&lt;/a&gt;. You only need read permission, so it's safe to uncheck all of the scopes for the token.&lt;/p&gt;

&lt;h3&gt;Step 2: Protect your token with Shippable environment variable encryption&lt;/h3&gt;

&lt;p&gt;Now that you have a token you want to tell composer to use it during your build. However, you shouldn't just check this in to your repository because it's a private token for your account. This is where Shippable's encrypted environment variables come in handy. Head over to your subscription dashboard on Shippable and click on the "Encrypted env vars" link:&lt;/p&gt;

&lt;p&gt;&lt;img src="/Media/Default/BlogPost/blog/encrypt_env_vars.png" alt="Encrypting environment variables on Shippable" /&gt;&lt;/p&gt;

&lt;p&gt;Define a new environment variable. I'm going to call it &lt;code&gt;MY_GITHUB_TOKEN&lt;/code&gt; like so:&lt;/p&gt;

&lt;p&gt;&lt;img src="/Media/Default/BlogPost/blog/encrypt_dialog.png" alt="enter image description here" /&gt;&lt;/p&gt;

&lt;h3&gt;Step 3: Add the environment variable to your YML file&lt;/h3&gt;

&lt;p&gt;Paste the output from the encryption dialog exactly as it is to the &lt;code&gt;env&lt;/code&gt; section of your &lt;code&gt;shippable.yml&lt;/code&gt; file. When your build runs, this value will be decrypted and made available to your build as an environment variable called &lt;code&gt;MY_GITHUB_TOKEN&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;Step 4: Configure Composer to use your token&lt;/h3&gt;

&lt;p&gt;The last step is to tell Composer to use your token. Just add this to your &lt;code&gt;before_install&lt;/code&gt; section and you're done:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;before_install:
  - composer config -g github-oauth.github.com $MY_GITHUB_TOKEN
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That's it. Composer will now use your personal token when fetching dependencies from GitHub.&lt;/p&gt;
</description><pubDate>Fri, 10 Oct 2014 06:28:47 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/blog/getting-composer-to-work-with-github-tokens-on-shippable</guid></item><item><title>Looking back at 2013</title><link>http://rageshkrishna.com:80/blog/looking-back-at-2013</link><description>&lt;p&gt;2013 went by quickly, and what a year it has been. Three massive things that I want to reflect on for this year.&lt;/p&gt;

&lt;h2&gt;1. Shippable goes from "cool idea" to $2M in funding in less than a year&lt;/h2&gt;

&lt;p&gt;Avi and I started talking about building a continuous integration service somewhere in December of 2012. Since then, we've written and rewritten everything four times, slowly making progress towards a better product-market fit. We started out by using Jenkins as the core of our platform but we realized very soon that it wasn't going to let us innovate fast enough, at which point we built our own CI back end. That was a lot of fun to build.&lt;/p&gt;

&lt;p&gt;We got cross platform builds running using a solid distributed architecture that allowed us to run builds 3x faster than the competition. It was around this time that we got in to TechStars Seattle, which turned out to be a massive learning experience for all of us. They don't call it an accelerator for nothing -- the amount of stuff we got done in the three months at TechStars was phenomenal.&lt;/p&gt;

&lt;p&gt;Along the way, it became clear to us that Docker was going to change the way the world thinks about development, testing and deployment software. That's when we decided to start moving our own infrastructure to Docker. Today, our customers builds happen inside Docker containers and we're completely embracing an entire development workflow based around Docker. It's an exciting time to be a developer and I'm thrilled to be a part of this team.&lt;/p&gt;

&lt;h2&gt;2. I've moved to developing full time in Javascript on NodeJS&lt;/h2&gt;

&lt;p&gt;I love .NET. C# is, without a doubt, the best language that I've ever worked with, but I'm very worried about Windows. It's becoming painfully clear that there's almost no one other than Microsoft that's driving innovation on the Windows platform. All the cool toys seem to be on the other side of the fence and that makes me very sad. It's just disappointing that Microsoft, with all its abilities, has simply allowed the ecosystem to rot away.&lt;/p&gt;

&lt;p&gt;As a developer, it's hard to ignore all the awesomeness that's going on in the open source world. As much as I love C# and Visual Studio, there's something to be said about stuff like NodeJS, Python, Docker and Vim. Granted, some of those things can also be used on Windows, but the truth is Windows simply isn't a first class citizen of the open source world and all the interesting stuff happens on Linux first anyway.&lt;/p&gt;

&lt;p&gt;I've now learned to love my set up of tmux and Vim (+ plugins, of course). I'm not as productive as I used to be with Visual Studio yet, but it's not as scary as it seems and I'm getting a little better every day.&lt;/p&gt;

&lt;h2&gt;3. Oh, and one more thing...&lt;/h2&gt;

&lt;p&gt;Now this is going to come as a complete surprise to everyone because I've been really, really quiet about it so far. It isn't that I wanted to keep it quiet, but the truth is that this little &lt;em&gt;project&lt;/em&gt; has kept me so busy for the past few weeks that I just haven't had the time to go announcing it to the world.&lt;/p&gt;

&lt;p&gt;Folks, meet Aradhya.&lt;/p&gt;

&lt;div style="text-align: center"&gt;
&lt;img src="http://rageshkrishna.com/Media/Default/BlogPost/blog/WP_000292_1.jpg" alt="Aradhya Krishna" title="Aradhya Krishna"/&gt;
&lt;/div&gt;

&lt;p style="text-align: center; font-size: 0.9em; font-style: italic"&gt;The bundle of awesomeness that's been keeping Niree and I busy since the 7th of December.&lt;/p&gt;

&lt;p&gt;I don't think the enormity of parenting has descended on me yet, but I do know this -- when I'm looking at her, time slows down, everything is alright with the world and it all makes sense.&lt;/p&gt;

&lt;h2&gt;2014, here we come!&lt;/h2&gt;

&lt;p&gt;Standing here at the cusp of another new year, I'm filled with hope, enthusiasm and excitement. 2013 was one hell of a ride and I'm sure 2014 will be filled with even more ups, downs and everything in between! Here's wishing everyone a fantastic new year filled with all the best that life has to offer. :)&lt;/p&gt;
</description><pubDate>Thu, 26 Dec 2013 13:12:00 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/blog/looking-back-at-2013</guid></item><item><title>Pro tip: Don't use a generic email address to promote your business</title><link>http://rageshkrishna.com:80/blog/pro-tip-don-t-use-a-generic-email-address-to-promote-your-business</link><description>&lt;p&gt;How often do you see a proposal that goes like this:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Hey there,&lt;/p&gt;
  
  &lt;p&gt;At XYZ we do awesome stuff around something. Check us out at &lt;strong&gt;xyz.com&lt;/strong&gt;!  &lt;/p&gt;
  
  &lt;p&gt;Thanks,&lt;br /&gt;
  xyz@&lt;strong&gt;gmail.com&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Really? It only takes 10 minutes to set up email on your own domain. If you really don't have the time to do that, then I'm not too sure I want to give you money to do things for me.&lt;/p&gt;
</description><pubDate>Sat, 16 Mar 2013 12:43:10 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/blog/pro-tip-don-t-use-a-generic-email-address-to-promote-your-business</guid></item><item><title>You really should</title><link>http://rageshkrishna.com:80/blog/you-really-should</link><description>&lt;p&gt;Procrastination is the root of all laziness. It's easy to come up with a million reasons why you shouldn't do something. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Excercise? Too hard. Tomorrow, maybe.&lt;/li&gt;
&lt;li&gt;Eat healthy? Just one more piece of cake. &lt;/li&gt;
&lt;li&gt;Save money? Ooooh, XBox!&lt;/li&gt;
&lt;li&gt;Start a company? Hmmm, maybe in a few years when I'm really "&lt;em&gt;ready&lt;/em&gt;".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So why should you do any of this right now? Simple. You have more time and energy to do these things today than you will have tomorrow.&lt;/p&gt;

&lt;p&gt;Let it sink in for a minute. Now go do something.&lt;/p&gt;
</description><pubDate>Tue, 12 Mar 2013 19:20:00 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/blog/you-really-should</guid></item><item><title>Asynchronous S3 file uploads with async/await</title><link>http://rageshkrishna.com:80/blog/asynchronous-s3-file-uploads-with-async-await</link><description>&lt;p&gt;The &lt;a href="http://msdn.microsoft.com/en-us/library/vstudio/hh156513.aspx"&gt;async&lt;/a&gt;/&lt;a href="http://msdn.microsoft.com/en-us/library/vstudio/hh156528.aspx"&gt;await&lt;/a&gt; pattern in C# really is awesome. Perhaps it is just syntactic sugar over the TPL, but it makes the code so much more beautiful and easier to read. Before async/await came around this would have been an ugly mess of BeginXXX/EndXXX. Instead, now we get to do this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var s3 = AWSClientFactory.CreateAmazonS3Client(accessKey, secretKey);
PutObjectRequest putRequest = new PutObjectRequest()
{
    FilePath = "your-file.txt",
    Key = "whatever/you/want",
    BucketName = "your-bucket-name",
};

PutObjectResponse response = await Task
    .Factory
    .FromAsync&amp;lt;PutObjectRequest, PutObjectResponse&amp;gt;(s3.BeginPutObject, s3.EndPutObject, putRequest, null);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That is so much easier on the eyes, and that's just the wrapper around the traditional BeginXXX/EndXXX calls that the Amazon SDK gives us. If you're using the newer stuff like HttpClient, it's just one line to async goodness:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;HttpResponseMessage response = await client.GetAsync("http://bing.com");
&lt;/code&gt;&lt;/pre&gt;
</description><pubDate>Thu, 07 Feb 2013 19:34:01 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/blog/asynchronous-s3-file-uploads-with-async-await</guid></item><item><title>Plain-text passwords: Will it ever end?</title><link>http://rageshkrishna.com:80/blog/plain-text-passwords-will-it-ever-end</link><description>&lt;p&gt;Sometimes you just have to wonder how long computer security professionals will have to keep screaming &amp;ldquo;Don&amp;rsquo;t store passwords in plain-text&amp;rdquo; before people take notice. Getting an email like this from MasterCard really freaks me out:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://rageshkrishna.com/Media/Default/Windows-Live-Writer/How-long-is-this-going-to-take_11A55/MasterCard_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="MasterCard" alt="MasterCard" src="http://rageshkrishna.com/Media/Default/Windows-Live-Writer/How-long-is-this-going-to-take_11A55/MasterCard_thumb.png" width="650" border="0" height="415" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I wonder if they store PINs in plain-text, too. It&amp;rsquo;s just sad when a credit card company&amp;rsquo;s policies allow something like this to get pushed in to production.&lt;/p&gt;
</description><pubDate>Fri, 23 Mar 2012 09:11:00 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/blog/plain-text-passwords-will-it-ever-end</guid></item><item><title>Yes, SIM Cards Must Die</title><link>http://rageshkrishna.com:80/yes-sim-cards-must-die</link><description>&lt;p&gt;I like this idea.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://ilyabirman.net/meanwhile/2012/03/23/1/"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="ilyabirman.net" alt="ilyabirman.net" src="http://rageshkrishna.com/Media/Default/Windows-Live-Writer/SIM-Cards-Must-Die_11779/ilyabirman.net_3.jpg" border="0" height="540" width="420" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The author thinks carriers won&amp;rsquo;t support it because it will prevent them from locking in customers. I think they should support it because it also prevents &lt;em&gt;competitors&lt;/em&gt; from locking in customers.&lt;/p&gt;

&lt;p&gt;Read the original post at &lt;a title="http://ilyabirman.net/meanwhile/2012/03/23/1/" href="http://ilyabirman.net/meanwhile/2012/03/23/1/"&gt;http://ilyabirman.net/meanwhile/2012/03/23/1/&lt;/a&gt;&lt;/p&gt;
</description><pubDate>Fri, 23 Mar 2012 08:56:00 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/yes-sim-cards-must-die</guid></item><item><title>Opening hours</title><link>http://rageshkrishna.com:80/opening-hours</link><description>&lt;p&gt;I really wonder why the Indian Railways, arguably one of the most active e-commerce sites in the country, needs to be offline for an hour every day.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.rageshkrishna.com/Media/Default/Windows-Live-Writer/Opening-hours_14E5A/image_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border: 0px;" title="image" alt="image" src="http://www.rageshkrishna.com/Media/Default/Windows-Live-Writer/Opening-hours_14E5A/image_thumb.png" border="0" height="289" width="644" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Seriously!?&lt;/p&gt;

&lt;p&gt;I run a few web apps of my own and I&amp;rsquo;ve had only 50 minutes of downtime in an entire month. Yes, I know my app is nowhere near as complex as a railway reservation system. And yes, I know, those of you that are measuring up time in &lt;a href="http://en.wikipedia.org/wiki/Five_nines"&gt;5 nines&lt;/a&gt; are laughing at me, but give me a break &amp;ndash; my services are in beta. Still, why does the IRCTC need an hour off &lt;em&gt;every single day&lt;/em&gt;? Sure, as a customer, I&amp;rsquo;m somewhat inconvenienced, but as a developer I&amp;rsquo;m really curious as to what they&amp;rsquo;re doing in that hour.&lt;/p&gt;
</description><pubDate>Sun, 15 Jan 2012 12:56:00 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/opening-hours</guid></item><item><title>Turn off the complication!</title><link>http://rageshkrishna.com:80/turn-off-the-complication</link><description>&lt;p&gt;Surely, we&amp;rsquo;d all be better off if we would just turn off &amp;ldquo;&lt;em&gt;complications&lt;/em&gt;&amp;rdquo; in our system settings.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://rageshkrishna.com/Media/Default/Windows-Live-Writer/be0b4382ebdf_94A3/image_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" alt="image" src="http://rageshkrishna.com/Media/Default/Windows-Live-Writer/be0b4382ebdf_94A3/image_thumb.png" border="0" height="200" width="726" /&gt;&lt;/a&gt;&lt;/p&gt;
</description><pubDate>Sat, 07 Jan 2012 23:36:00 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/turn-off-the-complication</guid></item><item><title>Priority #1 for 2012: Exercise</title><link>http://rageshkrishna.com:80/priority-1-for-2012-exercise</link><description>&lt;p&gt;2011 has been a very interesting year for me. It&amp;rsquo;s the year I found out that my body is in far better shape than I give it credit for. The fact that I&amp;rsquo;ve done almost nothing to aid that over the last 30 years is, however, somewhat troubling. So, for 2012, I&amp;rsquo;ve decided that the biggest priority for me is to get more exercise.&lt;/p&gt;

&lt;p&gt;The funny thing about exercise is that you don&amp;rsquo;t really need to do a lot of it to start experiencing the benefits. And, you don&amp;rsquo;t really need to splurge on a gym, either. Just go take a walk. It really is that simple. If you&amp;rsquo;re getting absolutely no exercise right now, stepping up to nothing more than a brisk 30 minute walk every day will do wonders for your body. Assuming you&amp;rsquo;re already eating in a relatively healthy manner, a regular walk is all you really need to start burning off fat, increase your energy levels and generally feel better every day.&lt;/p&gt;

&lt;p&gt;Walking for half an hour isn&amp;rsquo;t difficult. What&amp;rsquo;s difficult is making it a habit. This video is what got me to finally turn this into a real priority for 2012. I hope it does the trick for you, too.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;div style="margin: 0px auto; width: 448px; display: block; float: none; padding: 0px;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:3bd9f2eb-f42d-4b2b-9223-488b02ff9bd0" class="wlWriterEditableSmartContent"&gt;
&lt;div&gt;&lt;object height="252" width="448"&gt;&lt;param name="movie" value="http://www.youtube.com/v/aUaInS6HIGo?hl=en&amp;amp;hd=1" /&gt;&lt;embed src="http://www.youtube.com/v/aUaInS6HIGo?hl=en&amp;amp;hd=1" type="application/x-shockwave-flash" height="252" width="448" /&gt;&lt;/object&gt;&lt;/div&gt;
&lt;div style="width: 448px; clear: both; font-size: .8em;"&gt;23 and 1/2 hours: What is the single best thing we can do for our health?&lt;/div&gt;
&lt;/div&gt;
</description><pubDate>Wed, 04 Jan 2012 05:12:00 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/priority-1-for-2012-exercise</guid></item><item><title>Perspective</title><link>http://rageshkrishna.com:80/perspective</link><description>&lt;blockquote&gt;
&lt;p&gt;When Windows 95 shipped, my primary machine was a 486/DX50 with 8MB of RAM. My test machine was a 386 with 4MB of RAM. The combined computing power and storage capacity of all the machines in my office is now exceeded by your cell phone.&lt;/p&gt;
&lt;p&gt;-- Raymond Chen, Microsoft.&lt;/p&gt;
&lt;/blockquote&gt;
</description><pubDate>Mon, 02 Jan 2012 22:53:00 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/perspective</guid></item><item><title>Interesting stuff I read last week #2</title><link>http://rageshkrishna.com:80/interesting-stuff-i-read-last-week-2</link><description>&lt;h3&gt;Programming/technology&lt;/h3&gt;

&lt;p&gt;&lt;a href="http://programmers.stackexchange.com/questions/114819/are-9-to-5-programmers-looked-down-upon"&gt;Are 9 to 5 programmers looked down upon?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.gamedev.net/blog/355/entry-2250790-there-are-many-kinds-of-ugly/"&gt;There are many kinds of ugly&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://security.stackexchange.com/questions/7911/what-kind-of-attacks-against-home-routers-nat-do-exist"&gt;What kind of attacks against home router&amp;rsquo;s NAT do exist?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://programmers.stackexchange.com/questions/114530/what-were-the-reasons-why-windows-never-had-a-decent-shell"&gt;What were the reasons why Windows never had a decent shell?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://usabilitygeek.com/official-usability-user-experience-user-interface-guidelines-from-companies/"&gt;Official Usability, User Experience and User Interface Guidelines from companies&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.barracudalabs.com/wordpress/index.php/2011/07/21/google-gets-a-1-for-browser-security-3/"&gt;&lt;strong&gt;Google+ gets a +1 for browser security&lt;/strong&gt;&lt;/a&gt; &amp;lt;&amp;mdash;Good checklist for web projects&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.red-team-design.com/just-another-awesome-css3-buttons"&gt;Just some other awesome CSS3 buttons&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://coding.smashingmagazine.com/2011/10/11/essential-jquery-plugin-patterns/"&gt;Essential jQuery plugin patterns&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://news.ycombinator.com/item?id=3134363"&gt;Ask HN: Open-source alternatives of Gmail?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://listjs.com/"&gt;List.js: Sortable, searchable HTML lists&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://arstechnica.com/gadgets/news/2011/10/lytros-new-light-field-camera-lets-you-focus-after-you-take-a-picture.ars"&gt;&lt;strong&gt;Lytro camera&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&amp;lt;&amp;mdash;Wow, I want one of these&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/bleroy/archive/2011/10/22/state-of-net-image-resizing-how-does-imageresizer-do.aspx"&gt;State of .NET image resizing&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Startups&lt;/h3&gt;

&lt;p&gt;&lt;a href="http://steveblank.com/2011/09/22/how-to-build-a-web-startup-lean-launchpad-edition/"&gt;How to build a web startup &amp;ndash; lean launchpad edition&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://security.stackexchange.com/questions/8164/why-are-hand-written-signatures-still-so-commonly-used"&gt;Why are hand-written signatures still so commonly used?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://thestartuptoolkit.com/blog/The_coffeeshop_fallacy/"&gt;&lt;strong&gt;The coffee shop fallacy&lt;/strong&gt;&lt;/a&gt; &amp;lt;&amp;mdash;&amp;rdquo;Enjoying the product is the luxury of the customer, not the producer.&amp;rdquo;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://excid3.com/blog/want-something-make-it-too-easy-to-say-yes/"&gt;Want something? Make it easy to say yes&lt;/a&gt;&lt;/p&gt;
</description><pubDate>Sun, 23 Oct 2011 09:08:00 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/interesting-stuff-i-read-last-week-2</guid></item><item><title>Beautiful vs. Usable</title><link>http://rageshkrishna.com:80/beautiful-vs.-usable</link><description>&lt;p&gt;I like Chrome. I really do. It&amp;rsquo;s a lovely browser. Fast, clean, minimal. But every so often I run into minor irritations like this, which is why I still use Firefox as my main browser.&lt;/p&gt;

&lt;p&gt;Take a look at what Chrome&amp;rsquo;s tabs look like once you have a lot of stuff going on:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://rageshkrishna.com/Media/Default/Windows-Live-Writer/Its-the-little-things_DBD3/chrome.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="chrome" alt="chrome" src="http://rageshkrishna.com/Media/Default/Windows-Live-Writer/Its-the-little-things_DBD3/chrome_thumb.png" border="0" height="146" width="858" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now compare that to Firefox:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://rageshkrishna.com/Media/Default/Windows-Live-Writer/Its-the-little-things_DBD3/firefox.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="firefox" alt="firefox" src="http://rageshkrishna.com/Media/Default/Windows-Live-Writer/Its-the-little-things_DBD3/firefox_thumb.png" border="0" height="162" width="856" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The way I see it, at this point Chrome&amp;rsquo;s tabs are as useless as they are beautiful. Firefox shows you less tabs in one go, but at least I can use what I see and I can scroll through the tabs with my mouse&amp;rsquo;s scroll wheel.&lt;/p&gt;
</description><pubDate>Mon, 17 Oct 2011 06:53:00 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/beautiful-vs.-usable</guid></item><item><title>Interesting stuff I read last week</title><link>http://rageshkrishna.com:80/interesting-stuff-i-read-last-week</link><description>&lt;p&gt;Here are some of the more interesting things I&amp;rsquo;ve read over the past week.&lt;/p&gt;

&lt;h3&gt;Programming/technology&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.theatlantic.com/magazine/archive/2011/11/hacked/8673/1/"&gt;&lt;strong&gt;Hacked!&lt;/strong&gt;&lt;/a&gt; &amp;lt;&amp;mdash; &lt;strong&gt;Important stuff&lt;/strong&gt;. Turn on two-factor authentication in gmail if you haven&amp;rsquo;t done it already.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://programmers.stackexchange.com/questions/113295/when-to-use-c-over-c-and-c-over-c"&gt;When to use C over C++, and C++ over C?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://superuser.com/questions/344704/can-touching-any-hardware-inside-a-running-pc-be-dangerous-for-you"&gt;Can touching any hardware inside a running PC be dangerous for you?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.thice.nl/hide-your-data-in-plain-sight-usb-hardware-hiding/"&gt;Hiding your data in plain sight &amp;ndash; USB hardware hiding&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ultrapico.com/Expresso.htm"&gt;Expresso 3.0 -- The premier regular expression development tool&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://ux.stackexchange.com/questions/12629/undo-history-why-limit-it"&gt;Undo History - Why limit it?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://superuser.com/questions/346856/why-is-not-all-internet-traffic-encrypted"&gt;&lt;strong&gt;Why is not all internet traffic encrypted?&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.thoughtcrime.org/ssl-and-the-future-of-authenticity"&gt;SSL And The Future Of Authenticity&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://programmers.stackexchange.com/questions/114481/how-do-mashups-work-with-same-orgin-policy"&gt;How do mashups work with same-orgin policy?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://plus.google.com/112218872649456413744/posts/dfydM2Cnepe"&gt;Dizzying but invisible depth&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.hanselman.com/blog/ThereIsOnlyOneCloudIconInTheEntireUniverse.aspx"&gt;There is only one Cloud Icon in the Entire Universe&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Health/medicine&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://zenhabits.net/tired/"&gt;Tired of Being Tired&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://well.blogs.nytimes.com/2011/10/12/what-parkinsons-teaches-us-about-the-brain/?src=me&amp;amp;ref=general&amp;amp;gwh=E4BF7E8ADDE0D4187FA2C07FE7836D88"&gt;What Parkinson&amp;rsquo;s Teaches Us About the Brain&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.theatlantic.com/life/archive/2011/10/all-work-and-no-play-why-your-kids-are-more-anxious-depressed/246422/"&gt;All Work and No Play: Why Your Kids Are More Anxious, Depressed&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Miscellaneous&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://okvivi.com/?p=55"&gt;What does &amp;ldquo;it&amp;rsquo;s a good start&amp;rdquo; really mean&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.theatlantic.com/business/archive/2011/10/the-declining-hotness-of-flight-attendants/246610/"&gt;The Declining Hotness of Flight Attendants&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description><pubDate>Sun, 16 Oct 2011 08:04:00 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/interesting-stuff-i-read-last-week</guid></item><item><title>Disconnect, Disable and De-stress: How I'm learning to sit down, think clearly and get stuff done</title><link>http://rageshkrishna.com:80/disconnect-disable-and-de-stress-how-i-m-learning-to-sit-down-think-clearly-and-get-stuff-done</link><description>&lt;p&gt;The &lt;a href="http://www.theonion.com/articles/last-american-who-knew-what-the-fuck-he-was-doing,26268/"&gt;recent Onion article on the death of Steve Jobs&lt;/a&gt; really struck a chord with me:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Jobs will be remembered both for the life-changing products he created and for the fact that &lt;strong&gt;he was able to sit down, think clearly, and execute his ideas&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you really think about, that's a superhero power &amp;ndash; the ability to&lt;em&gt; sit down, think clearly and execute&lt;/em&gt;. I've always known that I have trouble finishing things. For as long as I can remember, I've always been a starter. I love the rush of embarking on a new project. The initial brainstorming and roughing out the first prototypes really give me a high. Unfortunately, after that I just fizzle out. The actual process of moving things from prototype to real world product always seems to bore me. Somewhere along the way, I generally lose interest and shelve things. As a result, I now have around 10,327 half-finished &lt;em&gt;things&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;That sucks.&lt;/p&gt;

&lt;p&gt;Reading that piece on The Onion, however, made me take a good hard look at myself and I decided to make a few changes. One of the things I quickly noticed during my introspection was that I'm distracted very easily. Whether I'm writing code, watching television, reading a book or even trying to fall asleep, my mind is always buzzing with a million different thoughts. I'm not quite sure when that started happening, but now I find that it takes a serious effort for me to focus on a single train of thought for an extended period of time.&lt;/p&gt;

&lt;p&gt;There are just too many distractions. Too many devices crying for attention. Too many emails to process. Too many blogs to read. And the worst thing is that the default on every device or app is to let you know instantly when something happens. The list is just endless:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Email&lt;/li&gt;
&lt;li&gt;RSS&lt;/li&gt;
&lt;li&gt;Twitter&lt;/li&gt;
&lt;li&gt;Facebook&lt;/li&gt;
&lt;li&gt;Hacker News&lt;/li&gt;
&lt;li&gt;etc., etc., etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;This stuff is &lt;a href="http://en.wikipedia.org/wiki/Kryptonite"&gt;Kryptonite&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So, as the first step to regaining my superpowers, I've now decided to turn off every notification on every device or app that I own. That's right, &lt;em&gt;everything&lt;/em&gt;. Hell, even my phone now makes noises only for incoming calls. No more "you've got mail", twitter alerts, Facebook messages or blog alerts to get in my way. Zero alerts. Period. No exceptions. Nada. Not on the phone, laptop or desktop.&lt;/p&gt;

&lt;p&gt;And you know what? The world suddenly seems like a more peaceful place. It's only been two days since I started doing this and already I can feel my thought process improving. Not only am I getting more work done, but I'm doing a better job at it than before.&lt;/p&gt;

&lt;p&gt;Try it, people. Turn off the notifications. There's important stuff to be done. Don't let a new tweet or email take your eyes off the ball.&lt;/p&gt;
</description><pubDate>Tue, 11 Oct 2011 12:51:00 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/disconnect-disable-and-de-stress-how-i-m-learning-to-sit-down-think-clearly-and-get-stuff-done</guid></item><item><title>Essential Geek Skills: Automating incremental snapshot backups on Windows with rsync</title><link>http://rageshkrishna.com:80/essential-geek-skills-automating-incremental-snapshot-backups-on-windows-with-rsync</link><description>&lt;p&gt;I just finished setting up a fully automated incremental snapshot backup regime on my Windows 7 machine. Every night, my script creates an exact replica of my data and retains 3 days of snapshots. This means that I can go &amp;ldquo;back in time&amp;rdquo; for three days in case I need to recover something quickly. More importantly, the data isn&amp;rsquo;t hidden away in some obscure, proprietary file format &amp;ndash; it&amp;rsquo;s sitting there just like a bunch of normal files. This makes it really easy to recover from a catastrophic failure of my main drive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The process I&amp;rsquo;m about to describe is for geeks only. If you&amp;rsquo;re not a geek, maybe you should just buy a decent backup application and save yourself the trouble of doing this manually. If, on the other hand, you&amp;rsquo;ve got an hour to spare and you&amp;rsquo;re OK with dealing with things like Cygwin, ntrights and the Task Scheduler, read on!&lt;/p&gt;

&lt;p&gt;The core idea is to use rsync to make a backup of your data and use hardlinks to create the snapshots, as described by &lt;a href="http://www.mikerubel.org/computers/rsync_snapshots/#Incremental" title="Easy Automated Snapshot-Style Backups with Linux and Rsync"&gt;Mike Rubel&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;What you&amp;rsquo;ll need:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="http://www.cygwin.com/"&gt;Cygwin&lt;/a&gt;&amp;nbsp;(we&amp;rsquo;ll be using rsync to make the backups)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&amp;amp;DisplayLang=en"&gt;Windows 2003 Resource Kit&lt;/a&gt;&amp;nbsp;(We need a copy of ntrights.exe to do this on Windows 7 Home Premium)&lt;/li&gt;
&lt;li&gt;A spare hard disk that&amp;rsquo;s at least the same size as the drive you want to backup&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;h3&gt;Step 1: Install Cygwin&lt;/h3&gt;

&lt;p&gt;Get the installer from the Cygwin site. Be sure to install the rsync package by selecting it from the installer:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://rageshkrishna.com/Media/Default/Windows-Live-Writer/2d025113febd_B218/image_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" alt="image" src="http://rageshkrishna.com/Media/Default/Windows-Live-Writer/2d025113febd_B218/image_thumb.png" border="0" height="403" width="665" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;h3&gt;Step 2: Prepare your backup disk&lt;/h3&gt;

&lt;p&gt;Format your disk and create the following files:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1) backup.sh&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This file creates the actual backup and manages moving around the snapshots. Just be sure to replace &lt;strong&gt;/cygdrive/d/*&lt;/strong&gt; with your source (the location with the data you want to backup) and &lt;strong&gt;/cygdrive/e&lt;/strong&gt; in the following script to point to your backup drive.&lt;/p&gt;

&lt;pre class="brush: bash; toolbar: false;"&gt;rm -rf /cygdrive/e/backup.3
mv /cygdrive/e/backup.2 /cygdrive/e/backup.3
mv /cygdrive/e/backup.1 /cygdrive/e/backup.2
cp -al /cygdrive/e/backup.0 /cygdrive/e/backup.1
rsync -a /cygdrive/d/*  /cygdrive/e/backup.0/&lt;/pre&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) cygrun.bat&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the file that will startup a bash shell and run our backup script. We&amp;rsquo;ll be calling this from a scheduled task. The credit goes to &lt;a href="http://zenovations.com/blog/2009/06/how-to-run-a-cygwin-command-from-windows-scheduler-scheduled-tasks/"&gt;Zenovations.com&lt;/a&gt; for this script:&lt;/p&gt;

&lt;pre class="brush: bash; toolbar: false;"&gt;@echo off
rem set HOME=c:\
if "%DEF_PATH%"=="" set DEF_PATH=%PATH%
set PATH=c:\cygwin\bin;%DEF_PATH%
set myargs=%*
if "%myargs%" == "" goto noarg
rem echo %myargs%
bash --rcfile "%HOME%/.bashrc" -i -c "%myargs%"
c:
rem pause
sleep 1
goto exit
:noarg

rxvt -e /usr/bin/bash --login -i

:exit
exit
&lt;/pre&gt;

&lt;h3&gt;Step 3: Create a scheduled task&lt;/h3&gt;

&lt;p&gt;Nothing special about this, just set up a standard scheduled task. I&amp;rsquo;ve set mine to trigger at 4:00 AM every day. The action should look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://rageshkrishna.com/Media/Default/Windows-Live-Writer/2d025113febd_B218/image_4.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" alt="image" src="http://rageshkrishna.com/Media/Default/Windows-Live-Writer/2d025113febd_B218/image_thumb_1.png" border="0" height="510" width="472" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Step 4: Making it work on Windows 7 Home Premium&lt;/h3&gt;

&lt;p&gt;If you choose to run this task as a non-administrator user, you will need to ensure that your user account has the &amp;ldquo;Logon as a batch job&amp;rdquo; privilege. Unfortunately, Windows 7 Home Premium doesn&amp;rsquo;t give you an easy way to do this. So get yourself the Windows 2003 Resource Kit and use the &lt;strong&gt;ntrights.exe&lt;/strong&gt; tool that comes with it to assign the privilege from the command line. Credits to &lt;a href="http://toblogornottoblog.co.uk/blog/misc-it/1/how-to-grant--log-on-as-batch-job--in-windows-7-home-premium.php?blog=159&amp;amp;page=1&amp;amp;order=d&amp;amp;mode=h"&gt;Daniel&lt;/a&gt; for this tip.&lt;/p&gt;

&lt;pre class="brush: bash; toolbar: false;"&gt;ntrights -u COMPUTER\User +r SeBatchLogonRight&lt;/pre&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;And that, my dear readers, should be it. You should (hopefully) have a fully automated, scheduled, incremental snapshot backup running of your important data.&lt;/p&gt;
</description><pubDate>Sun, 09 Oct 2011 03:26:00 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/essential-geek-skills-automating-incremental-snapshot-backups-on-windows-with-rsync</guid></item><item><title>FileSystemWatcher is (almost) always a bad idea</title><link>http://rageshkrishna.com:80/filesystemwatcher-is-almost-always-a-bad-idea</link><description>&lt;p&gt;Using the FileSystemWatcher to watch a folder for changes usually turns out to be a bad idea. From missing notifications to IOExceptions when trying to copy files, I&amp;rsquo;ve just given up on using FileSystemWatcher to do anything useful. I find that using &lt;a href="http://quartznet.sourceforge.net/"&gt;Quartz.NET&lt;/a&gt; to set up a simple scheduled task that polls the folder occasionally is a more reliable and robust solution. Just remember to use &lt;a href="http://quartznet.sourceforge.net/tutorial/lesson_3.html"&gt;stateful jobs&lt;/a&gt; to ensure your tasks don&amp;rsquo;t overlap.&lt;/p&gt;
</description><pubDate>Thu, 29 Sep 2011 02:38:00 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/filesystemwatcher-is-almost-always-a-bad-idea</guid></item><item><title>Would you use a Facebook app for project management?</title><link>http://rageshkrishna.com:80/2011/05/24/WouldYouUseAFacebookAppForProjectManagement.aspx</link><description>&lt;p&gt;I asked this question a few days ago on OpinionAided and to my buddies on Facebook. The results of my stunningly non-scientific research are in, and the world apparently thinks it&amp;rsquo;s a bad idea. Here are the results:&lt;/p&gt;

&lt;h2&gt;OpinionAided&lt;/h2&gt;

&lt;table border="1" cellpadding="2" cellspacing="0" width="220"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="138"&gt;Yes&lt;/td&gt;
&lt;td valign="top" width="80"&gt;
&lt;p align="right"&gt;12&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="137"&gt;No&lt;/td&gt;
&lt;td valign="top" width="81"&gt;
&lt;p align="right"&gt;28&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="137"&gt;Neutral&lt;/td&gt;
&lt;td valign="top" width="81"&gt;
&lt;p align="right"&gt;6&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="137"&gt;&lt;strong&gt;Total votes&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top" width="82"&gt;
&lt;p align="right"&gt;&lt;strong&gt;46&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;h2&gt;Facebook&lt;/h2&gt;

&lt;table border="1" cellpadding="2" cellspacing="0" width="220"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="137"&gt;Yes&lt;/td&gt;
&lt;td valign="top" width="81"&gt;
&lt;p align="right"&gt;0&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="136"&gt;No/not very useful&lt;/td&gt;
&lt;td valign="top" width="82"&gt;
&lt;p align="right"&gt;5&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="136"&gt;Maybe&lt;/td&gt;
&lt;td valign="top" width="82"&gt;
&lt;p align="right"&gt;5&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="136"&gt;&lt;strong&gt;Total votes&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top" width="82"&gt;
&lt;p align="right"&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;The comments on the Facebook poll shows me that the biggest concern is the desire to keep social and work profiles separate. Personally, I agree with this to a large degree. However, I think an app like this would be useful for planning &amp;ldquo;social projects&amp;rdquo;, like a camping trip or something like that with your friends and family. There are projects that need management that aren&amp;rsquo;t necessarily related to work.&lt;/p&gt;
</description><pubDate>Tue, 24 May 2011 07:49:00 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/2011/05/24/WouldYouUseAFacebookAppForProjectManagement.aspx</guid></item><item><title>What's the distance between elegant and ugly?</title><link>http://rageshkrishna.com:80/2011/02/17/WhatsTheDistanceBetweenElegantAndUgly.aspx</link><description>&lt;p&gt;&lt;strong&gt;4 pixels&lt;/strong&gt;, apparently.&lt;/p&gt;

&lt;p&gt;I have some JavaScript code that uses jQuery to get the height of a web page to determine whether we should do some auto-scrolling as we add new content to the page. I do this by comparing the height of the document and the window like this:&lt;/p&gt;

&lt;pre class="brush: js; gutter: false; toolbar: false;"&gt;var $win = $(window);
var currentPos = $win.height() + $win.scrollTop();

if (currentPos == $(document).height()) {
    // The user is at the bottom of the page.
    shouldScroll = true;
} else {
    shouldScroll = false;
}&lt;/pre&gt;

&lt;p&gt;Unfortunately, Internet Explorer 8 acts weird when it comes to comparing the height of window and document. When there's no scroll bar on the page, the height of the document is always 4 pixels more than the height of the window. You can see this happening even on the &lt;a href="http://api.jquery.com/height"&gt;jQuery documentation for height&lt;/a&gt;. Chrome, Firefox and IE9 will report 125px for both document and window height. IE8 will report the window height as 121px.&lt;/p&gt;

&lt;p&gt;So, $win.height() + $win.scrollTop() is always 4 pixels less than $(document).height() which causes my scrolling feature to kick in, even when there's no scrolling to do. As a result, I had to turn that elegant piece of code into this monstrosity just because of IE 8:&lt;/p&gt;

&lt;pre class="brush: js; gutter: false; toolbar: false;"&gt;// This first check is an ugly hack to deal with the fact that
// IE 8 reports document height to be window height + 4 pixels
// in the absence of a scroll bar.
if ($win.scrollTop() == 0) {
    if (currentPos + 4 &amp;gt;= $(document).height()) {
        // User is at the bottom of the page
        scrollResult = true;
    } else {
        scrollResult = false;
    }
} else {
    // Just the following code would be sufficient if it weren't
    // for IE 8.
    if (currentPos == $(document).height()) {
        // The user is at the bottom of the page.
        scrollResult = true;
    } else {
        scrollResult = false;
    }
}&lt;/pre&gt;
</description><pubDate>Wed, 16 Feb 2011 23:28:00 GMT</pubDate><guid isPermaLink="true">http://rageshkrishna.com:80/2011/02/17/WhatsTheDistanceBetweenElegantAndUgly.aspx</guid></item></channel></rss>