« July 2005 | August 2005 Archives | September 2005 »

Exploring the C++ Unit Testing Framework Jungle

| 5 Comments
Exploring the C++ Unit Testing Framework Jungle over on Games from Within is a really good look at all of the C++ unit testing frameworks out there. It compares the following frameworks: CppUnit Boost.Test CppUnitLite NanoCppUnit Unit++ CxxTest I'm one of those people who has written their own mini framework because none of the existing frameworks seemed to do what I wanted at the time I needed the framework and I wanted to get up to speed quickly with minimal learning time. Had this comparative review been available when I was first starting out with C++ unit testing then I…

/Y3 where have you been all my life

| 0 Comments
I was just flicking through some of the entries over on Games from Within and I came across an entry on precompiled headers which is a good introduction of the pros and cons of using precompiled headers in a cross platform environment. I wanted to comment on this posting but the comments seem to be turned off for it now so I'll comment here...…

Setup and Teardown, reprise

| 0 Comments
Roy adds a little fine tuning to Brian's advice about avoiding setup and teardown in unit tests. In summary; aim to minimise duplication in your test code...…
OpenSSL is an open source implementation of the SSL and TLS protocols. Unfortunately it doesn't play well with windows style asynchronous sockets. This article, which was first published in Windows Developer Magazine and then reprinted on my company web site, provides a simple connector that enables you to use OpenSSL asynchronously. A new posting in the blast from the past reprints area. The article is here.…

Be explicit about a class's multiple interfaces

| 0 Comments
I've been working on The Server Framework this week. A client wanted a version of the latest framework with UDP support added. They'd taken the freely available version of the code a couple of years ago and I'd given them some hints as to how they could get it to deal with UDP. This worked well for them and they've built a rather large VOIP system on top and now they're having some performance problems. My first suggestion to them was to add some performance counters so that we could see what was going on. They decided that they liked that idea…

I feel the need to comment on this...

| 0 Comments
Richard Hale Shaw continues his series of blog postings on "Moving away from C++" with the obligatory "pointers are bad, garbage collection is good" post... I feel the need to write something about this but not yet, I have work to do...…
I've been using the latest Visual Studio 2005 beta on and off for the last couple of days. This is the first time I've bothered to try "Whidbey" and my initial impressions are very favourable; I'm just using it for unmanaged C++ at present. I haven't really done a great deal with it yet but even though it's installed on in a VMWare virtual machine it seems faster and generally less lardy than both VS.Net 2003 and 2002, which is a relief. I've mostly been converting projects and running some test builds. This is going reasonably well though it does…

How to reset the BIOS on a Vortex86-6071LV

| 1 Comment
The embedded Linux project came back to life this week when the manufacturer sent us some new video driver source for the SiS 550 on the Vortex86-6071LV. At present the new driver seems to work as well as the old one; i.e. not very well at all... Anyway, whilst adjusting the BIOS settings for the LCD panel I managed to set them to something which meant that neither the LCD panel nor the external VGA would display anything. Since both displays were dead during boot up and since I hadn't made a note of the key presses required to navigate…

Borland C++ v3.1 and "The Raymond Chen Camp"

| 11 Comments
Last weekend was a bit of a "compiler weekend" for me; I started playing with VS 2005 and I found some old source code and wanted to build it and that required Borland C++ v3.1 (In the currently fashionable style of naming things - Borland C++ 1991). I dug through my box of old disks and found a backup of my old 386 development machine. That contained an installation of BC3.1 and, since this is from back when DOS programs ruled I simply copied the directory onto my new dev box and ran it up. After tweaking the display settings…

Garbage Collection and Pointers

| 5 Comments | 1 TrackBack
So, Richard Hale Shaw is helping us move away from C++ and in his latest posting on the subject he explains how "veteran C++ programmers" don't like to manage memory themselves; hmm. I'd quite like to see his sample data. Especially as he then goes on to define "veteran C++ programmers" as people who don't like to manage memory themselves...…
Geoff Appleby discovers that a common C++ template idiom doesn't work with .Net generics. The code that doesn't work is this: Public Class Class1(Of V As System.Web.Services.Protocols.SoapHttpClientProtocol) Inherits V End Class which is the .Net generics equivalent of this common C++ idiom: template <class base> class TDerived : public base { }; This is useful in all kinds of situations, as Christopher Diggins explains and, as Geoff says: "You don't know if V is NotIneritable, MustInherit, or whatever. It would surely fail at compile time if that happened" which is fine. Failing at compile time is great and means that…

Joel is a bit confused about agility and design

| 0 Comments
Joel Spolsky of has just completed a very public product development project for a Windows based user assistance program called CoPilot. This has been interesting to watch and has, no doubt, generated lots of positive PR for him. He's just released the functional spec for the system and points out that "I believe in Big Design Up Front, which the proponents of Extreme Programming consider anathema. I have consistently saved time and made better products by using BDUF and I'm proud to use it, no matter what the XP fanatics claim. They're just wrong on this point and I can't…

It's the libraries, stupid

| 0 Comments
Jeff Atwood has a nice piece on the productivity of different programming languages (go read it). His sums up with the following: Given .. 1). the abandonment of C++ and C for mainstream programming 2). the huge influence of individual programmer skill 3) the slow but steady adoption of scripting/dynamic language conventions in Java and .NET .. maybe all modern programming languages really are the same. Ole Eichhorn has already taken Jeff to task in the comments about his definition of mainstream, and Jeff has responded here so I'll leave that one alone for now ;) Several people picked up…
This is a nice piece by Tim Anderson on why COM is still alive and kicking despite what all the .Net-heads would have you believe... It always seemed to be pretty obvious to me that all the "COM is dead, long live .Net" hype was just that, hype. Whilst there are obvious advantages to using .Net for new projects there are a lot of projects out there in the wild where you can't just throw away all of the investment that has been made in COM. Also, as Tim points out, .Net doesn't really have replacements for all of the…

JLR on C++ interfaces

| 0 Comments
A while ago I came across JLR's weblog and read his three postings using interfaces in C++ (1, 2, 3). I fired off a quick comment on the first article because I didn't agree with a couple of things he was saying. Jose's response to my comment grew into this posting and, well, now I need to explain my position in more detail. This is it...…

More Reprints - CORBA, C++ and Java

| 0 Comments
I've just finished posting some more reprints from back in 2001 when I was working on CORBA systems with C++ and Java. The articles mostly compare CORBA to COM and show why providing a reference counted server object lifetime management system is harder than it appears. 1 - CORBA - Reference Counting. Adding reference counting to CORBA objects isn't as easy as it first seems. 2 - CORBA - More Reference Counting. Although we managed to develop a working solution in the first CORBA reference counting article the results were ugly and fragile. In this article we attempt to clean…

The price of freedom is eternal vigilance.

| 4 Comments
Kevin Barnes has written a nice piece on "freedom" languages, his word for Ruby, Python, Perl, etc. He compares these with "safety" languages, such as C++, C#, Java, VB, Delphi. He starts off by saying "I picked the terms freedom and safety because they represent a philosophical split that I'm not sure some of the advocates of these languages realize is present. You can sense this split when you listen to the words that the various pundits use when discussing the merits of different languages." and continues to compare and contrast the strengths and weaknesses of each kind of language.…

Undocumented Windows 2000 Secrets

| 0 Comments
Just finished reading Undocumented Windows 2000 Secrets: A Programmer's Cookbook by Sven B. Schreiber. Well, I say reading, it was really just a first pass through the book. The text and code spends more time in kernel mode than user mode; there's a lot of information in there and it's all relatively new to me so it's the kind of book that needs a fair bit of work.…

It's obvious when you think about it, but

| 2 Comments
Piracy is not an enemy until you are famous. Until that point, obscurity is your enemy. I think independent creators should spend all of their attention fighting obscurity until they are famous, and only then should start to worry about piracy. Derek Silvers, via microISV…

I just don't get it, what's with this->?

| 7 Comments
I'm looking at some code to help me understand how to use the dbghelp.dll Windows stack walking and symbol discovery stuff and the code I've found on the net uses a programming style that I've seen a few times before and have never understood the reason for. if (this->m_sw->pSGSFA(this->m_hProcess, s.AddrPC.Offset, &(csEntry.offsetFromSmybol), pSym) != FALSE) { strcpy_s(csEntry.name, pSym->Name); // UnDecorateSymbolName() this->m_sw->pUDSN( pSym->Name, csEntry.undName, STACKWALK_MAX_NAMELEN, UNDNAME_NAME_ONLY ); this->m_sw->pUDSN( pSym->Name, csEntry.undFullName, STACKWALK_MAX_NAMELEN, UNDNAME_COMPLETE ); } else { this->OnDbgHelpErr("SymGetSymFromAddr64", GetLastError(), s.AddrPC.Offset); } Why did the author feel it necessary to be explicit about his use of the current object by specifying this-> when accessing…
I'm still reading someone else's code and it just struck me that a lot of 'strange' coding practices become unnecessary if you factor your code 'correctly'. Note that both 'strange' and 'correctly' live in the Len::Personal::ViewOfTheWorld namespace... Take this, for example: // show line number info, NT5.0-method (SymGetLineFromAddr64()) if (this->m_sw->pSGLFA != NULL ) { // yes, we have SymGetLineFromAddr64() if (this->m_sw->pSGLFA(this->m_hProcess, s.AddrPC.Offset, &(csEntry.offsetFromLine), &Line) != FALSE) { csEntry.lineNumber = Line.LineNumber; strcpy_s(csEntry.lineFileName, Line.FileName); } else { this->OnDbgHelpErr("SymGetLineFromAddr64", GetLastError(), s.AddrPC.Offset); } } // yes, we have SymGetLineFromAddr64() The comments, which can rot, would be completely unnecessary if the whole block of code…
« July 2005 | August 2005 Archives | September 2005 »

About this Archive

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

July 2005 is the previous archive.

September 2005 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