« October 2005 | November 2005 Archives | December 2005 »

Practical Testing: 15 - Testing payback

| 2 Comments
Last year 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. The code under test was intended to be very scalable, I use the code to provide light weight asynchronous timers for my socket server framework and the idea is that each connection might have several timers associated with it. In the original introduction I wrote this: "The…

RSS feeds for Microsoft Knowledge Base articles

| 4 Comments
This is quite nice, a whole list of finely targetted RSS feeds for Knowledge Base articles for various products.…

Windows TCP/IP Server Performance

| 22 Comments
For the last week or so I've been working on measuring and improving the performance of The Server Framework. The latest release of the free version of my asynchronous, windows, IOCP based, socket server framework can now be obtained from here at ServerFramework.com. This week I've had several potential new clients asking about performance numbers for various aspects of the system and so I thought it best to do some measuring. To be able to measure I first had to build a tool to help me.…

Simple Echo Servers

| 2 Comments
A long time ago when I wrote my first article on high performance TCP/IP servers for Windows using IO Completion ports over on CodeProject I complained that "Also the more complicated examples, ones that used IO completion ports for example, tended to stop short of demonstrating real world usage. After all, anyone can write an echo server... " Yet here I am, three and a half years later with a huge collection of different kinds of echo server.…

TCP/IP Server Failures

| 5 Comments
One of the good things about the server performance testing that I've been doing recently is that I have been able to witness some rather rare failure conditions in action and seen how The Server Framework handles them.…
Jochen Kalmbach has discovered a problem with dynamically linked applications built with VC2005 running (or not running!) on NT 4. I guess this isn't going to bite that many people... Read about it here.…

What's your worst bug?

| 4 Comments
"Because of a subtle bug called a "race condition," a quick-fingered typist could accidentally configure the Therac-25 so the electron beam would fire in high-power mode but with the metal X-ray target out of position. At least five patients die; others are seriously injured" History's Worst Software Bugs, from Wired. I'm pretty careful about how I write code and I like to have my tests in place and, on the whole, I write pretty reliable code (most of the time) but I'm still glad that I don't work on stuff that's likely to cost lives if it goes wrong... Probably…

Bad Managers?

| 5 Comments
Alan Green doesn't like the word "manager" used as a class name suffix. His point seems to be that "manager" is imprecise and instead he suggests a list of alternative suffixes with more precise meaning; though they seem to be rather contrived and smack of using new words just for the sake of it to me. For example using "Herder" rather than the more usual "Collection" (PolicyHerder, hmm...) and using "Bucket" as a pretty non standard replacement for "Pool". He also suggests using Supervisor which seems, to me at least, to be potentially as vague as Manager and just, well,…

Profilers and The Perils of Micro-Optimization

| 0 Comments
Ian Griffiths has just written a nice piece on profiling .Net code and why the obvious things that people do are often very wrong: "Unfortunately, lots of developers just love to go off on micro-benchmarking exercises, where they write about 10 lines of code in a variety of different ways, and discover that one runs faster than the rest. (Or worse, one looks like it runs faster than the rest when running in the profiler.)" He advocates measuring performance outside of the profiler as well as within it so that you can be sure you're improving actual real world performance…

Controlling Time, Take 2

| 5 Comments
Recently I finished developing a high performance ISO-8583 financial transaction authorisation server for a client using The Server Framework and whilst I was running the final black-box tests against the server I realised that these particular tests were dependant on the system date of the machine running the server. The server uses the current time and date to make some decisions on whether it can authorise a particular transaction or not. The date is used to look up some information from a database table. The table contains details of whether a particular competition type is available for entry or not; it has…
Every now and then I come across a situation where encapsulation has been taken slightly too far. Usually, or at least most recently, these over encapsulated designs have had problems because they've blocked access to an event handle. It's great to wrap up a bunch of Win32 primitives into a nice coherent class but if you expose a method that allows the user of the class to wait for something to happen then it's probably also a good idea to expose a handle they can wait on as well. Failure to do so imposes unnecessary restrictions on how the user…

Why are the "event" classes in .Net STILL broken?

| 0 Comments
Whilst I'm ranting about the little things... You still can't create named versions of the .Net ManualResetEvent and AutoResetEvent, even in .Net 2.0. Wasn't everything going to be fixed in Whidbey?…

I don't like Vanilla Scoble

| 0 Comments
Robert Scoble, the "Microsoft Geek blogger", has recently had a complaint that he only writes about Microsoft and he figured that he was in a rut and decided to get out of his rut by deliberately not writing about his usual topics of Microsoft, Google and Yahoo (GYM) for 100 posts... So, for the last 3 days he's been writing about other stuff... There are problems with this idea though...…
My VoIP client has been stress testing the UDP version of The Server Framework and they had what they thought was a deadlock. It wasn't a deadlock it was more of a lazy server... What seemed to have happened is that they had been thrashing a server with lots of concurrent datagrams and pushed the machine until it stopped receiving packets due to the resource limitations of the machine being hit (probably either non-paged pool exhaustion or the i/o page lock limit). They then allowed the server to rest for a bit and then resumed the test. The server ignored every packet…

Kevin Barnes on TDD

| 0 Comments
Kevin Barnes over at Code Craft has just written an interesting piece on TDD. In it he claims that "Excessive unit testing infrastructure hampers your practical ability to refactor things efficiently. People scream at me when I say this. Unit tests are supposed to enable refactoring by spotting unexpected bugs resulting from the refactoring effort. I agree. Unit tests help with this, but only up to a point. When they cross the line into extreme-testing they can be pretty much guaranteed to break every single time you refactor the code" He has a point, as with all things, you need…

Hosting problems

| 0 Comments
As you may have noticed I'm having some hosting problems at present. The server that hosts www.lenholgate.com was hacked and it's taking my hosting provider longer to fix than they expected... Right now comments and trackbacks don't work because of incorrect CGI settings on the webserver but even if that were fixed now there's no database backing up the pages so things would just be broken in a different way. Hopefully they'll get the database restored and the CGI settings fixed real soon now... Still, at least the pages are back up, some people don't even have that yet.…

Hosting problems resolved

| 0 Comments
It looks like all of the hosting problems are now resolved. There was a brief period when the database and CGI were fixed and an MT configuration path hadn't been updated so pages were not being rebuilt after comments were added but that's now been fixed and the pages have been rebuilt to include the missing comments. If anyone notices anything strange please leave a comment on this posting.…

Testing Windows Services

| 6 Comments
Mark Pearce writes about Debugging a .Net Windows Service from within the IDE. We do something similar with our C++ Windows services but, as you've probably come to expect from me, it's slightly more complicated than Mark's approach.…

Udi Dahan on Physical Design

| 2 Comments
Udi Dahan writes about managing dependencies in code at the 'package' level in "So many Dlls, so little time". "Sloppiness with dependencies. If two classes are independent of each other, and do not provide different implementations of the same interface, think twice about putting them in the same project/dll. Minimizing dependencies is the bread and butter of loose coupling. Break dependence on implementations by introducing interfaces in a separate project/dll."…
« October 2005 | November 2005 Archives | December 2005 »

About this Archive

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

October 2005 is the previous archive.

December 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