« September 2005 | October 2005 Archives | November 2005 »
A collection of blog posts that I flagged for follow up this week.…
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 October - there is an interesting discussion still going on over in the comments on Noel's post...]…

Jeff Darcy on Linus on specifications

| 2 Comments
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 bit them ..." has to be worth a read, and as Jeff says, there's a vast difference between a truly good specification and a bad one. Good specs are worth their weight in gold and can be a joy to work from. I'm just about to resume a project for a client who produces very good specifications and the certainty…

Serenity

| 0 Comments
Just back from seeing Serenity. It doesn't disappoint. We got into Firefly whilst on our ski trip to Megève last season and were really hooked. The film continues the story from the series, answers some of the questions left hanging at the end of the series and allows all the characters to grow a little. Recommended; it's so much a better Sci-Fi film than then recent Star Wars stuff...…

MT-Blacklist

| 3 Comments
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 MT-Blacklist comment spam blocking add-in for Movable Type 2.x. He also published a changes feed that made it easy for others to update their own black lists using the master feed. Unfortunately some developers ignored the feed and simply pulled the whole file all the time and just recently this issue has escalated and led to severe bandwidth usage and…

Walking the call stack

| 0 Comments
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. Note: the deadlock detector mentioned in this blog post is now available for download from www.lockexplorer.com. I started looking into working with windows call stacks a while ago when I was working on my deadlock detection tool. What surprised me was how easy it was to get a call stack once you understood the DebugHelp API. There are lots of examples…

More on locking

| 0 Comments
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 deadlock detection tool wont help him much but it's good to know that it's not just me that thinks such a tool would be useful... Jeff links to some expensive static code analysis tools that do deadlock detection. My tool doesn't rely on static code analysis, so you don't need to have source to run it. It can tell you…

Back in time

| 0 Comments
I find it quite interesting to have so much information about my past available on the web. I often use my own blog like a database that I can search for past solutions to problems, or for locating some text on my feelings on a subject that I can drop into a report and tweak. When producing code reviews for clients it's useful to be able to justify your view points (I have a lot of views that need justification ;) ) and, in the interests of reuse, having those views up here means that I can easily reuse them.…

Throwing the baby out with the bathwater

| 7 Comments
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 that using tries to provide support for "scoped locals" and it doesn't do it well enough.…

Quote of the week

| 0 Comments
"Desire to know why, and how, curiosity; such as is in no living creature but man: so that man is distinguished, not only by his reason, but also by this singular passion from other animals; in whom the appetite of food, and other pleasures of sense, by predominance, take away the care of knowing causes; which is a lust of the mind, that by a perseverance of delight in the continual and indefatigable generation of knowledge, exceedeth the short vehemence of any carnal pleasure." From which comes the (historic) Wikipedia slogan. Found, via a rather strange route from Jeff Atwood's…
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 in my place and returns order to the world. ;) If anyone can come up with a better translation, leave it as a comment please.…

Dependency Injection

| 0 Comments
Jeremy D. Miller writes about The Dependency Injection Pattern; or what I've tended to call "Parameterise from above". He covers the various ways you can inject a dependency into a class rather than having the knowledge of the dependency hard wired into the class itself. I tend to favour the constructor injection pattern myself; it's all about breaking concrete coupling with interfaces and then allowing the creator of the object to specify the concrete type used by the object. As Jeremy says, it's not just for testing; it leads to much more flexible software. It's worth following the link from…
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.…

Printf debugging when you don't have a console

| 8 Comments
There's a nice story over on "Bug Babble" about debugging a problem with a robot by using various sounds coming out of a speaker to determine where in the code the problem occurred: "Now the robot sounded like a modem trying to connect. We would repro the hang and based on the pitch at 'flatline' we knew the point of the last successful call to the sound driver." Via Google Translate and Radium Software, which also suggests using the CapsLock key, or changing display colours to debug gnarly problems in a printf style when you don't have a console to…

Some people shouldn't be dungeon master

| 0 Comments
This made me smile. From "Irregular Web Comic", via Raincannon.…

Reprints - OLEDB; no pain, no gain

| 5 Comments
I've just finished posting several OLE DB provider articles from back in 1999 and 2000 when the favourite method of data access that Microsoft recommended was OLE DB. This was relatively easy to use as a data consumer, especially from VB. Writing a data provider was another matter entirely. The OLE DB documentation was mostly written in a style that assumed that you were only using it for reference, this made it hard to get to grips with when you first started working with it. The ATL OLE DB provider templates offered some help, but, to be honest, as soon…

Classic hits

| 2 Comments
Jacob Nielsen has a list of Top Ten Blog Design Mistakes. Number 5 is "Classic hits are buried" where he suggests that it is useful for readers if you list your most 'important' entries prominently as well as regularly back linking to earlier posts. This sounds like sensible stuff; until you have to work out what your classic entries are from the other 486 not so classic postings... Anyway, I've had a go at starting a list of some entries that are either a) very popular or b) clearly define my views on software development. The list is available in…

Unit testing and accessing external systems

| 0 Comments
There's a lot of talk about how unit tests shouldn't touch the network or the file system or databases whilst they're running. Michael Feathers even has a set of unit test "rules" (A Set of Unit Testing Rules) which go so far as to suggest that: "A test is not a unit test if: It talks to the database It communicates across the network It touches the file system It can't run at the same time as any of your other unit tests You have to do special things to your environment (such as editing config files) to run it."…

Charles Petzold on coding

| 3 Comments
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 building your dialogs in your resource files by hand. I agree with his view that many of the features of Visual Studio are there simply to help us write code faster and that this doesn't, necessarily, result in us writing code better or in code that is clear of fluff and easy to maintain. I commented recently (on a post…

LNK2005: _iswdigit already defined in ...

| 1 Comment
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 and test cycle. It's a nice feeling. One of the last things I do when shipping code is to turn off the default STLPort support that I use when I'm developing. I edit one header file and the whole codebase switches from using STLPort to using the STL that ships with whatever version of VC you happen to be using.…

If you enjoyed the Petzold thing earlier...

| 0 Comments
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. Once knowledge disappears into code, how do we retrieve it? Via Joey deVilla over at The Farm. I'd forgotten how readable Ellen Ullman was (especially for techies of "a certain age"). I read a novel of her's, Close To The Machine, this time last year. Worth checking out, as is this interview with her, also in Salon. This week is…

Old friends

| 2 Comments
I guess it's a combination of wine, Pink Floyd and the fact that this week the world wants to remind me that I'm older than I feel. Thoughts drift back to the past. Times past and friends forgotten. A long time ago, in a galaxy far, far away I used to play an online game called MUD II. This was back when you had to use your modem to dial another modem to get a connection to the world and there was no such thing as "the internet" unless you could connect to a university computer somewhere (like Essex Uni,…

Evil macros in April 2005 Platform SDK headers

| 2 Comments
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 the end of September 2005 the last version of the Platform SDK that will work with Visual Studio 6 was the February 2003 version. There has been quite a lot of discussion in the comments of my Bluetooth code sample about the 'broken' uuid.lib file in the later Platform SDKs. I thought it was just a corrupted lib file but…

Handling lots of socket connections

| 6 Comments
I'm doing some research for a potential client. They need a TCP/IP server that handles 'lots' of concurrent connections. Their own in-house server code currently fails at 4-6000 connections and I'm putting together a demo for them of how The Server Framework supports 30000 connections on 1GB of ram before running into non-paged pool restrictions... Whilst doing this I ran into an 'interesting' feature of WSAAccept() (or, perhaps, simply of an LSP that's installed on my machine...).…

Note to self

| 4 Comments
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.…

Assume makes an ass out of u and me

| 9 Comments
But mostly me. ;) During yesterday's investigations into handling lots (30,000+) of socket connections to a server built with The Server Framework I took a few things for granted. I should have been a bit more thorough rather than just assuming I knew what I was doing. Today I did some more tests.…

The 64000 connection question

| 7 Comments
I've been spending some time pushing the limits of The Server Framework, my IO Completion Port based socket server framework, to see how many connections my servers can handle and what happens when system resources run out. Earlier postings on the subject are here and here. This morning I fired up one of my older server boxes and ran the server on that rather than on my dev box. It effortlessly managed 64000 concurrent connections. Previously I've had problems getting above ~30000 connections. The machines I've been testing on have been my main development box and my laptop (both are Windows XP…
« September 2005 | October 2005 Archives | November 2005 »

About this Archive

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

September 2005 is the previous archive.

November 2005 is the next archive.

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

Find recent content on the main index or look in the archives to find all content.

I have other blogs...

Subscribe to feed The Server Framework - high performance server development
Subscribe to feed Lock Explorer - deadlock detection and multi-threaded performance tools
Subscribe to feed l'Hexapod - embedded electronics and robotics
Subscribe to feed MegèveSki - skiing