
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
  <meta charset="utf-8">
  <title>Kaushik Gopal's Online Journal</title>
  <meta name="author" content="Kaushik Gopal">

  
  <meta name="description" content="My last post didn&#8217;t exactly end in an optimistic note. Let&#8217;s correct that: Wishing you all a happy, joyous and peaceful 2013 folks! The &hellip;">
  

  <!-- http://t.co/dKP3o1e -->
  <meta name="HandheldFriendly" content="True">
  <meta name="MobileOptimized" content="320">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  
  <link rel="canonical" href="http://journal.kaush.co/">
  <link href="/favicon.png" rel="icon">
  <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
  <script src="/javascripts/modernizr-2.0.js"></script>
  <script src="/javascripts/ender.js"></script>
  <script src="/javascripts/octopress.js" type="text/javascript"></script>
  <link href="http://feeds.feedburner.com/Katablogism" rel="alternate" title="Kaushik Gopal's Online Journal" type="application/atom+xml">
  <!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">

  
  <script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-26231653-2']);
    _gaq.push(['_trackPageview']);

    (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
  </script>


</head>

<body   >

<div class="container">

  <!-- <header role="banner" id="header-logo-banner"><hgroup>
  <a href="http://kaush.co" title="Kaushik Gopal's Online Journal" id="header-logo">KG</a>
</hgroup>

</header> -->
  <nav role="navigation"><div class="main-navigation">
  <ul>
    <li><a href="http://kaush.co">Home</a></li>
    <li><a href="/">Blog</a></li>
    <li><a href="/archives">Archives</a></li>
    <li><a href="" >Contact</a></li>
    <li><a href="http://feeds.feedburner.com/Katablogism" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
  </ul>
</div>
<hr />
</nav>
  <div id="main">
    <div id="content">
      <div class="blog-index">
  
    
    









    <article >

    <!-- extracted from article.html -->

    
    <header>
      
      <p class="meta">
        








  


<time datetime="2013-01-01T00:00:00+03:00" pubdate data-updated="true">Jan 1<span>st</span>, 2013</time> <br />
        
        <a class="icon" href="http://twitter.com/kaushikgopal/" title="comments powered by twitter"></a>
      </p>
      
      <h1 class="entry-title">
<a href="/2013/01/01/new-year-2013/">2012 in Retrospective</a>
</h1>

    </header>
    

    
    <div class="entry-content">
      <p>My <a href="http://journal.kaush.co/2012/12/31/itunes-purchase-error-your-account-is-not-valid-for-use-in-this-store/">last post</a> didn&#8217;t exactly end in an optimistic note. Let&#8217;s correct that:</p>

<blockquote><p><strong>Wishing you all a happy, joyous and peaceful 2013 folks!</strong></p></blockquote>

<p>The Mayans predicted that the world-as we know it-would end but we&#8217;re still here standing (cheers to that, <a href="http://www.apocalypsetee2012.com/">you should get this shirt in celebration</a>).</p>

<a rel="full-article" href="/2013/01/01/new-year-2013/">&#8230; Read on</a>
    </div>
    </article>

    
    









    <article >

    <!-- extracted from article.html -->

    
    <header>
      
      <p class="meta">
        








  


<time datetime="2012-12-31T19:05:00+03:00" pubdate data-updated="true">Dec 31<span>st</span>, 2012</time> <br />
        
        <a class="icon" href="http://twitter.com/kaushikgopal/" title="comments powered by twitter"></a>
      </p>
      
      <h1 class="entry-title">
<a href="/2012/12/31/itunes-purchase-error-your-account-is-not-valid-for-use-in-this-store/">iTunes Store Error When Trying to Purchase or Update Apps</a>
</h1>

    </header>
    

    
    <div class="entry-content">
      <blockquote><p>&#8220;Your account is not valid for use in the Kuwait Store. You must switch to the US Store before purchasing.</p></blockquote>

<p>Apparently this is an <a href="https://discussions.apple.com/thread/4337916">iOS6 bug</a>. It&#8217;s highly annoying and the <a href="http://www.survivalguide4idiots.com/ios-6-bug-your-account-is-not-valid-for-use-in-the-xxx-store-you-must-switch-to-yyy-store-before-purchasing.html">suggested solution</a> doesn&#8217;t work for me because I still have some iTunes credit and iTunes insists that I fully use that up, before trying to switch stores.</p>

<p>I&#8217;ve always been using the US store for my purchase and prefer to not have that friggin change  every time I travel to a different country. In any case, the &#8220;fix&#8221; for me was to just temporarily disable the location services (so all that magic jing bang of auto-figuring out where I am and personalizing my experience). I could then sign in to the store and purchase/update my apps again.</p>

<p>An instance where technology does more damage trying to be smart. Welcome to 2013 folks&#8230;.long way to go before we have our flying cars and <a href="http://en.wikipedia.org/wiki/TARDIS">TARDISes</a>.</p>

    </div>
    </article>

    
    



  







    <article data-linklog>

    <!-- extracted from article.html -->

    
    <header>
      
      <p class="meta">
        








  


<time datetime="2012-12-24T18:02:00+03:00" pubdate data-updated="true">Dec 24<span>th</span>, 2012</time> <br />
        
        <a class="icon" href="http://twitter.com/kaushikgopal/" title="comments powered by twitter"></a>
      </p>
      
      <h1 class="entry-title">
<a href="https://www.destroyallsoftware.com/talks/wat">WAT? A Lightning Talk by Gary Bernhardt From CodeMash 2012</a>
<span class='linklog-marker'>&rarr;</span></h1>

    </header>
    

    
    <div class="entry-content">
      <p>This is a hilarious talk by Gary Bernhardt (of <a href="www.destroyallsoftware.com">Destroy all Software fame</a>) on programming inconsistencies.</p>

    </div>
    </article>

    
    









    <article >

    <!-- extracted from article.html -->

    
    <header>
      
      <p class="meta">
        








  


<time datetime="2012-12-23T10:51:00+03:00" pubdate data-updated="true">Dec 23<span>rd</span>, 2012</time> <br />
        
        <a class="icon" href="http://twitter.com/kaushikgopal/" title="comments powered by twitter"></a>
      </p>
      
      <h1 class="entry-title">
<a href="/2012/12/23/heavy-maintenance-ahead/">Heavy Maintenance Ahead</a>
</h1>

    </header>
    

    
    <div class="entry-content">
      <p>Greetings folks!</p>

<ul>
<li>If you haven&#8217;t noticed, I&#8217;ve moved this blog <a href="http://journal.kaush.co/2012/12/23/kaushs-journal-now-powered-by-octopress/">from Wordpress to Octopress</a>.</li>
<li>You&#8217;re going to see some old stuff pop up in your feeds. I sincerely apologize for this. I know how irritating it can be to have that unread count shoot up, but the trouble I&#8217;ll have to go through to fix that, just didn&#8217;t seem worth it =D .</li>
<li>Octopress is blazingly fast (courtesy static site generation). If you&#8217;re reading this on your feed reader, I would really appreciate if you quickly <a href="http://journal.kaush.co">visit the site directly</a> and <a href="https://twitter.com/kaushikgopal/">send me your feedback</a>.</li>
<li><strong>There&#8217;s still a LOT of fixing and cleaning up to be done</strong>. I&#8217;ll do this over the weeks and update my<a href="http://journal.kaush.co/2012/12/23/kaushs-journal-now-powered-by-octopress/"> learnings post on this</a>.</li>
</ul>


    </div>
    </article>

    
    









    <article >

    <!-- extracted from article.html -->

    
    <header>
      
      <p class="meta">
        








  


<time datetime="2012-12-23T00:00:00+03:00" pubdate data-updated="true">Dec 23<span>rd</span>, 2012</time> <br />
        
        <a class="icon" href="http://twitter.com/kaushikgopal/" title="comments powered by twitter"></a>
      </p>
      
      <h1 class="entry-title">
<a href="/2012/12/23/kaushs-journal-now-powered-by-octopress/">Kaush&#8217;s Journal Now Powered by Octopress</a>
</h1>

    </header>
    

    
    <div class="entry-content">
      <h2>Why i moved to Octopress:</h2>

<ol>
<li>Performance : nothing beats generated static HTML.</li>
<li>Rails : Jekyll&#8217;s innards runs with Ruby, a language i&#8217;ve come to love. Octopress is built with Jekyll</li>
<li>Markdown : I love keeping everything in .markdown .</li>
</ol>


<a rel="full-article" href="/2012/12/23/kaushs-journal-now-powered-by-octopress/">&#8230; Read on</a>
    </div>
    </article>

    
    



  







    <article data-linklog>

    <!-- extracted from article.html -->

    
    <header>
      
      <p class="meta">
        








  


<time datetime="2012-12-22T08:23:00+03:00" pubdate data-updated="true">Dec 22<span>nd</span>, 2012</time> <br />
        
        <a class="icon" href="http://twitter.com/kaushikgopal/" title="comments powered by twitter"></a>
      </p>
      
      <h1 class="entry-title">
<a href="http://www.betterific.com/">Betterific: Improving Services and Possible Startup Ideas</a>
<span class='linklog-marker'>&rarr;</span></h1>

    </header>
    

    
    <div class="entry-content">
      <p>This looks like an awesome site for gathering good startup ideas.</p>

    </div>
    </article>

    
    









    <article >

    <!-- extracted from article.html -->

    
    <header>
      
      <p class="meta">
        








  


<time datetime="2012-12-18T05:47:00+03:00" pubdate data-updated="true">Dec 18<span>th</span>, 2012</time> <br />
        
        <a class="icon" href="http://twitter.com/kaushikgopal/" title="comments powered by twitter"></a>
      </p>
      
      <h1 class="entry-title">
<a href="/2012/12/18/neat-terminal-finder-commands/">Some Neat Terminal and Finder Commands</a>
</h1>

    </header>
    

    
    <div class="entry-content">
      <p>The very awesome Clark over at libertypages has gathered some really nifty commands for integrating the Terminal and Finder.  Especially like <em>selected</em> and <em>cdf</em> commands. I&#8217;ve added these to my <a href="https://github.com/kaushikgopal/oh-my-zsh">oh-my-zsh arsenal</a>.</p>

    </div>
    </article>

    
    









    <article >

    <!-- extracted from article.html -->

    
    <header>
      
      <p class="meta">
        








  


<time datetime="2012-12-12T18:21:00+03:00" pubdate data-updated="true">Dec 12<span>th</span>, 2012</time> <br />
        
        <a class="icon" href="http://twitter.com/kaushikgopal/" title="comments powered by twitter"></a>
      </p>
      
      <h1 class="entry-title">
<a href="/2012/12/12/ruby-styleguide/">Ruby Styleguide</a>
</h1>

    </header>
    

    
    <div class="entry-content">
      <p>First noticed this guide on <a href="http://news.ycombinator.com/item?id=4909429">HackerNews</a>. For immediate adoption.</p>

<p>Here are a couple of the ones that I have to keep a watch out for:</p>

<h4>Use ||= freely to initialize variables but not boolean variables.</h4>

<pre><code>    # set name to Bozhidar, only if it's nil or false
    name ||= 'Bozhidar'

    # bad - would set enabled to true even if it was false
    enabled ||= true

    # good
    enabled = true if enabled.nil?
</code></pre>

<h4>Use _ for unused block parameters.</h4>

<pre><code>    # bad
    result = hash.map { |k, v| v + 1 }

    # good
    result = hash.map { |_, v| v + 1 }
</code></pre>

<h4>Prefer %w to the literal array syntax when you need an array of strings.</h4>

<pre><code>    # bad
    STATES = ['draft', 'open', 'closed']

    # good
    STATES = %w(draft open closed)
</code></pre>

<h4>Use Set instead of Array when dealing with unique elements. Set implements a collection of unordered values with no duplicates. This is a hybrid of Array&#8217;s intuitive inter-operation facilities and Hash&#8217;s fast lookup.</h4>

<h4>Use symbols instead of strings as hash keys.</h4>

<pre><code>    # bad
    hash = { 'one' =&gt; 1, 'two' =&gt; 2, 'three' =&gt; 3 }

    # good
    hash = { one: 1, two: 2, three: 3 }
</code></pre>

<h4>Prefer string interpolation instead of string concatenation:</h4>

<pre><code>    # bad
    email_with_name = user.name + ' &lt;' + user.email + '&gt;'

    # good
    email_with_name = "#{user.name} &lt;#{user.email}&gt;"
</code></pre>

<h4>Use &lt;&lt; instead of + for String concatenation</h4>

<pre><code># good and also fast
html = ''
html &lt;&lt; '&lt;h1&gt;Page title&lt;/h1&gt;'

paragraphs.each do |paragraph|
  html &lt;&lt; "&lt;p&gt;#{paragraph}&lt;/p&gt;"
end
</code></pre>

<h4>Avoid using $1-9 as it can be hard to track what they contain. Named groups can be used instead.</h4>

<pre><code>    # bad
    /(regexp)/ =~ string
    ...
    process $1

    # good
    /(?regexp)/ =~ string
    ...
    process meaningful_var
</code></pre>

<p><a href="http://tomdoc.org/">Embrace Tomdoc for documentation</a>.</p>

    </div>
    </article>

    
    









    <article >

    <!-- extracted from article.html -->

    
    <header>
      
      <p class="meta">
        








  


<time datetime="2012-12-11T22:17:00+03:00" pubdate data-updated="true">Dec 11<span>th</span>, 2012</time> <br />
        
        <a class="icon" href="http://twitter.com/kaushikgopal/" title="comments powered by twitter"></a>
      </p>
      
      <h1 class="entry-title">
<a href="/2012/12/11/oh-my-zsh/">Oh My Zsh</a>
</h1>

    </header>
    

    
    <div class="entry-content">
      <p>After much soul-searching, I&#8217;ve settled with <a href="http://en.wikipedia.org/wiki/Z_shell">ZSH</a> because bash didn&#8217;t seem to cut it anymore. Actually this <a href="http://vimeo.com/46795747">video on Zeus</a> by <a href="https://github.com/burke/zeus">burke</a> sent me down the rabbit hole. The shell used in that vimeo video is <a href="http://ridiculousfish.com/shell/">fishfish</a> (which I actually prefer more). I had to meddle a lot with it though to get it working with my existing rails/rvm environment, and even then things seemed a little broken. I then looked at ZSH and oh-my-zsh just worked.</p>

<p>I&#8217;ve shamelessly forked <a href="https://github.com/robbyrussell/oh-my-zsh">robbyrussel&#8217;s oh-my-zsh repo</a> and modified it to function as my <a href="https://github.com/kaushikgopal/oh-my-zsh">new dotfiles repo</a>.</p>

<p>Loving it.</p>

<p>One step install from terminal:</p>

<pre><code> curl -L https://github.com/kaushikgopal/oh-my-zsh/raw/master/tools/install.sh | sh
</code></pre>

    </div>
    </article>

    
    









    <article >

    <!-- extracted from article.html -->

    
    <header>
      
      <p class="meta">
        








  


<time datetime="2012-12-07T07:53:00+03:00" pubdate data-updated="true">Dec 7<span>th</span>, 2012</time> <br />
        
        <a class="icon" href="http://twitter.com/kaushikgopal/" title="comments powered by twitter"></a>
      </p>
      
      <h1 class="entry-title">
<a href="/2012/12/07/modern-space-cadet/">Modern Space Cadet</a>
</h1>

    </header>
    

    
    <div class="entry-content">
      <p>Super geeky post on keyboard remapping. I have to hold myself off these days from jumping in and trying something like this.</p>

    </div>
    </article>


  <div class="pagination">
    
      <a class="prev" href="/page/2/">&larr; Older</a> |
    
     <a href="/archives">Blog Archives</a>
    
    </div>
</div><!-- blog-index -->
<aside class="sidebar">
  
    
  
</aside>

    </div>
  </div>
  <footer role="contentinfo" id="copyright"><p>
  Copyright &copy; 2013 - journal.kaush.co -
  <span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
    
  <form action="http://google.com/search" method="get">
    <fieldset role="search">
      <input type="hidden" name="q" value="site:journal.kaush.co" />
      <input class="search" type="text" name="q" results="0" placeholder="Search journal.kaush.co ..."/>
    </fieldset>
  </form>
    

</p>

</footer>
  











</div>


</body>
</html>
