Blogs

How hand overs become hand offs

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

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… So this morning I find myself adjusting my Dll hooking code so that I call back into DllMain() just before unloading the Dll and realising that since I’ve told the loader that this Dll doesn’t have an entry point it’s not going to bother making any calls into the Dll when I create new threads…

They're learning

I’m back with the guys on the refactoring project for a couple of days. I got to my desk, updated my CVS tree and started to check my email. The first mail was from the boss man of the team; “I fixed a bug in the FX code earlier in the week, we need to write a test for it so it doesn’t happen again”, followed by “by the way, this time all the tests still run, I checked them all myself on Monday”.

Why does windows hold the loader lock whilst calling DllMain?

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()… Chris Brumme explains this much better than me, but; the loader lock is a system wide lock that’s held by the OS when it does stuff to its internal process tables; things like loading and unloading Dlls.

WTF?

Ah, a place to keep all that bad code… The Daily WTF From Barry

LoadLibrary error

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…

NFOFY JTDPN are the victim of spamy morons

[Updated:15th October - Original domain name hidden with a simple caesar cipher to stop them getting bad press via search engines…] [Updated: 6th September - It seems “NFOFY JT” were possibly the victim of a vindictive ex employee and that they didn’t originate or approve of any of the recent comment spam in their name.] See comment on this entry from Jacob Jones. NFOFY JTDPN is a professional web design and consulting company for businesses, schools, churches, non-profits, and individuals.

Code coverage and testing

Recently I mentioned that we were in the process of adding additional tests to our code base. We’d been using JITT to reduce the number of tests that we wrote and now it was time to fill in some of the gaps. This week I started to use some code coverage tools to see how well we were doing with our tests… My client has both Compuware DevPartner Studio, which includes a coverage tool called True Coverage, and Rational Pure Coverage.

Doxygen niggles

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. I used to drop in and out of drawing my own cut down version of UML diagrams as I designed code.

Platform, push off

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…