<?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>Michael Righi.com</title>
	<atom:link href="http://www.michaelrighi.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michaelrighi.com</link>
	<description></description>
	<lastBuildDate>Fri, 18 Nov 2011 22:08:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>I&#8217;m Wasting Time / Truncating Numbers with Regex</title>
		<link>http://www.michaelrighi.com/2011/11/18/i-am-wasting-time-truncating-numbers-with-regex/</link>
		<comments>http://www.michaelrighi.com/2011/11/18/i-am-wasting-time-truncating-numbers-with-regex/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 22:08:35 +0000</pubDate>
		<dc:creator>Michael Amor Righi</dc:creator>
				<category><![CDATA[KIAC]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.michaelrighi.com/?p=105</guid>
		<description><![CDATA[I&#8217;m Wasting Time I waste too much time relearning how to do simple things that only come up once or twice per year. Some recent examples: Figuring out how to build an AppleScript to show/hide hidden files. Every time I reinstall OS X I&#8217;m starting from scratch, with only a faint recollection that I once ...]]></description>
			<content:encoded><![CDATA[<h2>I&#8217;m Wasting Time</h2>
<p>I waste too much time relearning how to do simple things that only come up once or twice per year.  Some recent examples:</p>
<ul>
<li>Figuring out how to build an AppleScript to show/hide hidden files.  Every time I reinstall OS X I&#8217;m starting from scratch, with only <a href="http://hints.macworld.com/article.php?story=20100719001040829">a faint recollection that I once knew how to do this</a>.</li>
<li>Every time I modify my /etc/hosts file I completely forget how to flush my local DNS.  Sure the answer is a quick <a href="http://www.mymacosx.com/tricks-and-tips/clear-dns-cache-leopard.html">Google search away</a>, but it&#8217;s frustrating that I can&#8217;t just remember this.</li>
<li>Once every 12 months or so I find myself needing to write a regex to truncate decimal numbers. This is trivial, but every time it comes up I have to spend thirty seconds thinking it through for like the tenth time in my life.</li>
</ul>
<p>From this day forward, every time I learn (or re-learn) a simple task like this I&#8217;m going to document it on my blog.  This is partially so that I can query my blog as a proxy for my past knowledge, but by making these little things public perhaps I can help somebody else also trying to relearn that little piece of syntax they once knew but forgot years ago.</p>
<h2>Truncating Numbers with Regex</h2>
<p>Today I was working with a JSON object containing SVG paths.  The paths contain decimals with a ridiculous amount of precision and I needed a way to quickly truncate all of them at once. A portion of that file looked like this:</p>
<p><code>"frame" : {<br />
	"framePath" : "M 338.00358637178726,76.44431778009219C 337.3533534525326,76.44431778009219 328.2739344566734,75.22811129070296 319.67,74.15 C 317.50,73.88 295.21,70.88417372385919 293.094015386729,70.33711592961231 C 219.8144624861983,51.43448609977959 150.69444444444446,59.13249044730145 98.71787208607293,79.69548237636549 C 98.71787208607293,80.34571529562014 98.71787208607293,105.05456622729717 98.71787208607293,105.70479914655182 C 104.19818564217239,138.56241136723992 103.1188808312146,165.83046925594903 130.05909879414747,185.423355047173 C 171.04623388375416,215.2321805668871 230.55555555555557,210.52137933619036 259.1511450329329,197.25759417760776 C 274.12500192608155,190.31211676462385 284.23559266287486,174.83312522486972 297.3344728765868,163.7922732666347 ",<br />
	"nosePath" : "M 297.3344728765868,163.7922732666347C 300.61877960915047,157.71737810848663 299.45871165265066,156.9281764260582 303.90308634171424,151.64248295033855 C 312.8221414955163,141.03505334903969 324.94089906256886,132.40677608534708 338.00358637178726,131.06388299748352 ",<br />
	"templeProfilePath" : "M 103.39210998206816,86.42137601547572C 104.39210998206816,86.42137601547572 112.39210998206816,86.42137601547572 113.39210998206816,86.42137601547572 C 113.39210998206816,87.42137601547572 113.39210998206816,95.42137601547572 113.39210998206816,96.42137601547572 C 112.39210998206816,96.42137601547572 104.39210998206816,96.42137601547572 103.39210998206816,96.42137601547572 C 103.39210998206816,95.42137601547572 103.39210998206816,87.42137601547572 103.39210998206816,86.42137601547572 ",<br />
	"lensPath" : "M 304.6828883843359,94.28066353971869C 315.15242080095635,110.11085599156657 281.8913723752886,154.36727094138655 249.95695467226062,174.5634496818991 C 229.19157202630007,187.6960323215128 179.15619563044785,190.04204825863354 143.7124545468221,168.68589073225627 C 115.0311971938544,151.40437835918695 116.3066956065222,98.9434122137887 120.8796942175233,89.74067422456241 C 125.76091487574503,79.91766778910245 168.00571744139953,73.51652014971526 205.07771935487446,74.05426220951449 C 229.19157202630007,74.40404188517087 295.166110391501,79.8910593861534 304.6828883843359,94.28066353971869 "<br />
}</code></p>
<p>So, I fired open <a href="http://macromates.com/">my favorite text editor</a> and built a regex to search for three groups in a row:</p>
<ul>
<li><strong>(\d+\.)</strong>: A group of one or more digits ending with a period, followed by&#8230;</li>
<li><strong>(\d{2})</strong>: a group of exactly two digits, followed by&#8230;</li>
<li><strong>(\d*)</strong>: a group of 0 or more digits</li>
</ul>
<p>Altogether, the full regex search is:<br />
<code>(\d+\.)(\d{2})(\d*)</code></p>
<p>I wanted to keep the results of the first two groups, and ignore the last group, so my regex<br />
replacement looked like this: <code>$1$2</code></p>
<p>I know.  It&#8217;s hardly rocket science. But now that it&#8217;s documented I&#8217;ll save myself 30 seconds every six months.</p>
<p>After running the regex find/replace my JSON shrunk to just this:</p>
<p><code>"frame" : {<br />
	"framePath" : "M 338.00,76.44C 337.35,76.44 328.27,75.22 319.67,74.15 C 317.50,73.88 295.21,70.88 293.09,70.33 C 219.81,51.43 150.69,59.13 98.71,79.69 C 98.71,80.34 98.71,105.05 98.71,105.70 C 104.19,138.56 103.11,165.83 130.05,185.42 C 171.04,215.23 230.55,210.52 259.15,197.25 C 274.12,190.31 284.23,174.83 297.33,163.79 ",<br />
	"nosePath" : "M 297.33,163.79C 300.61,157.71 299.45,156.92 303.90,151.64 C 312.82,141.03 324.94,132.40 338.00,131.06 ",<br />
	"templeProfilePath" : "M 103.39,86.42C 104.39,86.42 112.39,86.42 113.39,86.42 C 113.39,87.42 113.39,95.42 113.39,96.42 C 112.39,96.42 104.39,96.42 103.39,96.42 C 103.39,95.42 103.39,87.42 103.39,86.42 ",<br />
	"lensPath" : "M 304.68,94.28C 315.15,110.11 281.89,154.36 249.95,174.56 C 229.19,187.69 179.15,190.04 143.71,168.68 C 115.03,151.40 116.30,98.94 120.87,89.74 C 125.76,79.91 168.00,73.51 205.07,74.05 C 229.19,74.40 295.16,79.89 304.68,94.28 "<br />
}</code></p>
<p><a href="http://www.michaelrighi.com/wp-content/uploads/2011/11/regex_before.png"><img src="http://www.michaelrighi.com/wp-content/uploads/2011/11/regex_before.png" alt="TextMate - Before Regex" title="TextMate - Before Regex" width="490" height="486" class="alignnone size-full wp-image-113" /></a></p>
<p><a href="http://www.michaelrighi.com/wp-content/uploads/2011/11/regex_after.png"><img src="http://www.michaelrighi.com/wp-content/uploads/2011/11/regex_after.png" alt="TextMate - After Regex" title="TextMate - After Regex" width="480" height="456" class="alignnone size-full wp-image-114" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelrighi.com/2011/11/18/i-am-wasting-time-truncating-numbers-with-regex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git-R-Done!</title>
		<link>http://www.michaelrighi.com/2010/07/02/git-r-done/</link>
		<comments>http://www.michaelrighi.com/2010/07/02/git-r-done/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 20:30:02 +0000</pubDate>
		<dc:creator>Michael Amor Righi</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[TEQ]]></category>

		<guid isPermaLink="false">http://www.michaelrighi.com/2010/07/02/git-r-done/</guid>
		<description><![CDATA[Note: This article originally appeared in the June, 2010 edition of TEQ Magazine. From: Michael Righi To: Joe Gallo Subject: Git Dear friend and business partner, I&#8217;m writing to thank you for convincing me to replace Subversion with Git as our source control management (SCM) tool. At first I resisted the change, but after making ...]]></description>
			<content:encoded><![CDATA[<p><strong>Note:</strong> This article originally appeared in the June, 2010 edition of <a href="http://e-ditionsbyfry.com/Olive/AM3/TEQ/">TEQ Magazine</a>.</p>
<p><strong>From:</strong> Michael Righi<br />
<strong>To:</strong> Joe Gallo<br />
<strong>Subject:</strong> Git</p>
<p>Dear friend and business partner,</p>
<p>I&#8217;m writing to thank you for convincing me to replace <a href="http://subversion.tigris.org/">Subversion</a> with <a href="http://git-scm.com">Git</a> as our source control management (SCM) tool.  At first I resisted the change, but after making it past the learning curve I realized that Git is the best tool for managing changes to our source code.  It makes it much easier for developers to collaborate than any other tool I&#8217;ve tried.  This thing rocks!</p>
<p>My previous experiences with SCM tools were with Visual Source Safe, CVS, and Subversion, which all rely on a central repository.  Git&#8217;s distributed approach was initially very alien to me, but things made more sense once I realized that Git is to source control what Napster was to music: a peer-to-peer tool for sharing files.  With Git, each developer&#8217;s computer has a complete copy of a software project&#8217;s history, and teammates can send each other new code by transferring it directly from machine to machine.</p>
<p>The best thing about Git is its blazing fast speed!  Subversion would sometimes take ten minutes to merge two branches of code, but Git&#8217;s merges only take seconds.  Instead of getting a cup of coffee while my code merges, now I barely have time to check my email before it&#8217;s done.  At first I assumed that only black magic could explain a speed increase of that magnitude, but now I realize that Git is so fast because of how it stores changes to files: instead of copying the entire codebase when a branch is made, Git only stores the incremental changes.  And unlike Subversion which compares the differences between files over the network, Git can do the comparison on the local hard drive. Very clever.</p>
<p>Do you remember that time my computer crashed after I opened an attachment from the Nigerian prince who needed help wiring $10M into the country?  I couldn&#8217;t decide if I should be more upset that I lost all my data, or that I lost out on making a quick million!  What unfortunate timing for my hard drive to crash just as I opened his email.  Anyway, at least I didn&#8217;t lose any of my work in the Java project I was developing, because I was able to restore my code from <a href="http://www.github.com">GitHub.com</a>, the online Git hosting service you recommended.</p>
<p>Another benefit of Git is that it lets me code while flying, because it doesn&#8217;t require a live network connection the way Subversion does.  Since Git can operate as a standalone tool, I&#8217;m now able to branch and merge my code at 30,000 feet!  This was a lifesaver on my last flight when a bad-breathed accountant wanted to chat my ear off about tax law.  I told him to go bother the Subversion developer in aisle twelve because I had work to do!</p>
<p>I&#8217;ve been encouraging my friends and customers to learn more about Git at its official web site, <a href="http://git-scm.com/">http://git-scm.com/</a> .  When they ask how much it costs I explain that Git is free and open-source, so the only cost is the time it takes to learn it.</p>
<p>Thanks again for the great recommendation! </p>
<p>Take care,<br />
Michael</p>
<p>P.S. I was finally able to track down that Nigerian prince, and would you believe he still needs my help wiring the $10M?  Can I borrow $5,000 to cover the transaction fee?  Everything is explained in the attached file, <a href="#">EasyMoney.pdf.exe</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelrighi.com/2010/07/02/git-r-done/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Holding a Finger to the Wind</title>
		<link>http://www.michaelrighi.com/2010/06/01/holding-a-finger-to-the-wind/</link>
		<comments>http://www.michaelrighi.com/2010/06/01/holding-a-finger-to-the-wind/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 13:05:07 +0000</pubDate>
		<dc:creator>Michael Amor Righi</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[TEQ]]></category>

		<guid isPermaLink="false">http://www.michaelrighi.com/2010/06/01/holding-a-finger-to-the-wind/</guid>
		<description><![CDATA[Note: This article originally appeared in the May, 2010 edition of TEQ Magazine. A fashion trend has been growing over the last few years, and I saw it widely displayed on a recent stay in New York: the decorative man-scarf. On a warm day in Central Park, my girlfriend and I calculated the percentage of ...]]></description>
			<content:encoded><![CDATA[<p><strong>Note:</strong> This article originally appeared in the May, 2010 edition of <a href="http://e-ditionsbyfry.com/Olive/AM3/TEQ/">TEQ Magazine</a>.</p>
<p>A fashion trend has been growing over the last few years, and I saw it widely displayed on a recent stay in New York: the decorative man-scarf.  On a warm day in Central Park, my girlfriend and I calculated the percentage of men wearing a decorative scarf, and it would only be a slight exaggeration to say that it was 150%.</p>
<p>Personally, if I wanted a stylish way to keep my neck warm I&#8217;d rather grow a mullet than wrap a plaid tablecloth around my neck.  That said, it&#8217;s difficult to tell which clothing trends will stick, and I wonder if the future will make me look like a fashion fool.  In twenty years will our skies be filled with flying cars, decorative man-scarves fluttering from the windows?  Are man-scarves more like MC Hammer pants in the 1980s, or denim jeans in the 1880s?      </p>
<p>Exiting Central Park, we caught a brief glimpse of the trendiest man to ever walk the earth.  Except he wasn&#8217;t walking the earth, because he was riding a Segway&#8230;while wearing a decorative scarf.  Never before had I witnessed such a powerful intersection of fashion and technology trends.</p>
<p>This chance encounter got me thinking about two things: First, technology is much like fashion in the sense that it&#8217;s hard to predict what the future holds.  Second, how awesome would it be to use a Segway as a segue in my next TEQ article?</p>
<p>I love working with new technology, and I&#8217;m fortunate that my job as a software developer allows me to do this often.  However, working with the latest tools comes at the expense of sometimes learning a technology that quickly becomes abandoned and obsolete.  (WML, VRML, and J# come to mind.) Employing the newest technologies also prevents me from being able to apply all of the experience gained from my last project to the next one, because by the time one project wraps up there are new tools to learn.</p>
<p>My team and I recently started developing condominium management software.  Our previous project lasted fourteen months, and many tools were released in the interim for us to consider adding to our tool chest.  It was a challenge deciding which new technologies to adopt, which old ones to upgrade, and which to abandon altogether.  We took into consideration our knowledge invested in the old tools, the benefits of alternatives, and how likely it would be for the technologies to still be around in a few years.</p>
<p>Nothing was sacred, and we even considered replacing Java (our staple language) with Python.  Although we&#8217;re sticking with Java, some things we&#8217;ll be using are very new to us, such as <a href="http://aws.amazon.com/ec2/">EC2</a> (Amazon&#8217;s Cloud Computing service), <a href="http://git-scm.com/">Git</a> for version control (in place of <a href="http://subversion.tigris.org/">Subversion</a>), and <a href="http://www.springsource.org/">Spring 3.0</a> as our application framework on top of Java.</p>
<p>Mispredicting the future of technology is costlier than getting it wrong with fashion.  A silly looking scarf might set you back $40, but investing in a dead-end technology can cost you years that you&#8217;ll never get back.  Worse still, it can leave your company entrenched in obsolete solutions that are hard to maintain or replace.  Performing due diligence can help prevent this situation, but I don&#8217;t trust my prognostication skills to rely on them alone.  That&#8217;s why we architected our software in a decoupled and layered manner that will allow parts to be more easily replaced.  (Like swapping a scarf for a necktie while keeping the pants and shirt.)</p>
<p>In future articles I&#8217;ll describe the decisions we made for this project, and since we&#8217;re still in the early stages I&#8217;ll get to share realtime updates along the way.  The choices we made are leading us down an unfamiliar road, but hopefully you&#8217;ll enjoy reading about the adventure.  By the end I&#8217;ll probably be pleased with some decisions and come to regret others.  Who knows, maybe in a year you&#8217;ll even spot me zipping away from Barnes &#038; Noble on a Segway, with a scarf rippling from my neck, and a Python book in tow.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelrighi.com/2010/06/01/holding-a-finger-to-the-wind/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Good Riddance, IE6</title>
		<link>http://www.michaelrighi.com/2010/05/02/good-riddance-ie6/</link>
		<comments>http://www.michaelrighi.com/2010/05/02/good-riddance-ie6/#comments</comments>
		<pubDate>Sun, 02 May 2010 14:55:49 +0000</pubDate>
		<dc:creator>Michael Amor Righi</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[TEQ]]></category>

		<guid isPermaLink="false">http://www.michaelrighi.com/2010/05/02/good-riddance-ie6/</guid>
		<description><![CDATA[Note: This article originally appeared in the April, 2010 edition of TEQ Magazine. My grandfather enjoyed a simple lifestyle in upstate New York, so when he passed away last year there were only a few accounts in his name that needed to be closed. One was with his telephone provider. Usually when people talk about ...]]></description>
			<content:encoded><![CDATA[<p><strong>Note:</strong> This article originally appeared in the April, 2010 edition of <a href="http://e-ditionsbyfry.com/Olive/AM3/TEQ/">TEQ Magazine</a>.</p>
<p>My grandfather enjoyed a simple lifestyle in upstate New York, so when he passed away last year there were only a few accounts in his name that needed to be closed.  One was with his telephone provider.  Usually when people talk about their “telephone provider” they mean “telephone service provider”, but not so with Papa.  My grandfather leased a rotary phone for $1.75 per month rather than buying his own for $10.  The phone he was given in 1967 served him well until the end.  Over the years my family tried to convince him to join the modern world of touchtone telephone ownership, and along with it the ability to express your language preference with the press of a button.  But my grandfather, bless his soul, sometimes preferred consistency over common sense.</p>
<p>If Papa were here today, and if he owned a computer (ha!), and if he had an Internet connection (double ha!), there&#8217;s no doubt in my mind which web browser he&#8217;d be using: Internet Explorer 6.</p>
<p>IE6 is to web browsing what a rotary phone is to calling.  It&#8217;s ancient (IE6 was released in August, 2001), it&#8217;s slow (today&#8217;s browsers can render pages in half the time), it&#8217;s full of security holes (as of February 9, 2010, <a href="http://secunia.com/advisories/product/11/">Secunia.com lists 24 unpatched vulnerabilities in IE6</a>), and it simply can&#8217;t do all the whiz-bang things that modern browsers can.</p>
<p>I used to have a handsome head of hair, but it&#8217;s been replaced by a – some would say more handsome – bald dome.  The cause?  Genetics, and more than eight stressful years of crafting web sites to display correctly in IE6.  Ask any web developer what the hardest part of their job is, and they&#8217;ll probably tell you it&#8217;s devising tricks to get IE6 to properly display pages.  For nearly a decade, web developers have wasted countless hours struggling to fix IE6-specific problems.  Their time could have been better spent creating new features, learning new techniques, or grooming the hair they&#8217;d otherwise still have.</p>
<p>Last month my company got bit by an IE6 bug in software we built for a customer.  Our application turns form letters into PDFs, and it displays a list of the most recent documents on a page that we call the Print Queue.  The page features a checkbox next to each document, and two buttons at the bottom: Print and Delete.  Depending on which button is pressed, our software either prints or deletes the chosen PDFs.  Unless you&#8217;re using IE6.  In that case it always deletes the documents, even if you hit print.  Yikes!</p>
<p>When you submit a web form, your browser is supposed to tell the server which button you clicked.  But when IE6 sees a form that contains multiple &lt;button&gt; tags, instead of telling the server which one was clicked, it recklessly submits the name of every button on the form!  Imagine if our nuclear missiles were controlled by a web page with two buttons: Disarm and Launch.  Let&#8217;s just hope the Russians are using Firefox.</p>
<p>Last month was my tipping point.  Instead of wasting an hour tweaking things for IE6, with my customer&#8217;s consent we completely blocked access to Internet Explorer 6 and lower.  Time and hair are just too precious to be wasted on such problems, and fortunately I&#8217;m not alone in this belief.  Google <a href="http://googleenterprise.blogspot.com/2010/01/modern-browsers-for-modern-applications.html">recently announced they will begin phasing out support for IE6 this year</a>, and they are part of a larger movement to do the same.  Although IE6 still accounts for 20% of web traffic, campaigns such as <a href="BringDownIE6.com">BringDownIE6.com</a> are working to change that.  Despite what you might think, these efforts aren&#8217;t anti-Microsoft.  Although I prefer Chrome and Firefox, IE8 is a decent browser too.  </p>
<p>If you&#8217;re reading this article I suspect you already stopped using IE6 years ago.  But if you&#8217;re still developing web sites for it, I hope you&#8217;ll join the movement and abandon this hideous browser.  Should you disagree, there&#8217;s this phone company in upstate New York I can highly recommend. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelrighi.com/2010/05/02/good-riddance-ie6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lost Sleep Over SOAP?  Get Some REST.</title>
		<link>http://www.michaelrighi.com/2010/02/01/lost-sleep-over-soap-get-some-rest/</link>
		<comments>http://www.michaelrighi.com/2010/02/01/lost-sleep-over-soap-get-some-rest/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 16:18:02 +0000</pubDate>
		<dc:creator>Michael Amor Righi</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[TEQ]]></category>

		<guid isPermaLink="false">http://www.michaelrighi.com/2010/02/01/lost-sleep-over-soap-get-some-rest/</guid>
		<description><![CDATA[Note: This article originally appeared in the January, 2010 edition of TEQ Magazine. If you were given the opportunity to travel back in time for one day, how would you use it? Would you try and stop a famous tragedy? Would you go back to witness an historical event, like the Beatles&#8217; first appearance on ...]]></description>
			<content:encoded><![CDATA[<p><strong>Note:</strong> This article originally appeared in the January, 2010 edition of <a href="http://e-ditionsbyfry.com/Olive/AM3/TEQ/">TEQ Magazine</a>.</p>
<p>If you were given the opportunity to travel back in time for one day, how would you use it?  Would you try and stop a famous tragedy?  Would you go back to witness an historical event, like the Beatles&#8217; first appearance on Sullivan?  Maybe you&#8217;d prefer to relive your happiest day.</p>
<p>For me it&#8217;s a no-brainer.  I&#8217;d use the time machine to go back six months and stop myself from using SOAP in my last software project.</p>
<p>Last year my company developed warranty management software for a company that makes siding for homes.  Our application manages most of the claim process from filing to payment, but one part it doesn&#8217;t handle is the scheduling of the home inspection.  A third-party handles that step, and they have their own application that my team&#8217;s program had to interact with.</p>
<p>To get our applications talking, we decided to use web services with SOAP.  It made perfect sense.  After all, our situation was exactly the kind of data-exchange-over-the-web type of application that SOAP was designed for.  We&#8217;ve used it before, and although we&#8217;ve never loved it, it still seemed like the best tool for the job.</p>
<p>But what started out as a two-week task turned into three months of debugging, handwringing, and self-doubt.  Nothing worked as it should.  First our Java application couldn&#8217;t connect with the proprietary authentication technique the other company was using.  (Although SOAP itself is a standard, it can work with dozens of “sub-standards” which aren&#8217;t all well supported.)  Then we had problems with decoding image attachments, data validation, XML file size limitations, and server conflicts with other programs.  At one point the web service even failed when the other system&#8217;s clock fell out of sync because of daylight saving time.</p>
<p>SOAP&#8217;s not an acronym anymore, but when it was, the “S” used to mean “simple”.  Ha!  That&#8217;s like calling a cystoscopy a “simple procedure”.  Sorry Dr. Smith, but what you once described to me as a simple procedure is actually the least simple thing I can think of.  And the only thing more painful was that time I used SOAP in a warranty management application.</p>
<p>SOAP has good intentions, and with enough effort it can be made to work well.  But the problem with SOAP is that it&#8217;s built on top of many layers, and with each new layer comes a new set of complications.  SOAP tries to be an all-encompassing protocol, and although this makes it powerful, it also makes it complex.</p>
<p>Fortunately there&#8217;s an easier way of exchanging data between programs over the web.  It&#8217;s called Representational State Transfer, or REST.  Unlike SOAP which is a protocol, REST is more of a general approach to sharing data between a client and server.  A RESTful web service forgoes complicated protocols, and instead takes advantage of HTTP&#8217;s underutilized features.</p>
<p>Imagine you run a business that rents camels by the hour.  In addition to allowing reservations on your web site, you want to open your system to third party brokers.  The brokers use their own software to compare prices and make reservations, and they&#8217;re not going to rent out your camels if you don&#8217;t give their software a way to hook into yours.  You decide to make your reservation system available to theirs via a RESTful web service.</p>
<p>With REST, you expose your software&#8217;s functionality via meaningful URLs, and you take advantage of HTTP&#8217;s “verbs”, which are called actions.  For example, if a broker wanted to check the availability of your two-humped camels, their software could issue a GET request of http://www.carav.an/camel/hump/2.  To make a reservation for a camel named Gobi on April 12th, their software could issue a POST request of http://www.carav.an/camel/gobi/2010/04/12.  To check on the status of reservation #123, they could issue a GET request of http://www.carav.an/reservation/123, and to cancel that reservation they could issue a DELETE request of the same URL.</p>
<p>Unlike SOAP which is limited to XML, RESTful web services can share their data in any number of formats, such as XML, JSON, or CSV.  REST replaces complexity with simplicity, and it takes better advantage of existing methodologies instead of inventing its own.  Although it lacks some of SOAP&#8217;s strengths, such as a unified way of defining your interface, it makes up for it with its ease of implementation.</p>
<p>The next time you develop a web service, consider this alternative to SOAP.  Although we can&#8217;t travel backwards through time, at least we can use REST to save it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelrighi.com/2010/02/01/lost-sleep-over-soap-get-some-rest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Context, Please</title>
		<link>http://www.michaelrighi.com/2009/12/01/context-please/</link>
		<comments>http://www.michaelrighi.com/2009/12/01/context-please/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 22:21:58 +0000</pubDate>
		<dc:creator>Michael Amor Righi</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[TEQ]]></category>

		<guid isPermaLink="false">http://www.michaelrighi.com/2009/12/01/context-please/</guid>
		<description><![CDATA[Note: This article originally appeared in the November, 2009 edition of TEQ Magazine. This is an actual email I once received from a friend: Date: October 27, 2005 From: (I&#8217;ll protect the not-so-innocent) To: Michael Righi Subject: number 071-89122 That&#8217;s it. Nothing more to see. Just a vague subject and a mysterious number. The email ...]]></description>
			<content:encoded><![CDATA[<p><strong>Note:</strong> This article originally appeared in the November, 2009 edition of <a href="http://e-ditionsbyfry.com/Olive/AM3/TEQ/">TEQ Magazine</a>.</p>
<p>This is an actual email I once received from a friend:</p>
<blockquote><p>
<strong>Date:</strong> October 27, 2005<br />
<strong>From:</strong> (I&#8217;ll protect the not-so-innocent)<br />
<strong>To:</strong> Michael Righi<br />
<strong>Subject:</strong> number</p>
<p>071-89122</p></blockquote>
<p>That&#8217;s it.  Nothing more to see.  Just a vague subject and a mysterious number.</p>
<p>The email probably made sense at the time, but today I have no idea what question it was answering.  And what kind of number is that?  It&#8217;s clearly not a phone number, and it doesn&#8217;t follow any common patterns like credit card or SSN.  Maybe it&#8217;s a numbered Swiss bank account I forgot I had.</p>
<p>This email suffers from a lack of context, but that&#8217;s not to say it didn&#8217;t have any at the time.  The problem is that the context was likely provided by a phone conversation I was having with my friend.  I&#8217;m guessing it went something like this.</p>
<blockquote><p>
<strong>Me:</strong> “Hey, I forget the number for the XYZ.  Do you know what it is?”<br />
<strong>Friend:</strong> “Sure, check your email.  I just sent it to you.”<br />
<strong>Me:</strong> “Got it!  Thanks!”<br />
<strong>Friend:</strong> “Anything for you.  You&#8217;re such an awesome person, Michael!”<br />
<strong>Me:</strong> “And you&#8217;re a great judge of character!”</p></blockquote>
<p>Contextless emails are one of my biggest pet peeves, because they&#8217;re confusing and unsearchable.  My email archive represents the collective knowledge of everything that&#8217;s passed through my inbox since 1996, and I&#8217;m constantly searching through it.  What&#8217;s the phone number for the plumber I hired five years ago?  Where does my customer like to play golf?  Which bondsman does my attorney recommend?  All of these questions can be answered with a quick search.</p>
<p>I rely on email searches so much, that I often send emails to myself with information I might need one day.  Here&#8217;s a recent example:</p>
<blockquote><p>
<strong>Date:</strong> October 1, 2009<br />
<strong>From:</strong> Michael Righi<br />
<strong>To:</strong> Michael Righi<br />
<strong>Subject:</strong> Rachel is Allergic to Buckwheat</p>
<p>Rachel is allergic to buckwheat.  It will kill her.  Quit offering her food that has buckwheat in it, like multigrain pancakes or anything from Kashi.  She&#8217;s starting to think you&#8217;re doing this on purpose.</p>
<p>Keywords: allergy, allergies, buckwheat, buck wheat, allergic reaction, Rachel, EpiPen, benadryl, ways to kill my employees</p></blockquote>
<p>I can never remember what Rachel is allergic to, but now I can do a quick search to find out.</p>
<p>When I send emails to others, I don&#8217;t go as far as adding keywords in the message, but I do provide context with descriptive subjects and message bodies.  Instead of sending an email that says, “Their number is 412-271-9293”, I&#8217;m more likely to say, “The phone number for Beasley Plumbing is 412-271-9293.”</p>
<p>Not everyone is good at writing descriptive emails, but fortunately tools exist to make their emails searchable anyway.</p>
<p>Apple Mail is my main email client, and I use a plugin called <a href="http://www.indev.ca/MailTags.html">MailTags</a>.  ( $29.95 from <a href="http://www.indev.ca/">indev software</a> ) When I receive an email with little or no context, MailTags lets me add my own keywords for quick searching in the future.  This is especially useful for emails with PDF or image attachments that couldn&#8217;t otherwise be indexed.</p>
<p>Outlook users might benefit from Taglocity, which offers email tagging and more.  Although I&#8217;ve never used it myself, I&#8217;ve heard good things, and I encourage you to learn more at <a href="http://www.taglocity.com/">http://www.taglocity.com/</a>.</p>
<p><a href="http://mail.google.com">Gmail</a> calls their tags labels, and you can even create filters to automatically assign them, such as “attachment” to emails with attachments or “family” to emails from certain addresses.</p>
<p>These tools are great, and I recommend you use one, but the best solution would be for everybody to start sending more descriptive emails from now on.  As Rachel will tell you, this isn&#8217;t just a matter of convenience.  It&#8217;s a matter of life and death.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelrighi.com/2009/12/01/context-please/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sizing Up Software, Part II</title>
		<link>http://www.michaelrighi.com/2009/11/17/sizing-up-software-part-two/</link>
		<comments>http://www.michaelrighi.com/2009/11/17/sizing-up-software-part-two/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 22:17:40 +0000</pubDate>
		<dc:creator>Michael Amor Righi</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[TEQ]]></category>

		<guid isPermaLink="false">http://www.michaelrighi.com/2009/11/17/sizing-up-software-part-two/</guid>
		<description><![CDATA[Note: This article originally appeared in the October, 2009 edition of TEQ Magazine. This summer, a friend and I walked the length of Manhattan for my birthday. Our goal was to trek the fourteen miles from Battery Park to 220th Street, and depending on how things went, return by subway or ambulance. We estimated a ...]]></description>
			<content:encoded><![CDATA[<p><strong>Note:</strong> This article originally appeared in the October, 2009 edition of <a href="http://e-ditionsbyfry.com/Olive/AM3/TEQ/">TEQ Magazine</a>.</p>
<p>This summer, a friend and I walked the length of Manhattan for my birthday.  Our goal was to trek the fourteen miles from Battery Park to 220th Street, and depending on how things went, return by subway or ambulance.</p>
<p>We estimated a six-hour walk, and periodically checked our progress along the way.  But tracking a Manhattan hike isn&#8217;t easy, because the numbered streets don&#8217;t begin until after you leave SOHO.  If you&#8217;re as Vitamin-D starved as I am, that could mean you already have serious blisters before 1st Street.</p>
<p>A few blocks past Times Square, my cell phone rang.  It was another friend, and she wanted to know what time to expect me for dinner.  Having already passed the naked cowboy, I told her I didn&#8217;t think I&#8217;d be much longer.  After all, isn&#8217;t Times Square just a couple blocks south of Harlem?  (Fact check: They&#8217;re as distant as Squirrel Hill and Monroeville.)</p>
<p>That day I realized that long walks are like big software projects.  It&#8217;s hard to measure their progress, difficult to predict their completion, and both can induce big sweats.</p>
<p>In my last column, I discussed techniques to measure the quality of your code, and in this issue we&#8217;ll look at ways to measure your progress during development.  But first, a note of caution: This stuff is hard to do well.  Even companies like Microsoft and Apple aren&#8217;t perfect, so start by lowering your expectations.  In fact, I would go as far as saying that on the spectrum of awful to awesome, the best companies only score slightly higher than “doesn&#8217;t suck.”</p>
<p><strong>Have specific goals.</strong><br />
Many projects fail from a lack of planning.  If the project is large enough, it should have a written specification, which may include use cases, technical specs, and functional specs.  Without a clear goal, how can you know when you&#8217;re done?</p>
<p><strong>Break up your goals.</strong><br />
Predicting the duration of a project is like guessing how much sand is in a desert. That&#8217;s why projects should be divided into sub-tasks, each representing major sections of the software.  Keep breaking sub-tasks into smaller sub-tasks, until you&#8217;re left with fine-grained tasks, all with time estimates under forty hours.  It&#8217;s easy to imagine what can be accomplished in a week, but difficult to do the same for a month or a year.  Now you&#8217;ll be counting the sand in a jar, instead of a desert.</p>
<p><strong>Measure with metrics.</strong><br />
Many project management applications exist, but I&#8217;ve had the most success with these two tools:</p>
<p><a href="http://docs.google.com">Google Spreadsheets</a> – This is the easiest and most affordable solution I&#8217;ve used. Create a row for every fine-grained task, and set up columns for task name, original time estimate, current time estimate, hours worked, and hours remaining.  Add some logic to turn the completed tasks green, and share the document with all parties involved.  This takes thirty minutes to set up, it&#8217;s very easy, and it&#8217;s very free.  Try it out at http://docs.google.com</p>
<p><a href="http://www.fogcreek.com/fogbugz/">FogBugz</a> – FogBugz is a bug tracking and project management application from FogCreek software.  It features evidence-based scheduling, which allows you to predict how realistic your milestones are based on the track record of every member on the team.  The Burn Down Chart shows how much time remains before goals are reached, and FogBugz even demonstrates which tasks stand in the way on the critical path.  FogBugz costs $25 per user per month.</p>
<p><strong>Update your metrics often.</strong><br />
Donald Rumsfeld once said, “There are known unknowns, but there are also unknown unknowns.  [These] are things we don&#8217;t know we don&#8217;t know.”  This quote is often taken out of context and applied to war.  Of course, Rumsfeld was actually talking about software development.  Scope creep happens, and surprises are common.  Metrics are only as useful as the data you provide them, so don&#8217;t be afraid to update numbers based on knowledge gained along the way.  Updating your metrics at least once per week will keep you and your projections honest.</p>
<p>Whether you&#8217;re building software or hiking through New York, it&#8217;s difficult to predict the future.  But, with proper planning, fine-grained sub-goals, and a little technology, you&#8217;ll stand a fighting chance.</p>
<p>As for my Manhattan hike, we finished in just over seven hours, and I made it to dinner on time.  I gained a new respect for the size of Manhattan, and the importance of better planning.  Next year, I&#8217;ll attempt to walk the length of Pittsburgh&#8217;s Golden Triangle in a day.  My prediction: Twenty minutes, including a stop at Primanti&#8217;s.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelrighi.com/2009/11/17/sizing-up-software-part-two/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sizing Up Software, Part I</title>
		<link>http://www.michaelrighi.com/2009/11/16/sizing-up-software-part-one/</link>
		<comments>http://www.michaelrighi.com/2009/11/16/sizing-up-software-part-one/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 15:25:17 +0000</pubDate>
		<dc:creator>Michael Amor Righi</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[TEQ]]></category>

		<guid isPermaLink="false">http://www.michaelrighi.com/2009/11/16/sizing-up-software-part-one/</guid>
		<description><![CDATA[Note: This article originally appeared in the August, 2009 edition of TEQ Magazine. Older brothers can be very cruel to their siblings. Just ask my little sister. As kids, we often split the chore of washing the dishes after dinner. I dreaded this task, but one evening I had some fun with it at my ...]]></description>
			<content:encoded><![CDATA[<p><strong>Note:</strong> This article originally appeared in the August, 2009 edition of <a href="http://e-ditionsbyfry.com/Olive/AM3/TEQ/">TEQ Magazine</a>.</p>
<p>Older brothers can be very cruel to their siblings.  Just ask my little sister.  As kids, we often split the chore of washing the dishes after dinner.  I dreaded this task, but one evening I had some fun with it at my sister&#8217;s expense.</p>
<p>After enjoying our mother&#8217;s chicken tetrazzini, I raced to the sink to wash my half of the dishes first.  But instead of washing the dishes to perfection until half remained, I carefully washed 50% of every single dish in the sink.  Each plate resembled a half-moon made of Parmesan cheese and chicken skin.  Hilarious.</p>
<p>Sure, if I had done the job properly it would have taken less time, but you should never underestimate the wicked dedication of an older brother.</p>
<p>The moral of my story is that work assignments and job performances can be measured and interpreted in different ways.  This is especially true with software projects.</p>
<p>As a software developer, I am commonly asked how &#8220;big&#8221; my applications are.  (The cheeky side of me wants to answer with a physical size.  &#8220;Well, I once built an iPhone app that was 2&#215;3 inches!&#8221;) In all seriousness, when I&#8217;m asked this question I assume the person wants to hear about the scale of my software, so I tell them how long it took to build, how many concurrent users it can handle, and how large the underlying database is. Interesting stuff if you&#8217;re trying to gauge a developer&#8217;s experience, but what if you want to measure the progress of a project under development?</p>
<p>Some programmers measure their progress by counting how many lines of code they&#8217;ve written, but this practice makes me taste my lunch again.  Why?  First, the numbers aren&#8217;t isomorphic across different languages. (Twenty lines of C++ might accomplish the same as five lines of Java, or one line of Ruby.) Second, measuring progress by counting the lines of code encourages the development of bloated software.  To quote Kanye West quoting Daft Punk, I&#8217;ve seen many applications that would be &#8220;harder, better, faster, stronger&#8221; if they were rewritten with half the code.</p>
<p>Last year this issue became an important one for my company.  During negotiations with a client, I proposed that our fee be split into thirds, with the second payment due after three months.  However, my customer wanted to cut the second check when “half the software was complete.”</p>
<p>But what does &#8220;half the software&#8221; mean?  Half the lines of code?  If so, then we&#8217;d have to somehow predict the final line count in advance.  Since our software was web-based, it was suggested that we measure the number of pages built, but even that&#8217;s not perfect.  If 75% of the pages are 65% complete, is that considered half? Besides, when web applications are measured by page count, developers are rewarded for building clunky user interfaces that use more pages than necessary.</p>
<p>Fortunately, I was able to convince my customer that &#8220;half the software&#8221; was too vague, but others aren&#8217;t always so lucky.  I once saw a project whose members were unwittingly encouraged to ignore problems, because their success was measured by the number of bugs filed.  If there&#8217;s no Dilbert cartoon for that, there really should be.</p>
<p>Good software developers view their work as a craft, and their software as a work of art.  To them, judging software by silly metrics makes no more sense than judging the beauty of a painting by the canvas size, or the strength of a bridge by the number of rivets.</p>
<p>Instead of using lousy software metrics, companies should focus on what really matters: software quality.  Yes, this is harder to measure because it&#8217;s more subjective, but it can be done.</p>
<p>What makes software good?  For starters, good software isn&#8217;t bad, and bad software is easy to identify.  Some of the many things that can make software bad include a lack of comments, poor formatting, mismatched naming conventions, copy-and-pasted code, deprecated method calls, and broken syntax that doesn&#8217;t even compile.</p>
<p>Just as it can be difficult to smell your own B.O., sometimes it&#8217;s hard to recognize when your own code stinks.  That&#8217;s why my team uses an open-source Java application named Hudson.  Hudson is a continuous integration tool, which is a type of program that automatically compiles, tests, and analyzes software on a recurring basis.  Think of Hudson as a friend who sniffs you once an hour and tells you when it&#8217;s time to reapply the Old Spice.  (To my fellow geeks: Old Spice is a form of deodorant.)</p>
<p>Once an hour, Hudson downloads and attempts to compile the latest source code for  my team&#8217;s software projects.  It then runs our code through a gauntlet of unit tests to ensure that our latest changes haven&#8217;t broken anything.  Next, Hudson  sends our source code through another tool named Checkstyle, which analyzes the code against a set of known bad practices.</p>
<p>In the end, Hudson generates a lovely web-based report that spotlights our projects&#8217; health.  Each project is summarized with an icon, showing either a shining sun for the really healthy projects, or a stormy thundercloud for the projects that should be taken out behind the shed.  Clicking a report reveals more detail, including which unit tests failed and why, along with beautiful graphs that highlight the results of Checkstyle.  For each issue, you can drill deeper into the reports to discover the source of the problem, along with suggestions for how to fix it.</p>
<p>Hudson is extremely customizable, and it does a million things I haven&#8217;t mentioned here.  There are also many other tools available for measuring the quality of software, but Hudson and Checkstyle are the ones my team prefers.</p>
<p>I&#8217;ll admit that Hudson does a better job of telling you when software is bad, rather than telling you when software is good.  For this I think you&#8217;ll always need code reviews and the opinion of an expert human being.  Also, measuring the health of a project doesn&#8217;t really help you track its progress, so please don&#8217;t use tools like Hudson for this.  Measuring the progress of a software project is such a difficult thing to do, that I&#8217;m going to revisit that one next time.  </p>
<p>Project managers and developers, please stop measuring code with silly metrics.<br />
At best they provide useless data, and at worst they encourage good people to do bad things.  Instead, focus on measuring the health of your software and improving its quality.  And if you&#8217;re still not convinced, just ask my dad about the time he asked me to mow half the lawn.</p>
<p>You can learn more about Hudson at <a href="http://hudson.dev.java.net/">http://hudson.dev.java.net</a> , and Checkstyle at <a href="http://checkstyle.sourceforge.net/">http://checkstyle.sourceforge.net</a>.</p>
<p>Special thanks to Joe Gallo for editing and contributing to portions of this document.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelrighi.com/2009/11/16/sizing-up-software-part-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Recession Fueled Entrepreneur</title>
		<link>http://www.michaelrighi.com/2009/03/15/a-recession-fueled-entrepreneur/</link>
		<comments>http://www.michaelrighi.com/2009/03/15/a-recession-fueled-entrepreneur/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 22:39:24 +0000</pubDate>
		<dc:creator>Michael Amor Righi</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Pittsburgh]]></category>

		<guid isPermaLink="false">http://www.michaelrighi.com/2009/03/15/a-recession-fueled-entrepreneur/</guid>
		<description><![CDATA[The economic meltdown is causing devastating effects for millions of people, and I&#8217;ve witnessed its collateral damage first hand. Some of my smartest, hardest working friends &#8212; people that I used to consider untouchable &#8212; now find themselves unemployed. Even the most fiscally prudent and financially conservative people have been harshly impacted by the incredible ...]]></description>
			<content:encoded><![CDATA[<p>The economic meltdown is causing devastating effects for millions of people, and I&#8217;ve witnessed its collateral damage first hand.  Some of my smartest, hardest working friends &mdash; people that I used to consider untouchable &mdash; now find themselves unemployed.  Even the most fiscally prudent and financially conservative people have been harshly impacted by the incredible scope of the stock market and housing crashes.  Unlike in the past, you didn&#8217;t have to be reckless with a credit card, buy a Miami condo with no money down, or risk your life savings on a dot com IPO to be impacted this time around.</p>
<p>I&#8217;m fortunate to live in Pittsburgh, because my city has not been affected as badly as other places.  BusinessWeek labeled Pittsburgh <a href="http://images.businessweek.com/ss/08/10/1014_recession_cities/7.htm">one of the best places to ride out a recession</a>, Smart Money magazine called Pittsburgh <a href="http://articles.moneycentral.msn.com/RetirementandWills/RetireInStyle/7RecessionProofPlacesToRetire.aspx">a recession-proof place to retire</a>, and the New York Times said that <a href="http://www.nytimes.com/2009/01/08/business/economy/08collapse.html?_r=1&#038;em">Pittsburgh is the envy of many recession-plagued communities.</a>  In short, Pittsburgh is an awesome place to be in a horrible economy.</p>
<p>That said, if Pittsburgh is one of the least affected cities in the country, I can only imagine how bad things are elsewhere.</p>
<p>My grandfather &mdash; we called him Papa &mdash; was a big believer of investing in the stock market as the means to a comfortable retirement.  When I was ten years old, he helped me purchase my first shares of a publicly traded company, and when we spoke he&#8217;d often dispense stock advice.  To Papa&#8217;s delight, he met CNBC anchor Larry Kudlow at an airport a few years ago.  &#8220;Michael,&#8221; he would later recount, &#8220;this man wore the sharpest pinstripe suit you&#8217;ve ever seen!&#8221;</p>
<p>Papa passed away two months ago, and although his death was an immensely sad and difficult thing to deal with, in a small way I am happy that he didn&#8217;t have to live out his final years struggling to get by.  In just a few months, his investments lost more than a decade&#8217;s savings, and I don&#8217;t know what he would have done had he lived another twenty years.</p>
<p>My grandfather&#8217;s generation was sold on three ideas which my generation &mdash; I&#8217;m twenty-seven years old &mdash; has trouble believing today.  The first is that investing in the stock market for the long term is the best way to save for retirement, the second is that climbing a corporate ladder is the surest way to success, and the third is that social security will be there for your golden years.</p>
<p>Between October 2007 and March 2009, the Dow Jones Industrial Average dropped more than 50%.  I am still a believer in free market capitalism and the American economic engine, but I know that this crash has shaken the confidence of many of my friends.  Tomorrow morning <a href="http://www.fieldexpert.com">my company</a> is rolling out its first retirement plan in the form of a Simple IRA.  Although most of my employees are in their mid-twenties, and despite their knowledge that it&#8217;s best to buy low and sell high, some of them are hesitant to trust the stock market after what&#8217;s happened lately.  Personally, I&#8217;ll be maxing out my IRA, but it&#8217;s difficult to blame them for lacking faith.</p>
<p>Another evaporated belief is the notion of climbing a corporate ladder to a comfortable retirement.  Gone are the days of joining a company like General Motors with an entry level position, and counting on the business to take care of you for life.  Many people my age couldn&#8217;t explain to you what a pension fund is, or for that matter how it differs from a mutual fund.  Workers of my generation have had stability replaced with insecurity, and endurance replaced by transience.</p>
<p>So much doubt has been placed on the future of social security that many people my age just assume we&#8217;ll have none.  Social security strikes me as a pyramid scheme that could only be stable in a world where life expectancy decreases while child bearing increases.  (<a href="http://en.wikipedia.org/wiki/Nadya_Suleman">Octomom</a> to the rescue!)</p>
<p>Faced with an unpredictable stock market, a non-existent corporate ladder, and an unlikely social security payout, I have never been more at peace with my decision to be an entrepreneur.</p>
<p>As an entrepreneur, I have much more control over my destiny than I would if I worked for somebody else.  The stock market&#8217;s success is influenced by swings of emotions outside my control, while my company&#8217;s success is influenced by the quality of service I provide my customers.  This I can control.</p>
<p>If I were an employee of a large business, my corporate ladder could be kicked out from underneath at any time.  But, in <a href="http://www.paulgraham.com/highres.html">the words of former Pittsburgher Paul Graham</a>, as an entrepreneur I can grow a corporate ladder underneath me instead of climbing someone else&#8217;s to the top.</p>
<p>And when it comes to retirement, rather than relying on my government for socially offered security, I feel more comfortable depending on myself.</p>
<p>Of course, being an entrepreneur has its drawbacks too.  Two weeks ago I worked eighty hours in seven days, and in addition to worrying about putting food on my plate, I enjoy the added stress of anguishing for my employees too.  Don&#8217;t get me wrong; it&#8217;s not all roses.</p>
<p>Despite the stresses of being an entrepreneur, I&#8217;m much happier to be running my own company in today&#8217;s economic climate than I would be working for somebody else.  Past and present employees of some large companies (Lehman Brothers, Bear Stearns, and AIG come to mind) must feel like hapless passengers aboard the Titanic.  However, being an entrepreneur in a small business is like being the captain of a small speed boat.  It doesn&#8217;t make the waters any safer, but at least you&#8217;re in control of navigating them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelrighi.com/2009/03/15/a-recession-fueled-entrepreneur/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Rubbing Sticks and the Magpie&#8217;s Nest</title>
		<link>http://www.michaelrighi.com/2008/11/18/rubbing-sticks-and-the-magpies-nest/</link>
		<comments>http://www.michaelrighi.com/2008/11/18/rubbing-sticks-and-the-magpies-nest/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 01:20:07 +0000</pubDate>
		<dc:creator>Michael Amor Righi</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://www.michaelrighi.com/2008/11/18/rubbing-sticks-and-the-magpies-nest/</guid>
		<description><![CDATA[I was actively involved with the Cub Scouts as a child. On one of our camping expeditions, a troop leader taught us how to start a fire by rubbing sticks together. (To be honest, he tried to teach us how to start a fire with sticks, but in the end nobody &#8212; not even our ...]]></description>
			<content:encoded><![CDATA[<p>I was actively involved with the Cub Scouts as a child.  On one of our camping expeditions, a troop leader taught us how to start a fire by rubbing sticks together.  (To be honest, he <em>tried</em> to teach us how to start a fire with sticks, but in the end nobody &mdash; not even our group leader &mdash;  was able to achieve ignition.)</p>
<p>We began by searching the woods for two dry sticks that were &#8220;thicker than our thumbs and thinner than our wrists.&#8221;  After locating the ideal timber, we sat in a circle and listened to the leader explain the process of starting a fire.  Well, some of the kids listened.  Eager to see flames, I was too impatient to hear the instructions and began furiously rubbing my sticks together.  My troop leader, dismayed that I wasn&#8217;t paying attention, asked me to stop.  He set down his sticks and asked all of the kids to do the same.  Seizing the opportunity, our leader took a moment and shared the story of the Magpie&#8217;s Nest.</p>
<p>The Magpie&#8217;s Nest is a story from the late 1800&#8242;s, published by <a href="http://en.wikipedia.org/wiki/Joseph_Jacobs">Joseph Jacobs</a> in <a href="http://www.amazon.com/English-Everymans-Library-Childrens-Classics/dp/0679428097">English Fairy Tales</a>.  More parable than fairy tale, the Magpie&#8217;s Nest tells the story of how different birds learned to build their nests.  Here&#8217;s an abbreviated version of the tale:</p>
<blockquote><p>All the birds of the air came to the magpie and asked her to teach them how to build nests. For the magpie is the cleverest bird of all at building nests. So she put all the birds round her and began to show them how to do it. First of all she took some mud and made a sort of round cake with it.</p>
<p>&#8220;Oh, that’s how it&#8217;s done,&#8221; said the thrush; and away it flew, and so that&#8217;s how thrushes build their nests.</p>
<p>Then the magpie took some twigs and arranged them round in the mud.</p>
<p>&#8220;Now I know all about it,&#8221; says the blackbird, and off he flew; and that&#8217;s how the blackbirds make their nests to this very day.</p>
<p>Then the magpie put another layer of mud over the twigs.</p>
<p>&#8220;Oh that&#8217;s quite obvious,&#8221; said the wise owl, and away it flew; and owls have never made better nests since.</p>
<p>After this the magpie took some twigs and twined them round the outside.</p>
<p>&#8220;The very thing!&#8221; said the sparrow, and off he went; so sparrows make rather slovenly nests to this day.</p>
<p>Well, then Madge Magpie took some feathers and stuff and lined the nest very comfortably with it.</p>
<p>&#8220;That suits me,&#8221; cried the starling, and off it flew; and very comfortable nests have starlings.</p>
<p>So it went on, every bird taking away some knowledge of how to build nests, but, none of them waiting to the end.</p></blockquote>
<p>My troop leader was making the point that you should always be patient when learning something new.  If you run off and start applying new knowledge too early, it can come back to bite you.  Sometimes you&#8217;ll even be downright dangerous putting partial knowledge to use.  (Imagine trying to fly an airplane after reading a manual for an hour.)</p>
<p>I often think of the Magpie&#8217;s Nest when I deliver <a href="http://www.fieldexpert.com">corporate training</a> seminars.  Some of the courses that I teach are prerequisites for other classes, and I worry that my students will be overconfident with the partial knowledge that I&#8217;m able to share in just a few days.  </p>
<p>For example, in <a href="http://www.fieldexpert.com/training/courses/fx1001">Introduction to Java</a> I teach students how to connect to a database with JDBC.  Unfortunately, I can only afford to spend four hours on this topic in a typical five-day course.  This is plenty of time to explain the basics, but not nearly enough time to cover good style and best practices.  I do my best to explain that in the &#8220;real world&#8221; developers should consider using a database pooling manager, a JNDI registry, and even an Object Relational Mapping framework such as Hibernate.  These are all topics that I teach in more advanced courses.</p>
<p>I do my best to emphasize that what I&#8217;m teaching is a necessary prerequisite but a horrible real-world practice.  Despite my emphasis,  I still worry that students will act as I once did, and start rubbing their sticks together too soon.  </p>
<p>It&#8217;s a difficult problem to solve.  On one hand, I believe that a solid foundation needs to be laid before students can learn best practices.  On the other hand, I fear that my students will never get around to learning more robust techniques.  Part of my fear is fueled by ego.  I worry that a person who knows better might see the handiwork of one of my students and ask who taught them how to build such shoddy software.  (I also worry that their software will be slow, inefficient and insecure, but I&#8217;d be lying if I said egotism didn&#8217;t play a large role.)</p>
<p>I&#8217;ve learned that the best way to solve this problem is to set realistic expectations.  When I begin to deliver a new topic that I know I won&#8217;t have time to cover deeply, I simply explain the situation.  I tell my students that the topic they are about to learn is complex, and that we won&#8217;t have time to discuss all of its nuances.  </p>
<p>After covering the topic as well as time allows, I ask my students to come up with ideas for how they could improve upon what they learned.  Rather than explicitly pointing out the shortcomings of what I just showed them, I believe it&#8217;s important for my students to realize them on their own.  I want them to understand that it&#8217;s important to learn more about the topic before they go to work.  If they arrive at this conclusion on their own, then they will be more likely to take the initiative to learn more.</p>
<p>This advice applies to teachers and students alike.  Trainers should set realistic expectations, and put their students down the path toward learning more.  Students should be patient as they learn, and resist the urge to apply their knowledge too soon.  Impatience is often a sign of passion, and passion is great for learning.  However, it&#8217;s important that passion be channeled and patience be exercised when learning something new.  Remember the tale of the Magpie&#8217;s Nest, and don&#8217;t rub your sticks too soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelrighi.com/2008/11/18/rubbing-sticks-and-the-magpies-nest/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

