<?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>Hey, it&#039;s OPOWER!</title>
	<atom:link href="http://www.heyitsopower.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.heyitsopower.com</link>
	<description>Energy Efficiency Starts at /usr/home</description>
	<lastBuildDate>Tue, 19 Jan 2010 16:56:37 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Tie Tuesday &#8211; more fun that it sounds</title>
		<link>http://www.heyitsopower.com/culture/tie-tuesday-more-fun-that-it-sounds/</link>
		<comments>http://www.heyitsopower.com/culture/tie-tuesday-more-fun-that-it-sounds/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 16:56:28 +0000</pubDate>
		<dc:creator>Dave Copeland</dc:creator>
				<category><![CDATA[Best Practice]]></category>
		<category><![CDATA[Culture]]></category>

		<guid isPermaLink="false">http://www.heyitsopower.com/?p=183</guid>
		<description><![CDATA[
The developers have an informal &#8220;Tie Tuesday&#8221; each work.  It&#8217;s exactly what it sounds like.  And, since you asked, yes, it is more fun to wear a tie when you don&#8217;t have to.  Not everyone does it every week, but this week, we had the best participation yet:

]]></description>
			<content:encoded><![CDATA[<p>
The developers have an informal &#8220;Tie Tuesday&#8221; each work.  It&#8217;s exactly what it sounds like.  And, since you asked, yes, it is more fun to wear a tie when you don&#8217;t have to.  Not everyone does it every week, but this week, we had the best participation yet:
</p>

<div id="attachment_182" class="wp-caption alignnone" style="width: 535px"><img src="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2010/01/our-opower-mascot-on-tie-tuesday.jpeg" alt="Riley Dawg participates in tie tuesday" title="Our Mascot on Tie Tuesday" width="525" height="700" class="size-full wp-image-182" /><p class="wp-caption-text">Riley Dawg participates in tie tuesday</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.heyitsopower.com/culture/tie-tuesday-more-fun-that-it-sounds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Locking screens on Macs with the keyboard</title>
		<link>http://www.heyitsopower.com/uncategorized/locking-screens-on-macs-with-the-keyboard/</link>
		<comments>http://www.heyitsopower.com/uncategorized/locking-screens-on-macs-with-the-keyboard/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 17:56:56 +0000</pubDate>
		<dc:creator>Charles Koppelman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mac quicksilver security]]></category>

		<guid isPermaLink="false">http://www.heyitsopower.com/?p=176</guid>
		<description><![CDATA[Desktop security is a big issue when you have access to massive amounts of data.  As far as plain old terminal security, locking your computer while you&#8217;re away is a pretty basic rule.
We have lots of OSes around the office here &#8211; Ubuntu, Windows, and OSX.  Of those, Ubuntu and Windows natively provide [...]]]></description>
			<content:encoded><![CDATA[<p>Desktop security is a big issue when you have access to massive amounts of data.  As far as plain old terminal security, locking your computer while you&#8217;re away is a pretty basic rule.</p>
<p>We have lots of <abbr title="operating systems">OSes</abbr> around the office here &#8211; Ubuntu, Windows, and OSX.  Of those, Ubuntu and Windows natively provide a way to lock your desktop with a keystroke (Win+L or <abbr title="control alt delete">Ctrl+Alt+Del</abbr>, Enter on Windows and <abbr title="control alt L">Ctrl+Alt+L</abbr> on Ubuntu).  Strangely, Mac gives no easy way to lock your desktop.</p>
<p>We&#8217;ve been using HotCorners for the screen saver, but who wants to touch the mouse if you don&#8217;t have to (especially when you&#8217;re racing to grab a free lunch)?</p>
<p>Enter <a href="http://www.macupdate.com/info.php/id/14831">Quicksilver</a>, everyone&#8217;s favorite application interface.  <small>(There are all sorts of things you can do with Quicksilver and its various plug-ins, but you can look that up yourself.)</small> To set up a keyboard shortcut with Quicksilver to lock your screen (hat tip to <a href="http://www.brynary.com/2007/4/11/mac-tip-keyboard-shortcut-for-screen-saver">Bryan Helmkamp</a>):</p>
<ol>
<li>Create a symbolic link to your screen saver application:<br />
<code>$ sudo ln -s /System/Library/Frameworks/ScreenSaver.framework/Versions/Current/Resources/ScreenSaverEngine.app/ /Applications/Screen\ Saver.app</code></li>
<li>Quicksilver -&gt; Triggers -&gt; Custom Triggers</li>
<li>Add a Hotkey</li>
<li>Find the ScreenSaverEngine by typing and press enter</li>
<li>Double-click the cell in the Trigger column</li>
<li>Choose your hotkey (I like <abbr title="control command backslash">Ctrl+Cmd+\</abbr> since it&#8217;s almost <abbr title="control alt delete">Ctrl+Alt+Del</abbr></li>
<li>Close the window (you may also need to restart <abbr title="Quicksilver">QS</abbr></li>
</ol>
<p>Now set up your System Prefs in Security -&gt; General to require a password immediately after screen saver begins and you&#8217;re set.</p>
<p>Sadly, you need to do this or your screen saver will awake as soon as you release your <abbr title="Quicksilver">QS</abbr> shortcut.  This even happens if you set <abbr title="Quicksilver">QS</abbr> to launch screen saver &#8220;On Release&#8221;.</p>
<p>Anyway, after that, lock screen is just a keystroke away.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heyitsopower.com/uncategorized/locking-screens-on-macs-with-the-keyboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When adding more threads makes it all slower</title>
		<link>http://www.heyitsopower.com/code/when-adding-more-threads-makes-it-all-slower/</link>
		<comments>http://www.heyitsopower.com/code/when-adding-more-threads-makes-it-all-slower/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 18:07:25 +0000</pubDate>
		<dc:creator>Dave Copeland</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[scaling]]></category>
		<category><![CDATA[threads]]></category>

		<guid isPermaLink="false">http://www.heyitsopower.com/?p=154</guid>
		<description><![CDATA[I&#8217;ve been working on a new feature that requires analysis of each individual&#8217;s entire energy-use history.  In other words, I have a process that will touch every single bit of data in our database. This should be a rare thing, so if it takes a while, it&#8217;s not that big of a deal.  [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on a new feature that requires analysis of each individual&#8217;s entire energy-use history.  In other words, I have a process that will touch <strong>every single bit of data</strong> in our database. This should be a rare thing, so if it takes a while, it&#8217;s not that big of a deal.  My initial implementation was on track to complete in&#8230;11 days.</p>
<p>My first thought was: there&#8217;s lots of blocking reading and writing from the database, so adding some threads should speed things up.  While one thread was analyzing Bob&#8217;s energy data, another could be fetching Mary&#8217;s, while another could be updating Joe&#8217;s meta-data with the results.  Or so I thought.</p>
<p>The more threads I added, the slower the entire thing became.  It turned out that <strong>the fastest implementation was a single-threaded one</strong>.  But why?  It all has to do with the diminishing returns one gets from scaling out.</p>
<p>If you think of a task as having a serial component, which cannot be broken up concurrently, and then multiple tasks which <strong>can</strong> be done concurrently, we can analyze the returns we get by increasing the number of available processors (threads, in my case).  This is <a href="http://en.wikipedia.org/wiki/Amdahl%27s_law">Amdahl&#8217;s Law</a> and is exemplified by the following equation (where &#8220;x&#8221; is the number of processors or threads, and &#8220;s&#8221; is the percentage of your overall task that must be serialized; &#8220;y&#8221; is the increase in speed you will see from scaling).<br />
<img class="alignnone size-full wp-image-157" title="Amdahl's Equation" src="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2009/11/amdahl.png" alt="Amdahl's Equation" width="97" height="34" /></p>
<p>When you graph this, it&#8217;s pretty obvious that there are diminishing returns to adding more threads/processors (the graph below assumes that 90% of the overall job can be done concurrently).  As we add threads, we get less and less of a gain in speed.<br />
But there&#8217;s still a gain to get, so what happened to me?</p>
<p><img class="alignnone size-medium wp-image-165" title="Graph of Amdahl's Equation with 10% of our task serialized" src="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2009/11/Picture-3-300x106.png" alt="Graph of Amdahl's Equation with 10% of our task serialized" width="300" height="106" /></p>
<p>Amdahl&#8217;s law is actually pretty optimistic.  It doesn&#8217;t account for the overhead required to synchronize the shared data.  If we account for this, with a new value &#8220;k&#8221; ( the percentage penalty for maintaining consistency), we see that increasing our processors/threads actually starts to hurt us (this equation is in red)!</p>
<p><img class="alignnone size-medium wp-image-161" title="Taking shared state synchronization into account" src="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2009/11/Coherence-300x105.png" alt="Taking shared state synchronization into account" width="300" height="105" /></p>
<p>In my case, almost all of this synchronization is happening within the database; it turns out that almost all the time my process needs is accessing data from the database.  So, I dialed it down to only one thread, and we should be done early next week.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heyitsopower.com/code/when-adding-more-threads-makes-it-all-slower/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving Day</title>
		<link>http://www.heyitsopower.com/uncategorized/moving-day/</link>
		<comments>http://www.heyitsopower.com/uncategorized/moving-day/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 14:56:32 +0000</pubDate>
		<dc:creator>Tom Vaughan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.heyitsopower.com/?p=119</guid>
		<description><![CDATA[We officially out-grew our Rosslyn space today and moved in to a new space right next to the Court House metro stop.]]></description>
			<content:encoded><![CDATA[<p>We officially out-grew our Rosslyn space today and moved in to a new space right next to the Court House metro stop.</p>
<p><img class="alignright size-medium wp-image-122" title="movingday_kitchen" src="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2009/10/movingday_kitchen1-300x226.png" alt="movingday_kitchen" width="300" height="226" /> We&#8217;ve got a new kitchen area that&#8217;s big enough to hold the company for a stand-up meeting&#8230;we haven&#8217;t had that capability for what seems like forever.   There&#8217;s a pantry off to the left of the image (not shown) stocked with drinks, chips, pens and pads.</p>
<p><img class="alignright size-medium wp-image-123" title="movingday_lobby" src="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2009/10/movingday_lobby-300x235.png" alt="movingday_lobby" width="300" height="235" />We&#8217;ve got a nice lobby area too&#8230;through the windows in the background one can see the National Cathedral, Georgetown and most of Northwest DC. One of the things we&#8217;re all looking forward to most about the new space is the number of break away areas and conference rooms.</p>
<p><img class="alignleft size-medium wp-image-126" title="movingday_sasquatch" src="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2009/10/movingday_sasquatch-225x300.png" alt="movingday_sasquatch" width="225" height="300" />Our working space is, as you can see, very open.  In the old office, that was occasionally annoying because sound echoed off the relatively confined space and amplified the drone of office sounds.  This space is well carpeted and more &#8220;open&#8221; so it seems quite a bit quieter.<br />
The guy in the middle of this picture actually does the &#8220;Messin&#8217; with Sasquatch&#8221; series of commercials for Jack Links Beef Jerkey.  He got the part because he needed less time in costume than the other actors.</p>
<p>The new location means a whole new suite of lunch places to try out.  That&#8217;s a relief because the Chop&#8217;t -&gt; Chipotle -&gt; Chop&#8217;t cycle was wearing pretty thin back in Rosslyn.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heyitsopower.com/uncategorized/moving-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slides on Improving Your Agile Development Process</title>
		<link>http://www.heyitsopower.com/development/slides-on-improving-your-agile-development-process/</link>
		<comments>http://www.heyitsopower.com/development/slides-on-improving-your-agile-development-process/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 17:32:40 +0000</pubDate>
		<dc:creator>Dave Copeland</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Workflow]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[devdays]]></category>
		<category><![CDATA[process improvement]]></category>

		<guid isPermaLink="false">http://www.heyitsopower.com/?p=131</guid>
		<description><![CDATA[Dead last, after the headline act, and after Joel Spolsky told everyone to go home, I did a lightning talk at DC&#8217;s recent DevDays (A StackOverflow production) on how we have used process metrics from our bug tracker to improve our process.
Improving your Agile Process
View more documents from David Copeland.

]]></description>
			<content:encoded><![CDATA[<p>Dead last, after the headline act, and after Joel Spolsky told everyone to go home, I did a lightning talk at DC&#8217;s recent DevDays (<a href="http://www.stackoverflow.com">A StackOverflow</a> production) on how we have used <a href="/development/measuring-our-awesomeness-iteration-by-iteration/">process metrics</a> from our bug tracker to improve our process.</p>
<div id="__ss_2359457" style="width: 425px; text-align: left;"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" title="Improving your Agile Process" href="http://www.slideshare.net/davetron5000/measuring-agile-process-shorter-2359457">Improving your Agile Process</a><object style="margin:0px" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=measuringagileprocess-shorter-091027130310-phpapp01&amp;rel=0&amp;stripped_title=measuring-agile-process-shorter-2359457" /><param name="allowfullscreen" value="true" /><embed style="margin:0px" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=measuringagileprocess-shorter-091027130310-phpapp01&amp;rel=0&amp;stripped_title=measuring-agile-process-shorter-2359457" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div style="font-size: 11px; font-family: tahoma,arial; height: 26px; padding-top: 2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">documents</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/davetron5000">David Copeland</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.heyitsopower.com/development/slides-on-improving-your-agile-development-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tweaking the Agile Calendar</title>
		<link>http://www.heyitsopower.com/development/tweaking-the-agile-calendar/</link>
		<comments>http://www.heyitsopower.com/development/tweaking-the-agile-calendar/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 16:24:57 +0000</pubDate>
		<dc:creator>Tom Vaughan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">http://www.heyitsopower.com/?p=100</guid>
		<description><![CDATA[For the first five iterations, the dev team had been following this schedule:
<ul>
	<li>Iteration N, Week 1 = Design for iteration N and 2nd week of QA for iteration N-1</li>
	<li>Iteration N, Week 2 = Development</li>
	<li>Iteration N, Week 3 = Development</li>
	<li>Iteration N, Week 4 = 1st week of QA for iteration N</li>
	<li>Iteration N, Week 5 / Iteration N +1, Week 1 = 2nd week of QA for iteration N, design for iteration N + 1</li>
</ul>
We started to notice a couple things that have caused us to try out a new schedule in our upcoming 6th iteration.]]></description>
			<content:encoded><![CDATA[<p>For the first five iterations, the dev team had been following this schedule:</p>
<ul>
<li>Iteration N, Week 1 = Design for iteration N and 2nd week of QA for iteration N-1</li>
<li>Iteration N, Week 2 = Development</li>
<li>Iteration N, Week 3 = Development</li>
<li>Iteration N, Week 4 = 1st week of QA for iteration N</li>
<li>Iteration N, Week 5 / Iteration N +1, Week 1 = 2nd week of QA for iteration N, design for iteration N + 1</li>
</ul>
<p>We started to notice a couple things that have caused us to try out a new schedule in our upcoming 6th iteration.</p>
<p>First, we realized that we left very little time for fit to hit the shan.  If we had a tough QA cycle, we didn&#8217;t design enough.  If we didn&#8217;t design enough, we underestimated how much development would be needed (i.e. too many story points).  If we had too many story points, we&#8217;d go in to QA late.  And the cycle repeats.</p>
<p>Note that many of you Agile purists out there will cringe at the above description, especially this sentence: &#8220;If we had too many story points, we&#8217;d go in to QA late.&#8221;</p>
<p>I know.  We cringed too.</p>
<p>We&#8217;re committing to a couple new explicit practices going in to our next iterations:</p>
<ol>
<li>More formal velocity check-ins.  If less than 50% of our story points are closed by COB of the first Friday, we should have a come-to-jeebus meeting on Monday morning.</li>
<li>We absolutely need to respect the impact that dedicated design time has on the effectiveness of everything down-stream.  It&#8217;s too easy to say &#8220;Agile&#8221; as a synonym for &#8220;code by the seat of your pants,&#8221; but that&#8217;s not what it&#8217;s about and we know that.  We just need to get better at dedicating time to it.</li>
</ol>
<p>So with those ideas in mind, we&#8217;re moving to something like the following:</p>
<p><img class="aligncenter size-full wp-image-107" title="iteration_detail_screenprint_cropped" src="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2009/10/iteration_detail_screenprint_cropped.PNG" alt="iteration_detail_screenprint_cropped" width="1050" height="246" /></p>
<p>It&#8217;s a five-week iteration, with 2 solid weeks built in for QA and 1 dedicated week of design.</p>
<p>I think if we can get to a point where our regression and automation testing is good enough (and we develop enough confidence our automated tests), that we may be able to get back to a 4 week cycle.  In the mean time, we&#8217;re going to see if we can actually go faster by slowing down.</p>
<p>Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heyitsopower.com/development/tweaking-the-agile-calendar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Agile impressions, 5 iterations in&#8230;</title>
		<link>http://www.heyitsopower.com/development/agile-impressions-5-iterations-in/</link>
		<comments>http://www.heyitsopower.com/development/agile-impressions-5-iterations-in/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 15:45:38 +0000</pubDate>
		<dc:creator>Tom Vaughan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">http://www.heyitsopower.com/?p=92</guid>
		<description><![CDATA[I'm assuming from the amount of hype out there that if a development team isn't using "Agile" right now, they probably feel like the one kid on the block who didn't have a Nintendo (with the Duck Hunt option, of course).

<img class="alignright size-medium wp-image-93" title="duckhunt" src="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2009/10/duckhunt-300x165.png" alt="duckhunt" width="300" height="165" />Well, we here at OPOWER loved our Duck Hunt, so we've been attempting to use "Agile" for the last 5 months or so.  Agile means a lot of things to a lot of people, so I'll spell out what it means for us and then reflect on some of the pros, cons, and room-for-improvement in our practice.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m assuming from the amount of hype out there that if a development team isn&#8217;t using &#8220;Agile&#8221; right now, they probably feel like the one kid on the block who didn&#8217;t have a Nintendo (with the Duck Hunt option, of course).</p>
<p><img class="alignright size-medium wp-image-93" title="duckhunt" src="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2009/10/duckhunt-300x165.png" alt="duckhunt" width="300" height="165" />Well, we here at OPOWER loved our Duck Hunt, so we&#8217;ve been attempting to use &#8220;Agile&#8221; for the last 5 months or so.  Agile means a lot of things to a lot of people, so I&#8217;ll spell out what it means for us and then reflect on some of the pros, cons, and room-for-improvement in our practice.</p>
<ul>
<li>&lt;cringe&gt;Embrace change&lt;/cringe&gt; (duh)&#8230;but especially in this startup environment, we need to remember to do no more than is necessary, because any &#8220;extra mile&#8221; functionality is likely to be totally unused as priorities and direction changes.</li>
<li>Be scientific about development&#8230;<a href="/development/measuring-our-awesomeness-iteration-by-iteration/">measure, measure measure</a>.  We track velocities, average-open-days-per-bug-by-severity, etc.</li>
<li>&#8220;Individuals and interactions over processes and tools&#8221;&#8230;we self-organize, aren&#8217;t afraid to try new combinations of responsibilities and assignments, provide regular feedback to each other and we don&#8217;t dictate a development environment or technology stack.</li>
</ul>
<p>The best thing about the technical side of this company is that the entire development team and project management team is on-board with the idea of rapid iterations, continuous improvement and a focus on technical excellent and &#8220;maximizing the amount of work not done.&#8221;</p>
<p>This manifests itself in several practices that I&#8217;d chalk up in the &#8220;pro&#8221; column:</p>
<ul>
<li>Light weight documentation&#8230;use wikis and person-to-person contact (recorded on bug tickets for posterity) to flush out designs and requirement.</li>
<li>Continuous integration and continuous improvement (we just installed Sonar last week&#8230;we&#8217;ll blog about its effectiveness later)</li>
<li>Regular code reviews, 360 reviews, and &#8220;how did we collectively perform this iteration&#8221; meetings</li>
<li>Few formal meetings, many informal, impromptu &#8220;drive bys&#8221;</li>
</ul>
<p><strong>But the best thing about our Agile environment</strong> right now is that it is a work-in-progress &#8220;process framework&#8221; that repeats quickly enough for us to remember what to improve.</p>
<p>What do I mean by that?</p>
<p>It&#8217;s my impression that on the longer, more drawn-out software engagements (say&#8230;6 or 12 months), you can make a series of mistakes in the design phase, the build phase, the qa phase, etc. and then by the time you&#8217;re on the next project you repeat all those mistakes again because it&#8217;s been 6 or 12 months since you last learned your lesson.  Instead of concrete lessons, you develop a career full of &#8220;gut instincts.&#8221;</p>
<p>We&#8217;re still honing in on the right amount of measurement and process for OPOWER, but because we&#8217;re all on board with the idea of quick-hit iterations with a continuous focus on improvement, I have high hopes for our ability to become (stay?) a top-notch software engineering organization.</p>
<p><img class="alignleft size-medium wp-image-95" title="duckhunt_many" src="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2009/10/duckhunt_many-300x213.png" alt="duckhunt_many" width="300" height="213" />There&#8217;s lots of room for improvement, that I think I&#8217;ll save for another post on another day.  We could definitely stand to &#8220;communicate out&#8221; more&#8211; with the product team and with our operations team.  We need to do a better job of making sure our iterations are lining up with the corporate strategy.  We could improve on the whole &#8220;customer collaboration over contract negotiation&#8221; part of the manifesto.  But you can only squeeze that trigger so fast, right?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heyitsopower.com/development/agile-impressions-5-iterations-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best javadoc ever</title>
		<link>http://www.heyitsopower.com/uncategorized/best-javadoc-ever/</link>
		<comments>http://www.heyitsopower.com/uncategorized/best-javadoc-ever/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 21:40:47 +0000</pubDate>
		<dc:creator>Yoni Ben-Meshulam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[javadoc]]></category>

		<guid isPermaLink="false">http://www.heyitsopower.com/uncategorized/best-javadoc-ever/</guid>
		<description><![CDATA[
/**
  * Whatever to satisfy whatever.
  *
  * @author dave.copeland
  */

]]></description>
			<content:encoded><![CDATA[<pre name='code' class='java'>
/**
  * Whatever to satisfy whatever.
  *
  * @author dave.copeland
  */
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.heyitsopower.com/uncategorized/best-javadoc-ever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>expectations==trouble</title>
		<link>http://www.heyitsopower.com/uncategorized/expectationstrouble/</link>
		<comments>http://www.heyitsopower.com/uncategorized/expectationstrouble/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 23:34:31 +0000</pubDate>
		<dc:creator>Yoni Ben-Meshulam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.heyitsopower.com/?p=81</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-82" title="wtf_javascript" src="http://www.heyitsopower.com/wordpress/wp-content/uploads/2009/09/wtf_javascript.png" alt="expectations will get you in trouble :)" width="480" height="480" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.heyitsopower.com/uncategorized/expectationstrouble/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>When is a null not a null?</title>
		<link>http://www.heyitsopower.com/code/when-is-a-null-not-a-null/</link>
		<comments>http://www.heyitsopower.com/code/when-is-a-null-not-a-null/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 14:48:15 +0000</pubDate>
		<dc:creator>Tom Vaughan</dc:creator>
				<category><![CDATA[Best Practice]]></category>
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.heyitsopower.com/?p=74</guid>
		<description><![CDATA[tl/dr: <em>Don't have a non-null object's .toString() display "null". It's confusing and not helpful when looking at object states in IDE debuggers.</em>

I recently converted the attribute of our Person POJO that stored a user's email address from a java.lang.String to a javax.mail.InternetAddress.  Call it not enough testing or lack of imagination, but I introduced a Null Pointer Exception in a back-office web flow where a new user is created for our customer service application.  When a new CSR account is created and the email address is left blank, an NPE gets thrown up.  Embarrassing, but easy to fix, right?]]></description>
			<content:encoded><![CDATA[<p>tl/dr: <em>Don&#8217;t have a non-null object&#8217;s .toString() display &#8220;null&#8221;. It&#8217;s confusing and not helpful when looking at object states in IDE debuggers.</em></p>
<p>I recently converted the attribute of our Person POJO that stored a user&#8217;s email address from a java.lang.String to a javax.mail.InternetAddress.  Call it not enough testing or lack of imagination, but I introduced a Null Pointer Exception in a back-office web flow where a new user is created for our customer service application.  When a new CSR account is created and the email address is left blank, an NPE gets thrown up.  Embarrassing, but easy to fix, right?</p>
<p>Just looking at the stack trace narrows it down immediately:</p>
<pre class="java">2009-09-09 16:56:53,636 WARN  [btpool0-1] [REPORT] [WARN] Handler execution resulted in exception
java.lang.NullPointerException
	at javax.mail.internet.InternetAddress.parse(InternetAddress.java:609)
	at javax.mail.internet.InternetAddress.parse(InternetAddress.java:569)
	at javax.mail.internet.InternetAddress.(InternetAddress.java:105)
	at poscore.db.InternetAddressUserType.deepCopy(InternetAddressUserType.java:93)
	at org.hibernate.type.CustomType.deepCopy(CustomType.java:179)
	at org.hibernate.type.TypeFactory.deepCopy(TypeFactory.java:374)</pre>
<p>Ahh&#8230;yeah&#8230;that custom hibernate type I wrote to translate VARCHARs to InternetAddresses and vice versa.  Ok, what does that deep copy method look like?</p>
<pre class="java">    public Object deepCopy(Object value) throws HibernateException {
        if(value == null) {
            return null;
        }
        InternetAddress original = (InternetAddress)value;
        InternetAddress copy = null;
        try {
            copy = new InternetAddress(original.getAddress());
        }
        catch (AddressException ex) {
            throw new HibernateException("Unable to deep copy email address '" + original.getAddress() + "'");
        }
        return copy;
    }</pre>
<p>It turns out, the error is right here:</p>
<pre class="java">            copy = new InternetAddress(original.getAddress());</pre>
<p>You can&#8217;t pass a null to the InternetAddress constructor.  It was late in the day and I must not have internalized that there&#8217;s no way <em>value </em>or <em>original</em> could be null, because my first instinct was that the NPE was actually the result of calling &#8220;.getAddress()&#8221; on a null <em>original</em> object&#8230;.not that the constructor can&#8217;t take a null.</p>
<p>While I was on that assumption (that it was the <em>original</em> object that was null), I fired up my debugger and got confused by what appeared to be null-checks failing to check nulls. Check out this screen shot of the NPE about to be thrown after what appears to be 2 null checks failing to prevent the NPE:<br />
<img class="aligncenter size-full wp-image-77" title="null_internet_address" src="http://www.heyitsopower.com/wordpress/wp-content/uploads/2009/09/null_internet_address.png" alt="null_internet_address" width="705" height="606" /></p>
<p>The arrows marked (A) and (B) shows what appear to be null objects passing null checks (in the top pane) even though they&#8217;re being reported as null (in the bottom pane).  The green line (C) shows the code falling through to that line just before it throws up the NPE.</p>
<p>Of course, <em>value</em> and <em>original</em> aren&#8217;t null at all&#8230;it&#8217;s just that their .toString() methods report them to be null.  Here&#8217;s the InternetAddress.toString method:</p>
<pre class="java">  276       public String toString() {
  277   	if (encodedPersonal == null &amp;&amp; personal != null)
  278   	    try {
  279   		encodedPersonal = MimeUtility.encodeWord(personal);
  280   	    } catch (UnsupportedEncodingException ex) { }
  281
  282   	if (encodedPersonal != null)
  283   	    return quotePhrase(encodedPersonal) + " &lt;" + address + "&gt;";
  284   	else if (isGroup() || isSimple())
  285   	    return address;
  286   	else
  287   	    return "&lt;" + address + "&gt;";
  288       }</pre>
<p>In my situation, I fell in to the &#8220;else if(isGroup() || isSimple())&#8221; case, which returns <em>address</em>, which is null, so the .toString() for the whole InternetAddress object is &#8220;null.&#8221;</p>
<p>I think the toString() method could benefit from another null-check right at line 284, which would mean an InternetAddress object with a null internal <em>address</em> String would display as &#8220;&lt;null&gt;&#8221;&#8230;that&#8217;s a more immediate clue that the object itself isn&#8217;t null.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heyitsopower.com/code/when-is-a-null-not-a-null/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
