Blogs

Busy

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 soon I’ll have time to knock a few of the interesting looking items off of my “code this” list… The auction server exceeded our client’s expectations; which was nice. The hand over has reached a point where I no longer feel like I’m pushing water up hill and the market data consulting is interesting and of finite scope…

Hoisting test code into production

A while ago I mentioned how I had hoisted a mock object up into production code because it only needed a few changes to make it usable as real code rather than just test code. This last week we’ve done this again… Our system was designed with testing in mind; we’re loosely coupled and, consequently, have lots of interfaces that we can implement any way we want. To allow us to test large chunks of the system together we deliberately plugged the external data sources in right at the top.

The value of malleable systems

We’re almost at the end of our hand over phase now; my time on the project is almost over. The last couple of weeks have been interesting. We’ve been working towards a demo of the system and this seems to have helped to get everyone moving in the same direction; suddenly the hand over seems to be happening… I don’t think I’ll need to be that involved in the demo as everyone else knows what’s going on and can explain how the system works… This is a Good Thing.

Spammer's choice

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…

So much for testing

My category-based RSS feeds stopped feeding through to Testing Reflections and Test Driven a couple of weeks ago. They had worked fine, and then they just stopped. I assumed that the problem was at their end; either they didn’t think much of my testing posts or their feed polling software had some weirdness in it… But you know what assume does… I’d got it into my head that because the feeds used to work and now they didn’t, and that I hadn’t changed anything at my end, the problem must be the consumers… Wrong… My feed had crap in it because I don’t really understand how the MT templates work, I’d been sloppy and I hadn’t bothered to test the feed apart from running it through my aggregator and eyeballing it in IE.

VS.Net #Region

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… I guess I’m not a fan of ‘outlining editors’; perhaps I’m just not used to them. Anyway, I can see why #Region might have been considered a good thing to design into the IDE given the way Microsoft love to push wizard generated code into places that you’re forced to also put user generated code (I know, it’ll be fixed in Whidby, ZZZzzz…).

Looking back from near the end

My current consulting gig is coming to an end. We’ve been in the hand over phase for a while now and I think it’s slowly starting to work. Now seems like a good time to look back at what worked and what didn’t… This project was heavily focused on testability, from the outset and that’s paid off in the later stages of the project. As we near final integration testing lots of last minute requirements keep popping up; some were mentioned earlier in the project and just got missed out and some are completely new.

Smash it up

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. As a consultant I see this kind of fear a lot. Quite often I arrive at a client site and start to speak to the natives about the lay of the land and one of the first things they do is point out that their system is very very complicated and that you have to be very careful not to break things; right, I think, they have no tests then… Next I’ll be told that new features should be added without “disturbing” much of the existing code; which translates to, expect to see a patchwork of code that has been hacked in all sorts of wierd and wonderful directions…

NetMeeting Data Channel sample code

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.

Bug in CThreadPool

Bob Etheridge reported a bug in the socket server code from codeproject, this is probably the oldest version of The Server Framework’s Free Framework code. He was noticing a small amount of memory corruption on server shutdown. I’ve narrowed it down to a bug in the CThreadPool class in the Win32 tools library. The bug is present in all versions of the class. void CThreadPool::ThreadStopped(WorkerThread *pThread) { ::InterlockedDecrement(&m_activeThreads); ::InterlockedDecrement(&m_initialisedThreads); RemoveThreadFromList(pThread); OnThreadStopped(); } Should actually be