Saturday, August 7, 2010

Stuck in my head

I solved most of a problem yesterday. Almost. I implemented three-quarters of the problem in the last thirty minutes of the day. I need ten more minutes for coding and another ten for testing. (THe test framework is already in place.

The problem was in the reading of Microsoft Excel OOXML spreadsheet files. The OOXML files are much easier to read than the previous BIFF files, with data stored in XML and therefore as text. The one aspect I was not expecting was E notation for some numbers, and my existing parser considered these values as text, not numbers.

The solution is fairly simple: change my parser. I found a state machine description for validating a number (including E notation) in Cay Horstmann's "Practical Object-Oriented Programming in C++ and Java". I was able to convert his description into code. All that remains is to run the tests.

I would like to leave my work at the office, yet this problem is stuck in my head. I keep thinking about it. I know that I cannot simply forget it, I must find something else to think about.


No comments:

Post a Comment