I have recently been sent a couple of ebooks to review. It seems people at Packt Publishing think that I'd be a good person to review their C++ books... Anyway, bear in mind that this ebook was given to me for free and that I was asked to review it...

Instant Windows 8 C++ Application Development How-to is a short book, but then that's what the "Instant" range of books are supposed to be. I guess the idea is to get people quickly up to speed on a subject. The book does that, but, it contains too much code (which, lets face it, we're not going to type in and it's available for download). The code also isn't really referenced in the descriptive part of the text, certainly not enough to warrant its presence in the book. There's also a little too much explanation of how to use Visual Studio. This means that the meat of the book tends to be the very brief "How it works" paragraphs at the end of each chapter.

Whilst the book did walk me through the writing of a couple of simple Windows App Store applications I feel I learnt far less that I would have if I had simply typed "writing your first windows 8 store app C++" into Google and followed the first link or second links to the MSDN articles.

Even at 3.99 GBP for the ebook I can't really recommend it. There's too much padding and not enough meat and it doesn't add anything over what I could easily find on Microsoft's developer site.
We have a new client profile available here for a new client who selected The Server Framework to build the servers for its iOS and Android games.
We've released new versions of both our Lock Inversion Detector, LID and our Lock Inversion Analyser, LIA today.

This release is a simple bug fix release which fixes a problem where we could incorrectly treat two critical sections or SRW locks which happened to be created at the same memory address as the same lock for inversion tracking purposes. This could happen if a lock is created in dynamic memory, used and then cleaned up and then the memory is reused in such a way that a new lock is created with the same memory address for its CRITICAL_SECTION or SRWLOCK data. In such cases we would treat the two locks as the same lock when looking for lock inversions and this could cause us to report spurious inversions in some situations.

All customers are being contacted via email with details of how to obtain the latest release of LIA and you can download the latest version of LID from here (if you've already registered for the updates mailing list then simply reply to the email notification and we'll send you the latest version).

Do continue to get in touch with comments and suggestions and any problems that you have.

Comments disabled for a while

| 0 Comments
Due to masses of attempted comment spam which was causing my hosting provider's server some problems I've disabled comments for a while.

Email me if you have something you'd like added and I'll sort it out for you.

Update - 13/5/13 - comments enabled again...
We've released new versions of both our Lock Inversion Detector, LID and our Lock Inversion Analyser, LIA today.

This release is a simple bug fix release which fixes issues around the DuplicateHandle() API which is tracked as part of our support for tracking lock inversions which include Mutexes.

All customers are being contacted via email with details of how to obtain the latest release of LIA and you can download the latest version of LID from here (if you've already registered for the updates mailing list then simply reply to the email notification and we'll send you the latest version).

Do continue to get in touch with comments and suggestions and any problems that you have.

10 years of blogging...

| 0 Comments
On the 3rd of May 2003 I posted the first entry on this blog. I then proceeded to "back fill" the blog with various things that had either been posted before in other places or had been laying around waiting for me to have somewhere to put them. This is why although the blog began in 2003 the archives go back to 1992.

Things have changed quite a lot since then, both in terms of blogging and my life. Back then blogs were hot, there was lots of buzz around them and a lot of the things I wrote were designed to help connect my blog to the blogs of others (usually others that I perceived as having lots of readers in the hope of attracting readers to my blog). I like to think that the best things I wrote back then were the things that were more technical and less attention seeking and once I decided to stop trying to attract readers and simply write, the readers started to come. Now I only write technical stuff either for users of my Server Framework or as notes to my future self. I tend to view my blogs and my source code archive as 'my spell books'; the reference material that helps me be better at what I do for a living. Whilst I can't publish all of the code that I have I can at least put some of my thoughts up here for people to pull apart. Since I often work alone it's a way for me to get feedback from a technical audience. It doesn't often work but when it does it works well.

The blog itself is still driven by Movable Type and looked pretty much the same from 2003 through to the end of 2010 at which point I split my blog into multiple blogs and adjusted the design so that it matched in with my new company and product websites. You can see the various changes in style over at The Wayback Machine. Most of my sockets and networking talk has been moved off to The Server Framework blog though all of my technical blogs share the www.lenholgate.com "front page". I quite like the integration and it works well for directing readers to the appropriate place. I still have two blogs that are not integrated, mainly because they're hobby blogs and also because they're not really that active any more; my skiing blog (still skiing, just not writing about it) and my embedded assembly and robotics blog.

I have far less time for blogging now. Working for myself from my own office at home takes up lots of my time and provides no "commute time" for writing, and I now have a wife and two sons to keep me busy when I'm not working. I hope that I'll still be blogging 10 years from now. Who knows. Thank you for reading and taking part.

Back in January 2010 I discovered that if FILE_SKIP_COMPLETION_PORT_ON_SUCCESS is enabled on a datagram socket and a datagram arrives when a read is NOT currently pending and the datagram is bigger than the buffer supplied to the next read operation then no error is returned and the read will never complete. This was confirmed as a Windows bug and I'm pleased to see that it's been fixed in Windows 8 and Server 2012. It's still present in Windows 7 but that actually makes it easier to reason about the behaviour of the flag on the operating system that you're running on.

More details and links can be found in the original blog entry, here.
Release 6.6 of The Server Framework includes some breaking changes to both the IService, IServiceCallbacks and IShutdownService interfaces. Many functions now return an ServiceTools::ExitCode, either directly or by value, which allows you to fine tune the exit code returned from your service under failure conditions. This exit code is reported to the Service Control Manager (SCM) when your service shuts down and also returned from the exe if you run the service as a normal exe. These changes allow finer control of your service but can easily be completely ignored if you want things to stay the way they were.

Other functions take slightly different parameters

Slightly more efficient locking

| 0 Comments
Another performance improvement in the forthcoming 6.6 release is due to a change in our default choice for locking primitives on most platforms. Note that the perf improvement is small and, according to our testing, it doesn't materialise on all hardware (though there's no performance degradation seen).

The change is to switch from using CRITICAL_SECTION objects to using Slim Reader Writer Locks in exclusive (write) mode. You can read about the differences between these two locks in Kenny Kerr's MSDN article here. This change can't be applied to all uses of our CCriticalSection class as SRW locks are not recursive and so we have a whole new locking class hierarchy with new CLockableObject locks which use SRW locks on platforms that support it and drop back to using a CRITICAL_SECTION on XP and earlier. Then there's a CReentrantLockableObject which is, basically, a CCriticalSection with a new name and a slightly new interface. There are also classes for locks which track the thread that owns them (just so that they can tell you if you currently have them locked) as we use that functionality in a couple of places in The Server Framework for optimising code paths.

The new locks give a slight improvement in the time taken to acquire them and use fewer resources. They haven't been fully integrated into all libraries yet (in particular they are not in use throughout the Socket Tools library yet) and so the full affect of these changes cannot yet be appreciated.

Incorrect Windows 8 error message change!

| 0 Comments
I've been pretty happy with moving to Windows 8. I've got used to the "new" UI, it was a pretty painless transition once I learned the new shortcut keys and I actually think that the new "start menu" is better, you don't have to worry about complicated trees of folders, it's all flat and you just start typing the name of what you want... So for me, a developer with two monitors and no touch interface using the desktop pretty much as I always have done, Windows 8 works well.

In fact, the biggest upset for me so far has been that some bright spark decided to change an error message for my locale... The message for WSAESHUTDOWN has changed from "A request to send or receive data was disallowed because the socket had already been shut down in that direction with a previous <b>shutdown</b> call." to "A request to send or receive data was disallowed because the socket had already been shut down in that direction with a previous <b>shut-down</b> call.". Now, apart from the new message being incorrect, it's not a "shut-down" it was a call to shutdown(), the change has broken some of my (possibly too invasive and therefore fragile) tests!

I have unit tests for The Server Framework and they test all manner of things, including what gets passed to the error callbacks. One of these tests is testing what happens when you issue a read after a socket has been shutdown... I now have to allow either error message, which is easy for me to do but it's annoying since the new message is actually incorrect!

About this Blog

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

This page contains recent content. 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