« July 2004 | August 2004 Archives | September 2004 »
I've got one of those 'please dig us out of this hole before we ship on Friday' gigs this week. I'm back with the refactoring project for a few days and, well, when the cat's away... So, we're 80% done but none of it seems to work, no tests, and the design seems a tad overly complex and it just must go live by Friday... Our task is simple, just clean things up, make it work right and finish the other 80%. The code is the usual mess of highly coupled, overly complex, unrestricted, unplanned, half understood, thought droppings; at…

Sick of the R word

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

Caring

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

Failed

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

Most Amusing

| 0 Comments
Beatallica via Craig.…

Hmm, so I'm wet, huh?

| 0 Comments
You are water. You're not really organic; you'reneither acidic nor basic, yet you're an acidand a base at the same time. You're strongwilled and opinionated, but relaxed and readyto flow. So while you often seem worthless,without you, everything would just not work.People should definitely drink more of youevery day. Which Biological Molecule Are You? brought to you by Quizilla…

The Exponential Nature of Lines of Code

| 0 Comments
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…

Excellent piece on exceptions

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

Singletons and testing

| 15 Comments | 4 TrackBacks
When you need to jump through hoops to write tests you've done it wrong. Jonathan de Halleux writes about testing singletons and how he can subvert the standard C# singleton pattern to create a new singleton for each test he needs to run for the singleton. Omer then subverts the rules another way. Both are wrong.…

Brute force marshal by value

| 0 Comments
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…

Just In Time Testing

| 0 Comments
Once we'd integrated the new data provider we were in a position to do some more testing. We configured the code that used the new component to request the same data from the new component and the old code and to save the data to files. Then we wrote some code to compare the files and highlight any changes. Once that was done we located the source of the differences, wrote tests that failed due to the problems and then started to fix the bugs. A while ago I called this process Just In Time Testing (JITT); it's like TDD-lite.…
Previously, on Practical Testing: having decided to rework the code from scratch in TDD style we fixed the tick count bug for the second time - this time the solution was cleaner and simpler. At the end of that episode we were left with a failing test. The test was for multiple timers and it failed because our TDD route was taking a 'simplest thing that could possibly work' approach and that design only supported a single timer. Today we'll fix that problem by moving nearer to a real world solution.…

Thoughts turn to snow

| 1 Comment
The 2004/05 ski season starts for us in mid September when we're off to Saas Fee with Warren Smith again. Today we got our boots out and spent some time stomping around and practicing some of the jumping exercises that Warren had us do last time. We both have different boots to the last time we skied with Warren and they're more flexible and should work better with the kind of stuff he has us do. Since the ski season is approaching we've pulled the Skier's Edge machine out and we both spent some time on it today. Miche spends…

Repaying the technical debt

| 1 Comment
The boss is away, we've almost done all the things he asked us to do before he went and, well, there's a bit of spare time so we're looking closely at the code. The last few weeks have been a bit of a push for the finish and now I'm looking at stuff and trying to work out how to repay the technical debt we accrued during the push. Sure, I could be surfing the web and kicking back but, well, it just seems appropriate to work out how much we now owe to the code and how we can…

Platform, push off

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

Doxygen niggles

| 6 Comments
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.…
« July 2004 | August 2004 Archives | September 2004 »

About this Archive

This page is an archive of entries from August 2004 listed from newest to oldest.

July 2004 is the previous archive.

September 2004 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