I should really post up the pictures of my trip back home, my new little nephew and the dogs etc… But I’m wrecked. Between course planning for next semester and trying to buy a house I bearly have time to eat. However we put an offer in on a house this morning which was accepted so I may have more time in the near future to post stuff. It also means that Lori and I will be moving into our own house as soon as the contracts clear, which takes about two months in the U.K.
Archive for August, 2005
Buying a house
Tuesday, August 30th, 2005Software metrics
Tuesday, August 16th, 2005My new software quality metric is: If it looks like I can write it in half a day, it’s good software.
Of course I can’t write it in half a day. But have a look at the following numbers for the original version of my current project and the current version (all numbers generated by generated using David A. Wheeler’s ‘SLOCCount’).
Original version
SLOC Directory SLOC-by-Language (Sorted)
6509 src java=6509
Totals grouped by language (dominant language first):
java: 6509 (100.00%)
Total Physical Source Lines of Code (SLOC) = 6,509
Development Effort Estimate, Person-Years (Person-Months) = 1.43 (17.16) (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))
Schedule Estimate, Years (Months) = 0.61 (7.36) (Basic COCOMO model, Months = 2.5 * (person-months**0.38))
Estimated Average Number of Developers (Effort/Schedule) = 2.33
Total Estimated Cost to Develop = $ 193,122 (average salary = $56,286/year, overhead = 2.40).
Current version
SLOC Directory SLOC-by-Language (Sorted)
2306 src java=2306
Totals grouped by language (dominant language first):
java: 2306 (100.00%)
Total Physical Source Lines of Code (SLOC) = 2,306
Development Effort Estimate, Person-Years (Person-Months) = 0.48 (5.77) (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))
Schedule Estimate, Years (Months) = 0.41 (4.87) (Basic COCOMO model, Months = 2.5 * (person-months**0.38))
Estimated Average Number of Developers (Effort/Schedule) = 1.19
Total Estimated Cost to Develop = $ 64,960 (average salary = $56,286/year, overhead = 2.40).
So it appears that I’ve decimated the source base. And I have. I’ve culled two thirds of the source code and that has had a similar effect to the dollar value of the source base. The original soucebase had a gourad lighting model and an OpenGL renderer that I currently don’t have, but I think my version of the codebase is much cleaner….and I think I could rewrite my codebase in half a day.
I’ll repeat, of course I couldn’t rewrite it in half a day, but the codebase looks simple. Maybe I’ve worked with the source long enough to target it at the right level of abstraction. Which has lead me to the conclusion that a simple looking codebase can have more value than a complicated codebase, even if the metrics seem otherwise.
Plone or Hula
Monday, August 15th, 2005I’ve got to set up some web infrastructure that I can use for the next few years. I’m thinking about an IMAP frontend, some calendaring, a blog and a simple WIKI as a CMS (I know it’s not a CMS, but it’s all I need). Basically my choices are to go with the reliable, proven, fully-featured Plone or to go with the incomplete but cool Hula.
If I go with Hula I’ll have to write a blog extension in C or C#, but Hula is much more cooler than Plone. It looks like it’s going in a direction I want (easy-to-share personal information management) rather than Plone which is a CMS with the PIM stuff tacked on. Anyhow, I have to make the decision by this eveining…so any help is appreciated.
Fedora won’t believe that I have two NICs
Thursday, August 4th, 2005I rebooted today to get a new kernel. It seems that udev then assigned eth1 to my Intel NIC and eth0 to my 3Com NIC, which is the opposite of what they were. I can hear you say “Yeah Aidan, big deal, just reconfigure”. I tried and failed. The Fedora network config GUI refuses to believe that my Intel NIC can be assigned an IP, but does so silently.
Being the Linux hack that I am I decided to poke /etc/sysconfig/networking/devices/ifcfg-eth1 and /etc/sysconfig/networking/profiles/default/ifcfg-eth1with a magic stick called Emacs. After jiggling the files a bit the GUI seemed to understand that there is an eth1 assigned public_IP and an eth0 assigned private_IP. However if I close down the GUI and reopen it, it refuses to believe that there’s an eth1 anymore…and accordingly overwrited the correct settings in the config files.
I don’t have time to debug this. It’s one of the few problems I have with Fedora. But the other problems I have are to do with the Fedora specific configuration tools aswell. I wish Fedora just used the standard Gnome System Tools instead of inventing their own. At least if the tool was broken it would only be broken in one place. It gives me half an interest in re-installing Ubuntu Breezy when X starts working on that (I can’t use Hoary as my Intel BIOS is broken and needs a fix in a newer version of X.org not shipped in Hoary). The only thing that might hold me back is that Fedora has a native build of Eclipse and I’m not sure if Ubuntu has.
My current code sucks
Wednesday, August 3rd, 2005In the current codebase for the renderer I think I’ve figured out the issues concerning scanline rendering, scenegraphs and geometry representation. However, the codebase sucks. The code is fragile and even the unit tests are fragile. I really want to refactor/cull half the codebase. And I think I’ll finally do this; which has two implications
- V1.0 won’t be out on Friday. I’ll give myself to Monday evening (but even this is a bit short),
- I still don’t know how to handle lighting and materials which may force a second refactoring (further delay),
So for the rest of the day I should sit down with a pen and paper and design the refactoring.
I’ve been following the writings of Joel Spolsky whilst writing code the past few days. This basically means not leaving my email and IRC clients open all day and following the Joel test. I’ll stick with these practices for the next while as they seem to be working for me. But for now I’m off to find a cafe (in the Cockroft building) where I can sit with a pen and paper and work out some stuff.
BTW. Does anyone know a good open source UML plugin for Eclipse? I was told of one before, but I can’t remember it.
Congratulations to my sister and Damien
Wednesday, August 3rd, 2005My sister gave birth to a little fella yesterday (he was 9lbs 4oz)

His name is Darragh. Now I simply have to worry whether my Uncle duties require me to ensure that little Darragh uses a deb based distro rather than an rpm based one. Any ideas?
Complete and utter failure
Tuesday, August 2nd, 2005I failed to get the rendering algorithm working yesterday. Again, it is working for some cases but not for others. I find it too hard to keep all the cases in my head at the same time. Even though I said that I would do a great up-front design I didn’t. I sat down with a pen and paper and convinced myself that my current algorithm works. Which was a pretty stupid thing to do. Now I’m in a quandry: Do I now sit down with a pen and paper and do the design I was supposed to do yesterday, or do I refactor the codebase….what am I saying….
Obviously the codebase needs refactoring. The question is do I design the algorithm (it must be designed) with respect to the current bad architecture or do I consider refactoring in the design?
I think I’ll sit down and design the algorithm considering refactoring. I’ll then spike the design. Then I’ll make the decision as to either (a) refactor the codebase or (b) shoehorn the spiked design into the current product.
General update post
Monday, August 1st, 2005I got home last week to see my heavily pregnant sister and organise some things for Lori and my wedding next year (22nd July 2006). It was great to see everyone again and I got to see the lads on Wednesday but it was a school night so there was no madness. It’s not a bank holiday here in the U.K. so I’m really busy. I’ve got to get a 1.0 of this rendering software out the door by Friday. If I don’t I’m not leaving myself time to write the rest of the course notes. The main problem is testing. I can test the classes and API using JUnit however I can’t ensure that the rendering algorithm works 100% of the time as I can’t test arbitrarily complex rendered images. I suppose this is a typical problem in computer graphics.
The thing is I thought I had the correct algorithm, but it seems that I missed one or two cases. If I could unit test it like the rest of the code I’d be able to document all these cases and automate checking that the algorithm works against them. So this is a case where the algorithm has to be designed as in Waterfall designed rather than Agile design. I have to sit down with a pen and paper and draw the flowchart/sequence diagrams etc… and stick to an up-front design.
I know I should have started with the rendering algorithm and worked my way up to the higher levels of abstraction. I was hoping that I’d be able to rewrite some of the code for V1.0 but that is unlikely now. I’m off to get some food and I’m going to drag a pen and paper with me. I’m going to write-off thinking about optimisation for this version of the algorithm. Today I will get the algorithm working. Tomorrow I will get it working fast.