September 2005
-
:
Reader Questions
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 … -
:
Make sure you are doing RAII properly
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 … -
:
How refreshing
One of the things that I’ve always been a bit unsure of is the claim by dynamic languages crowd that static typing buys us nothing as the unit tests solve the same problem. It’s a nice idea but I’m a bit scared that the … -
:
I've been lazy this week
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… Note: the deadlock detector mentioned in this blog post is … -
:
It's Friday, so...
This G’n’R/Beatles mashup works surprisingly well, and brought a smile to my face earlier in the week - via Code Circle. And whilst we’re on the subject of music, Filip has started uploading some of his techno … -
:
Observing lock contention
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 had a report from … -
:
Lock Free
I just ran my OpenSSL echo server test harness and ran the server under the deadlock tool. The results are interesting and show that the main source of lock contention on the server is for the lock that protects the buffer allocator. Every … -
:
Viewing lock lifetimes
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 how often … -
:
What's with CreateProcess and managed exes?
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 same code the … -
:
Lots of answers but little help
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 … -
:
Change is good
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 way is worth adopting as a habit going forward. By … -
:
In summary, don't summarise too soon
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 GUI … -
:
Pimp my hide
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++ guy drop me a line. There’s … -
:
More thoughts on change and typedefs
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 all the reasons I … -
:
Assert is evil
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 talking about. This … -
:
Does the arrival of Google Blog Search mean blogs will be removed from the main Google results?
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? How … -
:
Rootkits
Just saw a mini review of Rootkits: Subverting the Windows Kernel over on Ted Neward’s blog. Looks like the perfect follow up to Undocumented Windows 2000 Secrets as I continue my slow progress towards being able to write Windows … -
:
Overriding virtual functions, C# is better than C++
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 for The Server Framework. In doing so I’ve experienced the pain … -
:
C# v3 Extension methods, syntactic sugar for the lack of free functions?
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 … -
:
Thoughts on testing COM objects
Ben over at Code Circle is thinking about unit testing COM objects. I did quite a lot of this back in 2000 when I was working with an investment bank. The first thing you need to realise is that COM is just an interface layer; so lots of … -
:
Sacrificing precision for ease of use?
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 … -
:
Whilst I'm on the subject of code communication
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 … -
:
Concepts and C++ Templates
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 … -
:
Restricting the use of extension methods?
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 C# v3.0 spec … -
:
Cool
Sometimes I think programmers find the wrong things “cool”… This cartoon kinda sums it up ;) -
:
Three reprints from when COM ruled the land
I’ve just finished posting three reprints from back in 1998 and 2002 when I was working on lots of COM stuff. Sinking connection points in C++ objects - shows you how to use the least COM possible to connect to Connection Points and … -
:
New C# v3 features explained in context
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 to … -
:
AdSense preview tool
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. -
:
Opera lover
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 birthday and I’ve been … -
:
Good stuff
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 from anywhere and always … -
:
Barry's take on Assert
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 a … -
:
Common knowledge to many, but...
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 … -
:
More from Mark and Barry on Assert
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, so far only Vagn … -
:
Book review: Rootkits by Hoglund and Butler
I’ve just finished reading Rootkits: Subverting the Windows Kernel. Overall I enjoyed it but I’m in two minds about its usefulness… The book covers “hacking” the Windows kernel using various techniques to get … -
:
Is Raymond Chen's use of Assert valid?
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 of the use of …