Bidwatcher Bug Fixes
Today I got hit by a Bidwatcher bug and decided to fix it. This program is really a mess of code. The UI isn't really great - it's OK, but it's not Wow! and the internals are a mess - pure and simple. What might be nice would be to gut the entire program and start with GTK/GNOME and build another that has all the functionality but without the limitations. TOday's bug was realted to the parser of the HTML received from eBay. Now this should be handled in as clean and generic a manner as possible. Anything less risks real problems when eBay changes the format even a little. Well, they did, and it broke the code.
So I fixed it and while it's working it's still a patchwork of a bunch of iffy at best code. The parser needs to be rebuilt, the strings need to be dynamically allocated and based on something better than char *, the object model is iffy... let's face it... This code has simply evolved and there's a ton of parts that are dead code - not used by anything, but still there. Oh well... there's a lot that Bidwatcher could benefit from.
Maybe if I have the time I'll start with the object model and then work in. It's just not obvious what to base the code on... data structures and good C code, or try object orientation and do a much better job. If the latter, then what to do about a really good string class... maybe GTK--? In any case, that's what I did today and it's working again.