Blogs

First tracks

Last week I managed to get my GPS code to download the GPS “track” from my device and create an html file that uses the Google Maps API to display it as an overlay. I spent some time trying to get the map to display correctly from within the normal blog pages but something was causing Internet Explorer to fail to display the tracks. Firefox and Opera were fine; I guess it’s something to do with IE using VRML to display the track and the others using a server-side generated graphical overlay.

Purecall

I’ve been plugging away at my multi-process Win32 debugger code this week and one of my test harnesses had started to suffer from intermittent “R6025 - pure virtual function call” errors. These tend to crop up if you call a virtual function from a constructor or destructor or if there’s a race condition between calling a method on an object from one thread and destroying the object in another thread. For me, at least, they tend to be simple mistakes to fix once I know where the problem lies.

A collection of links

Once again I’ve been too busy to comment on the following blog postings in a timely manner so here’s a collection of stuff that’s been sitting in my “good stuff” list for a while now. Josh Carter over at “multipart-mixed” warns us of “The Perils of Bad C/C++” Schools. I must admit that I agree with him here, far too many programmers that I’ve dealt with over the years don’t really understand pointers even though you would think, from their background, that they should.

Shaping the future of the XLL interface in Excel 12

If you’re into writing C/C++ XLL addins for Excel and you’d like to help make sure that the new features in the new XLL interface provide all the functionality that you’d like, then it might be an idea for you to get in touch with David Gainer via the contact form on his Excel 12 blog.

Online autism 'test'

I scored a 28, which is “above average”, so considerably nearer to Asperger’s than it is considered to be “normal”. Which, to be honest, seems about right to me. If nothing else, it might make you think… Via Steve Pavlina’s personal development blog.

Excel addins sharing data

Or, marvelling at my own, past, cleverness. I’ve been doing a lot of work on these Excel addins for my current client and, as I get back into the whole C++ XLL stuff, I start to realise just how cool my child of 2001 really is. The Excel addins run as a suite; the team I work with has different users within the bank and there’s some cross over but some distinct separation.

Beware the momentum of prototype code

A while back Chris Baus wrote a little rant about prototypes. I started to write a piece that defended prototypes when correctly used and ran out of steam; or, more to the point, couldn’t really say very much except they’re OK except when they’re not, try not to get to the point where they’re not. Having just recently been bitten by a prototype that was trying to rise above its station, I now have more to say.

Detecting the Excel Function Wizard

I’m currently working on some C++ Excel addins for an investment bank. I originally wrote the addins for them back in 2001 and they’ve evolved slowly ever since. Right now we’re adding some new functionality and, whilst testing some of the new functions in the test sheets, I noticed that the functions weren’t behaving themselves properly when the Excel Function Wizard was in use… The Function Wizard allows you to step through the creation of a call to an Excel worksheet function.

Now I'm confused (C++/CLI destructors)

So here I am, writing a piece about how the C++/CLI destructor and finalizer stuff could have been a bit neater and I put together some sample code to demonstrate my point and it doesn’t do what the docs I mentioned yesterday suggest that it should do… Given this example class…. ref class Example { public : Example( bool throws) : m_count(s_count++), m_string(gcnew String("MyString")) { Console::WriteLine(m_count + " - Example(throws = " + throws + ")"); if (throws) { throw "Thrown"; } } Example() : m_count(s_count++), m_string(gcnew String("MyString")) { Console::WriteLine(m_count + " - Example"); } ~Example() { Console::WriteLine(m_count + " - ~Example"); delete m_string; this->!