Refactoring
XML
RSS feed for this category.
![Validate my RSS feed [Valid RSS]](http://www.lenholgate.com/archives/images/valid-rss.png)
A single responsibility, please Posted by Len at 20 Jul 2005 06:28 PM
Having got the CMessageProcessor under test in the last posting. I added a few easy tests for the object and then I came to another hard to add test. The reason that it was hard to add was that the...
More Socket Server Refactoring Posted by Len at 14 Oct 2004 11:10 PM
I'm currently working on a simple auction server for a client. You can think of it as a specialised chat server, of sorts. One of the things it must do is broadcast messages from one user to a set of users. This is relatively easy to implement in a crude way in our socket server framework but it's not nice. Time to refactor towards niceness...
They're learning Posted by Len at 9 Sep 2004 11:02 PM
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". This is considerably better than last time I visited them.
Reducing what the code could do to just what the code should do Posted by Len at 3 Aug 2004 07:26 AM
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 least there's no XML...
Back with the refactoring project Posted by Len at 25 May 2004 01:41 PM
I spent a little time with the guys on the refactoring project last week. Of course, as is the way, pressure from the business for more functionality has reduced the amount of clean up work that they've been able to do. The good news is that the builds are still repeatable and most of the tests pass. The bad news is only most of the tests pass.
Admitting that your baby's ugly Posted by Len at 27 Jan 2004 11:12 AM
I have a couple of days to myself. We've just shipped some code to a client a couple of days ahead of schedule and we're waiting to recieve a purchase order from another client so I find myself without any client work to do. I've decided to try and refactor the socket server code that we're using a lot right now. Whilst working on the code that we've just shipped I realised that the new code I was writing was much easier to test than the socket server library that formed a major part of the project, so now that I have some time I'm going to try and rectify that. The problem is, it means facing up to some unfortunate facts...
End of the refactoring project Posted by Len at 20 Dec 2003 11:42 AM
My time working on the refactoring project has come to an end; at least for a while. Here's a little look back over what we achieved.
Bug hunt on the refactoring project Posted by Len at 21 Nov 2003 08:21 AM
The refactoring project rolls on. Mostly it's been more of the same so I haven't bothered boring my reader with the details. This week we had an interesting bug to fix. The bug had appeared in a much earlier version, way back in July, but it had only been reported by one user and we could never duplicate the problem. This week we managed to duplicate it, and then we needed to work out what it was and when it was added to the source...
Back to the refactoring project Posted by Len at 1 Oct 2003 08:24 PM
I've spent the last couple of days back with The Refactoring Project. They've done well in my absence. They managed 3 releases; all correctly tagged and repeatable. They started some refactoring of their own and, at first glance, it looks like they've taken on board lots of the suggestions I've been making over the last months. They've fixed a couple of new bugs in the FX code and whilst doing so found that a) the bugs were easy to locate, b) they were easy to fix with very localised changes, and c) the new code was much easier to work with! They even ran the tests after making the changes! All in all quite a reassurring result.
Now, of course, I have to move away from the relative safety of the newly refactored FX code (complete with tests) and back into the pile of code that has yet to be touched... Still, at least things are heading in the right direction.
You'll tick when I say so and not before! Posted by Len at 13 Aug 2003 06:43 PM
Today we wrote some complicated FX business logic tests. Things like making sure that the FX library can calculate a EURUSDCAD 1M rate - it can; or a USDCAD ON rate - it can't...
The first FX test Posted by Len at 11 Aug 2003 07:28 AM
On Friday we got to the point where the FX buiness logic code was suitably decoupled from the display logic that we could write our first test for the business logic. In the words of Homer Simpson, "Woo hoo!".
FX refactoring Posted by Len at 7 Aug 2003 10:21 PM
Bleugh! You are lost in a maze of crapy code, all alike (and much of it copy and pasted!). The last few days have been deep in the heart of darkness. Gently teasing the business logic and the display logic of the FX code apart so that we might one day be able to write tests for the business logic.
It's important who's driving Posted by Len at 24 Jun 2003 07:29 AM
I'm a firm believer that software rots unless you're very careful; and like apples, once one piece starts to go bad the rest quickly follows. The Pragmatic Programmers talk about Software Entropy and The Broken Window Theory and, unfortunately, this week the refactoring project showed how true this is...
Developer buy in Posted by Len at 13 Jun 2003 12:11 PM
The refactoring project rolls on and the code gets better. This week saw a marked change in attitute from some of the developers on the team......
We came. We saw. We did a little testing. Posted by Len at 31 May 2003 12:06 AM
Another week another release. Well, almost. The plan was to release today. The plan ignored the fact that most of the team are at a wedding this weekend and nobody was around today and nobody's around on Monday......
One step closer to sanity Posted by Len at 27 May 2003 11:23 PM
Now that the refactoring project has tests it's worth having a daily build so that it's easy to spot if someone checks something in that breaks a test....
Refactoring project: Joel Test, reprise Posted by Len at 18 May 2003 12:51 AM
Last week we were a 5.5, now we're an 8. Not bad progress, but there's still a long way to go until the project can get a 'SaneMark'...
Dawn of the dead Posted by Len at 17 May 2003 09:16 AM
One of the problems with the code base that we're refactoring is that it's full of dead code.
Throughout the system there were swathes of code that were commented out, there was very little in the way of explanation as to why the code was not currently required and when it might be required again.
This week we dealt with it...
On Cringely On Refactoring Posted by Len at 11 May 2003 11:53 AM
Bob Cringely has been upsetting some programmers with his comments on refactoring. He seems to intentionally miss the point that not all code changing is refactoring: some of it is still just hacking. Refactoring is risk management.
The Joel Test Posted by Len at 9 May 2003 07:17 AM
Joel Spolsky has a quick test to rate how good your software development process is. I thought it would be useful to see how the refactoring project scores....
Understanding bad code Posted by Len at 8 May 2003 08:22 AM
I always used to think that there was probably a good reason behind things I didn't understand. Now I'm far quicker at deciding that the reason is that the person who created the thing I don't understand didn't understand either.
Copyright © 1990-2008 Len Holgate. All Rights Reserved.