Saturday, September 16, 2006

Deflated Duty

I went to Starbucks this past Tuesday (the 12th), bashed my head against the DEFLATE algorithm, and nearly went nuts doing it. We left about an hour and a half early, that is Missy and I, because Chris can no longer do the bucks. Missy was studying plant stuff and had tried that location only to find it didn't suit her.

After arriving at work I made some break-throughs on the part of the DEFLATE algorithm I wasn't understand. Prior to this I had almost gotten to the point of emailing the creators of a couple docs I was reading to plead for better examples/explanations on some parts. When I've got this under my belt I'll have a document for other people like me to read and, hopefully, gain a better and more thorough understanding of this thing. Specifically I was having difficulty generating the correct literal/length Huffman tree from the code lengths alone. I didn't quite understand how the code lengths were sufficient to generate an entire tree and it took me a while for it to "hit me" and things to fall into place.

I really need to write this all down in a document before I forget it and have to start all over next week.

Thursday (the 14th) I was on my second day of Jury Duty so I missed the ol' S.B. That's two weeks of missing my bi-weekly hobby time and that's not good. I think I made some of it up today, however, in working on a couple of List Server bugs.

Gmail appears to remove HTML comments and another WebMail program munges the HTML horribly beyond recognition -- even using flattened HTML for the plain text version when a plain text part exists! Anyway, all of this added up to the footer notice not being recognized and removed (I was using HTML comments in the HTML part and a specific text in the plain part).

I deliberated a great deal on the fix to this. Something that would not cater to the flaws or quirks of any particular software. What I eventually came up with was a simple character "key id" which precedes and follows the notice:


It looks kinda like a face, don't you think? Anyway, email clients leave these characters intact and next to each other. Not only do I find these, but I like for the word "unsubscribe" in between them as further verification.

Additionally, I simplified the notice to a single line in the HTML version and two lines in the plain text one. The blob was eye catching, but quite distracting.

Oh yeah, I also added the beginnings of the ability to "censor" certain text. It sounds bad, but really it just means to remove or hide something. In my case, I added a pattern to get rid of AVG's scan notices which Outlook Express dumbly puts into replies and forwards (even though it's a separate MIME part).

Another Outlook Express irritation is that it doesn't hold onto attachments when forwarding or replying, it drops them. You have to re-attach them. Ugh ... I wonder if it's reading the list server emails incorrectly or I'm putting something there that's confusing it (a very real possibility). I will have to look into that.

No comments: