Wednesday, August 10

The Python King - Mayor's pride

Hmm, I have been I noticeably *excited* about this tiny, meaningless XML parser tool I wrote a few weeks ago in Python. After all, it's not like it's my first application -I have done many before.
Maybe it's because it's my first "full fledged" desktop application in like 5 years! Yep, all my development since I left this place in Frankfurt in 2000 has been Web/server-side based. Now it was really cool to play with the
OS API, menubars, toolbars, statusbars, file chooser dialogs, and all that jazz again. (not that this particular application needed all that anyways)




Sooo, the follow up to
1, 2, 3, and 4 looks like the above, though the final codebase only vaguely resembles what I posted then and many lessons were learned in terms of usability.

For example, in the 1st iteration of the tool I tried to keep user intervention to an absolute minimum. In that entry, I mentioned 3 steps: search current folder, search based on username heuristics, and search the whole disk.
Well, I obviously forgot that adventurous, living-on-the-edge users would want to tell the tool where they are keeping their logs, thereby avoiding search altogether. In fact, some users even keep their logs on a different partition (yes bro, I'm looking at you), something I wasn't expecting at all.
Hence, my final iteration of the tool gives users a 'Browse folders' facility.

Internally, the search functionality was also outrageously slow. I blamed it on the Windows API, where search is slow itself, but the truth is that there was room for improvement.
On the final iteration I make intensive use of regexes to prune the search space. Speed gains of over 80% were achieved (yes, the 1st iteration was that slow).

No comments: