Scripts

  2011-02-28


code_sample

I find programming to be an interesting exercise; it’s often one big fairly challenging puzzle to accomplish the task at end. As enormously frustrating as this can be when it doesn’t come together right away, it can be immensely rewarding once it does. I find my ultimate motivation comes from the desire to never want to tediously process hundreds of records by hand, or search for a needle in a haystack. Once I script it once, it’s a task I never need to spend another moment’s thought on again. It’s sort of like playing a sodoku puzzle, but with a much better payoff in the end.

However, it certainly does depend on the task, and my skill level is clearly not up to par. I have spent the last few hours trying to decompose an arbitrary pdf into a flat database of records with awk, but this hasn’t gone well. I suspect it’s because awk expects to find structured, delimited data, and what I have fed it is a mess. I think I probably need to filter the whole thing through sed a few times to get something clean enough that I can filter and organize it with awk. What a pain.

The amazing thing is that none of this should really be necessary, as I should have been given the data file from the beginning, but after having spent the last six months banging on that door, I decided I’d better take matters into my own hands. A pity that I’ve turned out to be a butterfingers.