Wednesday, September 07, 2005

 

Today I’m using Acrobat’s PDF/FDF library for .NET to create a program that will iterate a table NewData and create a populated PDF for each row of data. At a high level, I’m setting up a programmatic mail merge. The tricky part lies in the path to the merge – the data isn’t ready to be merged just yet. It lives in a table called OldData, which must be intelligently translated into NewData.

I suppose the textbook way to approach this problem would be to plan the translation over the course of a series of meetings and email discussions. I don’t have that kind of time though, and being my own resources as well as the team leader, I often prefer to work backwards. In this case, that means diving right into the PDF mail merge code.

Sounds idiotic, right? It does, unless you think about how we work. We like Cartesian logic because it espouses breaking things down into their simplest components. Tackling a huge translation job without looking directly at the end result makes my brain hurt. Any decision which isn’t dead-simple requires agonizing over, usually in the form of tedious, not-that-shit-again team meetings. Whereas if I dive right into the code, I get to see the whys of each decision before I even get to the questions.

This is an occasion where all that History – “a waste of time for me, I want to be a programmer!” – that we studied in school comes in handy. Military history is a series of plans gone awry – no plan survives first contact with the enemy is I believe the proper cliché. The successful general is not he who makes the best plans, but he who, with a well prepared army, wades in with the element of surprise, and trusts his superior decision-making skills.

Now if you’ll excuse me, I’m off to conquer Luxembourg, one PDF at a time.


Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?