Geek Speak
Software development, technology, gadgets, etc...
XML RSS feed for this category.
[Valid RSS]


More thoughts on invasive/intrusive containers and STL allocators Posted by Len at 5 Aug 2010 04:09 PM
I'm still considering my options with regards to intrusive containers to replace the STL maps that I'm using in my timer queue implementation. I think I may be able to use the boost::intrusive sets in place of a true map...


Useful Visual Studio retirement matrix Posted by Len at 5 Aug 2010 08:26 AM
Here's a useful matrix which shows when each version of Visual Studio will become unsupported by Microsoft. I'm posting the link here as I'm sure I'll not be able to find it the next time I need it......


Invasive containers Posted by Len at 4 Aug 2010 09:28 AM
Rather than immediately dive into the fun of writing my own invasive alternative for std::map I decided to take a look at what has been done before, as expected boost contains something that might work in the shape of the...


STL allocators, hmm... Posted by Len at 4 Aug 2010 07:17 AM
As I mentioned a while ago, I have some code which needs to perform better than it currently does and one of the areas that could be improved upon is the amount of contention for the heap that's occurring. The...


Tool lag Posted by Len at 27 Jul 2010 11:02 AM
One of the problems of having a collection of tools that interoperate is that there's often a lag between when a tool will interoperate with the latest version of another tool. I'm hardly a bleeding-edge tool junky, I wait until...


Amusing bug in GetTempPath() Posted by Len at 22 Jul 2010 10:14 AM
Yesterday I had a bug report from a client who had a user that was getting an exception report from their software which simply said "GetTempPath() - Failed to get temp path". Now as error messages go this isn't the...


More thoughts on Big C Posted by Len at 17 Jul 2010 07:21 AM
I'm finding that the thread contention notation that I made up the other day to help me talk about the performance implications of the changes I was making is pretty useful. The definition needs adjusting slightly though... For a given...


STLPORT 5.2.1 AND VS2010 AND X64 Posted by Len at 6 Jul 2010 09:05 AM
I have been updating some client code to VS2010 and they use STLPort for the STL as it has better performance in multi-threaded situations than the version that comes with Visual Studio (see here). This has meant that I've needed...


Step over library code when debugging C++ in Visual Studio Posted by Len at 2 Jul 2010 10:24 AM
This is a handy tip from Jim Beveridge. It shows you how to add to the list of native function calls that the debugger steps over rather than into when you're debugging in various flavours of Visual Studio. I wonder...


The joy of hacking Posted by Len at 23 Mar 2010 10:05 PM
Today I had a day which I knew from the start would be broken up due to pre-arranged calls and meetings out of the office, and so I decided to deal with a few low importance items on my todo...


DevPartner Studio 9.1 Posted by Len at 24 Dec 2009 09:07 AM
I've complained about DevPartner Studio enough in the past (here, here, here, etc.) that I thought I should write a positive blog posting since my recent experiences have been very positive. Some time ago I reported a bug in the...


Writing a custom Wireshark dissector plugin Posted by Len at 26 Nov 2009 12:05 PM
I've been spending a little time recently writing a custom Wireshark dissector plugin for the UDT protocol. This didn't prove to be that difficult once I got over the initial problem of actually getting the Wireshark source to build with...


The equivalent of static libraries in .Net Posted by Len at 1 Oct 2009 04:18 PM
I'm building my managed XLL tool in two versions, a 'normal user' version and a 'pro' version. The 'pro' version has additional features that I don't feel would necessarily appeal to all of my potential users; things such as easy...


Parasoft Insure++ vs Microfocus/Compuware DevPartner Studio Posted by Len at 8 Sep 2009 03:17 PM
Has anyone got anything to say about the relative merits of Parasoft Insure++ vs the BoundsChecker parts of the Microfocus DevPartner Studio product? I've used BoundsChecker for a long time, and it has plenty of faults but the fact that...


A week with Windows 7 Posted by Len at 4 Sep 2009 05:58 PM
I upgraded one of my build machines to Windows 7 almost a month ago now but I only managed to get around to doing my main developer machine at the start of this week. Apart from the fact that the...


Using old compilers Posted by Len at 4 Sep 2009 12:12 PM
By an interesting coincidence I happened to be searching for a few new C++ blogs to follow and I also happened to have just updated this entry about Stan Lippman's VC6 rant (since I found a link to the original...


uuid.lib(unknwn_i.obj) : fatal error LNK1103: debugging information corrupt; recompile module Posted by Len at 11 Aug 2009 08:49 AM
Back in October 2005 some of my clients started to complain that the latest version of the Platform SDK (the April 2005 version) broke their builds. The culprit was uuid.lib which had been built with debugging information that the VC6...


Downloading Windows 7 Posted by Len at 7 Aug 2009 10:53 AM
Since I complained about how the Microsoft File Transfer Manager sucked when I was downloading the Windows 7 Beta back in March I thought I should be balanced and point out that last night I kicked off a download of...


A time and a place for comments Posted by Len at 28 Jul 2009 01:19 PM
I'm fairly set in my ways about the value (or lack of) of comments in C++ code. I tend to have very few comments in my code and I tend to favour names and structure over comments; names and structure...


Globals are evil Posted by Len at 28 Jul 2009 01:08 PM
Jamie Fristrom over at GameDevBlog thinks that "Globals are underrated". I disagree, and, agree with most of the comments that Noel makes; globals and their 90's equivalent, singletons, are evil. As anyone who has looked at the code that I...


Bug Psychology and how you can get stuck in a rut... Posted by Len at 3 Jun 2009 09:25 AM
Eric Lippert has an interesting blog posting (here) on how sometimes you can be so focused on fixing the bug you fail to step back and take a better look at the actual problem that you're trying to solve. I'm...


#pragma unmanaged Posted by Len at 14 May 2009 06:19 PM
I've just spent a little too long trying to track down a bug in a mixed mode DLL that I'm building. The DLL exposes a set of entry point functions that are defined as taking a single pointer argument and...


Building an inproc ATL COM object as x86 and x64 Posted by Len at 12 May 2009 09:50 AM
I'm currently wrapping a server's client side API in an ATL COM object for a client. The COM object will be used to communicate with the server from managed code or VB or other COM compatible systems. It's a fairly...


Embedded assembly programming Posted by Len at 8 May 2009 07:50 AM
Well, I've finally done something that I've been meaning to do for a long time. I've written some non-trivial assembly language code. Up until recently I wasn't expecting this to be embedded assembly, but it actually seems like a sensible...


May your software scale, and other curses... Posted by Len at 28 Apr 2009 01:16 PM
I'm in the process of upgrading another client to v6.0. These guys write multi-user game systems and have a fairly complex CLR hosting custom application server. Anyway, I was hoping that we'd have a few easy performance wins from the...


Interesting piece on thread pools Posted by Len at 21 Apr 2009 08:48 AM
Herb Sutter has just published an interesting article over at DDJ on correctly using thread pools: Use Thread Pools Correctly: Keep Tasks Short and Nonblocking. It's not rocket science and it doesn't deal with platform issues but it's a useful...


Breakpoint sequences... Posted by Len at 22 Jan 2009 09:43 AM
Something that I find myself wanting in a debugger from time to time are breakpoints that only fire if the code has been entered via a specific route. You know the problem, you've tracked a particular issue down to one...


Living with Subversion Posted by Len at 15 Jan 2009 09:27 AM
It's now around a month since I started shifting the bulk of my source code from CVS to Subversion. In that time I've move most of my internal use code, and a couple of clients. I've done several client releases...


How do you convert a number to a string in C++ with MSVC... Posted by Len at 19 Dec 2008 09:17 PM
Converting a numeric type to a string format in C++ is one of those problems that was 'solved' a long time ago. The 'standard' method usually involves streaming the type to be converted into a std::stringstream and then extracting the...


More code shuffling... Posted by Len at 18 Dec 2008 09:40 AM
The CVS to SVN code migration is going well. As recommended by a commenter I've switched from using a script to pull my tools libraries from their repository into the server framework examples build tree to using svn:externals. This works...


The great source code shuffle... Posted by Len at 11 Dec 2008 01:23 PM
I'm in the process of moving my source code from a CVS repository to Subversion. The main reason for the move is so that I can move the repository onto one of my NAS devices so that it can be...


Comments are back on... Posted by Len at 2 Dec 2008 09:31 PM
The move to the new hosting server is complete and all the perl config has been done so I've turned comments back on!...


DevPartner Studio 9.0 Posted by Len at 22 Nov 2008 07:23 AM
I've just updated my installation of DevPartner Studio. I mainly use the C++ error detection part of this suite, that's the bit that used to be called BoundsChecker. Anyway, version 9.0 is the first version to support VS2008 and x64...


/Wall Posted by Len at 19 Oct 2008 10:25 PM
I've been compiling with /W4 for some time now. I didn't realise that this wasn't the best you could get. There are some warnings which are not enabled by default and therefore aren't included in /W4. To enable these you...


STLPort 5.1.5 and VS2008 and x64 Posted by Len at 1 Oct 2008 11:06 AM
I've been meaning to build STLPort for Visual Studio 2008 for some time now but as the STL support that ships with Visual Studio has been improved the urgency to be able to use an alternative has reduced. Unfortunately STLPort...


WM_TIMECHANGE broadcast strangeness... Posted by Len at 9 Sep 2008 06:05 PM
I'm currently writing and testing a simple class that watches for system time changes. This is to allow an app to adjust some timers that it sets for absolute times in the future if the system time changes. The code's...


Lock free code is hard Posted by Len at 6 Aug 2008 12:06 PM
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...


Good technical blog Posted by Len at 24 Jul 2008 09:52 PM
I stumbled on Gustavo Duarte's blog this week via this post about how lucky we are to be programmers. The post that led me to his blog is good stuff and has had lots of linkage this week. The rest...


Interesting blog Posted by Len at 6 May 2008 12:30 PM
I found JP's blog whilst googling for some information on RVA forwarders in PE files. There's lots of good stuff there about reasonably low level Windows development, debugging, testing and API hooking. Recommended if you like the kind of stuff...


WOW64 Win32 DebugAPI CLR application startup change Posted by Len at 1 May 2008 04:43 PM
Back in October 2007 I sumarised my findings from getting my Win32 DebugAPI based debug engine working on x64. One of the strange things that I found at the time was this: When running a CLR app under the Win32...


Spam gone... Posted by Len at 24 Apr 2008 08:52 AM
The endless torrent of bounce messages began again yesterday evening. Once again it was arount one email every 2 minutes or so. I turned on my laptop this morning expecting a few thousand emails to download and only a third...


What would I do?? Posted by Len at 15 Apr 2008 10:24 PM
There's an entry over on the Dr. Dobbs blog about testing and how you make sure that your tests are testing the right thing; effectively, who tests the test. There's a question at the end "What do you do?" and...


PQR - A Simple Design Pattern for Multicore Enterprise Applications Posted by Len at 14 Apr 2008 05:44 PM
There's an interesting article over on the Dr. Dobbs Code Talk blog; PQR - A Simple Design Pattern for Multicore Enterprise Applications. It documents a design that I'm pretty familiar with and one which has worked pretty well for me...


It seems I'm not the only one... Posted by Len at 7 Apr 2008 07:05 PM
It seems I'm not the only one to make mistakes with GetTickCount() based timer code, see: System.Threading.Timer fires immediately when specifying a large value for due time....


And then there were three... Posted by Len at 22 Mar 2008 08:53 AM
This morning a new Ready NAS NV+ unit arrived, so now I have three. I didn't have a sudden change of heart about buying a development box, the power supply in my office NAS died on Thursday afternoon and buying...


ReadyNAS development... Posted by Len at 18 Mar 2008 09:22 AM
As I mentioned a while back I'm using a pair of ReadyNAS NV+ RAID systems as my on-site data store and off-site backup. These are both working well and I'm pleased with the solution. After a few hickups and delays...


Bug in timer queue code Posted by Len at 18 Mar 2008 09:15 AM
Whilst I've been away I've had a bug report for the TDD timer queue code that's available here. The report is completely correct and could result in a timer being scheduled out of sequence if it's scheduled around the point...


.Net Abstract base classes vs. interfaces Posted by Len at 21 Feb 2008 01:20 PM
An interesting piece here from Phil Haack about why they decided to use an abstract base class rather than an interface. Versioning is always a complicated thing for library designers. I know that I'm lucky in that I don't have...


When are asynchronous file writes not asynchronous... Posted by Len at 20 Feb 2008 09:51 AM
For some time I've had a class which implements asynchronous file writing. It's the basis for a logging class that some of my clients use. The class builds on several of the classes used in my server framework and uses...


Major Vista Overlapped I/O change Posted by Len at 18 Feb 2008 08:17 AM
I'm still reading the Richter book, highly recommended even if you've read one of the earlier versions. In fact it's possibly MORE highly recommended IF you've read one of the earlier versions... It seems that lots of things have changed...


Process management using Jobs on Windows Posted by Len at 14 Feb 2008 09:25 AM
One of the problems I currently have with CruiseControl.Net is that some of my tests spawn multiple processes; such as server tests which run the development environment, which runs a batch file to start a server (or two) and then...


Living with continuous integration Posted by Len at 31 Jan 2008 08:48 AM
Well, it's about a month since I started running Cruise Control .Net and things have settled down somewhat now and I can almost go a day or two without tweaking my configuration or being tempted to fix issues in Cruise...


Coding the markets Posted by Len at 31 Jan 2008 08:33 AM
Barry (who seems to have stopped blogging) recommended this blog to me; Coding The Markets. It's pretty good if you're into investment banking development stuff....


DNSBL - again... Posted by Len at 15 Jan 2008 12:07 PM
If Richard Wolff is reading this then I can't reply to your emails as your ISP is bouncing my emails with this: Hi. This is the qmail-send program at ns.mgf4.net. I'm afraid I wasn't able to deliver your message to...


CruiseControl.Net patches Posted by Len at 14 Jan 2008 02:25 PM
Hacking CruiseControl.Net to work better for my specific circumstances (lots of projects that depend on lots of projects) has resulted in the following patches to revision 3607 of ccnet which I'm just about to submit to the developers. These patches...


How important is VC6 to you now? Posted by Len at 10 Jan 2008 09:23 AM
I'm working on the next releases of the licensed version of the socket server framework, and I now have continuous integration (of a sort) so my build and test problems are being minimised... BUT... Keeping Visual Studio 6 support in...


Thread.Sleep(100); // sleep for a short while, to avoid hammering CPU Posted by Len at 3 Jan 2008 10:41 PM
I am intending to check out some of the other build servers that people have been suggesting, but today I was too busy with real work so I just left a cut down version of my latest CruiseControl.Net configuration running...


More Cruise Control .Net woes Posted by Len at 2 Jan 2008 06:46 PM
I've almost got something that works out of CruiseControl.Net. Once I'd hacked in some fixes for the project triggers and other stuff that didn't work the way I wanted it to I concentrated on generating the config files that I...


Fighting with CruiseControl.Net... Posted by Len at 21 Dec 2007 09:55 PM
I've been trying to get my code to build with CruiseControl.Net this week. It's taken longer than I'd hoped, but I'm almost there. It became easier when I switched from assuming various parts of CruiseControl.Net would "work as I expected...


CruiseControl.Net Posted by Len at 18 Dec 2007 05:11 PM
I'm currently working on two new releases of my socket server framework, the first is a simple release to add support for VS2008 and the second is the next "feature" release. Due to the number of projects and example servers...


Secure code on vista only for 'enterprise' developers? Posted by Len at 13 Dec 2007 10:02 PM
I picked up a book yesterday, Writing Secure Code for Windows Vista. Which seemed quite interesting, and was a nice slim volume that would slip into my hand luggage for my flight to Geneva on Friday night (yay first ski...


Reclaiming my CPU... Posted by Len at 12 Dec 2007 11:22 AM
I removed the last version of "Norton Anti-Virus" (and all of the other stuff that I've been upgraded into over the years) from the last of my machines yesterday. I've replaced it with AVG, currently the free version to test...


Thank you Raymond Posted by Len at 29 Nov 2007 12:02 PM
Raymond Chen has just blogged about "The importance of the FORMAT_MESSAGE_IGNORE_INSERTS flag" over on The Old New Thing. That's another annoying bug fixed ;). I've occasionally wondered why I get some less than informative error messages sometimes, I wasn't passing...


Back in time with DDE Posted by Len at 20 Nov 2007 11:48 AM
After completing some work for client with the custom CLR hosting server I've started looking into a problem for another client, it's a bit of a transition as the problem that he's having is with a DDE connection from his...


Thirteen Patterns of Programmer Interviews... Posted by Len at 20 Sep 2007 01:53 PM
Sad but true... The "Typical Programmer" has a piece on Thirteen Patterns of Programmer Inverviews. I think I've probably been interviewed in all of these styles over the years and taken part in several of them from the interviewing side...


See the "What About .NET?" sidebar... Posted by Len at 31 Jul 2007 04:11 PM
Interesting... It seems that rumours of C++'s demise in the brave new world of .Net were slightly over exagerated, perhaps, maybe... From a recent issue of MSDN magazine: "There are two main reasons why this column was born. First, despite...


VS2008 Beta 2 first impressions Posted by Len at 28 Jul 2007 11:42 AM
I've just installed Visual Studio 2008 Beta 2 in a VMWare box so that I can start to test the x64 port of my socket server framework with the new compiler. I haven't bothered to look into what's new in...


Nick Gunn is blogging again... Posted by Len at 25 Jul 2007 05:13 PM
I used to work with Nick at CSFB and then at Barclays Capital. He's always been a good, techie, low-level COM/.Net geek and his latest writings on the Microsoft Concurrency and Coordination Runtime are interesting! If you're interested in async/multi-threaded/concurrent...


VS2005 breakpoint annoyance Posted by Len at 19 Jul 2007 10:51 AM
My Visual Studio 2005 C++ debugger seems to have stopped doing what VC6 used to do if you placed a breakpoint on a line that didn't result in executable code... VC6 used to warn you and then move the breakpoint...


Infrant Ready NAS NV+ Posted by Len at 18 Jul 2007 09:04 AM
I've been running a pair of 2TB Infrant Ready NAS NV+ RAID systems for a while now as on-site file server and off-site backup and so far I'm very pleased with them. I have one under my desk and one...


Non-trivial... Posted by Len at 18 Jul 2007 08:39 AM
Charles Miller over at 'The Fishbowl' provides a cheat sheet to decode what us programming types mean when we describe the difficulty of solving problems......


CreateFileMapping, Vista, Global namespace, SeCreateGlobalPrivilege... Posted by Len at 10 Jul 2007 09:21 AM
I'm fixing up my performance monitoring code and this uses shared memory to communicate between the perfmon extension DLL and the application. Since I'm tightening up security I decided to explicitly pass in the security attributes, which has a possitive...


Fixing my performance counter library for Vista Posted by Len at 9 Jul 2007 11:43 AM
So, back in June I discovered that my performance counter library code didn't work on my new Vista x64 development box... The problem seems to be that the code has always been doing things in an undocumented/unsupported way and it's...


Pluggable log systems Posted by Len at 27 Jun 2007 09:29 PM
In the past I've mentioned my lack of enthusiasm for the normal 'debug trace' files that some systems seem to include... I pretty much consider them a design smell... But, some of my clients seem to like them and over...


STLPort 5.1.3 and multiple VC versions Posted by Len at 23 May 2007 01:12 PM
I'm just about to try out the latest STLPort release and I went to apply my 'STLPort 5.0 multiple side by side dlls changes' from 2005 and noticed that the place where one of the changes needs to be made...


I'm with Dennis, and Ian... Posted by Len at 16 May 2007 10:17 PM
Given what Jeff wrote recently and what Ian and Dennis said about it... I'm definitely on the Ian and Dennis side of the fence......


A computer magazine that makes me feel like I used to about programming... Posted by Len at 16 May 2007 10:05 PM
I grabbed a couple of copies of "The NT Insider" from my 'not quite got around to reading' rack today and read them on the train on the way in to London. These are the quite short, bi-monthly, driver developer...


UPnP User Interface causes Explorer to hang in My Network Places? Posted by Len at 12 May 2007 10:09 AM
I've been having some problems with Explorer hanging when opening "My Network Places" on some of my machines. Some work fine, some hang. Most annoying. I've been trying a few things over the past few weeks (as and when I...


Taking more of my own advice... Posted by Len at 10 Apr 2007 12:19 PM
I'm continuing to work through my list of things to do for my Socket Server Framework library (and all the libraries that support it) and I've recently got to the 'set up Doxygen and do a bit of documentation' item......


Yay .Net sockets stuff... Posted by Len at 5 Mar 2007 04:35 AM
Nice to see that the new beta, sorry, CTP, of the next .Net Framework will increase the performance of .Net sockets by 70%! Way to go .Net dudes.... Interesting to see that it's a joint effort between the System.Net people...


Hmm, is this really a good fix? Posted by Len at 5 Mar 2007 04:30 AM
Back in July Joe Duffy wrote an interesting piece on the CLR thread pool. I commented on it then, here. He's now written another piece about why they increased the maximum number of threads in "the thread pool" from 25/cpu...


Software failures... Posted by Len at 15 Feb 2007 09:22 AM
I'm in Jackson Hole right now, my skis are still in Denver... Although they've replaced the baggage handling system at Denver International Airport since the days of the classic software project failure, it seems that the current system could still...


Dino Viehland on CLR hosting Posted by Len at 13 Feb 2007 12:13 PM
This is mainly a reminder for me so that I can read this when I get back from Jackson Hole... Dino Viehland has written some interesting looking blog posts on how to implement the thread/task and syncrhonisation host managers for...


Crapness in mscoree.h Posted by Len at 8 Feb 2007 03:49 PM
I'm playing around with hosting the CLR in C++ at present and have come across a bit of crapness in the mscoree.h file... #if (_MSC_VER...


Some interesting stuff from Katie Lucas Posted by Len at 8 Feb 2007 01:34 PM
Here are a few interesting views on software development from Katie Lucas. Via Joel on Software. I especially enjoyed the design methodologies, becoming a manager and "remove developers net access" pieces....


Why do developers still use VC6? Posted by Len at 1 Nov 2006 01:24 PM
Tim Anderson asks why there are so many developers still using VC6... Well, as I said before, if you produce C++ software in source code form and any of your clients require that you support VC6 then it's often easier...


Nerd in a cave Posted by Len at 12 Jul 2006 09:17 AM
This is something that anyone living with a geek really needs to understand. I find it interesting that Rands has his set patterns of behaviour for getting into The Zone in the mornings. I'm very much a creature of habit...


Deadlock detection tool design change for Vista? Posted by Len at 12 Jul 2006 08:54 AM
It seems that Vista contains lots of interesting new Win32 API calls and some of these provide built in support for deadlock detection... I guess my deadlock detection tool can operate differently on Vista then......


CLR thread pool woes Posted by Len at 12 Jul 2006 08:47 AM
Joe Duffy has written an interesting piece over on "Generalities & Details: Adventures in the High-tech Underbelly" about problems with the CLR thread pool. Joe's a program manager on the CLR team at Microsoft, so he knows what he's talking...


IDisagree Posted by Len at 7 May 2006 11:24 AM
Jeremy D. Miller talks about how he dislikes the "I" prefix on interface names and how he'd prefer to ditch it in the same way he's ditched most other hungarian notation. I'm all for ditching hungarian but I actually quite...


Ah, so that's what it's like to make the front page of digg! Posted by Len at 28 Mar 2006 10:00 AM
Typical. My usual subject matter isn't interesting enough to get onto digg.com, etc. but a throw-away post about using Ethereal to catch my partner cheating gets on the front page... Ah well, such is life :) I'll just try and...


VS2005 STL strstream and stringstream leaks Posted by Len at 11 Feb 2006 10:17 AM
Well, it turns out that my initial gut instinct about the leaks that I found in my socket servers when built with VS 2005 was correct. It was an STL thing....


New kind of spam? Posted by Len at 10 Feb 2006 08:02 AM
Recently I've been getting lots of emails from people who seem to think that my company, JetByte Limited, is currently recruiting. We're not now and are unlikely to be in the near future, but that doesn't mean people shouldn't send...


Good stuff Posted by Len at 9 Feb 2006 08:17 AM
Once again I have a list of items flagged for comment in Bloglines but at least this time I have an excuse: "We were on a break!". First is a link from Brad Wilson to where Bruce Eckel writes about...


Sounds like a real nice way to work Posted by Len at 6 Feb 2006 12:51 PM
Noel Llopis, over at Games From Within, has written a nice piece about a typical workday at his work place, High Moon Studios. It certainly sounds like a nice way of working. Unfortunately I haven't been involved in quite that...


More on the socket server leaks Posted by Len at 21 Jan 2006 01:34 PM
It seems that the leak that I found isn't likely to be the one that my new user of the code is having problems with. They've built the code with Visual Studio 2005, made a few (correct) changes to the...


Leak plugged Posted by Len at 20 Jan 2006 09:59 PM
Well, the leak in my legacy code wasn't too hard to find. There was one potential leak and one screamingly obvious leak. I'll post the fixed code tomorrow....


Always Produce Posted by Len at 20 Jan 2006 08:12 AM
Paul Graham writes about "How to do what you love"... It's quite a good piece but the best bit is hidden down near the end. He suggests that a good way to "stay honest with yourself" about dreams to do...


The best toys always come with an SDK, 2 Posted by Len at 16 Jan 2006 02:54 PM
I finally got around to upgrading my mobile phone from an aging Sony Ericsson T68i to a more current (though still hardly bleeding edge) Motorola Razr V3. I'm not interested in the downloadable java games but the fact that you...


First tracks Posted by Len at 15 Jan 2006 09:03 PM
Last week I managed to get my GPS code to download the GPS "track" from my device and create an html file that uses the Google Maps API to display it as an overlay. I spent some time trying to...


Purecall Posted by Len at 14 Jan 2006 01:19 PM
I've been plugging away at my multi-process Win32 debugger code this week and one of my test harnesses had started to suffer from intermittent "R6025 - pure virtual function call" errors. These tend to crop up if you call a...


A collection of links Posted by Len at 14 Jan 2006 12:16 PM
Once again I've been too busy to comment on the following blog postings in a timely manner so here's a collection of stuff that's been sitting in my "good stuff" list for a while now....


So that's what it's called Posted by Len at 14 Jan 2006 09:45 AM
Jeremy D. Miller points out that my 'second' style of coding (see here) is called writing a "spike" in XP terms....


Shaping the future of the XLL interface in Excel 12 Posted by Len at 12 Jan 2006 08:21 AM
If you're into writing C/C++ XLL addins for Excel and you'd like to help make sure that the new features in the new XLL interface provide all the functionality that you'd like, then it might be an idea for you...


Excel addins sharing data Posted by Len at 10 Jan 2006 10:58 PM
Or, marvelling at my own, past, cleverness. I've been doing a lot of work on these Excel addins for my current client and, as I get back into the whole C++ XLL stuff, I start to realise just how cool...


Beware the momentum of prototype code Posted by Len at 10 Jan 2006 07:53 PM
A while back Chris Baus wrote a little rant about prototypes. I started to write a piece that defended prototypes when correctly used and ran out of steam; or, more to the point, couldn't really say very much except they're...


Detecting the Excel Function Wizard Posted by Len at 9 Jan 2006 07:32 PM
I'm currently working on some C++ Excel addins for an investment bank. I originally wrote the addins for them back in 2001 and they've evolved slowly ever since. Right now we're adding some new functionality and, whilst testing some of...


Now I'm confused (C++/CLI destructors) Posted by Len at 8 Jan 2006 01:36 PM
So here I am, writing a piece about how the C++/CLI destructor and finalizer stuff could have been a bit neater and I put together some sample code to demonstrate my point and it doesn't do what the docs I...


Something all C++ programmers should know when using managed C++ Posted by Len at 7 Jan 2006 11:12 AM
Beware! The rules for when a destructor is called for a managed C++ class in Visual C++ are different than for "normal" C++ class....


Grumpy old men Posted by Len at 7 Jan 2006 09:42 AM
Am I a curmudgeon of technology? You betcha - Ted Neward over at "The Blog Ride" explains why he's cynical about new technology and suggests that we'd do well to have a little more cynicism. I agree with him, I...


iTech Bluetooth Virtual Keyboard Posted by Len at 6 Jan 2006 07:40 PM
I recently purchased an iTech Bluetooth Virtual Keyboard for use with Michelle's PDA. It's basically a little box that's about the size of two packets of chewing gum with a red window in the top. It projects a keyboard onto...


LEGO Mindstorms NXT Posted by Len at 5 Jan 2006 07:23 PM
LEGO has announced a new version of their Mindstorms autonomous robot building system. I did a fair amount of playing around with the original Mindstorms kit way back when and created a system that allowed you to control your robots...


Programming by contract in C++ Posted by Len at 1 Jan 2006 03:05 PM
There's the first part of what I expect to be a very nice article about programming by contract in C++ over at The C++ Source: The Nuclear Reactor and the Deep Space Probe. Updated 3rd Jan 2006 - the article...


Garmin eTrex Vista C communications protocols Posted by Len at 30 Dec 2005 11:08 AM
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...


Thought for the day Posted by Len at 28 Dec 2005 12:13 PM
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?...


Is it just me, or do the best toys always come with an SDK Posted by Len at 27 Dec 2005 10:35 AM
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...


Interesting article on deadlock detection in DDJ this month Posted by Len at 24 Dec 2005 03:49 PM
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...


More thoughts on thread naming Posted by Len at 22 Dec 2005 07:57 PM
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...


On Edit and Continue Posted by Len at 22 Dec 2005 11:59 AM
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......


Pluggable exception handling Posted by Len at 22 Dec 2005 11:27 AM
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...


STLPort 5.0 and multiple VC versions Posted by Len at 22 Dec 2005 09:59 AM
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...


Naming Win32 threads - how it works Posted by Len at 20 Dec 2005 07:28 PM
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...


I guess I'll file that in the "I didn't know you could do that" pile Posted by Len at 9 Dec 2005 10:49 PM
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...


A change of technologies Posted by Len at 3 Dec 2005 08:45 AM
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...


Udi Dahan on Physical Design Posted by Len at 30 Nov 2005 02:36 PM
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...


Hosting problems resolved Posted by Len at 25 Nov 2005 09:04 AM
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...


I don't like Vanilla Scoble Posted by Len at 16 Nov 2005 10:38 AM
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...


Why are the "event" classes in .Net STILL broken? Posted by Len at 15 Nov 2005 06:01 PM
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?...


Too much encapsulation reduces the ability to multiplex? Posted by Len at 15 Nov 2005 04:06 PM
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...


Bad Managers? Posted by Len at 9 Nov 2005 07:24 AM
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...


Visual C++ 2005 cannot build dynamically linked applications for NT4 deployment Posted by Len at 4 Nov 2005 12:35 PM
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....


Note to self Posted by Len at 27 Oct 2005 04:35 PM
This CodeProject entry is SO full of errors and poor practice that I must find the time to leave a comment on it... [Updated: 29th October] Done. Comment is here....


Evil macros in April 2005 Platform SDK headers Posted by Len at 26 Oct 2005 12:26 PM
I'm upgrading one of my build machines to use the April 2005 edition of the Platform SDK to investigate the implications of this posting over at eggheadcafe.com which states that since Visual Studio 6 ceased to be supported as of...


If you enjoyed the Petzold thing earlier... Posted by Len at 25 Oct 2005 09:50 PM
This may also be your kinda thing. Ellen Ullman's 1998 two part series "The Dumbing-Down of Programming" from Salon archives. Rebelling against Microsoft, "My Computer" and easy-to-use Wizards, an engineer rediscovers the joys of difficult computing. Returning to the Source....


LNK2005: _iswdigit already defined in ... Posted by Len at 25 Oct 2005 09:11 PM
I'm in the process of preparing a release for a client. I've done the work, the tests pass, the stress test runs with flying colours and so I've tagged the source and I'm in the middle of the final build...


Charles Petzold on coding Posted by Len at 25 Oct 2005 10:58 AM
Charles Petzold recently delivered a talk at the NYC .Net Developer's Group and he's made it available online here "Does Visual Studio Rot The Mind?". It's an interesting read, especially if you actually remember writing early Windows GUI applications and...


Walking Managed Stacks with the Profiling API in v2.0 of the CLR Posted by Len at 9 Oct 2005 11:24 PM
It seems to be stack walking week; what with Ned's posting earlier about walking an unmanaged stack and now this excellent piece by David Broman on doing the same in with managed code....


I don't think I've ever been disagreed with in Japanese before Posted by Len at 9 Oct 2005 10:02 PM
The discussion on Assert goes on, this time in Japanese... Google's language tools lead me to believe that they're disagreeing with me. They seem to be pretty shocked that I'd take this stance and appear happier when Noel puts me...


Throwing the baby out with the bathwater Posted by Len at 8 Oct 2005 12:55 PM
Richard Hale Shaw writes on using statements in C# and his conclusion is "it's too confusing" and "I'd suggest not even using using statements". I think that position is a little harsh, but I think that the main problem is...


More on locking Posted by Len at 7 Oct 2005 08:11 AM
Jeff Darcy over at "Canned Platypus" writes about "How to add locking to a program". He laments the lack of a reasonably priced deadlock detection tool. I assume, from his backgrond, that he's interested in an Linux tool, so my...


Walking the call stack Posted by Len at 7 Oct 2005 07:23 AM
Ned Batchelder has written about the code he uses to get a call stack out of a windows program (thanks for the link Barry). I've added a snippet of the code I use as a comment to his post. I...


MT-Blacklist Posted by Len at 7 Oct 2005 06:45 AM
It seems that Jay Allen has shutdown both MT-Blacklist and the 'master blacklist' due to bandwidth problems caused by either a denial of service attack or inconsiderate developers. Jay hosted a regularly updated file of regular expressions that powered the...


Jeff Darcy on Linus on specifications Posted by Len at 3 Oct 2005 03:07 PM
Jeff Darcy over at "Canned Platypus" has written a nice piece on specifications and how Linus has got it wrong. Any post that contains the phrase: "... who wouldn’t know good code if it got into a robot and literally...


Asserts are evil, except when you have no other choice Posted by Len at 3 Oct 2005 09:39 AM
Noel Llopis over on "Games from Within" has written a nice rebuttal to my Asserts are evil post and the follow up. I think it's probably about time to wrap this up ;) So, here's what I've learned... [Updated: 24th...


Once again I've been too busy to comment on these during the week Posted by Len at 1 Oct 2005 11:15 AM
A collection of blog posts that I flagged for follow up this week....


Is Raymond Chen's use of Assert valid? Posted by Len at 28 Sep 2005 10:04 AM
I'm sure you're all getting bored on my views on using Assert in modern C++ code by now, I'll try and make this the last one. Last time, I asked if anyone had what they'd consider to be an example...


More from Mark and Barry on Assert Posted by Len at 27 Sep 2005 09:22 PM
Mark responded to Barry's response to my post on Assert. Barry then responded to Mark and Kim and I added a little more in the comments. I did have some more to say, but Barry's said most of it... Anyway,...


Common knowledge to many, but... Posted by Len at 27 Sep 2005 09:06 PM
Alexis Smirnov has just written a piece on why you shouldn't try and use STL's map::operator[] to find out if a map contains a particular element. It's probably common knowledge for most people using STL, but it's worth repeating for...


Barry's take on Assert Posted by Len at 26 Sep 2005 07:59 AM
Barry Lapthorn has a response to my Assert is Evil posting where he concludes that assertions aren't needed if you have tests... He also raises a point that I missed which is that the typical assert on Windows machines causes...


Good stuff Posted by Len at 24 Sep 2005 10:06 AM
I use BlogLines to read my RSS subscriptions. It's pretty good, and now that the performance issues I had initially seem to have gone away, I like it a lot. It's very handy to be able to read my feeds...


Opera lover Posted by Len at 22 Sep 2005 09:53 AM
The Opera web browser is now free. It's worth giving it a try. I downloaded it after Barry sent me a link to the free registration codes that they were giving away a few weeks ago to celebrate their 10th...


AdSense preview tool Posted by Len at 22 Sep 2005 09:38 AM
The Google AdSense Preview Tool does exactly what it says on the tin. So it's very useful for working out what kind of ads you'd get if you added Google's AdSense to your pages....


New C# v3 features explained in context Posted by Len at 22 Sep 2005 09:02 AM
Ted Neward has a very nice piece about the new language features in C# v3 and how they work together to provide something quite powerful. Go read it! Given that implicit typing, object initialisers and extension methods are all designed...


Restricting the use of extension methods? Posted by Len at 19 Sep 2005 11:37 AM
Having looked through the slides that Vagn pointed me to in a comment to my recent post about C# v3.0 Extension Methods I can understand, a little more, about the reasoning behind the change to the language. Given that the...


Concepts and C++ Templates Posted by Len at 18 Sep 2005 07:45 PM
The slides from Herb Sutter's C++ Futures talk (TLN309) at this year's PDC refer to "Concepts" in C++ templates; for me this is a much more useful addition than the auto keyword repurposing. I'm sure this is something that would...


Whilst I'm on the subject of code communication Posted by Len at 17 Sep 2005 12:19 PM
I've never really got to grips with the STL's algorithms; actually that's not strictly true, it's really just for_each() that I have most problem with. To me, code that uses for_each() simply doesn't communicate as clearly as code that uses...


Sacrificing precision for ease of use? Posted by Len at 17 Sep 2005 11:15 AM
I'm probably jumping the gun a little here as I can't find Herb Sutter's slides that Matt Pietrek is referring to, but... Once again I find myself asking why is it actually useful to repurpose the auto keyword in C++......


C# v3 Extension methods, syntactic sugar for the lack of free functions? Posted by Len at 16 Sep 2005 03:12 PM
There's a lot of noise coming out of the Microsoft PDC right now. Something that interested me was the future direction of C#; you can grab the spec from here. It seems they're adding "extension methods" which, to me, appear...


Overriding virtual functions, C# is better than C++ Posted by Len at 16 Sep 2005 12:22 PM
I've been merging my UDP framework development branch back to main, building all of my example servers and running all of the "black box" server tests. In doing so I've experienced the pain of changing virtual function signatures. This is...


Does the arrival of Google Blog Search mean blogs will be removed from the main Google results? Posted by Len at 14 Sep 2005 09:00 AM
Google have a beta of blog search engine up and running here. It looks good, seems to work and does pretty much what you'd expect. I'm left wondering why it's needed though... After all, how to you define a blog?...


Assert is evil Posted by Len at 12 Sep 2005 10:58 AM
Christopher Baus has been away and whilst he was a away his HTTP proxy shutdown due to a bug which caused an assert and his site was unavailable. Personally I abhor assert; but I completely agree with what Chris is...


More thoughts on change and typedefs Posted by Len at 10 Sep 2005 08:49 AM
Of course, now that I'm well into using the "option 4" I start to remember why I kept sliding back from options 2 and 3 towards 1. Although option 1 uses native types instead of typedefs which is bad for...


Pimp my hide Posted by Len at 9 Sep 2005 11:20 PM
As some of you may have guessed, the fact that I've spent the last week working on a tool for my own use means that I'm a little light on client work right now. If anyone needs a Windows C++...


In summary, don't summarise too soon Posted by Len at 9 Sep 2005 10:54 PM
I've been working on my deadlock detection and lock monitoring tool quite a lot this week; that and fixing the issues that it's been highlighting. Yesterday I decided that I was drowning in data and that I really needed a...


Change is good Posted by Len at 9 Sep 2005 12:17 PM
I like to experiment with new coding practices. Not too many at once mind you. I tend to add one new thing to how I work, operate in the new way for a while and then decide if the new...


Lots of answers but little help Posted by Len at 8 Sep 2005 06:18 PM
I don't read many newsgroups, I don't have the time, but I take notice of the Windows networking ones as they're low traffic and they're relevant to a lot of the work I'm doing at present... I've noticed something that's...


What's with CreateProcess and managed exes? Posted by Len at 8 Sep 2005 10:06 AM
I have some code that launches another process in a suspended state, does some stuff (tm) and then resumes the process. This uses CreateProcess() and works fine on unmanaged exes. When I try and launch a manged exe with the...


Viewing lock lifetimes Posted by Len at 8 Sep 2005 08:34 AM
I added some more monitoring to the deadlock tool. You can now view the entire life cycle of the locks, from initialisation, through usage to destruction. The lock usage figures put the contention figures in context as you can see...


Observing lock contention Posted by Len at 7 Sep 2005 02:39 PM
The deadlock detection tool that I was working on last week is coming on nicely. I managed to locate two potential deadlocks that had never caused any problems in code that is running live on a client's site. Once I...


I've been lazy this week Posted by Len at 2 Sep 2005 08:46 AM
As I mentioned in an earlier posting I've been working on a tool this week. I'm too lazy to do a job manually and so I decided to write a tool to help me do it... The tool is designed...


Make sure you are doing RAII properly Posted by Len at 1 Sep 2005 11:48 AM
There's an interesting post over on the Joel On Software forums about RAII in C++. The original poster's problem is clearly stated in the first line of their question: When the constructor for CTheClass runs, I want to acquire 3...


Reader Questions Posted by Len at 1 Sep 2005 11:34 AM
Ahsan Askari asked the following in a comment to one of yesterday's posts: Just like to know whether you use external libraries specially 'BOOST' in your commercial projects and related pros-n-cons ? Also i like to know your initial strategy...


Lots of things become unnecessary if you factor things correctly Posted by Len at 31 Aug 2005 07:06 PM
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...


I just don't get it, what's with this->? Posted by Len at 31 Aug 2005 09:29 AM
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...


It's obvious when you think about it, but Posted by Len at 31 Aug 2005 09:01 AM
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...


The price of freedom is eternal vigilance. Posted by Len at 23 Aug 2005 03:35 PM
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...


JLR on C++ interfaces Posted by Len at 23 Aug 2005 07:20 AM
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...


While Windows lives, it's hard to see how COM will ever die. Posted by Len at 22 Aug 2005 03:28 PM
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,...


It's the libraries, stupid Posted by Len at 19 Aug 2005 03:16 PM
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...


Joel is a bit confused about agility and design Posted by Len at 18 Aug 2005 09:24 AM
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...


I wonder what the rationale for this restriction is Posted by Len at 17 Aug 2005 07:09 PM
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...


Garbage Collection and Pointers Posted by Len at 12 Aug 2005 07:26 AM
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....


Borland C++ v3.1 and "The Raymond Chen Camp" Posted by Len at 11 Aug 2005 11:06 AM
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...


First impressions of Visual Studio 2005 from a C++ point of view Posted by Len at 10 Aug 2005 04:45 AM
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...


I feel the need to comment on this... Posted by Len at 8 Aug 2005 08:49 AM
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...


/Y3 where have you been all my life Posted by Len at 2 Aug 2005 08:54 AM
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...


Threading flames Posted by Len at 30 Jul 2005 09:48 AM
Thanks to Ned Batchelder for pointing out the "discussion" about the pros and cons of multi-threaded programming over on the SQLite newsgroup. The comments on Ned's post are well worth reading; they've provided me with a new blog to subscribe...


On the bandwidth wasted by poorly designed spam software Posted by Len at 30 Jul 2005 06:40 AM
I've been watching my web server logs in real time for the last couple of days, not intently; I do have a few slightly more interesting things to do. I've had a tail of the logs running on the laptop...


Blog Explosion just doesn't do it for me Posted by Len at 29 Jul 2005 09:05 PM
I've been attempting to boost the number of people reading this blog in the last few weeks. Mainly because the more people there are reading the more likely I am to get feedback in the form of comments and postings...


Whilst on the subject of deadlocks Posted by Len at 28 Jul 2005 07:56 PM
It must be a deadlock kinda day. Pete McKinstry points to a Java deadlock avoidance scheme which involves knowing and using a total ordering of the locks that you wish to acquire. This is similar to Andrei Alexandrescu's C++ idea...


Visual C++ 2005 loses single threaded CRT Posted by Len at 27 Jul 2005 03:10 PM
From C++ Potential. In a posting about changes to the compiler switches in Visual C++ 2005 Brandon mentions that they've removed the single threaded C runtime library options. Does anyone out there use the single threaded CRT anymore? I can't...


Result should be const ? conditional operator : if then else Posted by Len at 27 Jul 2005 09:27 AM
Simon says; I've stopped using ?: because it isn't as readable as an if .. then .. else. ... I, personally, don't find the readability of the conditional operator (?:) a problem. No more than I find readability of assignments...


Blogs as conversations and how blog search can help fill in the gaps Posted by Len at 26 Jul 2005 02:57 PM
Robert Scoble, and others, are discussing blog search engines at present. It's quite interesting to see that there are lots of different approaches to the same problem. Mary Hodder's article is good in that it explains a bit about the...


This should be interesting Posted by Len at 25 Jul 2005 06:57 PM
Richard Hale Shaw is writing some blog entries about moving away from C++ (to .Net). But then he would say that, wouldn't he. His job includes providing courses for people learning .Net... ;) Anyway, I'm sure it'll be an interesting...


No, that's not the point, and yes, trace logging IS bad Posted by Len at 21 Jul 2005 10:50 AM
Sahil Malik doesn't agree with Jeremy Miller's description of excessive tracing being a code smell. He suggests a 'neat' way to get around the problem but, IMHO, he's completely missing the point, and I've said as much before. Oh, and...


What's wrong with my CSS? Posted by Len at 20 Jul 2005 08:57 PM
My <pre> styling looks OK (to me at least) in IE 6 and horrible (double spaced and strange) in Firefox. Can anyone tell me why?


The 'full articles' feed is now feeding full articles again Posted by Len at 18 Jul 2005 06:34 PM
Seems like I broke it when I added the GoogeAds for that feed... RSS 1.0 (full articles) RSS 2.0 (extracts)...


So, where's the Unix version of CodeProject? Posted by Len at 30 Jun 2005 10:49 PM
Software development is hard. Lots of details that are hard to get your head around and harder to simplify. CodeProject is a wonderful resource for Windows programmers where programmers try and make the complicated more simple for others; I view...


Linux's Dll hell? Posted by Len at 30 Jun 2005 10:44 PM
I've been playing with Linux this week. The last time I played with Linux was back when it fitted on 15 floppy disks; I think I still have the 15 floppy disks in Dad's office somewhere. It's come a long...


And now for something completely different Posted by Len at 28 Jun 2005 11:10 PM
One of my clients has asked me to do some investigative work for them in relation to Linux running on a Vortex86-6071LV (a PC/104 format PC which is 386 PC on a board that's around 6" x 4" x 1/2")....


Is bloglines always slow? Posted by Len at 25 Jun 2005 12:36 PM
I've been using SharpReader as my RSS reader for ages. I downloaded a version of it way back when I first got into blog reading and stuck with it because it worked, to a fashion. I ignored the bloaty .Netness...


0xFF 0xFE -> CVS -> 0xEF 0xBB 0xBF Posted by Len at 17 Jun 2005 10:21 AM
My project house-keeping yesterday ended up with a rather strange discovery. I have some test log files that contain Unicode characters and are stored on disk as UTF-16 with the correct 2 byte 'byte order mark' (BOM) header of 0xFF...


Working on the borders Posted by Len at 17 Jun 2005 09:32 AM
As anyone who has downloaded any of my code from here, or my company site or CodeProject will know, I have a particular way of doing things. The code I write tends to follow a particular style and as such...


Catching my breath Posted by Len at 16 Jun 2005 09:56 AM
I've had a busy few weeks. I'm waiting for a client to come back to me about a quote for some work and whilst I'm waiting I'm putting together a prototype for a product that I'm interested in producing. The...


Code Generation Posted by Len at 4 Jun 2005 11:35 AM
I've spent much of this week moving from a hand crafted prototype to a code generated version of the same code. The code is all repetitive boiler plate, sort of like the stuff that MIDL generates for you. The code...


Static linking Posted by Len at 31 May 2005 10:22 AM
Christopher Baus bemoans the problem of getting all the libs that he wants to use linked in statically on Linux. Chris wants an executable that will run on lots of different systems with the least amount of pain for all...


Stan Lippman's VC6 rant Posted by Len at 17 Dec 2004 10:12 PM
It's been a busy week. We got back from Verbier on Saturday and I'd hurt my knee, so I was sad, and limping and slow. I then had a mass of things to do to finish all of my client...


Stage complete - time bonus Posted by Len at 17 Dec 2004 09:54 PM
Today was my last day with one of my current clients. In the end the hand over went well, but then I did start the process off a long time ago.......


C++ Meta programming madness? Posted by Len at 17 Dec 2004 07:50 AM
I find myself agreeing with Chris on this one. I just dont think I'm clever enough to use these 'modern' C++ template programming styles reliably in a way that makes the resulting code better and easier to maintain by others....


Busy Posted by Len at 1 Dec 2004 10:44 PM
I've been busy recently; what with getting our trip sorted, finishing the hand over, completing the auction server and doing some consultancy for an internet market data providing company. The good news is that most things are now done and...


Spammer's choice Posted by Len at 24 Nov 2004 09:49 AM
I'd quite like to be able to harness the efforts of the comment spammers and MT-Blacklist so that when a spammer fails to comment on a posting this fact is noted and posting can get mentioned on the front page as the current "spammer's choice"... Sounds mad, but since I have a lot of content now, it would be a way of bringing some old stuff back to the front page - in the same way that the comment section does...


VS.Net #Region Posted by Len at 19 Nov 2004 07:37 AM
I'm reviewing some code for a client. I've decided that I don't like the #Region functionality from the VS.Net IDE... It seems to be another 'sticking plaster' to help make things 'easier' for people to structure code in inappropriate ways...


Smash it up Posted by Len at 5 Nov 2004 07:14 AM
I completely agree with Jeff on this one. Fear of breaking code can hold you back from making the kind of changes that are required to keep the code alive.


NetMeeting Data Channel sample code Posted by Len at 4 Nov 2004 07:59 PM
I've uploaded a new copy of the NMPing.zip file that is mentioned in this article. It seems that it was corrupted. Sorry about the delay in doing this, I'd forgotten about it. The code's very old, so be gentle with it.


I don't usually do the meta-blog thing but... Posted by Len at 28 Oct 2004 11:36 PM
I sympathise with Christopher Baus' frustrations...


Baus waves at Scoble Posted by Len at 28 Oct 2004 11:15 PM
Christopher Baus suggests that Robert Scoble's blog lacks focus and that his blog is mostly noise, "He's always blogging about something, but really nothing at all ". But Chris, surely that's the point of Scoble's blog? As Robert himself says "if you don't think I'm taking you to enough cool blogs, or writing enough cool stuff, there's a very easy solution. Unsubscribe.". I did that quite a while ago, but I'm glad he's still out there and that other people subscribe to him on my behalf...


This is the book I've been waiting for Posted by Len at 8 Oct 2004 08:20 AM
Excellent news; Herb Sutter and Andrei Alexandrescu's C++ Coding Standards book is done! This is the book I've been wanting for ages. Whilst there are other C++ coding standard books out there but, well, they just don't have the gravitas of a book written by these two and included in Bjarne Stroustrup's C++ In Depth Series. The table of contents is here. I hope the book's heavy enough to hit people with ;)


Harvest for reuse Posted by Len at 17 Sep 2004 08:00 AM
Jeff Atwood writes about the the delusion of reuse where he warns of the extra effort that's really required when writing for reuse: "I believe writing a truly reusable class is an order of magnitude harder than writing a single use class."


Could someone please Posted by Len at 16 Sep 2004 07:50 PM
Could someone please write a Java based estimating package? I really want to be able to able to turn to a manager and say, with a straight face, that all of my estimates were done in JEst... Sorry, it's been a long day.


How hand overs become hand offs Posted by Len at 10 Sep 2004 07:27 AM
Being a consultant, I find that the start up and shut down of projects are usually the most stressful times. Start up is all about "hitting the ground running", learning lots of stuff really fast and making a good impression. Shut down is all about hand over. Shut down is the hardest because you need the cooperation of the people you're handing over to. Whilst you can pretty much deal with any issues during the start up phase just by digging deeper or working harder a hand over with no cooperation just becomes a hand off.


The good thing about blogging is Posted by Len at 10 Sep 2004 06:32 AM
It makes you think. I find that when I've done a brain dump post like last night's "loader lock" posting, all of the issues are fresh in my mind. Posting just before bed means that by the time I wake up I've usually come up with lots of new ideas about the thing I just posted about...


Why does windows hold the loader lock whilst calling DllMain? Posted by Len at 9 Sep 2004 10:10 PM
I've been splunking around Dll loading recently for a pet project. It's been an interesting journey and this evening I solved the final piece of the puzzle and, when I did, I suddenly wondered, not for the first time, why Windows holds the loader lock when calling DllMain()...


WTF? Posted by Len at 8 Sep 2004 07:50 AM
Ah, a place to keep all that bad code... The Daily WTF From Barry


LoadLibrary error Posted by Len at 5 Sep 2004 10:15 AM
I need to dynamically load a dll, grab some function pointers and do stuff; simple stuff, done it 100s of times before. I decide that this time I'll wrap the HMODULE that I'll need in a class to make sure I can never forget to call FreeLibrary() on it - RAII is your friend. It's Sunday, I'm feeling righteous so I'm doing it in a TDD style. I write some tests, load a dll, load a bad dll to check error handling, load a dll that doesn't exist... So, what do you expect happens when you call LoadLibrary() on a file that isnt a valid dll or exe image?


Doxygen niggles Posted by Len at 28 Aug 2004 02:16 PM
I've been using Doxygen recently. It can scan a body of code and produce reams of linked documentation and diagrams. I, personally, don't really use it for its documentation, just for its diagramming. I've always believed that if I can't draw a neat and tidy picture of the relationships between pieces of code then the design needs fixing.


Platform, push off Posted by Len at 28 Aug 2004 10:01 AM
However, I still prefer that all these technologies should be introduced and made exclusive into Longhorn, because of the enormous benefits a comprehensive base platform provides. By requiring an upgrade, Longhorn would cause a mass shift to a new platform and offer developers a new minimum level of operating system functionality, a la Windows 95. From .Net Undocumented Riiiiight... I'll remember to tell all of my clients who are only just finishing moving from NT 4 that they'll need to move everyone again real soon now because it'll be more convenient for developers...


Brute force marshal by value Posted by Len at 21 Aug 2004 12:16 PM
This week I integrated the new data provider with the rest of the client's existing code. The integration was pretty easy as the existing code deals with the data provider via a single method on a COM interface. All that was needed was to adjust the calling code to use the COM object rather than the local implementation and everything just worked. The good news was that the call to get the data was now 100 times faster than it was with the old code; the bad news was that processing that data took almost three times as long. The end result was that the whole process was slower rather than faster... The wonders of COM and the construction of the data object we were using meant that each call to access the data now had to cross process boundaries...


Excellent piece on exceptions Posted by Len at 17 Aug 2004 07:45 AM
IanG on Tap: When to Catch Exceptions - the answer is, of course, not as often as you'd expect... Ian's talking about managed code as can be seen from his final comments about expecting to see many more finally blocks than catch blocks, of course, in a proper language ;) like C++ you don't need any try blocks at all as RAII will deal with all your resource management for you...


The Exponential Nature of Lines of Code Posted by Len at 16 Aug 2004 10:54 PM
The faster your codebase grows, the less of it people will understand. When people don't understand all of the code, they don't see global patterns, and so they will reinvent little wheels all over the place. In theory, the development leads and the architects are supposed to watch out for these issues, but there are always places where redundant code can hide, and as the code continues to grow, even this watchdog function breaks down. Soon you have people who are intimately familiar with only a couple of modules in the system, and so replication across modules becomes difficult to spot. As the line-count continues to rise, the percentage of the code that each person really knows decreases, compounding the problem. Welcome to exponential code growth. From Jason Marshall's Software Weblog via Ned Batchelder


Failed Posted by Len at 5 Aug 2004 07:27 PM
On Tuesday I wrote about the start of this week's gig. Now that the week is over I guess an update is in order. In summary; I failed to work miracles this week...


Caring Posted by Len at 4 Aug 2004 08:30 AM
There was a good reply by Dr. Real PC on one of Joel's discussion threads recently; "The most important thing is caring. If you don't care it doesn't matter how smart you might be. If you aren't interested how could you have the patience that's required?" How true. I think it's reasonably easy to spot if someone cares about what they're doing, or, perhaps it's just easy to spot when they dont...


Sick of the R word Posted by Len at 4 Aug 2004 08:08 AM
I'm getting a bit fed up of hearing the word 'Refactoring' when what people really mean is just 'hacking at code'. Back in May last year I responded to Bob Cringely's piece on how bad the whole idea of refactoring was; I still stand by what I said and, looking back, I think the key point is this: "Not all code changing is refactoring. Refactoring requires discipline. You need to balance the risk of refactoring with the risk of not refactoring. You need to know when to stop and you need to do it because it's the right thing to do for the project, not just because you can. Changing code without this kind of thought and discipline is just hacking (in the worst sense of the word)." Unfortunately, now that 'Refactoring' is trendy, everyone refers to every little hack job as 'Refactoring' because it sounds so much cooler to management... I think that's a pity; it devalues the term. When Refactoring is done well it improves the quality of the code base; when every little change is 'Refactoring' then it has at best a neutral effect on the quality of the code.


Explicit class initialiser methods Posted by Len at 24 Jul 2004 10:48 AM
Codemonkey uk has an interesting piece on the use of explicit initialiser and destroy member functions rather than allowing object lifetime to be managed by the constructor and destructor.


Reprint: CORBA - Reference Counting Posted by Len at 24 Jul 2004 10:19 AM
A new posting in the blast from the past reprints area. First in a series that compares CORBA and COM; CORBA - Reference Counting.


/FI, STLPort, Precompiled headers, warning level 4 and #pragma hdrstop Posted by Len at 24 Jul 2004 07:20 AM
The one where I find that you can teach an old dog new tricks and almost use the 'rocks' word.


Comment Spam Morons Posted by Len at 21 Jul 2004 07:58 PM
Hey, you comment spam morons, get a life and do something useful for a change. With MT Blacklist most of you are kept out (and I can see how effective it is from looking at the logs) and it takes me no time at all to clean up after the few of you that get through and post your pathetic excuse for advertising. One click on the email that I get sent when a comment is left adds your pathetic spoor to my blacklist and another click scans all other comments and removes the crap you're spreading. ZZZzzz...


Not Invented Here or just Not Usable Here? Posted by Len at 2 Jul 2004 07:03 PM
Reusing code is often harder than you'd think. Sometimes the decision not to reuse a piece of code but instead to write new code to do the same thing is not just a case of 'Not Invented Here' syndrome but is more a case of trying to 'Use Someone Elses' and finding that the fit isn't quite right...


Currently reading Posted by Len at 27 Jun 2004 04:03 PM
I currently have 3 quite different technology books on the go, and one waiting in the wings. I'm re-reading Software Craftsmanship, McBreen's ideas really appeal to me, but then I guess that may be because I went through an official apprentiship in a former life so I can see how the craft model might work well for software. Next is Applied C++ which is an interesting 'warts and all' journey through the design of a graphics manipulation library in C++. I particularly like the fact that the authors don't necessarilly give you any hints when they're exploring a technique that they will later discard; it's nice to sit there thinking "you don't want to do it like that" and then have them agree with you later on... The third book is Programming the Windows Driver Model. Which is an interesting change from all things .Net. I've also got Developing Windows NT Device Drivers to read but haven't started that one yet.


Staying focussed on the finish Posted by Len at 24 Jun 2004 08:32 AM
The data provider project rolls on and we're almost at 100% of the functionality required for version 1.0. In fact, we have a few 1.1 features in there because they were easy wins and by the time we made sure that we they'd be easy to do in 1.1 we found we'd done 90% of the work for them. The task now is to avoid the numerous distractions, improve test coverage, integrate with our clients and hitting the ship date.


Code that's like a box of Lego Posted by Len at 23 Jun 2004 11:15 PM
I've been noticing that since I started doing the testing thing in anger my objects tend to be smaller and I have more of them. The pressure that testing puts on you to design in such a way that each object can be used as independently as possible so that you can write tests seems to break chunks of functionality far better than other design methods I've tried. As I've said before, the problem then becomes one of managing the obvious complexity; looking at this kind of code for the first time can be a little daunting.


Firm Foundations Posted by Len at 21 Jun 2004 11:01 PM
As I mentioned last week, I'm writing a new component for one of my clients. I also mentioned that 'beyond the interface, I can do what I like'; that's actually a surprisingly important part of the specification due to the situation that the client finds itself in...


Repeat after me, COM is just an interface layer Posted by Len at 17 Jun 2004 11:43 PM
I was reading this the other day and I recognised Past Mozilla Mistakes: two as something that quite a few (if not all) of my clients have made...


Joel on Win32; API complexity and the Army of Muppets (a rant) Posted by Len at 17 Jun 2004 10:44 PM
Joel has written a nice little piece on the demise of the Win32 API. Some of it I agree with; such as for many developers the fact that .Net is just the latest example of Microsoft indulging in a Fire and Motion exercise, yet for other developers it's vitally important; the trick, as ever, is working out which camp you fall into... But some of it, I don't.


Pimply youth Posted by Len at 15 Jun 2004 08:16 AM
Last week I spent some time back with the guys on the refactoring project. Things are going well for them and, apart from a few minor transgressions, they're sticking with the process that we put in place when I was with them on a regular basis. The project is currently suffering from a slight lack of technical direction; they have a new guy on the team and he's enthusiastic to try 'new' things and nobody is currently restricting the things he is allowed to try...


This still amuses me Posted by Len at 5 Jun 2004 08:57 PM
A long time ago, in a galaxy far, far, away... I wrote a short review of The C++ Programming Language, 3rd Edition. Which, for some strange reason, Addison Wesley decided to quote on their page for the book in question (click reviews, the page is too clever to allow a direct link), along side an Amazon review and a review from Computer Literacy Bookshops... I laugh every time I stumble across that page...


Block Posted by Len at 19 Apr 2004 10:46 PM
My brain has been too busy to think recently. I've had too many background issues going on, too many unresolved items, too much shit to deal with. I haven't been able to think new things because I've been too tied up in the unfinished things, I've tried really hard to think but there wasn't any space... It sucked. Today I cleared a lot of that away; I found closure on lots of items and generally would be able to think nice shiny new thoughts right now if I hadn't relaxed with a little too much wine over dinner. Ah well. Come tomorrow the wheels will be spinning freely again and things will start to flow...


Designing to be inherited is extra effort Posted by Len at 17 Apr 2004 12:58 PM
I saw this rather nice explaination for why sealed is used in so many .Net classes over on cincomsmalltalk.com as a comment to a rant about how .Net is bad for your design skills... Designing to be inherited is extra effort [Shane King] April 16, 2004 20:26:54 EDT It's extra effort, since you have to think about not only what public interface to provide to users of the class, but also what interface to provide for people who want to inherit your class. Often it's just not worth putting in that effort. Marking your class as sealed is a way of saying "I didn't have the time or inclination to ensure that you can inherit this in a reasonable fashion, so I'm not going to let you do it at all". It's not telling your users what they should and shouldn't do as such, it's admitting you don't know enough to allow them to inherit, and so not letting them do so. Which is IMO a better decision than letting them do it anyway, and then getting stung when you have to change the class in a way that breaks the classes that inherit from you. It seems like a resonable position, but personally I'd prefer it if sealed were just advisory and the user could decide to go against the designer's wishes if they wanted to try their luck...


MT-Blacklist Posted by Len at 16 Apr 2004 07:45 PM
Well, so far I'm very pleased with MT-Blacklist. It works well at preventing comment spam and when some spam gets through it's very easy to update the blacklist and then run the 'despam' option to remove all traces of the offending material. 10 out of 10!


SOA, coupling, flexibility and discipline Posted by Len at 16 Apr 2004 07:43 PM
Some thoughts on Service Oriented Architectures and how for some people the silver bullet du jour is the only tool in their toolbox... Just a bit of a rant really...


MT-Blacklist Posted by Len at 4 Apr 2004 08:17 PM
Sorry about the comment spam whilst I was away. I've now installed MT-Blacklist, so hopefully the only offensive rubbish and stupid sales-pitches on this site will be my own... MT-Blacklist seems pretty good; it cleaned up the mass of spam with one click but then unfortunately failed to block a new piece of crap that was posted this afternoon. Having added one of the offending urls to the blacklist I ran the cleanup again and it removed the offensive comment and automagically added the other urls that the comment contained to the list... I'll write more about it once I've more experience of it...


True, even if beauty is in the eye of the beholder Posted by Len at 23 Mar 2004 08:01 PM
“I'll bet you that from ten feet away I can tell if a program is bad. I might not guarantee that it is good, but if it looks bad from ten feet, I can guarantee you that it wasn't written with care. And if it wasn't written with care, it's probably not beautiful in the logical sense.” Charles Simonyi


Code review Posted by Len at 20 Mar 2004 10:05 AM
I'm reviewing a large body of code for a client at present. It's a general review of the design, coding style, code correctness and testability of a project. I started off by making notes on some of the general design changes that I'd recommend and eventually got down to a detailed review of the code. There's a lot to say about the code and, as with all code, sometimes it's hard to figure out the reason behind the use of a particular construct. I was starting to think that the note taking was going to take an age when I realised that there was a much more concise way to record my thoughts on what was wrong with the code. I changed it.


Const correctness Posted by Len at 16 Mar 2004 07:57 PM
Interesting thread over on Joel today about using const, or not. The original poster asked how many people bothered to mark function parameters that they don't modify as const and whether there was any performance or readability advantages in doing so. Ignore any performance issues, making your code const correct has massive readability and comprehension advantages. I'd go so far as to say it's one of the most important coding standard issues there is...


Cypher Posted by Len at 13 Mar 2004 01:03 PM
I'm currently working with a corporate client. The plan is that I'll help them refactor a key component in their system and make it more robust and increase performance. Right now they're in the middle of a release and are in 'slip mode'. I find myself feeling some sympathy for Cypher from The Matrix; there I was, safe in my green-tinted world of TDD, then suddenly I find myself in "The real world" and it's nasty and messy and there aren't any tests. Now I wish I could get back to where I was and I don't care if it isn't "real"...


Adding layers without adding value Posted by Len at 6 Mar 2004 11:21 AM
I'm a great fan of wrapping stuff up with thin layers that make the wrapped code easier to use in a given circumstance, or to provide a more appropriate interface. Obviously there are other reasons to wrap APIs but I'm continually amazed at how often the wrapping fails to add much value.


These are not the containers you're looking for Posted by Len at 4 Mar 2004 08:18 PM
STL containers are great. Rather than have to worry about writing doubly linked lists, efficient maps, and other such data structures you just grab one from the STL and you're away. Unfortunately the STL containers have quite a large 'surface area'. Their interfaces are rich because they are generic containers. Often the container you actually need is much more limited in scope and in such situations I always find it's worth wrapping the STL container and providing a more appropriate interface to the user.


Thought for the day Posted by Len at 3 Mar 2004 11:16 PM
If you don't write the code are you doomed to forever be thinking that the abstraction is all in the wrong place? Another day, another dollar. Starting with a new client, well starting back with an old client, and doing...


An abstraction too far Posted by Len at 29 Feb 2004 10:36 PM
Today turned into a day for pondering complexity, abstraction and memory management and watching Pirates of The Caribbean on DVD... I experimented with a version of the buffer allocator that allowed a user defined memory allocation policy. It worked, but it was, I think, unnecessarily complex. If the buffer allocator itself lay behind an interface then that's enough flexibility. Additional abstraction, with an abstract allocation policy in addition to an abstract allocator seemed a tad too abstract... At some point you have to actually make the decision and write the code that does the work. An interesting day's thinking; the film was good too.


More on the bug Posted by Len at 29 Feb 2004 07:12 PM
As I mentioned earlier, I found a memory leak in a piece of code and was lamenting the difficulty in providing automatic tests for such a think when you use new and delete directly. I've thought about this some more and I'm now slightly less concerned...


Does anyone know of a VS.Net 200X to VC 6 project file conversion tool? Posted by Len at 25 Feb 2004 09:05 PM
We have lots of clients who haven't moved away from VC 6 yet. At present we need to maintain all our projects in a VC 6 compilable form. The easiest way to do this is just to use VC 6 as our primary development platform for C++. If we had a tool that allowed us to back port VS.Net 2003 projects to VC 6 then we could maintain the projects in the latest format and back port as required. As it is, we need to maintain them in the earliest format because we know that the newer compilers will always support upgrading from old to new... So, for us, at least, if MS provided a tool that took a project and converted it to an earlier compiler then we'd migrate to the new versions faster... As it is we can only migrate fully when the last of our clients (or potential future clients) gives up on VC 6 ... Is there a 3rd party tool available? We'll pay money... [Updated: the title of the post was wrong ;) I needed a new file format to old file format conversion not an old file format to new file format...]


Why is Outlook 2002's POP handling so slow? Posted by Len at 25 Feb 2004 08:06 PM
I ran Outlook against my POP3 server just now and once again was unimpressed by the speed that messages were being downloaded. It seems that Outlook 2002, over an SSL link to a POP3 server (so no anti-virus weirdness is going on) takes about half a second per message to download a large number of really small messages, from a server on the same machine... Because I'm curious, and because it doesn't appear to be a server issue as the server idles the whole time, I ran up Outlook Express and pointed that at the server (same SSL connection), it flew. Almost 100 x faster (totally unmeasured 'user interface responsiveness')... It was so much faster that I pointed it at a copy of my 'all the mail I've been collecting for test purposes' account which currently contains around 17000 messages... No problem at all, Outlook would still be processing message 100... Most strange... Why's Outlook so crap then?


I hate things that turn off the explorer status bar Posted by Len at 25 Feb 2004 07:33 PM
Whoever decided that it would be a good idea for the explorer status bar to be 'switch offable by someone other than the user' should be taken outside and given a good kicking. Why is it a good to let someone other than the user decide what's the best way to display information? and don't get me started on folder views that reset themselves to the dumb ass icon display for no apparant reason...


Is Open RBL a crock or is my DNS set up wrongly Posted by Len at 19 Feb 2004 05:38 PM
One of the people I email's corporate mailer has started to bounce my mail with the following message: mx.example.com[xxx.xxx.xxx.xxx] said: 554 You have been blocked by a DNS blacklist, please see:- http://www.openrbl.org/ (in reply to MAIL FROM command) So I wander over to www.openrbl.org and type in my domain name and it tells me REJECT: invalid ip-address or non-resolvable hostname: jetbyte.com... Now, it's true that jetbyte.com doesn't have an ip address, but it has a perfectly valid MX record... Shouldn't OpenRBL be checking that the MX record is valid rather than checking that the domain has an ip?


You learn something new every day Posted by Len at 16 Feb 2004 12:53 PM
I'm writing some tests where I need to log calls to function for the test log so that I can make sure the function is called in the expected way when the test runs. The logging version of the object under test derives from the object and adds the logging functionality and calls the object under test to do the work. Of course, for this to work, the functions that I'm interested in can't be private. Some of them were and I was dissatisfied with my current solution (reclassify them as protected because the test needs to access them) and I didn't really want to have the code under test declaring friendship to the logging code from the test library, so I tried a hack, and it didn't work... I decided that I'd be cheeky at the point where I included the headers for the real objects into the logging code. I added #define private protected before the #include and #undef private after the #include. The test compiled, as expected, and then failed to link... It seems that VC 6 mangles the access level into the function signature. I wasn't expecting that. The code under test is defined without my nasty hack and so the functions are private in the library that the test harness links to. The function signature seems to encode that fact so that when I try and link to the library from the test harness that uses the hack the linker can’t find the function because there's no function with the correct signature... I didn't expect that. I'm pleased the compiler does it though; the 'fix' was one of those horrible Monday morning hacks that should never see the light of day.


.Net 1.1 TCP/IP wierdness fixed Posted by Len at 11 Feb 2004 04:16 PM
"Additional information: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full" I've managed to get the .Net 1.1 TCP/IP issue that gives the above error mesage when trying to use sockets on .Net 1.1 fixed. Thanks to Alex Lowe for pointing me in the right direction and for the guys at MS support for allowing me to call them up and tell them I need to download the hotfix for KB 826757.


Quality of MS developer support Posted by Len at 6 Feb 2004 06:50 PM
Alex Lowe asks what Microsoft could do to improve their developer support. In general I think they do a reasonable job given the huge surface area of APIs and products that need support, I think some of the MS staff blogs are helping too. But they could do more...


I'd rather have poor information than no information Posted by Len at 6 Feb 2004 04:16 PM
Roy's post about information hoarding made me think, which is always good... Last night I followed a link from Larkware to this article on MSDN about Pocket PC services. The article annoyed me, I'd have preferred that it had been better edited, but given the choice between having the information that's in the article available or having it sitting in someone's mailbox waiting to be edited I know what I'd prefer. As far as the MVP's go, I'm happy they're there and it's great when they can help, but I'd rather have access to all and any snippets of information that they have access to that isn't under an NDA...


We want information, information, information Posted by Len at 6 Feb 2004 10:00 AM
Who are you? The new number 2... Who is number 1? Looks like Roy Osherove is making waves with his comments about MVP information hoarding... Having been in the position of being a developer searching for scraps of information on a MS technology that doesn't appear to be documented as well as it could be I know where he's coming from.


Thought for the day Posted by Len at 5 Feb 2004 03:40 PM
There are two ways of constructing a software design; one way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult. - C. A. R. Hoare From Joel's discussion board...


Bitten by the one definition rule Posted by Len at 14 Jan 2004 02:58 PM
I've just wasted 20 minutes or so on a nasty bug. I'd added a bit of test code and suddenly some other tests were failing but the reason for the failure seemed to be that a class's vtable was getting screwed up and a virtual function was jumping off into hyperspace... After some time stepping through the code for a while I could see that a function that should have been incrementing a data member was in fact stomping over part of the vtable. It looked like the compiler was failing to allocate the correct size for the object, which seemed unlikely; my view on things that could be compiler bugs is simple, no matter how much it looks like a compiler bug the chances are it's just me being stupid. I was...


In C++ why isn't this a reference? Posted by Len at 10 Jan 2004 11:52 AM
In C++ every object has a "this" pointer. You could think of it as being passed as an implicit argument to every non static member function that the object has. It can never be null so why isn't it a reference? The reason I started wondering about this is that when using wiring objects together, such as when using parameterise from above, I often find myself wanting to pass a reference to the current class to some related object. More often than not I actually want to pass a reference and not a pointer, because the relationship is not optional and the pointer can never be null. Because this is a pointer my code ends up littered with pointer dereferencing *'s to convert this from CFoo * to CFoo & like this WireMeUp(*this)...


Template shims Posted by Len at 9 Jan 2004 05:48 PM
I needed to implement the same interface twice in one object today. It took me a while to remember how I do this kind of thing so I thought it was worth a blog posting so that a) I can find it at a later date, b) other people can tell me of better ways to do this, and, c) other people can use the technique if they want to...


.Net 1.1 TcpClient strangeness Posted by Len at 7 Jan 2004 05:26 PM
There seems to be a wierd bug with .Net 1.1 and sockets...


Use and misuse of C++ nested classes Posted by Len at 5 Jan 2004 11:24 AM
I like nested classes in C++. They allow a nicely fine grained approach to naming. Where a class may need to be called CRegistryKeyIterator if declared at namespace level it can be called Iterator if nested inside the CRegistryKey class. The problem is I think I tend to overuse the feature...


2003, The year of the test Posted by Len at 5 Jan 2004 10:19 AM
Looking back on my blog entries for 2003 it's reasonably obvious that the big thing for me in 2003 was testing. TDD seems to work well for me and my clients. It's not a silver bullet but it is a useful tool and I find that when you're operating in TDD mode that nice code just unrolls in a nice, stress-free manner. What's more, the code usually seems to turn out better than that produced without using TDD. The structure and design is more flexible...


New Year Posted by Len at 5 Jan 2004 09:58 AM
A combination of events in the run up to my Christmas break meant that I have ended up spending almost 2 weeks without feeling the urge to write any code. I've just chilled out and relaxed, watched some DVDs, saw LOTR ROTK, played some SSX3 and ate and drank too much. At the weekend I started to get my head back into coding thoughts by restructuring a couple of libraries that make up my server framework. There is a need to use async file reading and writing using IOCP and this code will be similar enough to the existing network handling code to make it worth the two sharing some code. To share the code some of it needs moving from the "socket tools" library into a new library... The work went well and the couple of hours spent on Saturday and Sunday felt like a little light workout at the mental gym. I feel more able to get on with my client work today because I blasted the cobwebs out of my head at the weekend. Now, if only it was as easy to do that to my body....


Thinking, Discipline and Courage... Posted by Len at 23 Dec 2003 10:00 AM
Wayne Allen asks why so much code is so bad? Why the majority of code, even new code, that he sees as a consultant is terrible. Meanwhile, Rory Blyth is complaining about "Paper bag" code. I think Wayne hits the nail on the head with his comment about much of the problem being down to the individuals involved willingness to learn and change. But there's more. Doing a good job requires lots of thinking, lots of self-discipline and lots of courage. Finding programmers who can do all of that and program in the require language is hard...


F Lock fix Posted by Len at 15 Nov 2003 11:19 AM
Ok, I usually hate those 'me too' blog postings but... Here's a "fix" for the fact that on Microsoft keyboards that have an "F Lock" key to change how the function keys work the default power up state is "wrong".... From "The furrygoat experience", via "ISerializable". Thanks guys...


Bluetooth on XP Posted by Len at 15 Nov 2003 09:58 AM
I never expected the Bluetooth sockets entry to be so popular ... From the comments on that entry it seems a lot of people are having trouble with getting devices to work with XP's bluetooth support. To help out a little here's my proof of concept test project.


I'd like a refactoring lint Posted by Len at 28 Oct 2003 10:36 PM
So a refactoring editor doesn't float my boat; a lint tool that warned me that there were bad smells in the code would... Right now I use Gimpel Lint as a code review tool. I run it, it tells me nasty things about the code, I listen, fix or ignore. It would be nice if it could tell me that there were bad smells. I think this is where real value could come from refactoring tools.


A sustainable pace Posted by Len at 28 Oct 2003 10:07 PM
Ok, it's that 'wine' time of the evening. Miche is working late, I've eaten and am close to finishing off a nice bottle of Pinot Noir and my thoughts turn to people being excited by refactoring editors...


iPaq upgrade Posted by Len at 27 Oct 2003 11:26 PM
Finally got the Pocket PC 2003 upgrade for my iPaq 3970. The upgrade went nice and smoothly and the iPaq feels quite a bit faster and everything seems a little more polished and easy to use. So far it seems...


Way behind the curve Posted by Len at 21 Oct 2003 10:45 PM
I know I'm way behind the curve with this, but... I downloaded Virtual PC from the MDSN subscriber downloads at the weekend. It rocks. I needed to try something out on a Windows 98 box and I didn't fancy repaving one of my machines so I went virtual. What's cool is that once you've booted the virgin virtual PC and installed your OS of choice you can just copy the drive somewhere and use it again and again. So I installed and tested what I needed and I still have a clean Windows 98 box in a box. I installed Win2k AS 'just because' and that worked fine too. I'm currently restoring a Ghost image of one of my first dev boxes. A 386 Win 3.1 box, should be amusing... I guess that means I can finally ditch the NT 4 server box that's been sitting in the corner of the office for a year just in case a client needs me to make changes to one of the apps I wrote for him... Now, what would be really nice is for MSDN to have preinstalled Virtual PC drive images available for all of the OS's that I have access to as a subscriber...


Sniff my packets! Posted by Len at 21 Oct 2003 08:26 PM
Barry sent me an interesting link to a piece that points out just how easy it is to bypass wireless network security. I wonder if you can get a Bart Simpson shirt with him saying "Sniff my packets" rather than "Eat my shorts"...


lessonOfTheWeek == !onesize.fits(all) Posted by Len at 17 Oct 2003 08:47 AM
I've enjoyed the hoo har over exceptions this week. It's made me think and analyse and reassess what I do. I'll be continuing pretty much as before, but it's worth spending the time to think about these things once in a while.


Unexceptional examples Posted by Len at 16 Oct 2003 12:32 AM
We're going to run out of amusing titles for these exception related blog entries sooner or later... Joel wants Ned to rename the functions in his 'exceptions are better' example. He wants InstallSoftware(), CopyFiles() and MakeRegistryEntries(). Jesse Ezell leapt in with a C# version which includes the rollback functionality that Joel was undoubtedly hinting at. The thing is, although Jesse is defending the use of exceptions, I think his example is making the case for the other side...


Exceptions are for exceptional situations Posted by Len at 15 Oct 2003 08:00 AM
Like drumming up traffic to your site, perhaps? ;) On Monday Joel Spolsky wrote a controversial piece about exceptions; he hates them. Much blog cross linking and local discussion ensued. Today he's followed that piece up with a piece that basically says 'exceptions can be good and they can be bad, it's a design tradeoff'. Which, of course, takes all the controversy out of the original posting; strangely I was expecting something like this...


MSDN Reloaded Posted by Len at 10 Oct 2003 06:54 PM
Wheee. I can throw all of my existing MSDN disks in the disk bucket and I don't need to keep wondering which is the latest version. They've changed my subscription 'for the better'... Hmm, it seems that now the colours...


I've got a brand new combine harvester and I'll give you the key... Posted by Len at 8 Oct 2003 09:27 PM
The harvesting of the SSL server code took about an hour in all. It was simply a case of shuffling some code around, ripping it out of a project and into the library and then adjusting the original server and the POP3 server to suit. So, I now have a POP3 server on 110 and 995; and Outlook even lets me know that my server certificate is bogus... I guess I need a real message store now...


Harvest Time Posted by Len at 8 Oct 2003 05:42 PM
I had a bit of spare time today so I finished the POP3 server integration. It went nice and smoothly and I tested the result with telnet and Outlook. During the Outlook testing I noticed the 'this server requires a secure connection (SSL)' checkbox. I hadn't been aware that there was a standard port (995) for accessing a POP3 server over SSL. My server currently only supports port 110 for unencrypted transport but I've got code that can turn my server into an SSL enabled server... Looks like it's time to harvest that into the server framework.


Everyone there works on Word, I'm a bespoke tailor Posted by Len at 3 Oct 2003 09:57 PM
Joe Bork explains why he now tells people he works on Word as a way of connecting with something people understand. I found that people seemed to understand what I did if I compared Word to a Moss Bros suit and then explained that I was a Savile Row tailor.


Windows update should... Posted by Len at 2 Oct 2003 07:52 PM
Windows update should let you flag updates as things you dont want. You should be able to add some text if you want; so it can remind you why you didnt want it, and say to it "don't show me this one again unless I ask...".


Comment rot Posted by Len at 2 Oct 2003 08:32 AM
There's an interesting discussion going on on the ACCU's mailing list at present. It's about the value of comments in code. This is one of those topics that comes around every so often and this time I decided to dive in with some controversial suggestions.


"The sample code uses limited error handling" Posted by Len at 25 Sep 2003 01:27 PM
I'm looking at adding SSPI security to the socket server code for a client; first stop is MDSN and the samples section. Although I can understand why the MSDN samples are generally just 'here's the API, this is the order you call things in, run along now', I think it would be nice if they were better; especially since I often find pieces of pretty much untouched MSDN sample code deep within client's applications... I guess it's not really something for Microsoft and the MSDN team to provide though... Pity.


Frankenstein programming Posted by Len at 25 Sep 2003 10:02 AM
I'm spelunking around in some code for a client looking for a nasty bug that's hard to reproduce. The code is less than ideal... It's the kind of code that's been put together by what I refer to as 'Frankenstein programming'; lots of unrelated bits and pieces have been collected from various places and stuck together to make something that looks about right. Unfortunately we're at the point where we need a vast amount of power to give this thing life, and I for one don't see a thunder storm on the horizon...


No, No, No! That way lies the army of muppets! Posted by Len at 22 Sep 2003 03:43 PM
Krzysztof Kowalczyk on Alan Cooper on software business... "Alan Cooper argues in this article that a way to win in the software business is not by cutting costs of production (i.e. number of programmers and their salaries) but by investing more in creating good software (i.e. hiring more programmers)." My emphasis; I don't think that's what Alan's suggesting.


Things that make you go, Hmmm... Posted by Len at 12 Sep 2003 11:22 PM
Just yesterday, I had a discussion with the CTO of a current client. He's a 20 year industry veteran and he was wondering why Microsoft hadn't stopped in their tracks and underwent some massive code reviews to get rid of the problem for once and for all. ChristophDotNet Because it's a very hard problem? How many lines of old code has the CTO personally reviewed and decided were completely bug free?


Damned if they do, damned if they dont Posted by Len at 12 Sep 2003 04:26 PM
I had just sold management in the company I am clienting for on the ability of W2K3 to avoid these, with the line that during the Windows Security Push, all 9,000+ Windows developers stopped and poured over essentially every line of Windows code remove these kinds of situations and make W2K3 the most secure OS. Now two of these in the last month. To say that this has stopped a massive redeployment is an understatement.Sam Gentile's Blog So you oversold an idea to a client and now you're mad at Microsoft? You're concerned about the security of your server platform. W2K3 is more secure than W2K and NT4. NT4 is no longer supported and won't be getting any patches. Client has NT4 servers. What do you advise and why?


Why do I code? Because I couldn't not do it... Posted by Len at 11 Sep 2003 08:01 PM
Why do any of us do this stuff? Why do we read so many books on the subject? Go to user group meetings? Fly across the country to hear people talk? Why do you code? Seriously. I want to know. Rory Blyth - Neopoleon.com - WHY DO YOU CODE? Because I have to?


iNTJ Posted by Len at 11 Sep 2003 07:58 PM
So, I saw all this stuff over on Scoble and Chris Sells' blogs about Microsoft being full of ENTJ's and wondered what the hell they were on about. Myers-Briggs personality types; I took the test, apparently I'm an INTJ...


Netgear MR814v2 Posted by Len at 8 Sep 2003 12:32 AM
Further to my recent wailings about being responsible for family member's PCs... I decided to deal with the internet connection sharing issue at the hardware level... So far the Netgear MR814v2 firewalled, DSL router, WIFI access point seems to rock...


Eric Sink on instant gratification Posted by Len at 5 Sep 2003 08:41 AM
Eric Sink has an amusing piece on how his problem solving skills have been spoiled by Visual Studio's F5 rebuild and run option. He obviously isn't developing test first, because if he was then going for the instant gratification of a green bar is fine.


Insufficient coverage Posted by Len at 4 Sep 2003 08:07 PM
Today the FX engine went into UAT. Well, the nearest thing we have to UAT; a user looked at it... 3 bugs, differences between the new code and the current production version. All slipped through our test coverage. :(


You can lead a horse to water... Posted by Len at 29 Aug 2003 11:05 PM
Although the other developers on the refactoring project agree that the code needs to be made better sometimes they don't seem to bother to make changes in a way that improves things... This week a major new piece of functionality...


Decoupling the FX GUI Posted by Len at 21 Aug 2003 06:59 AM
The rates engine was now easy to test but the interaction between the engine and the user wasn't. This was unfortunate as the interaction is reasonably complex. We hadn't built and tests for any of the GUI code yet, last week we fixed that...


FX Testing Posted by Len at 17 Aug 2003 09:55 PM
By Friday our FX test harness was pretty much complete. We had coverage for all the nasty special cases that had caused us problems in the last few weeks. They were the hard things to write tests for so we...


FogBUGZ Posted by Len at 15 Aug 2003 06:54 AM
We're approaching the end of this phase of the poker game project. The client has started reporting lots of little things that don't quite work how he'd like them to. Some are bugs, most are feature requests, either way there's...


You'll tick when I say so and not before! Posted by Len at 13 Aug 2003 06:43 PM
Today we wrote some complicated FX business logic tests. Things like making sure that the FX library can calculate a EURUSDCAD 1M rate - it can; or a USDCAD ON rate - it can't...


The first FX test Posted by Len at 11 Aug 2003 07:28 AM
On Friday we got to the point where the FX buiness logic code was suitably decoupled from the display logic that we could write our first test for the business logic. In the words of Homer Simpson, "Woo hoo!".


FX refactoring Posted by Len at 7 Aug 2003 10:21 PM
Bleugh! You are lost in a maze of crapy code, all alike (and much of it copy and pasted!). The last few days have been deep in the heart of darkness. Gently teasing the business logic and the display logic of the FX code apart so that we might one day be able to write tests for the business logic.


The good thing about this web log lark is... Posted by Len at 31 Jul 2003 10:35 PM
Writing stuff down makes you think about things. Take the "balls in the air" piece. I had a problem, I didn't realise what the problem was until I wrote about it and now, a week later I see the problem coming up again and know what it is and how to avoid it. Magic!


Learning by imitation vs learning by understanding Posted by Len at 31 Jul 2003 10:26 PM
As I mentioned a while back, the refactoring project's FX functionality was developed by guess work. We're fixing that now by spending some time gaining an understanding of the problem domain as we refactor.


Polishing Posted by Len at 29 Jul 2003 08:29 PM
Hit a deadline early this afternoon and hadn't chased up some requirements so I ran out of things to implement. Faced with a couple of hours spare I whipped out Gimpel Lint and started to polish...


Uncle Bob talks lots of sense Posted by Len at 23 Jul 2003 11:40 PM
So, I read my own blog and follow the links I put in the entries, does that make me a bad person? After writing the post on Bob Martin's book I went off to read his blog, good stuff, read it!


The onset of infection Posted by Len at 23 Jul 2003 12:12 PM
I've spent the morning doing test driven development, properly; writing tests first and everything. It works, it's faster and it's addictive....


Currently reading Posted by Len at 22 Jul 2003 09:24 PM
Agile Software Development - Principles, Patterns, and Practices by Robert C. Martin This book is physically heavier than most of the books I've been reading lately but I'm still carrying it to work even though I only get around 5...


Keeping all the balls in the air Posted by Len at 22 Jul 2003 07:55 AM
A while back Carson asked me how I managed to keep track of all the projects that I was working on; I said that I had practiced being productive over short time periods, tried to stay focused on one thing at a time and not to switch projects too quickly. There's more to it than that though as I found out recently...


Free software integration code drop Posted by Len at 21 Jul 2003 08:57 PM
The free source code integration project has its first code drop and then its second code drop... Almost complete. The integration has gone pretty well. The server code now has a neat little facade that allows it to impersonate the...


Big blind, little blind Posted by Len at 21 Jul 2003 08:46 PM
The online game approaches completion but recently the requirements were lacking and we couldn't see the way forward. We're finishing the game play and getting to the complicated special cases - I'm hoping that they won't be complicated or special...


Unsound FX Posted by Len at 21 Jul 2003 07:44 AM
The FX code was a mess. It was written in the same style as the rest of the refactoring project; ie the code was just spewed into whichever class happened to be open in the editor at the time. Code was duplicated and concepts weren't abstracted. Naming was poor and the code was ugly as hell. We've fixed a lot of that now.


Big ball of mud Posted by Len at 11 Jul 2003 10:54 AM
Brian Foote and Joseph Yoder writing about software architecture (or the lack of it). Thanks to Bryan Boreham for the link....


Untestable 2 Posted by Len at 9 Jul 2003 07:11 AM
A couple of days ago I posted some untestable code. I've had a couple of emails saying that people couldn't see why the code was untestable. Here's why, and here's how to fix it.


Waltzing with Bears Posted by Len at 7 Jul 2003 07:27 AM
Finally finished reading Waltzing with Bears: Managing Risk on Software Projects and it was well worth the read....


Three bugs went into a program Posted by Len at 7 Jul 2003 07:01 AM
Three bugs went into a program; a memory leak, a misunderstood interface and a deadlock...


My Name is Len Holgate, and I'm a workaholic Posted by Len at 7 Jul 2003 06:19 AM
Given that the work I do goes on in my head and can be done anywhere I find that it's often done everywhere. Anyone got any hints on how to switch off?


In the future, there will be robots! Posted by Len at 2 Jul 2003 07:24 AM
The code generation crowd are at it again. So, "writing code" is stupid is it? Well what will we call writing the requirements in a form that the code generators can understand and why will it be easier to get the requirements right?


Changing the vinegar Posted by Len at 30 Jun 2003 07:41 AM
A while ago I likened writing articles about code with pickling it to preserve it... It seems the last few days have been spent changing the vinegar...


Pinging down NetMeeting data channels Posted by Len at 29 Jun 2003 09:28 PM
Back in 1999 Darren came up with a cunning plan to make lots of money. The plan was 'device control over the internet'... In summary, we didn't.


Wise words Posted by Len at 27 Jun 2003 10:39 PM
"The most successful method of programming is to begin a program as simply as possible, test it, and then add to the program until it performs the required job." -- The PDP-8/e Small Computer Handbook (DEC, 1972) - Chapter 9, Page 9-64


Top tip Posted by Len at 26 Jun 2003 10:42 PM
For those of us still working with VC 6... This page about all the clever things you can do in the debugger watch window is pretty cool. I knew all about s and su and hr but I didn't know...


OBEX and ISO8583 Posted by Len at 26 Jun 2003 10:02 PM
OBEX is a nice little protocol and reminds me a bit of a massively simplified version of ISO8583. It's a pity about the warts on Connect......


That test driven development thing might just work Posted by Len at 26 Jun 2003 09:31 PM
And then I began to develop test first...


Switching to CVS Posted by Len at 25 Jun 2003 11:25 PM
For my sins, I've used Source Safe for version control on quite a lot of my projects in the past few years. It's got its faults but, well, the price is right......


Analysing my blogging Posted by Len at 25 Jun 2003 10:27 PM
I see a trend here... So, I blogged, I ate, I had a little wine. And started thinking......


Giving it away Posted by Len at 25 Jun 2003 08:22 PM
I give a lot of source code away on the web. I have done for several years. Often when I tell people about this they try to convince me that I should be selling the code rather than giving it...


Analysing my analysis Posted by Len at 24 Jun 2003 08:39 PM
In my usual "don't read the manual" style I crufted together a simple OBEX decoder, fudged a response to the connect message and watched my iPAQ send the first chunk of the file I'm using as my test. Now I'll...


It's important who's driving Posted by Len at 24 Jun 2003 07:29 AM
I'm a firm believer that software rots unless you're very careful; and like apples, once one piece starts to go bad the rest quickly follows. The Pragmatic Programmers talk about Software Entropy and The Broken Window Theory and, unfortunately, this week the refactoring project showed how true this is...


80 00 1A 00 0F D7 Posted by Len at 24 Jun 2003 05:42 AM
My dabbling with Bluetooth continues. Using WSASetService it's pretty easy to get your device to advertise a standard Bluetooth service on one of its sockets. Simply create your socket with the Bluetooth address family, bind and listen as normal and...


Bluetooth sockets Posted by Len at 22 Jun 2003 08:34 PM
This morning I decided to investigate the Windows XP SP1 Bluetooth support. I played with the BluetoothXXXX API and quickly became disapointed. I then moved on to looking at how to access the Bluetooth hardware using Winsock and decided...


Working for Microsoft Posted by Len at 21 Jun 2003 10:33 AM
Andy Hopper has written about what makes the thought of working for Microsoft appealing to a geek. "It's presented as a tough place to work even if you're a wizard coder. It's also described as a meritocracy - Impress or...


New toy == good Posted by Len at 21 Jun 2003 01:54 AM
The new laptop is way cool. All the stuff is now installed and it compiles nice and fast... The batteries last well, even when the screen is bright and the disk is quiet. I can sit on the sofa and...


Stuff Posted by Len at 21 Jun 2003 01:44 AM
The refactoring project rolls on. This week was mainly taken up with managing a seemingly infinite number of minor releases. We decide to appear "responsive" by reacting to recently reported, low priority, issues quickly whilst never seeming to make progress...


Password policies Posted by Len at 17 Jun 2003 10:42 AM
Someone in an organisation decides that people's passwords aren't secure enough. They implement a policy so that people are forced to change their passwords on a regular basis. People find that changing passwords is a pain so they work around...


The colours thing bites Posted by Len at 17 Jun 2003 08:04 AM
A while back I found what might politely be called "a mixing of business logic with display logic" issue in the refactoring project. Yesterday it bit me......


New toy Posted by Len at 17 Jun 2003 07:16 AM
My old laptop was a brick that didn't run VS.Net fast enough for my liking, so I thought it was time for an upgrade. I went for the Sony Vaio PCG-Z1SP because of the weight, screen, wireless connectivity and...


Why do I do that Posted by Len at 15 Jun 2003 06:00 PM
One of the good things about working on a code base of questionable quality is that you get a chance to review the way you work as well as they way the original authors worked. It's my job is to...


Bluetooth blues Posted by Len at 15 Jun 2003 12:52 AM
Obviously been one of those days... I was woken before 7 this morning as Miche rushed back to work - always a bad sign when people take a wash bag with them; she's still not home... :( I was going...


MSDN Subscription blues Posted by Len at 14 Jun 2003 07:23 PM
and reds and blacks and greens and, well, you get the idea. Every month when I get a shipment of disks I feel stupid. I just don't get the way the MSDN Universal Sub is organised. I'd like a little...


Clean shutdown Posted by Len at 13 Jun 2003 10:47 PM
No more zone just yet, wine's just made me blabby. The testing I've just been doing with my server is real black box stuff. The build process fires off a script that kicks off the server and then runs the...


The slacking worked Posted by Len at 13 Jun 2003 10:02 PM
Had one of those days where I couldn't get started. I guess it was probably something to do with the beer last night. It was Darren's birthday and we went to Namco on the South Bank and played on the...


Developer buy in Posted by Len at 13 Jun 2003 12:11 PM
The refactoring project rolls on and the code gets better. This week saw a marked change in attitute from some of the developers on the team......


VS.Net 2003 Posted by Len at 11 Jun 2003 08:02 AM
Why oh why couldn't the new VS.Net solution file format have either been compatible with VS.Net 2002 or have a different file extension......


I'm an exception, let me out of here... Posted by Len at 10 Jun 2003 11:15 PM
We're adding some new functionality to the refactoring project. Unfortunately the new functionality is located in the Heart of Darkness - the most twisty and poorly structured code in the whole system. Today I stumbled onto something truly awful. Exceptions...


A coming together... Posted by Len at 7 Jun 2003 12:27 AM
A good week for the refactoring project. The release procedures that are now in place mean that we've been able to react quickly to new functionality requests whilst continuing the new development efforts. Ah the wonders of a source control...


Stage complete. Time bonus... Posted by Len at 4 Jun 2003 06:24 PM
This morning I wasted some time tracking down bugs in the multi-threaded online game engine that I'm writing for a client. Now I have tests. Tests are good....


Infect me Posted by Len at 4 Jun 2003 09:09 AM
I'm not test infected yet. I'm almost there. I want to be there. But I'm not there yet....


You don't want to do it like that.... Posted by Len at 3 Jun 2003 10:54 PM
During some simple refactoring today, a phase of 'restricting access to data members', I discovered an interesting little design 'descision'. In the spirit of completely mixing up the business logic and the display logic we have a data member that...


Requirements overload Posted by Len at 31 May 2003 12:17 AM
Today -1 Week: Them: So, here's what we need by 9th June. Us: Ok, we can just about do that... Today: Them: Oh, add all of these things and put most of the things we asked for last week way...


We came. We saw. We did a little testing. Posted by Len at 31 May 2003 12:06 AM
Another week another release. Well, almost. The plan was to release today. The plan ignored the fact that most of the team are at a wedding this weekend and nobody was around today and nobody's around on Monday......


One step closer to sanity Posted by Len at 27 May 2003 11:23 PM
Now that the refactoring project has tests it's worth having a daily build so that it's easy to spot if someone checks something in that breaks a test....


Our first test Posted by Len at 26 May 2003 08:44 PM
The refactoring project reached an exciting new stage on Friday. We were finally able to refactor some code to the point where several classes could be extracted from the application project and built in a library that the application then...


Can Do considered harmful Posted by Len at 23 May 2003 08:59 AM
I come from a family of pessimists, but I think I got off lightly... I’m just slightly on the ‘doom and gloom’ side of center. I expect this probably accounts for my attitude to risk. I assume bad things will happen. I want to know what the worst case scenario is. I ask difficult questions in meetings. Just be thankful that you don’t end up in a meeting room discussing your project with my sister…


Scribbly pen Posted by Len at 21 May 2003 01:59 PM
I think best when I can scribble. When designing software I always draw boxes and lines. These diagrams give me an anchor to come back to if I get distracted. They get binned once they're no longer needed. Pen and...


Just in time requirements Posted by Len at 18 May 2003 08:05 PM
I'm currently developing an online game for a client. I didn't realise that it was an online game when they originally contracted me. It's become a useful example of emergent requirements. Each time I think the project is complete they come back to me and say "and now we want you to quote for doing X"...


Refactoring project: Joel Test, reprise Posted by Len at 18 May 2003 12:51 AM
Last week we were a 5.5, now we're an 8. Not bad progress, but there's still a long way to go until the project can get a 'SaneMark'...


Dawn of the dead Posted by Len at 17 May 2003 09:16 AM
One of the problems with the code base that we're refactoring is that it's full of dead code. Throughout the system there were swathes of code that were commented out, there was very little in the way of explanation as to why the code was not currently required and when it might be required again. This week we dealt with it...


On Cringely On Refactoring Posted by Len at 11 May 2003 11:53 AM
Bob Cringely has been upsetting some programmers with his comments on refactoring. He seems to intentionally miss the point that not all code changing is refactoring: some of it is still just hacking. Refactoring is risk management.


The Joel Test Posted by Len at 9 May 2003 07:17 AM
Joel Spolsky has a quick test to rate how good your software development process is. I thought it would be useful to see how the refactoring project scores....


Little and often Posted by Len at 8 May 2003 09:47 PM
The XP folks talk about the importance of making frequent small releases. This method has advantages over and above the obvious ones; not only do you get regular feedback from real users, you also get regular practice at doing a...


Understanding bad code Posted by Len at 8 May 2003 08:22 AM
I always used to think that there was probably a good reason behind things I didn't understand. Now I'm far quicker at deciding that the reason is that the person who created the thing I don't understand didn't understand either.


Death by debug trace Posted by Len at 4 May 2003 11:27 AM
How debug traces can get out of hand and eventually you drown in debug spew.


The importance of keeping the metaphor pure Posted by Len at 3 May 2003 12:46 PM
Refactoring code to keep true to the metaphor is as important as refactoring to remove bad smells.


Smart cards in Russia Posted by Len at 25 Feb 1995 08:21 AM
In February 1995 I flew to Perm in eastern Russia as part of a two-man team installing a smartcard system for a local bank. I was responsible for designing and implementing the card production system that was being used. For...