bitwix

Tangential comments about Software Development

Sunday, March 01, 2009

Four Lines of Code in an Afternoon

The other day, my pair and I managed four lines of code in a whole afternoon. But they were the right lines of code, so we were very happy.

We wanted to add charts to an application creating MS Word Documents. We knew a little bit about automating Excel and updating Word's Content Controls. The four lines were
  1. set the source cells for an Excel chart
  2. copy the chart to the clipboard
  3. select a content control in Word
  4. paste from the clipboard
No reinvention of any wheels. The end user will be able to edit the look of the graphs as a template in Excel, or as the end result in Word. All graph types supported.

Agile is the art of maximizing work not done, so that was a good afternoon's work.