<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>KishoreLive</title>
	<atom:link href="http://kishorelive.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://kishorelive.com</link>
	<description>A blog on code, design and chaotic life.</description>
	<lastBuildDate>Wed, 01 May 2013 14:26:21 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Importance of context &#8211; takeaway from Dustin&#8217;s post</title>
		<link>http://kishorelive.com/2013/05/01/importance-of-context-takeaway-from-dustins-post/</link>
		<comments>http://kishorelive.com/2013/05/01/importance-of-context-takeaway-from-dustins-post/#comments</comments>
		<pubDate>Wed, 01 May 2013 14:23:16 +0000</pubDate>
		<dc:creator>Kishore Nallan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[context]]></category>
		<category><![CDATA[ideas]]></category>

		<guid isPermaLink="false">http://kishorelive.com/?p=1477</guid>
		<description><![CDATA[I came across Dustin Curtis&#8217;s latest blog post on how he first thought of Pinterest and Vine as stupid ideas. There is plenty of discussion on this at HN, but I wanted to add one more view point that seems to be missing from the discussion. The take away for me from Dustin&#8217;s post is [...]]]></description>
				<content:encoded><![CDATA[	<p>I came across Dustin Curtis&#8217;s latest <a href="http://dcurt.is/what-a-stupid-idea">blog post</a> on how he first thought of Pinterest and Vine as stupid ideas. There is plenty of <a href="https://news.ycombinator.com/item?id=5635437">discussion</a> on this at HN, but I wanted to add one more view point that seems to be missing from the discussion.</p>
	<p>The take away for me from Dustin&#8217;s post is that there is a lot of context that one requires to be able to evaluate someone else&#8217;s idea. Ideas, even those espressed as a prototype, convey very little meaning to someone who does not have the background information needed to process them. In this case, I really wonder how much Dustin actually knew about Pinterest&#8217;s target market (middle aged women) to actually offer any meaningful feedback. </p>
	<p>We can see the importance of context in various other parts of our life. On the morning of January 12, 2007, virtuoso violinist Joshua Bell stood on a Washington D.C. subway platform and performed classical music for passersby for 45 minutes. He collected a total of $32 from his performance. I don&#8217;t think anybody knew that Joshua had sold out a theatre in Boston just two days ago, with an average seat cost of $100. Yet, very few even bothered to listen to him (<a href="http://www.washingtonpost.com/wp-dyn/content/article/2007/04/04/AR2007040401721.html">read more</a> about this social experiment). Perhaps everyone was rushing for their work, but it&#8217;s hard to dispute that a lot more people would have lingered around if they had been told who this man was and what it would take them to watch his performance on any other day.</p>
	<p>If you&#8217;re looking for feedback, simply showing a prototype and explaining WHAT the app does is not enough to gain constructive feedback, unless you&#8217;re already speaking with a potential customer. The same goes for pitching to potential investors. More often than not, investors will not know about your target market, so the onus is on you to tell them the WHY and HOW parts of your idea.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://kishorelive.com/2013/05/01/importance-of-context-takeaway-from-dustins-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Embracing imperfection</title>
		<link>http://kishorelive.com/2013/04/07/embracing-imperfection/</link>
		<comments>http://kishorelive.com/2013/04/07/embracing-imperfection/#comments</comments>
		<pubDate>Sun, 07 Apr 2013 14:10:58 +0000</pubDate>
		<dc:creator>Kishore Nallan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[perfection]]></category>

		<guid isPermaLink="false">http://kishorelive.com/?p=1471</guid>
		<description><![CDATA[Quite a large part of our life revolves around things that are functional, but seldom polished. These things used to bother me. I don&#8217;t have OCD, but I equated the rough edges that I saw in things with somebody&#8217;s half hearted attempt at something. I used do to a lot of design back when I [...]]]></description>
				<content:encoded><![CDATA[	<p>Quite a large part of our life revolves around things that are functional, but seldom polished. These things used to bother me. I don&#8217;t have OCD, but I equated the rough edges that I saw in things with somebody&#8217;s half hearted attempt at something. </p>
	<p>I used do to a lot of design back when I was in college. I used to obsess over pixel perfection. Often I will show someone a finished design and ask them anxiously &#8220;Do you see anything strange with this?&#8221;. The reply would be &#8220;No it looks great!&#8221;. In my head, I will be thinking, &#8220;Maybe it&#8217;s just me who notices that the second heading is a trifle large and sticks out from the rest of the page&#8221;. I used to spend hours perfecting the copy, fonts and colors. </p>
	<p>When I stepped into the working world &#8211; that&#8217;s when I learned the fine act of balancing between perfection and getting things done. Depending on what your job is, being a obsessive perfectionist can be either a blessing or a curse. However, more often than not it&#8217;s a luxury. While one appreciates the extra effort spent on going the extra mile on something, often the value one gets out of trying to achieve near-perfection is exceedingly small. Once deadlines are upon you, you&#8217;re forced to compromise on your lofty goal of striving for near-perfection.</p>
	<p>Over time, I have learned to accept, embrace and love imperfection. I don&#8217;t suggest that we should all just settle for mediocrity. But it&#8217;s important to understand that perfection is a journey and not a destination. Imperfection is shipping things. Imperfection is getting things done. </p>
	<p>These days, when I look at something that barely does its job but is neither elegant nor pretty, instead of feeling disappointed, I feel happy that it&#8217;s out there helping me do something. Perhaps somewhere else, someone else is toiling away, trying to perfect the same contraption, but will never launch it. </p>
	<p>Hyperbolic? Perhaps, but probably not too far away from reality, as I see so many talented hackers work indefinitely on their side-projects without ever launching them. If you&#8217;re one of them, stop obsessing and start shipping. </p>

 ]]></content:encoded>
			<wfw:commentRss>http://kishorelive.com/2013/04/07/embracing-imperfection/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The comeback of static typing</title>
		<link>http://kishorelive.com/2013/02/24/the-comeback-of-static-typing/</link>
		<comments>http://kishorelive.com/2013/02/24/the-comeback-of-static-typing/#comments</comments>
		<pubDate>Sun, 24 Feb 2013 16:17:39 +0000</pubDate>
		<dc:creator>Kishore Nallan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://kishorelive.com/?p=1356</guid>
		<description><![CDATA[I used to loathe static typing. From PHP to JavaScript to Python to Ruby, I was pretty much a dynamic typing fan boy. I was working primarily on web applications with very straightforward business logic using frameworks like CodeIgniter and Django. These were some of the reasons why I hated statically typed languages then: Verbosity [...]]]></description>
				<content:encoded><![CDATA[	<p>I used to loathe static typing. From PHP to JavaScript to Python to Ruby, I was pretty much a dynamic typing fan boy. I was working primarily on web applications with very straightforward business logic using frameworks like CodeIgniter and Django.</p>
	<p>These were some of the reasons why I hated statically typed languages then:</p>
<ul>
<li>Verbosity &#8211; the presence of a type system meant that I needed to type more</li>
<li>Difficult to prototype</li>
<li>Compilation &#8211; time spent on waiting</li>
</ul>
	<p>Over time, not only have I learned to appreciate languages with good type systems, I actually now prefer them for solving certain classes of problems. </p>
	<p>Java and C++ (the languages through which I experienced static typing) are not the best representatives of statically typed languages. It&#8217;s only after I started diving into Scala, did I start discerning between good and bad type systems. A good type system should not get in your way and should definitely not make you type more than it&#8217;s necessary. I have also been dabbling a bit with Go and Rust, and I&#8217;m excited about how productive I feel in both of them.</p>
	<p>Type inference goes a long way in saving keystrokes, but a powerful type system can offer much more than that. For example, let&#8217;s take Scala&#8217;s structural types:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="scala" style="font-family:monospace;">  <span style="color: #0000ff; font-weight: bold;">def</span> speakWith<span style="color: #F78811;">&#40;</span>animal<span style="color: #000080;">:</span> <span style="color: #F78811;">&#123;</span><span style="color: #0000ff; font-weight: bold;">def</span> speak<span style="color: #000080;">:</span> String<span style="color: #F78811;">&#125;</span><span style="color: #F78811;">&#41;</span> <span style="color: #000080;">=</span> println<span style="color: #F78811;">&#40;</span>animal.<span style="color: #000000;">speak</span><span style="color: #F78811;">&#41;</span>
&nbsp;
  <span style="color: #0000ff; font-weight: bold;">class</span> Dog <span style="color: #F78811;">&#123;</span> <span style="color: #0000ff; font-weight: bold;">def</span> speak <span style="color: #000080;">=</span> <span style="color: #6666FF;">&quot;bow!&quot;</span> <span style="color: #F78811;">&#125;</span>
  <span style="color: #0000ff; font-weight: bold;">class</span> Cat <span style="color: #F78811;">&#123;</span> <span style="color: #0000ff; font-weight: bold;">def</span> speak <span style="color: #000080;">=</span> <span style="color: #6666FF;">&quot;meow!&quot;</span> <span style="color: #F78811;">&#125;</span>
  <span style="color: #0000ff; font-weight: bold;">class</span> Man <span style="color: #F78811;">&#123;</span> <span style="color: #0000ff; font-weight: bold;">def</span> walk <span style="color: #000080;">=</span> <span style="color: #6666FF;">&quot;walk!&quot;</span> <span style="color: #F78811;">&#125;</span>
&nbsp;
  speakWith<span style="color: #F78811;">&#40;</span><span style="color: #0000ff; font-weight: bold;">new</span> Dog<span style="color: #F78811;">&#41;</span>  <span style="color: #008000; font-style: italic;">// &quot;bow!&quot;</span>
  speakWith<span style="color: #F78811;">&#40;</span><span style="color: #0000ff; font-weight: bold;">new</span> Cat<span style="color: #F78811;">&#41;</span>  <span style="color: #008000; font-style: italic;">// &quot;meow!&quot;</span>
  speakWith<span style="color: #F78811;">&#40;</span><span style="color: #0000ff; font-weight: bold;">new</span> Man<span style="color: #F78811;">&#41;</span>  <span style="color: #008000; font-style: italic;">// compile error</span></pre></td></tr></table></div>

	<p>Structural types [1] eliminate the need for an abstract class or an interface/trait. I can simply define a function <code>speakWith</code> which takes an argument (<code>animal</code>) which is of type <code>{def speak: String}</code>, i.e. any object that has a <code>speak</code> method defined in it.</p>
	<p>I have heard arguments that such a type system is complex for the average developer to grok. I used to be one of them, but I&#8217;m now convinced that most of this talk about complexity comes from forgetting that there is a learning curve for any tool. One is bound to be unproductive during that time.</p>
	<p>Contrary to conventional thinking, I actually find statically typed languages to be good for projects that undergo a lot of churn, either because the problem requires an experimental approach or the requirements are hazy (as with the case with a lot of start-ups). Although it&#8217;s much easier to start hashing things out in a dynamically typed language, I noticed that as the codebase became larger, it becomes much harder for me to feel confident about the various changes I was making without the presence of proper tests. And, tests are painful to maintain when there is a lot of churn happening. Static typing does not replace tests, but it definitely catches a lot of stupid errors and makes refactoring code really easy. Apart from better IDE support, you also get the confidence that when the code compiles, you can be reasonably sure that atleast syntactically things are alright.</p>
	<p>With respect to compilation time, Go is <a href="http://stackoverflow.com/questions/2976630/why-does-go-compile-so-quickly">pretty fast</a> even when compiling large projects, but the same can&#8217;t be said about Scala (C++ is also notoriously slow). However, using a SSD has helped a lot, atleast in absolute time. Still, even if the compilation phase robs me some time, it&#8217;s a trade-off I&#8217;m now willing to make if a statically typed language gives me better confidence about the correctness of my programs, eventually leading to less time spent on bug fixing.</p>
	<p>A few years back, one big lure of Python or Ruby used to be the functional constructs that they offered like higher order functions. However even Java has now caught up, with Java 8 introducing lambda expressions and an enhanced collections API. Hence, moving forward, I believe I will find very little reasons to hate static typing as much as I used to. It&#8217;s really exciting to see how languages like Rust and Scala approach type safety without compromising on productivity. I&#8217;m going to continue to use Python, Javascript and Ruby where it makes sense (either because of the community or the libraries), but dynamic typing is no longer my number one reason to use them.</p>
	<p>[1] &#8211; thanks to <a href="https://twitter.com/mushtaqA">Mushtaq</a> for introducing me to Scala&#8217;s structural types.</p>
	<p>You can follow me on Twitter <a href="https://twitter.com/kishorelive">right here</a>.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://kishorelive.com/2013/02/24/the-comeback-of-static-typing/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>On being a Roman in Rome</title>
		<link>http://kishorelive.com/2013/01/26/on-being-a-roman-in-rome/</link>
		<comments>http://kishorelive.com/2013/01/26/on-being-a-roman-in-rome/#comments</comments>
		<pubDate>Sat, 26 Jan 2013 18:01:46 +0000</pubDate>
		<dc:creator>Kishore Nallan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://kishorelive.com/?p=1374</guid>
		<description><![CDATA[When I was 12, I remember asking my dad&#8217;s friend whether he gets mixed up between VB, C and Java, all of which he used at work. He had replied saying, &#8220;No, you just have to spend enough time on all of them&#8221;. Many years later I find myself in a similar position, having spent [...]]]></description>
				<content:encoded><![CDATA[	<p>When I was 12, I remember asking my dad&#8217;s friend whether he gets mixed up between VB, C and Java, all of which he used at work. He had replied saying, &#8220;No, you just have to spend enough time on all of them&#8221;. Many years later I find myself in a similar position, having spent the last few years writing significant amount of code in Python, Scala, Java, Groovy, Erlang, JavaScript and PHP. I don&#8217;t have a programming language fetish &#8211; I just found myself moving from one project to another at work and happened to learn a couple of them for my side projects. </p>
	<p>To be truthful, the first few times I had to pick-up a new language, I was not particularly thrilled about moving outside my comfort zone. Wading through a new language and some unknown framework was pretty daunting. It slowed me down significantly, and as someone who likes to get things done, it was not pleasant struggling to remember how to express my logic in an alien language. Over time, I have become a lot better at quickly getting up-to-speed with new toolsets, and on hindsight, I&#8217;m glad that I have been able to create meaningful things with all these languages. I don&#8217;t profess to have mastered all of them, but every language that I have learned has opened my mind and challenged the way I approach programming. </p>
	<p>Just as my dad&#8217;s friend said, I don&#8217;t get mixed up between all these languages in terms of their syntactical differences. When I write Python I indent and when I write Java I curly-brace. What <em>is</em> however difficult is writing idiomatic code in each language. Imagine creating a <a href="http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.html">AbstractSingletonProxyFactoryBean</a> class in Python. You don&#8217;t want to be <em>that</em> guy, especially when working in a team with experienced Python developers. </p>
	<p>It&#8217;s not easy being a Roman in Rome, though. Inevitably, ideas and concepts from one language affects the way you think and they percolate into another. I have been writing lots of Java lately, and I did not realize until recently that I&#8217;m not writing what I have commonly observed to be idiomatic Java. Here are some quirks:</p>
<ul>
<li>My classes tend to have lots of static methods. This is a direct consequence of too much functional programming. I definitely find programs that have less state simpler to reason about.</li>
<li>Business logic is hence sometimes encapsulated in such static methods, rather than through the use of proper models which contain both state and logic.</li>
<li>When I split a large static method into a bunch of smaller ones, I almost exclusively pass the arguments in a way that&#8217;s not unlike a continuation-passing style (which is how I write JavaScript).</li>
<li>For classes that serve merely as data containers, I make all their fields public rather than using getters and setters on private fields. In the same vein, I sometimes forget to declare private methods as private &#8211; too much Python.</li>
<li>When possible, I try to even avoid creating such data containers, and instead preferring the use of Maps and Lists. </li>
<li>Heavy use of <code>final</code>s, probably influenced by all those <code>val</code>s from Scala. </li>
</ul>
	<p>I have mixed feelings about some of the observations above. In many ways, they definitely have made my programs robust, but probably at the loss of some idiomaticity. To be fair, I also think that idiomatic Java code can be pretty idiotic so I hope that gets me some brownie points. </p>
	<p>I general, I would like to follow what I will call the party rule. If someone else is hosting a party, I try to turn up in the correct dress code (so long it&#8217;s not ridiculous like wearing some abstract proxy factory bean). If it&#8217;s my party, I get to define how the classes shall be dressed.</p>
	<p>You can follow me on Twitter <a href="https://twitter.com/kishorelive">right here</a>.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://kishorelive.com/2013/01/26/on-being-a-roman-in-rome/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Panacea</title>
		<link>http://kishorelive.com/2012/12/22/panacea/</link>
		<comments>http://kishorelive.com/2012/12/22/panacea/#comments</comments>
		<pubDate>Sat, 22 Dec 2012 13:22:03 +0000</pubDate>
		<dc:creator>Kishore Nallan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://kishorelive.com/?p=1330</guid>
		<description><![CDATA[Software development happens in various scales, right from little applications, hacks and tools that help us do one thing really well to monolithic operating systems, virtual machines and distributed systems that are managed by large teams of engineers. Having worked in most parts of this spectrum, whenever I have to pick a new language or [...]]]></description>
				<content:encoded><![CDATA[	<p>Software development happens in various scales, right from little applications, hacks and tools that help us do one thing really well to monolithic operating systems, virtual machines and distributed systems that are managed by large teams of engineers. Having worked in most parts of this spectrum, whenever I have to pick a new language or framework, I ask myself at what scale the project I intend to take on is going to operate in the near future. </p>
	<p>By now, most people tuned-in to the lean start-up bandwagon already know about the importance of hitting the market first, iterating quickly on a product and so on. If you&#8217;re building something for just testing the waters, it really does not matter if your tech stack cannot scale beyond 100 concurrent users. It also does not matter if you don&#8217;t test-drive your application, or if you borrow a free theme or use Twitter bootstrap (still beats enterprise software by miles). Scaling problems might eventually plague you in the future, but from experience, that&#8217;s often a happier place to be than convincing folks to fork out their cash for something that they don&#8217;t need.</p>
	<p>Whenever someone writes a rant about a technology that they are having pains with (hello MongoDB), I pause to ask myself whether the author is trying to use a knife to chop a tree, as more often that not, most rants expect something to be fast, simple, elegant, horizontally &#038; vertically scalable and also help them paint rainbows in Sahara desert. In reality, that doesn&#8217;t work, and a lot of people do know it. Yet, somewhere along the way, we get so vested in our tools that we expect it to dynamically grow with our application needs.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://kishorelive.com/2012/12/22/panacea/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A little observation on how failure shapes success</title>
		<link>http://kishorelive.com/2012/10/28/a-little-observation-on-how-failure-shapes-success/</link>
		<comments>http://kishorelive.com/2012/10/28/a-little-observation-on-how-failure-shapes-success/#comments</comments>
		<pubDate>Sun, 28 Oct 2012 17:02:18 +0000</pubDate>
		<dc:creator>Kishore Nallan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[failure]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[success]]></category>

		<guid isPermaLink="false">http://kishorelive.com/?p=1322</guid>
		<description><![CDATA[I have been tackling some incredibly hard problems at work over the past few months. While I can&#8217;t quite yet talk about all of it, I wanted to share a meta observation that I gleaned along the way. It&#8217;s hard to dispute that repeatedly failing at something tends to increase our chances of succeeding at [...]]]></description>
				<content:encoded><![CDATA[	<p>I have been tackling some incredibly hard problems at work over the past few months. While I can&#8217;t quite yet talk about all of it, I wanted to share a meta observation that I gleaned along the way.</p>
	<p>It&#8217;s hard to dispute that repeatedly failing at something tends to increase our chances of succeeding at it. This is the basic premise of Gladwell&#8217;s 10,000 hour rule of success as well: over time, we learn from our mistakes and get better. </p>
	<p>There is however, one more aspect of repeated failure that&#8217;s a lot more subtle, and worth mentioning here: repeated failure helps us understand what it takes to succeed, and in the process even redefine the notion of success. Success is a fairly arbitrary term, and in a complicated field of work, it&#8217;s usually not very easy to define it in an isolated, cut and dry fashion. We also tend to have multiple goals, often in conflict with each other. For instance, you might fail to solve a simple problem, but in the process partially solve a different problem, having far greater impact on your other goals. Or you might even realize that you did not in fact want to succeed at what you wanted for various reasons. Both of these have occurred to me in the past few months.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://kishorelive.com/2012/10/28/a-little-observation-on-how-failure-shapes-success/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The real problem with OO is taking it too far</title>
		<link>http://kishorelive.com/2012/03/18/the-real-problem-with-oo-is-taking-it-too-far/</link>
		<comments>http://kishorelive.com/2012/03/18/the-real-problem-with-oo-is-taking-it-too-far/#comments</comments>
		<pubDate>Sun, 18 Mar 2012 07:02:36 +0000</pubDate>
		<dc:creator>Kishore Nallan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://kishorelive.com/?p=1271</guid>
		<description><![CDATA[I just finished watching this talk by Jack Diederich (Python core developer) &#8211; somewhat flamebait-ishly named &#8220;Stop Writing Classes&#8221;. In his talk, Jack shows, through various examples, how introducing a class just for the sake of it actually makes the code harder to read and maintain. While reflecting on the talk, I realized that the [...]]]></description>
				<content:encoded><![CDATA[	<p>I just finished watching <a href="http://pyvideo.org/video/880/stop-writing-classes" title="Stop Writing Classes">this talk</a> by Jack Diederich (Python core developer) &#8211; somewhat flamebait-ishly named &#8220;Stop Writing Classes&#8221;. In his talk, Jack shows, through various examples, how introducing a class just for the sake of it actually makes the code harder to read and maintain. </p>
	<p>While reflecting on the talk, I realized that the actual problem here is that people take OO too far. I don&#8217;t know how OO is taught elsewhere in the world, but from my own experience, a large part of this abuse can be attributed to the way OO is preached in various CS courses. A lot of emphasis is placed on grilling into young heads the virtues of OO and it&#8217;s place in the big enterprise world, without actually explaining why OO works when developing large applications. And, do courses on OO actually highlight when it does <em>not</em> work?</p>
	<p>In interviews, when asked to solve a tricky problem, I find it disturbing that people immediately start off with skeletons of classes. It has become some kind of protocol that one should be modeling everything in classes and objects to come off as a competent software developer. Jack shows a succinct solution to Conway&#8217;s game of life problem. A solution that highlights the programmer&#8217;s knowledge and elegant use of Python&#8217;s <code>yield</code>, but which will probably be rejected as &#8220;poor procedural code&#8221; in a lot of places.</p>
	<p>In many ways, OO has become a safety belt. By having a few classes, <em>atleast</em> no one can fire you for writing procedural code right? If poorly written procedural code is death by repetition, poorly written OO code is death by multiple levels of insane abstractions.</p>
	<p>One technique that has worked for me when solving a problem from scratch is to first actually <em>solve</em> it by using functions that perform highly specific operations. As the solution evolves, I start identifying fragments of code that can either be pulled into a separate class for better abstraction or moved from one class to another. This way, my code moves towards object orientation based on <em>actual need</em>, rather than because of a hypothetical high level &#8220;modeling&#8221; of the problem. This way, I also don&#8217;t end up with a class like this:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">class</span> Foo<span style="color: black;">&#40;</span><span style="color: #008000;">object</span><span style="color: black;">&#41;</span>:
   <span style="color: #ff7700;font-weight:bold;">pass</span></pre></td></tr></table></div>

	<p>Simply because I (hopefully) would have felt stupid refactoring something, <em>anything</em> to that.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://kishorelive.com/2012/03/18/the-real-problem-with-oo-is-taking-it-too-far/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>When users out-think you</title>
		<link>http://kishorelive.com/2012/03/16/when-users-out-think-you/</link>
		<comments>http://kishorelive.com/2012/03/16/when-users-out-think-you/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 19:19:46 +0000</pubDate>
		<dc:creator>Kishore Nallan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://kishorelive.com/?p=1250</guid>
		<description><![CDATA[A client wanted to prevent paid users of their product from sending messages with email addresses to the free users. The client felt that allowing such exchanges to happen would make the free users less inclined to upgrade to a paid account. Anyhow, we went ahead and implemented a robust email masking &#8220;feature&#8221; which blanked [...]]]></description>
				<content:encoded><![CDATA[	<p>A client wanted to prevent paid users of their product from sending messages with email addresses to the free users. The client felt that allowing such exchanges to happen would make the free users less inclined to upgrade to a paid account. Anyhow, we went ahead and implemented a robust email masking &#8220;feature&#8221; which blanked out any fragment of text that appeared to be an email address. We felt pretty smug about it because it could even catch smart users who pulled tricks like <em>john at example dot com</em>. Heck, we had automated tests to cover all those edge cases and hairy scenarios!</p>
	<p>The users defeated the system in the following ways:</p>
<blockquote>You can contact me off here &#8211; jack sp 1967 at g mail (all in one address).</blockquote>
<blockquote>Take the first letter from each of the following words: please don&#8217;t count rabbits because they increase everyone&#8217;s expectations at great mayhem and internal lost dot clouds over mountains.</blockquote>
	<p>When we were implementing the email masking functionality, at one point, I was wondering whether we were going overboard in coming up with all kinds of ways to break the system. In fact, I&#8217;m sure I even thought, &#8220;Huh, these are probably non-technical folks, so we don&#8217;t have to go to really convoluted extents&#8221;. Boy, was I wrong. </p>
	<p>My favorite exploit included sending the email address using NINE separate messages:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="python" style="font-family:monospace;">r 
w
a
<span style="color: #ff4500;">1</span>
t
at
gmail
dot
com</pre></td></tr></table></div>

	<p>I&#8217;m sure even if we had spent two more weeks on the masking feature, we wouldn&#8217;t have been able to catch that one!</p>
	<p>NOTE: the above messages do not of course contain the actual email addresses of the users.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://kishorelive.com/2012/03/16/when-users-out-think-you/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Git &#8211; tracking branches</title>
		<link>http://kishorelive.com/2012/03/02/git-tracking-branches/</link>
		<comments>http://kishorelive.com/2012/03/02/git-tracking-branches/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 13:47:34 +0000</pubDate>
		<dc:creator>Kishore Nallan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://kishorelive.com/?p=1167</guid>
		<description><![CDATA[In Git, if you find yourself constantly typing git push origin branchname to push your local commits to the remote branch, here&#8217;s a tip: make your local branch automatically track your remote branch. When creating a new remote branch, here&#8217;s how you can make your local branch track its remote branch: # creates a new [...]]]></description>
				<content:encoded><![CDATA[	<p>In Git, if you find yourself constantly typing <code>git push origin branchname</code> to push your local commits to the remote branch, here&#8217;s a tip: make your local branch automatically <em>track</em> your remote branch.</p>
	<p>When creating a new remote branch, here&#8217;s how you can make your local branch track its remote branch:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># creates a new local branch</span>
<span style="color: #c20cb9; font-weight: bold;">git branch</span> foobranch  
&nbsp;
<span style="color: #666666; font-style: italic;"># creates a new remote branch, and makes local branch track that (-u)</span>
<span style="color: #c20cb9; font-weight: bold;">git push</span> <span style="color: #660033;">-u</span> origin foobranch</pre></td></tr></table></div>

	<p>If you want to set-up tracking for an existing branch, you can do so by:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># set-up tracking for an existing branch</span>
<span style="color: #c20cb9; font-weight: bold;">git branch</span> <span style="color: #660033;">--set-upstream</span> foobranch origin<span style="color: #000000; font-weight: bold;">/</span>foobranch</pre></td></tr></table></div>

	<p>If you are checking out an already existing remote branch, you can set-up tracking in a single command:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git branch</span> <span style="color: #660033;">--track</span> foobranch origin<span style="color: #000000; font-weight: bold;">/</span>foobranch
&nbsp;
<span style="color: #666666; font-style: italic;"># or, alternatively</span>
<span style="color: #c20cb9; font-weight: bold;">git checkout</span> <span style="color: #660033;">--track</span> origin<span style="color: #000000; font-weight: bold;">/</span>foobranch
&nbsp;
<span style="color: #666666; font-style: italic;"># or</span>
<span style="color: #c20cb9; font-weight: bold;">git checkout</span> <span style="color: #660033;">-b</span> foobranch origin<span style="color: #000000; font-weight: bold;">/</span>foobranch</pre></td></tr></table></div>

	<p>Setting up tracking offers two advantages. Firstly, it reduces the number of characters you have to type to push your changes to a remote branch. More importantly, it prevents you from accidentally typing <code>git push</code> which will end up pushing out the local commits in all your other branches as well (which you might not be ready to push yet!).</p>
	<p>Of course, you can also set-up tracking by directly modifying your <code>.git/config</code> file!</p>

 ]]></content:encoded>
			<wfw:commentRss>http://kishorelive.com/2012/03/02/git-tracking-branches/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Optimizing for productivity</title>
		<link>http://kishorelive.com/2012/02/27/optimizing-for-productivity/</link>
		<comments>http://kishorelive.com/2012/02/27/optimizing-for-productivity/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 13:43:30 +0000</pubDate>
		<dc:creator>Kishore Nallan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[ux]]></category>

		<guid isPermaLink="false">http://kishorelive.com/?p=1194</guid>
		<description><![CDATA[I came across this interesting anecdote about a waiter in a Swedish restaurant using his computer screen like a static whiteboard. Forgetting for a moment what his real intentions might have been for doing that, let us just take his word for it: by requiring him to click too many times, the computer system was [...]]]></description>
				<content:encoded><![CDATA[	<p>I came across this <a href="http://javlaskitsystem.se/2012/02/whats-the-waiter-doing-with-the-computer-screen/">interesting anecdote</a> about a waiter in a Swedish restaurant using his computer screen like a static whiteboard. Forgetting for a moment what his <a href="http://news.ycombinator.com/item?id=3630417">real intentions</a> might have been for doing that, let us just take his word for it: by requiring him to click too many times, the computer system was just not optimized for his productivity.</p>
	<p>This post reminded me of a client for whom we were designing an interface to record eye readings. The client, being an opthamologist himself, was extremely vocal about how the entire user experience should be. He wanted an interface in which you can enter eye readings by clicking on a series of buttons that had various prescription numbers. He showed it to a few people and they felt that it was fairly easy to use &#8211; everything was obvious and lucid. I had some reservations in taking a mouse driven approach, and just as I had suspected, this really ended up slowing down people who were using this interface over and over again. What seemed intuitive and having zero learning curve eventually turned out to be pretty slow and cumbersome for regular and repeated use. </p>
	<p>When designing user interactions, one should balance the long term productivity goals of a active user and the apparent immediate ease-of-use of the system for new users. Kevin Fox had recently <a href="https://plus.google.com/117599103108596130864/posts/47yZLnxcnhv">written</a> about how Google seems to be &#8220;simplifying the UX for current users at the expense of the new user learning curve&#8221;. I&#8217;m sure Google had reasons for doing that, but nevertheless, it&#8217;s not trivial to optimize a user experience for both new and power users. </p>
	<p>On the other hand, there are also lots of applications that treat all their users equally. In reality, user behavior and engagement changes over time, and so do their needs. Yet, run-off-the-mill analytics software only offer a broad picture of user engagement. This is where <strong>cohort analysis</strong> becomes useful. </p>
<blockquote>A cohort analysis is a tool that helps measure user engagement over time. It helps UX designers know whether user engagement is actually getting better over time or is only appearing to improve because of growth.  &#8211; <a href="http://52weeksofux.com/post/646711369/cohort-analysis-measuring-engagement-over-time">Cohort analysis &#8211; measuring engagement over time</a>.</blockquote>
	<p>With the help of cohort analysis, one could evolve the user experience to make it more productive the for power users, while at the same time, making it easy enough for new users to get going with the system. We already use graceful degradation as a strategy for enhancing the user experience in modern browsers, while still not completely dropping support for people with older browsers. I see optimizing for productivity the same way &#8211; user interactions should offer alternative hooks for the power users to exploit without making the external interface complex. A good example of that would be the spotlight tool on OS X. It stays out of the way, but it&#8217;s still just a keyboard shortcut away. A <a href="http://uxmag.com/articles/command-lines-alive-kicking">well-designed, modern command line interface</a> can really complement the graphical user interface.</p>
	<p>Finally, while designing interfaces, one should be making decisions based on facts and data, rather than gut feeling. I will end this post with another anecdote. We&#8217;re currently trying to convince a client to get rid of the confirm email address field in their signup page. In addition to making the user fill an additional field, the current form also <em>prevents the user from copy pasting their email address</em> from the previous field. When we asked the client why they are doing that, they replied, &#8220;We don&#8217;t want our users to accidentally endup typing a wrong email address&#8221;. </p>
	<p>This is a classic case of trusting the gut blindly, and it&#8217;s clearly not the best way to build a user interface. They are pissing off a lot of users, while all the time thinking that they are actually helping them.</p>
	<p>You can follow me on Twitter <a href="http://twitter.com/kishorelive">right here</a>.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://kishorelive.com/2012/02/27/optimizing-for-productivity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
