<?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, 27 Jul 2010 20:14:37 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Maven-izing Google&#8217;s Data Client Java Library</title>
		<link>http://www.heyitsopower.com/development/maven-izing-googles-data-client-java-library/</link>
		<comments>http://www.heyitsopower.com/development/maven-izing-googles-data-client-java-library/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 20:09:14 +0000</pubDate>
		<dc:creator>Tom Vaughan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Maven]]></category>

		<guid isPermaLink="false">http://www.heyitsopower.com/?p=238</guid>
		<description><![CDATA[Quick and dirty perl script for mvn deploy:deploy-file for the 40+ JARs google ships in it java client bundle.]]></description>
			<content:encoded><![CDATA[<p>OPOWER&#8217;s first Innovation Day was a lot of fun.  I was waiting about 30 minutes for my primary project (building an AWS machine image for our hudson slave) to complete and I got sucked in to a different project involving automatically downloading google analytics for all the traffic on all the websites we host for our clients.</p>
<p>Clicking around google&#8217;s well-documented &#8220;get started&#8221; guides, it looked like they haven&#8217;t made their client JARs available in any MVN repos anywhere.  There is a (not-google-sponsored) source forge project that points to a sonatype repo, but instead of adding another 3rd party repo to our small but growing list, I figured it&#8217;d be easier for small proof of concept purposes to just manually install the google JARs in OPOWER&#8217;s repo (thereby making them accessible to all our developer&#8217;s boxes).</p>
<p>It quickly became clear that the number of JARs google ships with makes it faster and less error prone to script the mvn repo installation than doing manual command line copy &amp; pasting.  Lo, my gift to the world:</p>
<ul>
<li>Grab latest JARs from the &#8220;gdata-java&#8221; link here: <a href="http://code.google.com/p/gdata-java-client/downloads/list">http://code.google.com/p/gdata-java-client/downloads/list</a></li>
<li>Unzip on the server hosting your company&#8217;s mvn repo</li>
<li>cd down in to ./gdata/java/lib</li>
<li>Make a file &#8216;installall.pl&#8217; in that lib directory:</li>
<pre class="java">#!/usr/bin/perl -w

my @jars = `ls *.jar`;
chomp(@jars);
foreach my $jar (@jars) {
  if($jar =~ /(.*)-(\d\.\d)\.jar/) {
    my $cmd = "./install.pl --artifactId $1 --version $2 --jar $jar";
    open(CMD, "$cmd|") or die "Could not execute $cmd $!";
    while(&lt;CMD&gt;) {
       print $_;
    }
   close(CMD);
  }
}</pre>
<li>Still in that directory, make another file &#8216;install.pl&#8217;:</li>
<pre class="java">#!/usr/bin/perl -w

use strict;
use warnings;
use Getopt::Long;

sub usage();

my $artifactId;
my $version;
my $jar;
GetOptions('artifactId=s' =&gt; \$artifactId ,
           'version=s' =&gt; \$version,
           'jar' =&gt; \$jar);
die usage() unless ($artifactId &amp;&amp; $version &amp;&amp; $jar);

my $cmd = "mvn deploy:deploy-file " .
      "-DgroupId=com.google.gdata " .
      "-DartifactId=$artifactId " .
      "-Dversion=$version " .
      "-Dfile=$jar " .
      "-Dpackaging=jar " .
      "-DgeneratePom=true " .
      "-Durl=file:///opt/mvn_repo " .  &lt;---  change this for your env
      "-Drepository=opower_local";  &lt;--- change this for your env
print "executing command = $cmd\n";
$cmd = "date";
open(CMD, "$cmd|") or die "Could not exec $cmd $!";
while(&lt;CMD&gt;) {
    print $_;
}
close(CMD);

sub usage() {
    print "Usage: ./install.pl [--artifactId artifactId] [--version version] [--jar jarfile]\n";
    print "Example: ./install.pl --artifactId gdata-webmastertools --version 1.0 --jar gdata-webmastertools-1.0.jar\n";
    exit 1;
}</pre>
<li>Don&#8217;t forget to chmod 755 *.pl</li>
<li>Then just run ./installall.pl and all those google JARs should get installed in your repo</li>
</ul>
<p>That assumes the &#8220;mvn&#8221; executable was in your path and that you run the scripts from within the same directory as all the JARs, but it&#8217;s easily modified for whatever your situation may be.</p>
<p>Note that relative to ./lib there are 2 jars in ../deps/ that you should also install in your repo because the google JARs to avoid ClassNotFoundExceptions in some runtime code paths.</p>
<p>Once in, you should be able to boot strap a mvn client project against a Google Data source with a pom not too dissimilar from:</p>
<pre class="java">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;artifactId&gt;foo&lt;/artifactId&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;Google Client Example&lt;/name&gt;

  &lt;scm&gt;
    &lt;developerConnection&gt;foo&lt;/developerConnection&gt;
  &lt;/scm&gt;

  &lt;dependencies&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;com.google.gdata&lt;/groupId&gt;
        &lt;artifactId&gt;gdata-core&lt;/artifactId&gt;
        &lt;version&gt;1.0&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;com.google.gdata&lt;/groupId&gt;
        &lt;artifactId&gt;gdata-analytics&lt;/artifactId&gt;
        &lt;version&gt;2.1&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;com.google.gdata&lt;/groupId&gt;
        &lt;artifactId&gt;gdata-client&lt;/artifactId&gt;
        &lt;version&gt;1.0&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;com.google&lt;/groupId&gt;
        &lt;artifactId&gt;google-collect&lt;/artifactId&gt;
        &lt;version&gt;1.0-rc1&lt;/version&gt;
    &lt;/dependency&gt;
  &lt;/dependencies&gt;
&lt;/project&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.heyitsopower.com/development/maven-izing-googles-data-client-java-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Heisenberg&#8217;s Key Performance Indicators</title>
		<link>http://www.heyitsopower.com/development/heisenbergs-key-performance-indicators/</link>
		<comments>http://www.heyitsopower.com/development/heisenbergs-key-performance-indicators/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 20:13:49 +0000</pubDate>
		<dc:creator>Tom Vaughan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Product]]></category>

		<guid isPermaLink="false">http://www.heyitsopower.com/?p=228</guid>
		<description><![CDATA[How do you objectively measure the progress of a software engineering team from iteration to iteration when they are so many variables (human and otherwise)?]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2010/07/Heisenberg.jpg"><img class="alignright size-medium wp-image-229" title="Heisenberg, when younger." src="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2010/07/Heisenberg-209x300.jpg" alt="A picture of Heisenberg." width="209" height="300" /></a>I was <span style="text-decoration: line-through;">trolling</span> trawling through reddit waiting for a JAR to compile and <a href="http://nerds-central.blogspot.com/2010/07/development-management-act-of.html">found this blog post</a>.  That blog made a couple claims that had crossed my mind a couple months ago when our engineering director solicited  feedback about using Key Performance Indicators for the dev team.  The blog post&#8217;s point wasn&#8217;t so much that the <em>act </em>of measuring a team changes its performance but rather that when the team is aware of what&#8217;s being measured, it naturally &#8220;cheats&#8221; in ways to maximize the measured value.  The first comment on the blog post alerted me to a law I hadn&#8217;t known about, but which sounds pretty intuitively correct:</p>
<p><a href="http://en.wikipedia.org/wiki/Goodhart%27s_law">Goodhart&#8217;s Law</a>: <em>Any observed statistical regularity will tend to collapse once pressure is placed upon it for control purposes</em></p>
<p>Here at OPOWER, developers and product managers don&#8217;t deal with KPIs on a day-to-day basis&#8230;.I think it&#8217;s mostly a management-level &#8220;let&#8217;s starting capturing some numbers over several months and see if there&#8217;s anything out-of-whack&#8221; kind of thing.</p>
<p>In terms of development KPIs, some of the things we thought it might be interesting to collect included:</p>
<ul>
<li>story points delivered per iteration</li>
<li>% of story points (aggregate) done in an iteration that were planned at the beginning</li>
<li>% QA coverage of production (automated)</li>
<li>etc.</li>
</ul>
<p>The &#8220;story points delivered per iteration&#8221; is, I think, precisely the kind of thing Goodhart was talking about when he made up his law.  <em>That said</em>, we are a business and we are expected to work and be productive, so it isn&#8217;t exactly a satisfying for a VP or CEO to hear from their dev team &#8220;sorry, you can&#8217;t measure us because we&#8217;ll just skew the measurement number to please you.&#8221;  So what&#8217;s management to do with their IT cabal?</p>
<p><em>Assuming</em> you could normalize what story points mean across different teams, and <em>assuming</em> you can account for &#8220;point inflation&#8221; and <em>assuming</em> you accurately tracked vacations and network outages and late requirements and all the other stuff that goes along with uncertainty in exactly how much gets delivered in an iteration, must you also assume that the team gradually skews the number to meet the goal?  What if the goal was kept secret?  What if the team didn&#8217;t know they were being measured?  That&#8217;s hardly a way to foster a healthy relationship between management and product development.<a href="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2010/07/heisenberg_bb.jpg"><img class="alignright size-full wp-image-230" title="Heisenberg, slightly older ;-)" src="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2010/07/heisenberg_bb.jpg" alt="A picture of Walt from Breaking Bad" width="160" height="247" /></a></p>
<p>One way around this dilemma is to find some totally objective metric in the software engineering process.  In other words, if you could apply KPIs to &#8220;number of sprockets coming off the assembly line such that each sprocket is within .1% tolerance,&#8221; what is a similar kind of thing in our iteration process we could measure?  I.e., one that doesn&#8217;t easily fall prey to inflation or manipulation?  If you can find something like that, lemme know.  Until then, I won&#8217;t be holding my breath.</p>
<p>Another possible option would be to go ahead and publicly measure highly subjective KPIs anyway and ask the measurees (us) to be as objective as possible when measuring.  I.e., fly in the face of Goodhart&#8217;s Law.  After all, it&#8217;s just a Law.  Like De Morgan&#8217;s Law, except maybe with a bit more wiggle room.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heyitsopower.com/development/heisenbergs-key-performance-indicators/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Boxed primitives and ==</title>
		<link>http://www.heyitsopower.com/culture/boxed-primitives-and/</link>
		<comments>http://www.heyitsopower.com/culture/boxed-primitives-and/#comments</comments>
		<pubDate>Thu, 27 May 2010 18:25:06 +0000</pubDate>
		<dc:creator>Dave Copeland</dc:creator>
				<category><![CDATA[Best Practice]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Culture]]></category>

		<guid isPermaLink="false">http://www.heyitsopower.com/?p=215</guid>
		<description><![CDATA[One part of programming culture at OPOWER is to program defensively, providing useful information when contracts are violated.   What does this have to do with boxed primitives?  Getting an assertion message of &#8220;Person 1001&#8217;s customer id 109032 didn&#8217;t match the passed-in customer&#8217;s id of 109032&#8243; seemed logically impossible, but was somehow true.
But [...]]]></description>
			<content:encoded><![CDATA[<p>One part of programming culture at OPOWER is to program defensively, providing useful information when contracts are violated.   What does this have to do with boxed primitives?  Getting an assertion message of &#8220;Person 1001&#8217;s customer id 109032 didn&#8217;t match the passed-in customer&#8217;s id of 109032&#8243; seemed logically impossible, but was somehow true.</p>
<p>But first, let&#8217;s talk about defensive coding and how we do it.  For example:</p>
<pre name="code" class="java">/**
 * frobs the bar and baz.
 * @param bar the bar to frob; may not be null
 * @param baz the baz to from; must be positive
 */
public String frob(String bar, int baz) {
  if (bar.length() &gt; baz) {
    return bar.substring(baz);
  }
  else {
    return bar;
  }
}</pre>
<p>If the contract is violated by the caller, we will get a <code>NullPointerException</code> or some other <code>StringIndexOutOfBoundsException</code>.  Not too helpful.  Instead, we use an internal validator helper class to provide useful messages.  This is <strong>crucial</strong> for properly understanding bugs that occur in production; there&#8217;s nothing worse than coming into work to find a <code>NullPointerException</code> in your inbox and no clue what went wrong.</p>
<pre name="code" class="java">/**
 * frobs the bar and baz.
 * @param bar the bar to frob; may not be null
 * @param baz the baz to from; must be positive
 */
public String frob(String bar, int baz) {
  Validate.notNull(bar,"bar must not be null to frob");
  Validate.isTrue(baz &gt; 0,"baz must be positive");
  if (bar.length() &gt; baz) {
    return bar.substring(baz);
  }
  else {
    return bar;
  }
}</pre>
<p><code>Validate.*</code>  methods essentially throw <code>IllegalArgumentException</code> if what they are checking for fails.<br />
We use this pattern extensively, even in constructors of simple data-structure style objects.  This (plus keeping this things immutable) allows users of these objects to safely rely upon the <code>get</code> methods behaving properly. I had need of a class to hold both a <code>Person</code> (representing a website user) and a <code>Customer</code> (representing a utility-company customer).  This class (called, naturally, <code>PersonAndCustomer</code>), takes both objects in its constructor and requires that they are both non-null.  As a further sanity check, I wanted to make sure that the <code>Person</code>&#8217;s <code>customerId</code> matched the id of the <code>Customer</code> that was being passed in (i.e. that they represented the same actual human in the real world):</p>
<pre name="code" class="java">public PersonAndCustomer(Person p, Customer c) {
  Validate.notNull(p,"Person may not be null");
  Validate.notNull(c,"Customer may not be null");
  Validate.isTrue(p.getCustomerId() == c.getId(),
    "Person %d's customer id %d didn't match passed-in customer's id %d",
    p.getId(),
    p.getCustomerId(),
    c.getId());
  ...
}</pre>
<p>Looks pretty inocuous, right?  Well, because these objects are Hibernate-managed, all of our ids are <code>Long</code> and not <code>long</code>.  So, my <code>isTrue</code> validation is really checking that the person&#8217;s <code>customerId</code> <em>object</em> is the <em>same object</em> as the customer&#8217;s <code>id</code> object.  What&#8217;s worse, in several months of development and production deployment, these two objects <em>happened to be the same</em>.</p>
<p>Until this week; we were testing our application for a new client and I got the error posted above (&#8220;Person 1001&#8217;s customer id 109032 didn&#8217;t match the passed-in customer&#8217;s id of 109032&#8243;).  It seems that much like how the JVM will re-use string objects, it also will sometimes re-use boxed objects as well.  But not always.  The fix for this is obvious, but I wanted to make sure I could actually recreate this situation.  So, I created a test that gave both the <code>Person</code> and <code>Customer</code> the same <em>value</em> for the customer id, but as different objects. and verified that the class could still be constructed.  Sure enough, the test failed.  The fix:</p>
<pre name="code" class="java">public PersonAndCustomer(Person p, Customer c) {
  Validate.notNull(p,"Person may not be null");
  Validate.notNull(c,"Customer may not be null");
  Validate.isTrue(p.getCustomerId().equals(c.getId()),
    "Person %d's customer id %d didn't match passed-in customer's id %d",
    p.getId(),
    p.getCustomerId(),
    c.getId());
  ...
}</pre>
<p>What&#8217;s interesting is that if one end of the <code>==</code> is a primitive, the JVM will unbox the other one and the test succeeds:</p>
<pre name="code" class="java">Long l1 = new Long(45L);
Long l2 = new Long(45L);

System.out.println(l1 == l2);      // false
System.out.println(l1.equals(l2)); // true
System.out.println(l1 == 45L);     // true!</pre>
<p>The moral of the story is to always know what you are comparing.  Might even be best to always use <code>.equals()</code> unless the compiler complains.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heyitsopower.com/culture/boxed-primitives-and/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Standing Desk</title>
		<link>http://www.heyitsopower.com/development/the-standing-desk/</link>
		<comments>http://www.heyitsopower.com/development/the-standing-desk/#comments</comments>
		<pubDate>Mon, 24 May 2010 15:25:31 +0000</pubDate>
		<dc:creator>Tom Vaughan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[ergonomics]]></category>
		<category><![CDATA[standing desk]]></category>

		<guid isPermaLink="false">http://www.heyitsopower.com/?p=204</guid>
		<description><![CDATA[Dave, My OPOWER colleague switched from a normal office desk &#38; chair situation to a standing desk more than a year ago and ever since, I&#8217;d been considering doing the same.  For my entire programming career, I&#8217;ve had terrible posture in my chair and tended to do &#8220;the maxell pose&#8221; where my wrists are resting [...]]]></description>
			<content:encoded><![CDATA[<p>Dave, My OPOWER colleague switched from a normal office desk &amp; chair situation to a standing desk more than a year ago and ever since, I&#8217;d been considering doing the sa<a href="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2010/05/maxell_blown_away.jpg"><img class="alignright size-medium wp-image-207" title="maxell_blown_away" src="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2010/05/maxell_blown_away-300x199.jpg" alt="" width="300" height="199" /></a>me.  For my entire programming career, I&#8217;ve had terrible posture in my chair and tended to do &#8220;the maxell pose&#8221; where my wrists are resting at a severe angle on the lip of my desk.</p>
<p>There have been a couple articles recently about the effects of sitting in a chair all day that pushed me to action.  This <a href="http://www.businessweek.com/magazine/content/10_19/b4177071221162.htm" target="_blank">article from business week</a> was particularly eye opening.</p>
<p>OPOWER is super cool about empowering developers to be more productive/comfortable/happy/etc so getting approval for expensing some generic Ikea furniture was as easy as a head nod.  A couple weekends ago, I drove down to Ikea and picked up an <a href="http://www.ikea.com/us/en/catalog/products/S49843462">Utby desk</a> for about $100 and an <a href="http://www.ikea.com/us/en/catalog/products/90167477">Ekby Viktor</a> shelf with <a href="http://www.ikea.com/us/en/catalog/products/00054564">Capita</a> legs for another $20 or so.  I didn&#8217;t think the desk by itself was going to be quite at the recommended elbow height, so I swung by Home Depot and got 4 cinder blocks too.</p>
<p>I ended up putting a stack of paper between my monitor and the shelf to really get it up at eye level and I&#8217;m pretty happy with the way it turned out:</p>
<p><a href="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2010/05/standing_desk_tom.jpg"><img class="aligncenter size-medium wp-image-205" title="standing_desk_tom" src="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2010/05/standing_desk_tom-225x300.jpg" alt="Me enjoying my new standing desk." width="225" height="300" /></a></p>
<p>Dave&#8217;s setup is very similar, but he seems to like focusing <em>down</em> on his single screen whereas I like having a couple monitors at different focus points where I can physically distinguish tasks (documentation, music, images on my laptop off to the side and development tasks on the main monitor straight ahead).</p>
<div id="attachment_206" class="wp-caption aligncenter" style="width: 235px"><a href="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2010/05/standing_desk_dave.jpg"><img class="size-medium wp-image-206" title="standing_desk_dave" src="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2010/05/standing_desk_dave-225x300.jpg" alt="Dave at his standing desk" width="225" height="300" /></a><p class="wp-caption-text">Dave at his standing desk</p></div>
<p>It&#8217;s been a couple weeks since I switched and I can draw the following conclusions so far:</p>
<ul>
<li>Your feet hurt like a sonofabitch at the end of 8, 9, 10 hours if you&#8217;re not used to standing that whole time</li>
<li>A little bar stool or some off-the-floor step helps a lot in shifting your weight around so you&#8217;re not always bearing down on both heels</li>
<li>My back feels a ton better</li>
<li>I <em>feel</em> more productive (though I don&#8217;t know empirically if I actually am) because (a) I feel really focused on the monitor right in front of me &#8212; more so than when sitting down and (b) I&#8217;m a little more self-conscious of my screen being visible to everyone walking by, so I suspect I&#8217;ve got a higher percentage of work-related stuff on my screen at all times than I did before.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.heyitsopower.com/development/the-standing-desk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cinco de Failure</title>
		<link>http://www.heyitsopower.com/culture/cinco-de-failure/</link>
		<comments>http://www.heyitsopower.com/culture/cinco-de-failure/#comments</comments>
		<pubDate>Wed, 05 May 2010 16:40:33 +0000</pubDate>
		<dc:creator>Tom Vaughan</dc:creator>
				<category><![CDATA[Culture]]></category>

		<guid isPermaLink="false">http://www.heyitsopower.com/?p=196</guid>
		<description><![CDATA[If you&#8217;ve ever seen Yoni or Jeff K, you would know that I have absolutely no chance of competing in a facial-hair competition with them on raw natural talent.  Thus, for the 2010 Cinco de Mustache event, I felt compelled to compete on ingenuity and engineering.
To the disgust of myself and my wife, I collected [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever seen Yoni or Jeff K, you would know that I have absolutely no chance of competing in a facial-hair competition with them on raw natural talent.  Thus, for the 2010 Cinco de Mustache event, I felt compelled to compete on ingenuity and engineering.</p>
<p>To the disgust of myself and my wife, I collected shavings for approximately 4 months in a plastic cream cheese jar labeled &#8220;Not Cream Cheese.&#8221;</p>
<p>This last weekend, I took a trip to AC Moore Arts &amp; Crafts and bought some clay.  I fashioned a mold into that clay of a mustache that would dominate all other mustaches.</p>
<p>Into that mold, I poured elmer&#8217;s glue, hair shavings, 14 gauge electrical copper wiring, more hair, more glue, more hair.</p>
<p><a title="cinco_assembly by Tom_Vaughan, on Flickr" href="http://www.flickr.com/photos/tom_vaughan/4581864452/"><img src="http://farm5.static.flickr.com/4035/4581864452_ba14d1b7ab.jpg" alt="cinco_assembly" width="375" height="500" /></a></p>
<p>This morning, the <em>plan </em>was to simply glue the assembled mustache on to my real mustache.  Unfortunately, the plan involved entirely too much super glue and the assembled mustache pieces proved to be entirely too heavy.  My previous experience with krazy-glue-on-skin is probably like most people&#8217;s&#8230;stick your thumb and index finger together.  Thanks to callouses, a lack of hair on your fingertips and the relative strength of your digits, it&#8217;s not that big of a deal.  I also don&#8217;t remember the glue <em>burning like lava on contact.</em></p>
<p>A split second before squirting a liberal does of krazy glue on the mustache I wondered: &#8220;is this really a good idea?&#8221;  But not wanting to pysch myself out, I quickly brought the assembled mustache up to my lip and pressed down hard.</p>
<p>The first thing I remember thinking is that this was going to look <em>really</em> good.  Like, maybe champion-quality entry.</p>
<p>That thought was quickly replaced with a rising alarm about the rapidly increasing burning sensation I was experiencing between the mustache and my lip.  That alarm was then replaced with the growing realization that I was inhaling quite a bit of vapor and that my throat was starting to burn.</p>
<p>Not-quite-panicked, but not totally calm either, I gently tried to remove the mustache and got as far as pulling my lip about an inch off my face before giving up.  Over the next 10 minutes I was able to saw, snip and shave the &#8217;stache down with a combination of electric shaver, electrical pliers, scissors and razor blade.  By that time, of course, the fumes had dissipated and the burning was just a low heat and my grand mustache plans were wrecked.</p>
<p><a title="cinco_fail_2 by Tom_Vaughan, on Flickr" href="http://www.flickr.com/photos/tom_vaughan/4581214623/"><img src="http://farm5.static.flickr.com/4021/4581214623_05e508de62.jpg" alt="cinco_fail_2" width="375" height="500" /></a></p>
<p><em>The redness of my eyes is due to the fumes and pain.</em></p>
<p>There&#8217;s always 2011&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heyitsopower.com/culture/cinco-de-failure/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dave&#8217;s Talk at ScalaDays 2010</title>
		<link>http://www.heyitsopower.com/code/daves-talk-at-scaladays-2010/</link>
		<comments>http://www.heyitsopower.com/code/daves-talk-at-scaladays-2010/#comments</comments>
		<pubDate>Mon, 03 May 2010 13:29:26 +0000</pubDate>
		<dc:creator>Dave Copeland</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.heyitsopower.com/?p=188</guid>
		<description><![CDATA[OPOWER graciously sent me to Switzerland this year for ScalaDays 2010.  I was lucky enough to be asked to present on &#8220;Sneaking Scala into the Enterprise&#8221;.  OPOWER sponsored the videography.  My talk, on starting to use Scala in your organization (based on my experience at OPOWER), is linked below; all the talks [...]]]></description>
			<content:encoded><![CDATA[<p>OPOWER graciously sent me to Switzerland this year for ScalaDays 2010.  I was lucky enough to be asked to present on &#8220;Sneaking Scala into the Enterprise&#8221;.  OPOWER sponsored the videography.  My talk, on starting to use Scala in your organization (based on my experience at OPOWER), is linked below; all the talks are online <a href="http://days2010.scala-lang.org/node/136">here</a>.<br />
<a href="http://days2010.scala-lang.org/node/138/169"><img class="alignnone size-full wp-image-189" title="Video | Scala Days 2010" src="http://www.heyitsopower.com/wordpress/home/35481/domains/heyitsopower.com/html/wordpress/wp-content/uploads/2010/04/Video-Scala-Days-2010.jpg" alt="Video | Scala Days 2010" width="648" height="388" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.heyitsopower.com/code/daves-talk-at-scaladays-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alfresco 3.3 Lunch &amp; Learn</title>
		<link>http://www.heyitsopower.com/code/alfresco-3-3-lunch-learn/</link>
		<comments>http://www.heyitsopower.com/code/alfresco-3-3-lunch-learn/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 21:57:25 +0000</pubDate>
		<dc:creator>Tom Vaughan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Alfresco]]></category>
		<category><![CDATA[Content Management]]></category>

		<guid isPermaLink="false">http://www.heyitsopower.com/?p=201</guid>
		<description><![CDATA[OPOWER attended the Reston, VA "Alfresco 3.3 lunch &#038; learn" seminar this week, hosted by the generous folks over at SiteWorx.  Alfresco 3.3 looks support the CMIS 1.0 spec and head further into the ECM space.]]></description>
			<content:encoded><![CDATA[<p>I attended the Reston, VA &#8220;Alfresco 3.3 lunch &amp; learn&#8221; seminar this week, hosted by the generous folks over at <a title="SiteWorx" href="http://www.siteworx.com/" target="_blank">SiteWorx</a>.  I have a couple years as &#8220;CMS guru&#8221; at some previous jobs so in addition to being interested in the field, I&#8217;m also the support guy in-house for our CMS needs.</p>
<p>We here at OPOWER use Alfresco Community 3.2 as a glorified &#8220;XML editing tool&#8221; that was easy to setup, configure and hand over to the business to allow them to contribute XML-based content that our applications can consume.  As a F/LOSS solution, it&#8217;s fit our needs pretty well and is generally a low-maintenance piece of our infrastructure.</p>
<p>I attribute my &#8220;low maintenance&#8221; characterization of an Alfresco installation mostly to the patience of my small user base, who are very accommodating to the quirks and limitations of the installed (and neglected) instance.</p>
<p>The 3.3 lunch and learn was intro&#8217;d by Chris from SiteWorx who surveyed the CMS landscape and equated the emerging CMIS spec as &#8220;content&#8217;s ODBC&#8221; which I thought to be a quite fitting analogy.</p>
<p>Richard Im from Alfresco then spoke for about 45 minutes about the new features Alfresco 3.3 contained:</p>
<p><strong>WCM Improvements</strong></p>
<ul>
<li>new web-based editor, reminiscent of Interwoven&#8217;s in-context editor from the 6.5/7.0 era</li>
<li>new bi-directional deployment capabilities (including addition of &#8220;delivery server&#8221; infrastructure possibilities like several other CMS offerings)</li>
<li>&#8220;Straight through&#8221; publishing without workflows</li>
<li>google-like search on metadata attributes</li>
</ul>
<p><strong>Share</strong></p>
<ul>
<li>Evolving share into more of a bit-for-bit replacement of the &#8220;traditional&#8221; UI (which Richard referred to as &#8220;DM&#8221;&#8230; &#8220;document manager?&#8221;)</li>
<li>Permission control a la DM</li>
<li>Rules and Actions just like in DM</li>
<li>Data Lists (like Share Point&#8217;s project lists)</li>
</ul>
<p>I asked the question: &#8220;what&#8217;s the medium-term road map for DM, if Alfresco seems intent on mirroring all(?) functionality in the traditional UI via the /share context?&#8221;  Richard wouldn&#8217;t definitively say that the traditional app is going to be deprecated any time soon, but it certainly appears that way&#8230;</p>
<p><strong>&#8220;Integration&#8221; improvements</strong></p>
<p>I think this suite of improvements is geared towards the enterprise crowd:</p>
<ul>
<li>Full CMIS 1.0 spec implemented as of 3.3 (the only open source implementation known to do so)</li>
<li>ACLs</li>
<li>Change Logs</li>
<li>Additional SOA/REST services and support</li>
<li>Ability to save off google docs in alfresco for management (!)</li>
</ul>
<p>My big take-aways from the lunch and Q&amp;A session was that Alfresco&#8217;s 3.3 feature list and 3.4 direction seem to put them on more of a competitive footing with monster ECM vendors like Interwoven.  It&#8217;s maybe an odd direction for an open source project to steer because while Alfresco certainly employs their own development team, I&#8217;m not sure how much community interest there is in contributing to some of the more mundane enterprise ECM concerns that need to be built or integrated.  On the other hand, Alfresco, Inc. does survive with enterprise support contracts that smaller shops like mine are unlikely to ever pay top-dollar for, so maybe it&#8217;s a long term survival strategy.</p>
<p>Long term, I&#8217;m interested in exploring architectures available to us with a SOA-enabled CMIS layer and eventually ditch the custom-DAO layer we&#8217;re running right now against Alfresco-exported XML flat files.  Even if that never happens, it&#8217;s exciting to see the kinds of complexity that open source projects are able to attack.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heyitsopower.com/code/alfresco-3-3-lunch-learn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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/null/locking-screens-on-macs-with-the-keyboard/</link>
		<comments>http://www.heyitsopower.com/null/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[Null]]></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/null/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>
	</channel>
</rss>
