Category Archives: Code

Boxed primitives and ==

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 “Person 1001’s customer id 109032 didn’t match the passed-in customer’s id of 109032″ seemed logically impossible, but was somehow true. But first, let’s [...]

Dave’s Talk at ScalaDays 2010

OPOWER graciously sent me to Switzerland this year for ScalaDays 2010. I was lucky enough to be asked to present on “Sneaking Scala into the Enterprise”. 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 here. [...]

Alfresco 3.3 Lunch & Learn

OPOWER attended the Reston, VA "Alfresco 3.3 lunch & 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.

When adding more threads makes it all slower

I’ve been working on a new feature that requires analysis of each individual’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’s not that big of a deal. My initial [...]

Slides on Improving Your Agile Development Process

Dead last, after the headline act, and after Joel Spolsky told everyone to go home, I did a lightning talk at DC’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. Continue reading ...

When is a null not a null?

tl/dr: 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. 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?

New Developer Law

NEW LAW FOR DEVELOPERS: If you throw an exception about some connection being refused, you'd better damn well put what connection you were attempting to make in the exception message. What inspired this law?  Thanks for asking.

Subversion Branching “Good” Practice

I am relatively new to Subversion — well, two years into using it now, but this is the first project I have used it on. Subversion, like any tool, has its quirks and works best when you really know how to use it. When I started, I treated the "trunk/branches/tags" directory structure exactly like a directory structure. It took me a little playing around until I stumbled on what I would call a best practice. When I checkout a new project, I do it like so: svn co http://domain.com/svnroot/project/trunk project That way, when I go to the project directory, I do not have to then go into the trunk directory to get to my files.

Measuring our awesomeness iteration by iteration

Like a lot of startups (and big companies!) we use iterative development: we break up our work into "stories" describing features and implement as many as we can in one month. We then repeat that until we conquer the world. But, if we can do more, or work more efficiently with each iteration, our goal of world domination will approach that much quicker :)

The easiest way to do that is to look at the bugs our QA staff find in the product updates. Although we have a lot of automated tests, we still need some eyes on the applications to check for things like text overruns of our printed reports, or JavaScript weirdness in some less-than-well-behaved) browsers.