<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Eric L Anderson.com</title>
	
	<link>https://ericlanderson.com</link>
	<description />
	<lastBuildDate>Sun, 10 Mar 2013 23:25:10 +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>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/0xea" /><feedburner:info uri="0xea" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>your pet project doesn’t stand a fighting chance</title>
		<link>http://feedproxy.google.com/~r/0xea/~3/jX7-d2tMOoQ/your-pet-project-doesnt-stand-a-fighting-chance</link>
		<comments>https://ericlanderson.com/entries/your-pet-project-doesnt-stand-a-fighting-chance#comments</comments>
		<pubDate>Tue, 11 Dec 2012 17:41:00 +0000</pubDate>
		<dc:creator>Eric Anderson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[OSS]]></category>
		<category><![CDATA[Success]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://ericlanderson.com/?p=187</guid>
		<description><![CDATA[Developers! Developers! Developers! Your project is probably doomed to fail, which is sad because I bet its really cool and/or helpful. Sadly though, it doesn&#8217;t matter how incredible you are pumping out the codez; there is far more to a &#8230; <a href="https://ericlanderson.com/entries/your-pet-project-doesnt-stand-a-fighting-chance">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Developers! Developers! Developers!</p>
<div class="row">
<div class="span6">
    <img src="http://ericlanderson.com/wp-content/uploads/2012/12/flickr-6302995233-hd.jpg" alt="Photo of Steve Ballmer from Wired Photostream on flickr" title="wiredphotostream-ballmer" width="1620" height="1080" class="img-rounded wp-image-188" />
  </div>
</div>
<p>Your project is probably doomed to fail, which is sad because I bet its really cool and/or helpful. Sadly though, it doesn&#8217;t matter how incredible you are pumping out the codez; there is <strong>far</strong> more to a successful project than that. Below are some problems you are likely seeing and how you can improve your projects success. Note: these suggestions are just as valuable in open source as they are in your workplace.</p>
<h2>Problem 1: No one is downloading / using your project</h2>
<p>Assuming you actually built something useful, the reason that no one is using your stuff is not that its too complex or that you&#8217;re users are too dumb to get it (although simplifying always helps). It&#8217;s because you&#8217;re not doing a good job at convincing them that Pet Project v1.0 will help them.</p>
<p>Think about the last time you heard about a new library or tool and hit the google, only to find no documentation (maybe some rdoc/javadoc if you are lucky, not that they commented on the methods/classes), no screenshots, no screencast, no examples, and hardly even a readme. At this point, you probably just moved on, realizing you didn&#8217;t care that much.</p>
<p>If you are making any kind of user interface, take screenshots. They don&#8217;t take that long.</p>
<p>If you&#8217;re tool/library is sufficiently complex, make a screencast. It won&#8217;t take that long. (Without any evidence of course, I think its this fact alone that made things like rails, heroku, and node so popular. Look at that cool video that built something real and deployed it in less than 5 minutes!)</p>
<p>Go back in time (if you&#8217;re old enough) to look at PHP conquering the web at a time when every cgi script was written in perl. It wasn&#8217;t just that PHP was easier to read/write nor that all the functions were documented online. It was that there were hundreds of tutorials that could concisely show you the php patterns for talking to mysql or reading a file. So write some tutorials. Write a README too. Done right, a README works as a pretty nice tutorial.</p>
<p>People, especially in this highly connected world are lazy. They are bombarded with information 24/7. They don&#8217;t have time to figure out your project just to evaluate it. They want to know NOW! They&#8217;ll put the time in once you&#8217;ve shown them its worth it. <strong>You have to &#8220;market&#8221; your project to compel people to try it.</strong></p>
<h2>Problem 2: Your users don&#8217;t stick around</h2>
<p>Users won&#8217;t typically stick around just because you made something. You can&#8217;t be a complete dickhead and respond harshly to their emails/bugs. You can&#8217;t ignore them. You can&#8217;t just put the documentation out there and call it a day. You can&#8217;t say, &#8220;its open source, submit a patch.&#8221; Most people don&#8217;t contribute code back. I don&#8217;t know why, but even when its clearly spelled out as an option, they just don&#8217;t do it. What people do do (hehe) is ask for help or submit bugs. (They also complain, but whether its twitter or the lunch room, if you are paying attention, you can get the feedback).</p>
<p>So, the question remains, how do you handle this FREE feedback? Do you help the users? Do you write up a FAQ? Do you fix the bugs they report? Do you help them work around their issues (even if it means debugging THEIR code)? Do you plan their improvements and communicate their timeline? Update your wiki?</p>
<p>Its not even enough to do these things every now and then. You have to do them now. <strong>If they have to work around your project too much, without your help, they will have no reason to stick with you.</strong></p>
<p>Everyone has an agenda, list of goals, schedules, and goals. If you help someone get to their goals quickly, they will appreciate your help and will probably help someone else with similar issues that they had. This is important for your project, as not only do you keep your users, the users actually start promoting your project in various ways.</p>
<p>Which brings us to&#8230;</p>
<h2>Problem 3: You don&#8217;t foster a community</h2>
<p>Its great that you tackled problems 1 and 2 before they even became problems. Pat yourself on the back but don&#8217;t start resting yet. If you hadn&#8217;t noticed, all of the above takes a lot of time and effort. Luckily, now that you have the users, you don&#8217;t need to go at it alone, but you do need to encourage a community so that your users help you.</p>
<p>Of course they&#8217;ll tell their friends and boss about how great you tool/framework is. But if you have a forum for help, they&#8217;ll probably start helping other users. If you have a mailing list, they will answer questions before you have to. They&#8217;ll sit on your irc channel helping people. They&#8217;ll help you test out new versions. They&#8217;ll be a sounding board for future features. And eventually, they&#8217;ll start contributing code.</p>
<p>But you have to foster this. You need to create the mailing lists or forums. You need to link to helpful blog posts from your README. You need to make it clear where to go for support. You need to make it clear how others can help. And if you want help developing, you better write docs on compiling/building/running tests.</p>
<p>You may not always have time to work on your project and as amazing as it feels to be critical to its success, <strong>the best thing you can do is make the project resilient to your absence.</strong></p>
<h2>Bottom line</h2>
<p>All projects have Product Manager(s), Project Manager(s), Community Managers, Support and Documentation teams, Designers, Developers, and QA. One day, when your project is a wild success, various people will fill these roles (even in open source), but for now, as the sole developer of Pet Project, <strong>its up to you</strong>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/0xea?a=jX7-d2tMOoQ:4H4gB9YTWc0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/0xea?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=jX7-d2tMOoQ:4H4gB9YTWc0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/0xea?i=jX7-d2tMOoQ:4H4gB9YTWc0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=jX7-d2tMOoQ:4H4gB9YTWc0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/0xea?i=jX7-d2tMOoQ:4H4gB9YTWc0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=jX7-d2tMOoQ:4H4gB9YTWc0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/0xea?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/0xea/~4/jX7-d2tMOoQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>https://ericlanderson.com/entries/your-pet-project-doesnt-stand-a-fighting-chance/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>https://ericlanderson.com/entries/your-pet-project-doesnt-stand-a-fighting-chance</feedburner:origLink></item>
		<item>
		<title>My own happiness project</title>
		<link>http://feedproxy.google.com/~r/0xea/~3/eHtY5g76tTQ/my-own-happiness-project</link>
		<comments>https://ericlanderson.com/entries/my-own-happiness-project#comments</comments>
		<pubDate>Tue, 23 Oct 2012 21:41:06 +0000</pubDate>
		<dc:creator>Eric Anderson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Happiness Project]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://ericlanderson.com/?p=137</guid>
		<description><![CDATA[I recently started reading listening to The Happiness Project (Paperback, Kindle, Audible) by Gretchen Rubin and while I would normally be embarrassed to admit I&#8217;m even reading this book, I couldn&#8217;t help but share it with you due to the &#8230; <a href="https://ericlanderson.com/entries/my-own-happiness-project">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I recently started <del>reading</del> listening to The Happiness Project (<a href="http://www.amazon.com/gp/product/006158326X/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=006158326X&amp;linkCode=as2&amp;tag=adiscourbyeri-20">Paperback</a>, <a href="http://www.amazon.com/gp/product/B002VJ9HRK/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B002VJ9HRK&amp;linkCode=as2&amp;tag=adiscourbyeri-20">Kindle</a>, <a href="http://www.audible.com/pd/ref=sr_1_1?asin=B0030MV7MU&amp;qid=1351007193&amp;sr=1-1">Audible</a>) by <a href="http://happiness-project.com">Gretchen Rubin</a> and while I would normally be embarrassed to admit I&#8217;m even reading this book, I couldn&#8217;t help but share it with you due to the immense value its given me so far.</p>
<p>For one, its reminded me that I want to write for my blog more often, thus providing you with this text (even if I am the only one to read it). More importantly, it has reminded me to take time to not only figure out what I want and what makes me happy, but also what makes me unhappy and the nature of my being. Further more, its inspiring me to not only better understand myself, but to accept who that person is and not be afraid to own who I am.</p>
<p>Like Gretchen, I have a short fuse, and like Gretchen, <del>acting on that short fuse</del> snapping makes me feel bad about my reactions long after the snapping is done.</p>
<p>And like Gretchen, there are plenty of things that I wish I liked but in reality, I don&#8217;t. To get back into the groove of blogging, here are a few things that I enjoy but don&#8217;t do, that I enjoy that I do do (hehe! doodoo), and that I don&#8217;t enjoy but do anyway.</p>
<h2>things I enjoy but I don&#8217;t do (often enough)</h2>
<ol>
<li><strong>working out</strong> &#8211; I hate going to the gym, but I love how I feel when I&#8217;m done. I need to do this <del>more</del> again.</li>
<li><strong>having breakfast out of the house alone with Charlotte (my daughter)</strong> &#8211; alone time while &#8216;doing&#8217; something is very rewarding</li>
<li><strong>spending alone time with Spencer (my son)</strong> &#8211; its time to find something special for just the two of us</li>
<li><strong>reading</strong></li>
<li><strong>working on open source</strong></li>
<li><strong>taking pictures</strong> &#8211; like working out, inertia is my enemy here</li>
<li><strong>napping</strong></li>
<li><strong>watching documentaries</strong> &#8211; thats right, I like movies like Helvetica and Jiro Dreams of Sushi</li>
</ol>
<h2>things I enjoy that I do do</h2>
<ol>
<li><strong>making a poop joke every time some says &#8220;do do&#8221; in a sentence</strong> &#8211; and just being silly in general, even if its juvenile</li>
<li><strong>listening to audio books during my commute</strong> &#8211; turns a crappy situation into a manageable one</li>
<li><strong>watching a good football game on a sunday afternoon</strong></li>
<li><strong>going out to dinner with Ceci (alone)</strong></li>
<li><strong>programming</strong> &#8211; nothing is more rewarding than creating</li>
<li><strong>helping others with their projects</strong> &#8211; this actually drives me insane at the time but is very rewarding down the road</li>
<li><strong>watching silly &#8220;girl&#8221; shows with Ceci</strong> &#8211; housewives, fashion shows, etc. What? I&#8217;m man enough to admit it.</li>
</ol>
<h2>things I don&#8217;t enjoy but I do anyway</h2>
<ol>
<li><strong>going to the opera</strong> &#8211; but because my wife enjoys it and I enjoy her company, I can have a good time </li>
<li><strong>reading email</strong></li>
<li><strong>getting up early with the kids</strong> &#8211; but I do like giving my wife more than 4 hours of sleep </li>
<li><strong>taking out the trash and other chores</strong> &#8211; seems my wife is the beneficiary of most of the things I don&#8217;t enjoy. &#8220;Happy wife, happy life&#8221;</li>
<li><strong>small talk</strong> &#8211; I used to think I was extroverted but I&#8217;m starting to come to grips with being an introvert that tries hard when he needs to</li>
<li><strong>talking on the phone</strong> &#8211; I hate the phone; lets do, not talk</li>
</ol>
<p>I&#8217;m sure I could add a ton to this list and maybe one day I will, but for now you have a much better picture of me than you did, and more importantly, I enjoyed writing it.</p>
<p>Thanks,</p>
<p>Eric Anderson (<a href="https://twitter.com/ericlanderson">@ericlanderson</a>)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/0xea?a=eHtY5g76tTQ:2moDFX3Riw8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/0xea?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=eHtY5g76tTQ:2moDFX3Riw8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/0xea?i=eHtY5g76tTQ:2moDFX3Riw8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=eHtY5g76tTQ:2moDFX3Riw8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/0xea?i=eHtY5g76tTQ:2moDFX3Riw8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=eHtY5g76tTQ:2moDFX3Riw8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/0xea?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/0xea/~4/eHtY5g76tTQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>https://ericlanderson.com/entries/my-own-happiness-project/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>https://ericlanderson.com/entries/my-own-happiness-project</feedburner:origLink></item>
		<item>
		<title>Making SSH Fast</title>
		<link>http://feedproxy.google.com/~r/0xea/~3/PQIWZHcyCyw/making-ssh-fast</link>
		<comments>https://ericlanderson.com/entries/making-ssh-fast#comments</comments>
		<pubDate>Fri, 13 Jan 2012 17:08:40 +0000</pubDate>
		<dc:creator>Eric Anderson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://0xea.com/?p=96</guid>
		<description><![CDATA[In my day to day work, I frequently need to bounce to various SSH servers to see whats happening or put out a fire. Nothing drives me more insane than having to wait 5-10 seconds for SSH. So I put &#8230; <a href="https://ericlanderson.com/entries/making-ssh-fast">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>In my day to day work, I frequently need to bounce to various SSH servers to see whats happening or put out a fire. Nothing drives me more insane than having to wait 5-10 seconds for SSH. So I put together the various pieces in one nice package for you. (Note: this is for mac/linux only)</p>
<p>First, update your <code>~/.ssh/config</code> to be sure that your <code>Host *</code> section has at least this in it:</p>
<script src="https://gist.github.com/1607514.js?file=.sshconfig"></script><noscript><pre><code class="language- ">Host *
	ServerAliveInterval 30
	ServerAliveCountMax 2
	ControlPath ~/.ssh/master-%r@%h:%p
	ControlMaster auto</code></pre></noscript>
<p>Second, add this shell script to your ~/bin or wherever you keep your shell scripts:</p>
<script src="https://gist.github.com/1607514.js?file=fastssh.sh"></script><noscript><pre><code class="language-shell shell">#!/bin/bash

SSH_OPTIONS=&quot; -MNf&quot;

export AUTOSSH_GATETIME=0
export AUTOSSH_PORT=0

function makefast {
        HOST=$1
        shift
        ADDITIONAL_ARGS=$@

        CMD=&quot;autossh -M 0 -f -- $HOST $SSH_OPTIONS $ADDITIONAL_ARGS&quot;
        `$CMD`
}

makefast bamboo@bamboo
makefast gerrit
makefast jira</code></pre></noscript>
<p>Edit fastssh.sh and add new lines for the servers you connect to. In my above example, I have 3 servers defined &#8220;jira&#8221;, &#8220;gerrit&#8221;, and &#8220;bamboo&#8221;.</p>
<p>If you want to provide additional SSH arguments like port forwarding, just add them after the hostname/username.</p>
<p>Finally, make sure you install <a href="http://www.harding.motd.ca/autossh/">autossh</a>.</p>
<h2>Cool, what does all of this mean?</h2>
<ul>
<li><code>.ssh/config</code>
<ul>
<li><code>ServerAliveInterval: 30</code> &#8211; Check that the connection is alive every 30 seconds.</li>
<li><code>ServerAliveCountMax: 2</code> &#8211; If there are 2 consecutive keep alive failures, kill the connection.</li>
<li><code>ControlPath: ~/.ssh/master-%r@%h:%p</code> &#8211; The location to save persistent connection information.</li>
<li><code>ControlMaster: auto</code> &#8211; If there is a persistent connection, use it. If not, create one.</li>
</ul>
</li>
<li><code>autossh</code> &#8211; This is a tool, that spawns SSH for you and if SSH quits for an irregular reason, relaunches ssh.</li>
</ul>
<p><small><em>Update:</em> Added explanation of some of the configuration and commands below.</small></p>
<p>[<a href="http://news.ycombinator.com/item?id=3461355">Discuss at Hacker News</a>]</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/0xea?a=PQIWZHcyCyw:6f28RbIsI48:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/0xea?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=PQIWZHcyCyw:6f28RbIsI48:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/0xea?i=PQIWZHcyCyw:6f28RbIsI48:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=PQIWZHcyCyw:6f28RbIsI48:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/0xea?i=PQIWZHcyCyw:6f28RbIsI48:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=PQIWZHcyCyw:6f28RbIsI48:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/0xea?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/0xea/~4/PQIWZHcyCyw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>https://ericlanderson.com/entries/making-ssh-fast/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>https://ericlanderson.com/entries/making-ssh-fast</feedburner:origLink></item>
		<item>
		<title>MS Office in the App Store: The Business Perspective</title>
		<link>http://feedproxy.google.com/~r/0xea/~3/swh20xUTMk4/ms-office-in-the-app-store-the-business-perspective</link>
		<comments>https://ericlanderson.com/entries/ms-office-in-the-app-store-the-business-perspective#comments</comments>
		<pubDate>Fri, 28 Jan 2011 13:33:13 +0000</pubDate>
		<dc:creator>Eric Anderson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Random Thoughts]]></category>

		<guid isPermaLink="false">http://ericanderson.ws/?p=62</guid>
		<description><![CDATA[Microsoft, I hope you’re listening. I’m about to outline every business reason in the world for you to be in the app store. From the Student perspective: Most students need word processing. Fewer need spreadsheets. Fewer still need to give &#8230; <a href="https://ericlanderson.com/entries/ms-office-in-the-app-store-the-business-perspective">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Microsoft, I hope you’re listening. I’m about to outline every business reason in the world for you to be in the app store.</p>
<h2>From the Student perspective:</h2>
<p>Most students need word processing. Fewer need spreadsheets. Fewer still need to give presentations.</p>
<p>Options: $20-$60 for iWork on the App Store, paid with your itunes account that your parents probably pay for or $150 for MS Office Student Edition.</p>
<p><strong>Winner</strong>: Apple</p>
<h2>From the Small Business perspective:</h2>
<p>Most businesses need word processing and excel. Few need presentations.</p>
<p>Options: $40-$60 for iWork on the App Store or $280 for MS Office for Home and Business.</p>
<p><strong>Winner</strong>: Apple</p>
<h2>From Microsoft’s perspective:</h2>
<p>Best Buy, OfficeMax, Amazon, etc all need to make some profit. From what I can tell from wholesale prices online, most stores will sell you Microsoft products for 15% off. Obviously these companies are still making a profit. I’m guessing that MS sells wholesale at at least 20% off and 30% off wouldn’t be a stretch.</p>
<p>This kills the argument “Microsoft doesn’t want to give Apple 30%”. They give 30% to everyone else for handling their business, Apple would be no different.</p>
<p>But more important for Microsoft is that they are starting to lose the game. There are Macs and iPads in the enterprise. Some companies use Google Docs. The App Store is simple. Its cheap. Unless you absolutely had to get Office, most people will be buying iWork. I can promise you that Apple Store employees will be telling every new Mac buyer that they can get office software for much cheaper in the App Store, rather than buying it in a box from Microsoft.</p>
<p>Options: Continue to have declining business in the Office arena or slash some prices, join the app store, and give Apple 30%.</p>
<p><strong>Winner</strong>: I don’t know what Microsoft will choose, but in the first case, it’ll likely be Apple that wins. In the second case, they both win.</p>
<p>Time will tell.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/0xea?a=swh20xUTMk4:VFRjRg2o2mY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/0xea?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=swh20xUTMk4:VFRjRg2o2mY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/0xea?i=swh20xUTMk4:VFRjRg2o2mY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=swh20xUTMk4:VFRjRg2o2mY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/0xea?i=swh20xUTMk4:VFRjRg2o2mY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=swh20xUTMk4:VFRjRg2o2mY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/0xea?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/0xea/~4/swh20xUTMk4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>https://ericlanderson.com/entries/ms-office-in-the-app-store-the-business-perspective/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>https://ericlanderson.com/entries/ms-office-in-the-app-store-the-business-perspective</feedburner:origLink></item>
		<item>
		<title>When a computer is not a toy</title>
		<link>http://feedproxy.google.com/~r/0xea/~3/Bh6mgM_eHYg/when-a-computer-is-not-a-toy</link>
		<comments>https://ericlanderson.com/entries/when-a-computer-is-not-a-toy#comments</comments>
		<pubDate>Thu, 17 Jun 2010 23:31:30 +0000</pubDate>
		<dc:creator>Eric Anderson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Random Thoughts]]></category>

		<guid isPermaLink="false">http://wordpressdev.local/?p=4</guid>
		<description><![CDATA[My first computer was a 33mhz Compaq POS. It has Windows 3.1, DOS, and QBasic. (Side note: yes, I got started ‘late’). After I played my first game in QBasic and realized that the words on the screen are what &#8230; <a href="https://ericlanderson.com/entries/when-a-computer-is-not-a-toy">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>My first computer was a 33mhz Compaq POS. It has Windows 3.1, DOS, and QBasic. (Side note: yes, I got started ‘late’). After I played my first game in QBasic and realized that the words on the screen are what made the game tick, I was hooked and I have been ever since. I think I tinkered with and hacked every single device I could get my hands on. You name it, if it had a way to get custom software on there, I was going to try it.</p>
<p>This morning I came across an article on <a href="http://lifehacker.com/">Lifehacker</a> about <a href="http://lifehacker.com/5563196/turn-your-old-router-into-a-range+boosting-wi+fi-repeater">converting your router into a wifi repeater</a>, which sounded really cool to me, so I started reading. Unfortunately about halfway down the page I realized I couldn’t care less about this.</p>
<p>Sure, I can reuse that old hardware collecting dust in the garage. But why? To save a few bucks? What happens when I’m at work and my wife is at home with the baby and the thing stops working? Now I’m getting phone calls to do tech support because I saved $100 and can do that one “cool” thing that I never actually needed in the first place.</p>
<p>When I was 13, the hacky free way was always the best way, not because it was free, but because it was fun to tinker. While it is still fun to tinker, some things should just work. My router should just work. My wife, my mom, and my grandma should be able to use it without calling for help.</p>
<p>The same goes for my phone, my “tablet”, and to some extent, my laptop.</p>
<p>The Android argument that you can install whatever you want and that you can even replace the ROM that runs the phone/tablet is insane. 99% of people don’t need that capability. They don’t need the ability to shoot themselves in the foot. I’m sure it would be fun to hack the OS of my iPhone, but at the cost of possibly not making calls? I don’t think so.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/0xea?a=Bh6mgM_eHYg:BQoJ0Ggny8A:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/0xea?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=Bh6mgM_eHYg:BQoJ0Ggny8A:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/0xea?i=Bh6mgM_eHYg:BQoJ0Ggny8A:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=Bh6mgM_eHYg:BQoJ0Ggny8A:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/0xea?i=Bh6mgM_eHYg:BQoJ0Ggny8A:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=Bh6mgM_eHYg:BQoJ0Ggny8A:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/0xea?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/0xea/~4/Bh6mgM_eHYg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>https://ericlanderson.com/entries/when-a-computer-is-not-a-toy/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>https://ericlanderson.com/entries/when-a-computer-is-not-a-toy</feedburner:origLink></item>
		<item>
		<title>How to play turbo hearts</title>
		<link>http://feedproxy.google.com/~r/0xea/~3/bQicuvlRwNQ/how-to-play-turbo-hearts</link>
		<comments>https://ericlanderson.com/entries/how-to-play-turbo-hearts#comments</comments>
		<pubDate>Fri, 04 Sep 2009 00:00:07 +0000</pubDate>
		<dc:creator>Eric Anderson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Turbo Hearts]]></category>

		<guid isPermaLink="false">http://wordpressdev/?p=13</guid>
		<description><![CDATA[The game is a slight variation on regular Hearts, with a few cards having extra meaning, the possibility for a trick to go around twice, and &#8220;special&#8221; cards being &#8220;charged&#8221; (doubling their value). In Turbo Hearts, points are bad. In &#8230; <a href="https://ericlanderson.com/entries/how-to-play-turbo-hearts">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>The game is a slight variation on regular Hearts, with a few cards having extra meaning, the possibility for a trick to go around twice, and &#8220;special&#8221; cards being &#8220;charged&#8221; (doubling their value). In Turbo Hearts, points are bad.</p>
<p>In Turbo Hearts, the <span style="color: green;">10&clubs;</span> doubles your score final score, the <span style="color: teal;">J&diams;</span> gives you -10 points (good), the Q&spades; is worth 13 points, and each heart is worth 1 point.  &#8220;Running&#8221; is defined as taking the Q&spades; and all of the hearts. This is equivilant to &#8220;shooting the moon&#8221; in regular hearts.  Nines are also special in Turbo Hearts; if they are played in suit, they make a trick go around twice.  Charging is a technique that happens before a hand begins that has a few effects:</p>
<ul>
<li>The charged suite is now worth double. A charged Q&spades; is now worth 26pts, a charged <span style="color: red;">A&hearts;</span> makes all hearts worth 2pts, a charged <span style="color: green;">10&clubs;</span> is worth 4x your final score, and a charged <span style="color: teal;">J&diams;</span> is worth -20pts.</li>
<li>The charged card must be placed face up in front of the player until they play it</li>
<li>There is a caviate to charging a card however, you cannot play a charged card on the first trick in suit unless you are forced to do so. An example: You charge the <span style="color: green;">10&clubs;</span> and the only other club you have is the <span style="color: green;">9&clubs;</span>. On the first club trick, you cannot play the <span style="color: green;">10&clubs;</span> since you have another club, so you play your 9, making the trick go around again. Now, you have to play a second time and since your <span style="color: green;">10&clubs;</span> is the only card in suit, you must play that card.</li>
</ul>
<p>The game consists for 4 hands with the flow of the game as follows:</p>
<ol>
<li>Passing &#8211; in order of the 4 hands: 3 left, 3 right, 3 diagonal, no passing.</li>
<li>Charging &#8211; anyone with a chargeable card (<span style="color: green;">10&clubs;</span>, Q&spades;, <span style="color: teal;">J&diams;</span>, <span style="color: red;">A&hearts;</span>) can now charge.</li>
<li>Play starts &#8211; the person with the <span style="color: green;">2&clubs;</span> plays first.</li>
<li>Tricks &#8211; gameplay continues until all tricks have been claimed</li>
<li>Scoring &#8211; scoring is tabulated and saved for later; more details below</li>
</ol>
<p>Scoring may be the most complicated part of playing Turbo Hearts but it is really easy once you get the hang of it. Scoring is performed by totally up everyones points, multiplying if they got the <span style="color: green;">10&clubs;</span>, making negative if they &#8220;ran&#8221; and totally it up with the previous tricks.  We keep a notebook of scores, with each hand taking a line, the hand total on the left and the cumulative sum on the right. Negatives are wrapped in parens. It looks like this:</p>
<table width="400">
<tbody>
<tr>
<th width="25%">RF</th>
<th width="25%">TW</th>
<th width="25%">KB</th>
<th width="25%">EA</th>
</tr>
<tr>
<td>0 &#8211; 0</td>
<td>0 &#8211; 0</td>
<td>72 &#8211; 72</td>
<td>11 &#8211; 11</td>
</tr>
<tr>
<td>16 &#8211; 16</td>
<td>32 &#8211; 32</td>
<td>(10) &#8211; 62</td>
<td>16 &#8211; 27</td>
</tr>
<tr>
<td>12 &#8211; 18</td>
<td>4 &#8211; 45</td>
<td>16 &#8211; 78</td>
<td>16 &#8211; 43</td>
</tr>
<tr>
<td>0 &#8211; 18</td>
<td>0 &#8211; 45</td>
<td>0 &#8211; 78</td>
<td>(248) &#8211; (205)</td>
</tr>
</tbody>
</table>
<p>These are your hand scores and as you can see, I did really well on the last hand (ran for 248 pts!)</p>
<p>These scores are then kept cumulatively across multiple games and multiple players. Your final game score is calculated by &#8220;paying out&#8221;. What this means, is your total number of points, you must pay to all other players (and they must pay to you). It is good to have a low hand score but the opposite is true for a game score; higher scores are better.</p>
<p>So the final games scores are:</p>
<table>
<tbody>
<tr>
<td width="40px">RF</td>
<td>-18*3 + 35 + 78 &#8211; 205 =</td>
<td>&nbsp;-146</td>
</tr>
<tr>
<td>TW</td>
<td>-35*3 + 18 + 78 &#8211; 205 =</td>
<td>&nbsp;-214</td>
</tr>
<tr>
<td>KB</td>
<td>-78*3 + 18 + 35 &#8211; 205=</td>
<td>&nbsp;-386</td>
</tr>
<tr>
<td>EA</td>
<td>205*3 + 18 + 45 + 78 =</td>
<td>&nbsp;756</td>
</tr>
</tbody>
</table>
<p>We keep these numbers are a long term tally. You can just sum up everyones game scores to see their standings.</p>
<p>The best way to think of these game scores is as pennies. In this game, I would be making $7.56 while the others would be paying out $1.46, $2.14, $3.86 respectively.</p>
<p>In my next post, I will lay out some basic strategy, but now you know how to play.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/0xea?a=bQicuvlRwNQ:FOwvi7MMrqs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/0xea?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=bQicuvlRwNQ:FOwvi7MMrqs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/0xea?i=bQicuvlRwNQ:FOwvi7MMrqs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=bQicuvlRwNQ:FOwvi7MMrqs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/0xea?i=bQicuvlRwNQ:FOwvi7MMrqs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=bQicuvlRwNQ:FOwvi7MMrqs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/0xea?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/0xea/~4/bQicuvlRwNQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>https://ericlanderson.com/entries/how-to-play-turbo-hearts/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>https://ericlanderson.com/entries/how-to-play-turbo-hearts</feedburner:origLink></item>
		<item>
		<title>Terminal.app TabNamer released under GPL</title>
		<link>http://feedproxy.google.com/~r/0xea/~3/f8cbo3YMFCQ/terminal-app-tabnamer-released-under-gpl</link>
		<comments>https://ericlanderson.com/entries/terminal-app-tabnamer-released-under-gpl#comments</comments>
		<pubDate>Sat, 29 Aug 2009 00:00:44 +0000</pubDate>
		<dc:creator>Eric Anderson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Project]]></category>

		<guid isPermaLink="false">http://wordpressdev/?p=20</guid>
		<description><![CDATA[Short and sweet, I have no intention of maintaining this code. It seems that snow leopard completely removes the need for it and as such, I am releasing it at github. TabNamer @ GitHub]]></description>
				<content:encoded><![CDATA[<p>Short and sweet, I have no intention of maintaining this code. It seems that snow leopard completely removes the need for it and as such, I am releasing it at github.</p>
<p><a href="http://github.com/EricAnderson/Terminal.app-TabNamer">TabNamer @ GitHub</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/0xea?a=f8cbo3YMFCQ:dfIly3VWnSQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/0xea?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=f8cbo3YMFCQ:dfIly3VWnSQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/0xea?i=f8cbo3YMFCQ:dfIly3VWnSQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=f8cbo3YMFCQ:dfIly3VWnSQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/0xea?i=f8cbo3YMFCQ:dfIly3VWnSQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=f8cbo3YMFCQ:dfIly3VWnSQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/0xea?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/0xea/~4/f8cbo3YMFCQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>https://ericlanderson.com/entries/terminal-app-tabnamer-released-under-gpl/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>https://ericlanderson.com/entries/terminal-app-tabnamer-released-under-gpl</feedburner:origLink></item>
		<item>
		<title>Archiving a message via keyboard shortcut in Microsoft Entourage</title>
		<link>http://feedproxy.google.com/~r/0xea/~3/QppflQfSNnQ/archiving-a-message-via-keyboard-shortcut-in-microsoft-entourage</link>
		<comments>https://ericlanderson.com/entries/archiving-a-message-via-keyboard-shortcut-in-microsoft-entourage#comments</comments>
		<pubDate>Fri, 27 Feb 2009 00:00:45 +0000</pubDate>
		<dc:creator>Eric Anderson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://wordpressdev/?p=25</guid>
		<description><![CDATA[This has been driving me nuts for a long time and I finally figured out the applescript for this so I figured I should share. The script is: This script assumes you have an exchange account and a folder in &#8230; <a href="https://ericlanderson.com/entries/archiving-a-message-via-keyboard-shortcut-in-microsoft-entourage">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>This has been driving me nuts for a long time and I finally figured out the applescript for this so I figured I should share.</p>
<p>The script is:</p>
<p><script src="https://gist.github.com/760535.js?file=gistfile1.scpt"></script></p>
<p>This script assumes you have an exchange account and a folder in that exchange account you want to use.</p>
<p>If you want to use an archive folder that is a subfolder of another folder, you&rsquo;ll want to tweak the script to say something like &ldquo;to folder archiveFolderName in folder parentFolderName in Exchange account exchangeAccount&rdquo; and add a parentFolderName variable to the top of the script.</p>
<p>Now all you have to do is save the script in: &#8220;<code>~/Documents/Microsoft User Data/Entourage Script Menu Items/Archive\cA</code>&#8220;</p>
<p>This will put it in your script menu and set the keystroke ctrl+a to &ldquo;Archive&rdquo;.</p>
<p>Enjoy!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/0xea?a=QppflQfSNnQ:2WFt0E71UHo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/0xea?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=QppflQfSNnQ:2WFt0E71UHo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/0xea?i=QppflQfSNnQ:2WFt0E71UHo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=QppflQfSNnQ:2WFt0E71UHo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/0xea?i=QppflQfSNnQ:2WFt0E71UHo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=QppflQfSNnQ:2WFt0E71UHo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/0xea?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/0xea/~4/QppflQfSNnQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>https://ericlanderson.com/entries/archiving-a-message-via-keyboard-shortcut-in-microsoft-entourage/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>https://ericlanderson.com/entries/archiving-a-message-via-keyboard-shortcut-in-microsoft-entourage</feedburner:origLink></item>
		<item>
		<title>Rant: Using error codes in user messages</title>
		<link>http://feedproxy.google.com/~r/0xea/~3/x6NDTk1WXD0/rant-using-error-codes-in-user-messages</link>
		<comments>https://ericlanderson.com/entries/rant-using-error-codes-in-user-messages#comments</comments>
		<pubDate>Tue, 05 Aug 2008 00:00:34 +0000</pubDate>
		<dc:creator>Eric Anderson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://wordpressdev/?p=31</guid>
		<description><![CDATA[In short: DON&#8217;T! What in the world was Apple thinking when you try to upgrade/register/sync your iPhone/iPod and you get &#8220;Error: -19&#8243; or &#8220;Error: -20&#8243;?? What good does this do any one? How am I supposed to fix the problem &#8230; <a href="https://ericlanderson.com/entries/rant-using-error-codes-in-user-messages">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>In short: DON&rsquo;T!</p>
<p>What in the world was Apple thinking when you try to upgrade/register/sync your iPhone/iPod and you get &ldquo;Error: -19&Prime; or &ldquo;Error: -20&Prime;?? What good does this do any one? How am I supposed to fix the problem if I don&rsquo;t know what the problem is? Isn&rsquo;t Apple the king of user-friendliness?</p>
<p>When you write software, you should use good error messages. You should use good exceptions. You should use descriptive values.</p>
<p>Granted, some things the user cannot fix. Telling the user the database connection was lost on a web application does very little good for the user. You can however tell the user that an error that was not their fault occurred. At least then I know I can come back and try again later.</p>
<p>Luckily, after rebooting my iPhone I was able to install the recent software update. This may not have been the problem, but certainly Apple could have notified me that I should attempt rebooting.</p>
<p><strong>In any case, be nice to your damn users!</strong></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/0xea?a=x6NDTk1WXD0:5OyYQIQ0ML0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/0xea?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=x6NDTk1WXD0:5OyYQIQ0ML0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/0xea?i=x6NDTk1WXD0:5OyYQIQ0ML0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=x6NDTk1WXD0:5OyYQIQ0ML0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/0xea?i=x6NDTk1WXD0:5OyYQIQ0ML0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=x6NDTk1WXD0:5OyYQIQ0ML0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/0xea?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/0xea/~4/x6NDTk1WXD0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>https://ericlanderson.com/entries/rant-using-error-codes-in-user-messages/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>https://ericlanderson.com/entries/rant-using-error-codes-in-user-messages</feedburner:origLink></item>
		<item>
		<title>Using EclEmma to write better unit tests</title>
		<link>http://feedproxy.google.com/~r/0xea/~3/6449zzxlJdU/using-eclemma-to-write-better-unit-tests</link>
		<comments>https://ericlanderson.com/entries/using-eclemma-to-write-better-unit-tests#comments</comments>
		<pubDate>Thu, 08 May 2008 00:00:36 +0000</pubDate>
		<dc:creator>Eric Anderson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Code Coverage]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://wordpressdev/?p=36</guid>
		<description><![CDATA[If you don&#8217;t already write unit tests you should be. (Hey, why aren&#8217;t you writing unit tests?) Unit testing has so many benefits and the upfront developer cost to write some unit tests can pay huge dividends later when you &#8230; <a href="https://ericlanderson.com/entries/using-eclemma-to-write-better-unit-tests">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>If you don&rsquo;t already write unit tests you should be. (Hey, why aren&rsquo;t you writing unit tests?) Unit testing has so many benefits and the upfront developer cost to write some unit tests can pay huge dividends later when you aren&rsquo;t spending time debugging broken code nor attempting to save face due to clueless mistakes. You can also use them as a contract to the expectations of your implementations.</p>
<p>So, assuming you have some unit tests, how useful are they if they don&rsquo;t test everything? At some level you will want to have a good idea that you&rsquo;re testing everything. (NOTE: I mean everything really important. Writing perfect 100% coverage like this would likely be too expensive for the entire codebase.) This is where <a href="http://emma.sourceforge.net/">Emma</a> comes in (and more importantly for us, <a href="http://www.eclemma.org/index.html">EclEmma</a>, an Eclipse plugin for Emma). Emma is a code coverage tool which lets you visual which parts of your code get executed during some execution (regular or JUnit).</p>
<p>Lets walk through using EclEmma to ensure that we have adequate testing being done. Lets test the following two classes.</p>
<p>GuessTheNumber.java:</p>
<script src="https://gist.github.com/760542.js"></script><noscript><pre><code class="language-java java">import java.util.Random;

public class GuessTheNumber {

	private final Integer value;
	private final int min;
	private final int max;
	private int guesses = 0;
	private boolean solved = false;

	public GuessTheNumber(int min, int max, int value) {
		this.min = min;
		this.max = max;
		this.value = value;
	}

	public GuessTheNumber(int min, int max) {
		this(min, max, getRandomNumber(min, max));

	}

	public int guess(int i) {
		if (solved)
			throw new IllegalStateException();

		guesses++;

		int ret = value.compareTo(i);

		if (ret == 0)
			solved = true;

		return ret;
	}

	public void resetCount() {
		guesses = 0;
		solved = false;
	}

	public int getValue() {
		if (solved == false)
			throw new IllegalStateException();

		return value;
	}

	public int getMin() { return min; }
	public int getMax() { return max; }

	private static int getRandomNumber(int min, int max) {
		return new Random().nextInt(max - min + 1) + min;
	}
}</code></pre></noscript>
<p>And SequentialStrategy.java:</p>
<script src="https://gist.github.com/760543.js"></script><noscript><pre><code class="language-java java">public class SequentialStrategy {

    private final GuessTheNumber guesser;

    public SequentialStrategy(GuessTheNumber guesser) {
        this.guesser = guesser;
    }

    public int solve() {
        for (int i=guesser.getMin(); i&amp;lt;=guesser.getMax(); i++) {
            if (guesser.guess(i) == 0)
                return i;
        }

        throw new IllegalStateException();
    }
}</code></pre></noscript>
<p>Finally, we&rsquo;ll write up a basic StrategyTest.java:</p>
<script src="https://gist.github.com/760545.js"></script><noscript><pre><code class="language-java java">import junit.framework.TestCase;

public class StrategyTest extends TestCase {

    public void testSequentialStrategy() {
        GuessTheNumber guesser = new GuessTheNumber(5, 100);
        SequentialStrategy strategy = new SequentialStrategy(guesser);

        int value = strategy.solve();
        assertEquals(guesser.getValue(), value);
    }
}</code></pre></noscript>
<p>So the question is, how good is our test? If you installed EclEmma, you can right click on your Unit Test in Eclipse, head to &ldquo;Coverage As&rdquo; -&gt; &ldquo;JUnit Test&rdquo;</p>
<p><img src="/wp-content/uploads/2011/01/tumblr_l42zo9ZC0i1qalygt.png.scaled500.png" alt="" title="Run as Coverage" width="500" height="118" class="alignnone size-full wp-image-42" /></p>
<p>This will run your unit test against your code and when complete, highlight the code green, yellow, or red for covered, partially-covered, and not-covered respectively.</p>
<p>According to EclEmma, our code coverage when running StrategyTest is:</p>
<p><img src="/wp-content/uploads/2011/01/tumblr_l42zozRzJ01qalygt.png.scaled500.png" alt="" title="tumblr_l42zozRzJ01qalygt.png.scaled500" width="218" height="40" class="aligncenter size-full wp-image-43" /></p>
<p>Thats not too bad, lets take a look at the output for SequentialStrategy:</p>
<p><img src="/wp-content/uploads/2011/01/tumblr_l42zpskvVm1qalygt.png.scaled500.png" alt="" title="tumblr_l42zpskvVm1qalygt.png.scaled500" width="415" height="238" class="aligncenter size-full wp-image-44" /></p>
<p>We may want to test the IllegalStateException since we currently don&rsquo;t and we are expecting it to happen if we&rsquo;ve guessed everything between min and max and haven&rsquo;t solved the problem. This would ensure if someone else comes in behind us and changes this code, the unit test will fail if they take that out and change it to return, say, Integer.MIN_VALUE.</p>
<p>Lets also take a look at some of GuessTheNumber:</p>
<p><img src="/wp-content/uploads/2011/01/tumblr_l42zqnenJ21qalygt.png.scaled500.png" alt="" title="tumblr_l42zqnenJ21qalygt.png.scaled500" width="319" height="335" class="aligncenter size-full wp-image-45" /></p>
<p>It appears we also want the contract to include an IllegalStateException being thrown if you have already solved the guessing game. It also looks like we don&rsquo;t ever call resetCount() and possibly retest after doing that. We also never check if getValue() fails prior to having a solution.</p>
<p>If we modify the test slightly to:</p>
<script src="https://gist.github.com/760546.js"></script><noscript><pre><code class="language-java java">import junit.framework.TestCase;

public class StrategyTest extends TestCase {

    public void testSequentialStrategy() {
        GuessTheNumber guesser = new GuessTheNumber(5, 100);
        SequentialStrategy strategy = new SequentialStrategy(guesser);

        for (int i=0; i&amp;lt;3; i++) {
            try {
                guesser.getValue();
                fail(&quot;An exception should have been thrown&quot;);
            }
            catch (IllegalStateException ex) { /**/ }

            int value = strategy.solve();
            assertEquals(guesser.getValue(), value);

            try {
                guesser.guess(guesser.getMax() + 1);
                fail(&quot;Shouldn't reach this point&quot;);
            }
            catch (IllegalStateException ex) {/**/}

            guesser.resetCount();
        }
    }

    public void testBadGuessGame() {
        GuessTheNumber guesser = new GuessTheNumber(1, 10, 3000);
        SequentialStrategy strategy = new SequentialStrategy(guesser);

        try {
            strategy.solve();
            fail(&quot;Should not reach this point&quot;);
        }
        catch (IllegalStateException ex) { /**/ }
    }
}</code></pre></noscript>
<p>And now our code coverage is:</p>
<p><img src="/wp-content/uploads/2011/01/tumblr_l42zrzRMI61qalygt.png.scaled500.png" alt="" title="tumblr_l42zrzRMI61qalygt.png.scaled500" width="221" height="39" class="aligncenter size-full wp-image-46" /></p>
<p>I know this was a very basic example that really didn&rsquo;t test any complex logic or conditions, but I hope it gives you a good idea of how you can use code coverage to improve your unit tests.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/0xea?a=6449zzxlJdU:9hT1yWjv0vo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/0xea?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=6449zzxlJdU:9hT1yWjv0vo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/0xea?i=6449zzxlJdU:9hT1yWjv0vo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=6449zzxlJdU:9hT1yWjv0vo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/0xea?i=6449zzxlJdU:9hT1yWjv0vo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/0xea?a=6449zzxlJdU:9hT1yWjv0vo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/0xea?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/0xea/~4/6449zzxlJdU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>https://ericlanderson.com/entries/using-eclemma-to-write-better-unit-tests/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>https://ericlanderson.com/entries/using-eclemma-to-write-better-unit-tests</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 1.328 seconds. --><!-- Cached page generated by WP-Super-Cache on 2013-04-22 12:05:18 --><!-- Compression = gzip -->
