Blog
Page: 0 ... 5 10 11 12 13 14 15 16 17 18 ... 20 ... 25 ... 30 ... 35 ... 40 ... 45 ... 50 ... 55 ... 60 ... 65 ... 70 ... 75 ... 80 ... 85 ... 90
Const Armageddon
Date: 7/4/2011
Tags: code
So after getting about 9000 warnings building Lgi with the latest XCode 3.x I decided that I would do something about it. A lot of the warnings consisted of "casting from const char* to char* is deprecated" because I was passing a string constant into a char* arg. So I fix one of those. Which causes 4 more. And so I fix some more of those, and it snowballs... and snowballs... and then there is an avalanche of API's getting 'const' all through them. Many days latter I'm now back on top of the warnings. However now I've modified a number of base classes with virtual functions that had char* arguments. Of course the compiler doesn't warn you when your child class stops overriding the parent function does it! So the big hunt for mis-matched function definitions begins. No doubt I'll miss some and random stuff will just stop working, because the base class got the call, not the child class. *sigh*

Update: So after finding most of the problems by bumping into them accidentally I realized that I was going to missing something important anyway. So I wrote a python script that calls ctags to extract a bunch of symbol definitions, then it parses through all those and finds all the class methods, and compares their arguments and return type with the parent classes virtual function, and spits out an error if they differ. This was great, it picked up a few methods I'd missed, and gave me confidence that I could release the next build of Scribe without having broken functionality.
(0) Comments | Add Comment

Python Is Awesome
Date: 7/4/2011
Tags: code python
That is all.
(0) Comments | Add Comment

Outlook and that stupid "J"
Date: 1/3/2011
Tags: email outlook
It seems to be common knowledge that people receiving email from Outlook users see a capital J instead of a smiley face if they are not using Outlook themselves. As I've been testing the IMAP behavior of Scribe and Thunderbird lately I noticed that both clients display Outlook's smiley face as a "J" and thought to myself, if I have spent so much effort making Apple's Emoji work that it's only fair that I at least have a look into why Outlook's smileys don't work.

There are a lot of "fixes" out there for the "problem", but I wanted to know the REAL reason why it happens. So here it is; Outlook wraps the smiley in the following HTML:
<span style='font-face:wingdings'> J</span>
There is the famous J character, but technically that markup is correct, if you open up Word, set the font to Wingdings and type 'J' you get a smiley. So what the hell? Initially I thought maybe my glyph substitution code was getting in the way, but after turning that off for wingdings it didn't help. So I looked at the font creation code and remembering something about ANSI vs SYMBOL charsets I hard coded anything with "wingdings" in the face name to use SYMBOL_CHARSET instead of ANSI_CHARSET when calling CreateFont.

Which fixes the problem, Scribe now renders the smiley characters correctly. There you go, now you know.

Now I can snicker quietly when Thunderbird renders them as 'J's ;)
(2) Comments | Add Comment

Scribe / Exchange 2010
Date: 15/2/2011
Tags: outlook email imap
So I spend my life writing this email client to get away from Outlook:
And then they change to Exchange 2010 which Scribe for whatever reason can't authenticate on so I start using Outlook 2010 and for a while I put up with it. Then I after a few weeks I get sick of it and try and get Scribe working and with Exchange and fail. Then a few weeks go by and then I try again, different problems. Then more weeks go by, FML. Then I finally have it out and spend too long frigging with NTLM. I read the M$ docs and they are completely WRONG. So I download various open source libraries, they are too old and broken and also WRONG. So I start reading 10 different descriptions of the protocol on the web, which all conflict, but I start getting the gist of it. Then I download the Thunderbird source code and start reading that. Because it does NTLM authentication. And finally after using that as a guide, all these months later, I authenticate with Exchange's IMAP server. And then notice lots of things are broken, so fix fix fix, and now it's running OK. Then I see the calendar folder and click on it, and up shows a list like this:
So Exchange goes to all the trouble of exporting an IMAP folder called "Calendar" that when you click on has a list of email that contains little notes to the effect that "Oh hai, there was a calendar entry here, but I moved it, and btw you need to use Outlook to view it".

*twitch*

*twitch*

Apparently back in Exchange 2002 or something there use to be email containing vCal attachments in the Calendar folder. But some pointy haired boss at Microsoft put an end to that interoperability quick smart.
(0) Comments | Add Comment

Visual Studio 2010 is as fun as a broken leg
Date: 11/1/2011
Apart from the constant crashes, unbearable slowness and long load times, vs2010 has this bug... where "Go To Definition" results in:



So thinking that maybe a compile switch might fix that I turn on "Enable Browse Information" (/FR) for my project, because that sounds like it might be useful for looking up symbols, or something. I rebuild (just in case) and try to lookup a symbol definition... and...



But do you know what that option is useful for?

Turning off member variable lookup in the debugger.

Yup. Awesome isn't it?

So I turn it off, rebuild, and wow, I can see class member variables in the debugger again.

Top work Microsoft, now get back to ignoring your users.
(0) Comments | Add Comment

Well well well... what 'ave we here?
Date: 30/11/2010
Tags: itunes
It seems the iTunes 10 persistant library ID nut has been cracked by Felipe. I wonder what I should do with that information?
(2) Comments | Add Comment