Friday 19 March 2004

The Joys of Code Re-use

Any programmer who's worked on a project of any notable size would like to re-use code. I certainly do, and I usually plan objects that way. I've been working on one project (in C#.NET) for over a year now, and have developed a business layer that is reasonably generic, but still needs lots of work. A few days ago I was given another small project - an online graduate job application form - and I decided to re-use my business code. That part was relatively easy, although it could be easier. The hard part was the web front end.

Okay, to be honest, the web controls code I was using was more specific to the old project, so it wasn't much intended to be re-used, but I did it anyway. That just served to highlight the point that a generic web front end framework would be really useful. Besides the hoops I had to jump through to get the thing working, it's not extensible. If I need a new control - say, a date input - then I can write it, but I need to go back to the original code and modify that, too. This makes me think there is a better way, like an interface. I think I can make it better, but it would take lots of time that the company probably wouldn't pay me for.

In all, and as usual, the more interesting job is writing frameworks, tools and components rather than writing actual applications.

Mokalus of Borg

PS - A true hacker, I suppose, is the programming equivalent of a research professor.
PPS - That is, the ideas matter more than whether this will actually be used by anyone.