« July 2008 | August 2008 Archives | September 2008 »
Back in 2004, I wrote a series of articles called "Practical Testing" where I took a piece of complicated multi-threaded code and wrote tests for it. I then rebuild the code from scratch in a test driven development style to show how writing your tests before your code changes how you design your code. Since then there have been various changes and fixes and redesigns all of which were made considerably easier due to the original tests. There has always been a potential for deadlock when using the timer queue, which is unfortunate but something that you can avoid if…
The latest release of The Server Framework is now available. This release includes the following changes. The following changes were made to the libraries. Some whitespace changes to remove incorrect tabs. Admin Library - 5.2.3 Added a check for _WIN32_WINNT >= 0x0600 and JETBYTE_PLATFORM_SDK_VERSION < 0x060A as targetting Vista or later means we enable stuff that's only available in the v6.0a Platform SDK. Added The \ref AdminFAQ "Frequently asked project related questions" page. Having done some more testing, you might need sal.h for VS.Net (2002) and VS 2003. A copy can be found in Admin\VC6Compatibility and you need to copy it to…

The life of a stream socket connection

| 0 Comments
As I mentioned here I've recently adjusted how socket callbacks are dispatched in The Server Framework.…
The code in the last two articles in the "Practical Testing" series have contained a considerable amount of duplication. This came about for a couple of reasons. Firstly part 17 was a bit rushed and secondly it was useful to compare the CCallbackTimerQueue implementation with the CCallbackTimerQueueEx implementation. I'm also a firm believer that in this kind of situation it's better to get both sets of code working independently and then refactor to remove any duplication rather than attempting to design a duplicate-free solution from the start. Anyway, this time around we'll remove the duplication by creating a base class…

Documentation bug...

| 0 Comments
I realised this morning that part of my "The life of a stream socket connection" document about the safe use of server callbacks in my server framework was wrong. I said this: At any time after a connection is established, including before you've had a chance to handle the connection establishment event, you might get a connection termination event. and this: Note that it IS possible that you could receive error, client disconnect, connection reset or connection closed events before or during the processing of the connection established callback. Due to this it is advisable not to access per-connection user…

Lock free code is hard

| 0 Comments
There's an interesting article over on Dr. Dobb's about why writing lock free code is so hard. Herb Sutter takes some code from an article that Dr. Dobb's published a couple of months ago and pulls it apart and points out the problems.…

Writing testable code

| 0 Comments
There's a nice post by Mi┼íko Hevery over on the Google Testing Blog about Writing Testable Code. It pretty much sums up my views on testable code. Go read it!…

Practical Testing: 20 - Mind the gap

| 0 Comments
Back in 2004, I wrote a series of articles called "Practical Testing" where I took a piece of complicated multi-threaded code and wrote tests for it. I then rebuild the code from scratch in a test driven development style to show how writing your tests before your code changes how you design your code. Since the original articles there have been several bug fixes and redesigns all of which have been supported by the original unit tests and many of which have led to the development of more tests. But... you need to be aware of the tests that you…
« July 2008 | August 2008 Archives | September 2008 »

About this Archive

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

July 2008 is the previous archive.

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