« November 2005 | December 2005 Archives | January 2006 »

A change of technologies

| 0 Comments
I started back with an investment banking client this week. I'm working with the team that brought us "the refactoring project" and another small team, and integrating the trade entry system with some "xll" excel addins and some back end server software. Pretty standard fare for investment banking work... I've worked with this client quite a few times over the years and it's interesting to go back and find that they're still using the systems that I helped them to put in place back in 2001. It's nice to see all of the C++ Excel addin code still in regular…

3 days with JMock

| 2 Comments
As I mentioned last week, I'm currently doing some Java work with an investment banking client. This week I added JMock to their toolset. JMock is a dynamic mock object generation tool that works with JUnit to allow you to create mock objects without writing code. Since most of my TDD work has been in C++, most of the mock objects that I've used in the past have been hand coded. There are similar tools for C++ but, due to the lack of reflection in C++, they can be a bit painful to use. I actually like writing my mocks…
Ned Batchelder reminds us of the value of the C++ FAQ (Lite). It's been a long while since I've looked at it yet Ned's example shows that I've still a lot to learn about the subtleties of C++. I can think of a few places where I could use that throw; as an exception dispatcher example to replace some rather ugly macros.…

DbgHelp weirdness

| 0 Comments
I was using one of my home made debugging tools recently and it kept crashing :( I assumed it was something I was doing but I've eventually tracked it down to where I load the symbols for the loaded modules in the target process. Attempting to load the symbols for x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\\comctl32.dll leads to dbghelp.dll generating a BEX event (which appears to be either buffer overrun or data execution prevention related).…

I think the weirdness was me

| 0 Comments
A couple of days ago I mentioned that I was having some problems with loading symbols for a common controls dll. I'm now pretty sure that it was my problem, as usual, rather than someone elses. I've reworked my process startup controlling code and now set and clear the breakpoints in a more reliable (i.e. less hacky) way and things are behaving themselves again. I think I was failing to stop one of the threads properly and that was later causing problems.…

Naming Win32 threads - how it works

| 0 Comments
I've been using the SetThreadName() function from the MSDN docs for ages to provide a way of distinguishing between threads in the VC debugger. I always thought it was a bit of a weird 'API' but had never really thought to wonder why. Steve over at "Bug Babble" explains how the 'API' works from the debugger's point of view and, well, then it all becomes obvious. For some reason I'd always thought that the 'API' was communicating with the OS in some weird and wacky manner; I hadn't twigged that in fact it was just communicating with the debugger using…

Panto season!

| 2 Comments
In case you missed it the first time around... We're doing the old "assert is evil"/"Oh no it isn't" thing over at Ned Batchelder's place.…

STLPort 5.0 and multiple VC versions

| 2 Comments
I'm in the process of testing some of my code with Visual Stuio 2005 and the first thing I found that I needed to do was to upgrade my STLPort installation from 4.6.2 to 5.0.0 to get a version that built with VC8. Given that I like to test one change at a time I first upgraded my VC6 build to use STLPort 5; STLPort built fine with VC6 and all my tests passed. The next step was to build STLPort with VC8, build my code with VC8 and run the tests. Unfortunately this is where the latest version of…

Pluggable exception handling

| 0 Comments
Ben takes the "throw as an exception dispatcher" idiom to its logical conclusion by presenting a pluggable exception handler. As Ben says "I'm not sure how many situations something like this would be useful in, but it fit the testing problem well and was fun to write anyway". It's not the kind of code you need every day, but it's useful stuff if you're working on a test framework, or if you're interested in how you can use the "throw as an exception dispatcher" idiom.…

On Edit and Continue

| 6 Comments
Dennis Forbes talks about "Edit and Continue" in VS 2005 and asks "Is it, coupled with similar tool advances, making programmers sloppier, though?" I think so...…

More thoughts on thread naming

| 5 Comments
I've just finished the first cut of the code that handles the Win32 Thread Naming "API". This means that my debugging tools can now report the name of a thread (if it has been named) rather than just its thread ID. Having implemented the code in the debugger to deal with the exception I find myself wondering about API design and why the original designer of this particular facility decided to make it hard on themselves.…
There's an interesting article by Tomer Abramson in this month's Dr Dobb's Journal about deadlock detection. He provides a compile in tool that works in a similar way to my deadlock detection tool and reports on potential deadlocks in code even if they never occur during the program run in question. His architecture is considerably different to mine but the idea is the same. By recording the sequence of lock acquisition and release on all threads in the program you can then examine the sequence that locks are taken out and spot potential deadlocks.…
I got a Garmin eTrex Vista C handheld GPS as a Christmas present. Another cool tool to add to my geeky ski stuff. So far I've only used it to navigate to and from a restaurant yesterday lunch time, but it seems to have lots of features that will make it useful on the mountain. The best thing about it? There's an SDK that you can download to communicate with the device. The SDK is more of a spec and a bit of sample code that shows you how to get a handle on the USB device driver but that's…

Thought for the day

| 0 Comments
Does anyone in IT use paper clips for anything other than resetting hardware either by pressing those hard to reach reset buttons or by shorting out bios batteries, etc?…

Garmin eTrex Vista C communications protocols

| 2 Comments
As I mentioned a while back, I got a Garmin eTrex Vista C handheld GPS as a Christmas present and there's code available from the Garmin website that lets you talk to it via its USB interface. There's also a specification document for the protocols that it uses. At first glance this is great. I've seen better specifications but with a little trial and error I've managed to transfer the saved GPS tracks from the device to my code and I can set the device up to send it GPS position every couple of seconds (so I could use it…
« November 2005 | December 2005 Archives | January 2006 »

About this Archive

This page is an archive of entries from December 2005 listed from newest to oldest.

November 2005 is the previous archive.

January 2006 is the next archive.

I usually write about C++ development on Windows platforms, but I often ramble on about other less technical stuff...

Find recent content on the main index or look in the archives to find all content.

I have other blogs...

Subscribe to feed The Server Framework - high performance server development
Subscribe to feed Lock Explorer - deadlock detection and multi-threaded performance tools
Subscribe to feed l'Hexapod - embedded electronics and robotics
Subscribe to feed MegèveSki - skiing