harriyott.com

Wednesday, April 27, 2005

Build machine and SQL Server

Today I added some SQL Server action to the daily build process. This deletes the database from the previous build, and runs the SQL scripts for adding the UDTs, tables, indexs, foreign keys etc.

A contractor, who left before I joined, had written a handy utility to compare the current database version to the installed database version and run the correct update scripts. I modified this to run in unattended mode, and use command line arguments for the server, user name and so on.

The existing code was "challenging". There were magic numbers identifying button controls, so the "Next >" button was cmdAction(2), and the "Cancel" button was cmdAction(3). These all called the same method, which had a select statement to choose what to do next.

There was a database access class, which handled all the communication with the database, from anywhere in the program, except for one of the modules, which used its own connection.

I'd love to have time to "refactor" all this, but unfortunately I don't.

Friday, April 22, 2005

ASP.NET Beta 2 upgrade

Spent the last couple of days upgrading .NET beta 1 to beta 2. Of course, there are some changes, as that's what betas are for.

Recompiling the projects written in beta 1 wasn't too hard; all the obsolete methods and classes are mentioned in the compiler output. The hardest one so far was a FrameworkInitialize() error, but Scott had already solved that one for me!

The SDC tasks for MSBuild don't work any more, so I'm going to take them out, and use a bunch of <Exec> calls instead.

[Update:] Renaming the Resources directory to app_globalresources enabled the <asp:Literal > control to work again.

Wednesday, April 20, 2005

Lawrence Mudford is blogging

My good friend Lawrence, a top dentist has started blogging. When I say top dentist, I mean top dentist. He's a fellowship examiner for the Royal College of Surgeons, and a board member of the Faculty. He's got a calming chair-side manner, and a gift of explaining what's about to happen to one's mouth.

I set up a website for him a few months ago, introduced him to blogging, and added his blog to the site. Kind of like what Hugh Macleod did for Thomas Mahon, the blogging tailor.

Lawrence has told me a little bit his future posts, and I'm expecting some insights into the more specialised procedures, and maybe even some details of the Faculty.

[note: The blogger spell-checker suggested Mudford should be Mouthpart]

Tuesday, April 19, 2005

CodeSmith for class generation

I'm really getting into CodeSmith now. We create new exception classes derived from ApplicationException, and I needed to write one today. Someone else in the team had already written one, so I used that as the basis for the template. I also incorporated our corporate standard code header comment macro, which cunningly plucks the logged in user's name out of the air like a ripe cherry.

Thursday, April 14, 2005

New Glass's valuation feature

One of our company's products is a valuation of used cars service. This has been enhanced today with a number plate search. Previously, users had to go through the rigmarole of choosing the make, model, engine size, mileage, number of doors, trim level, depth of tyre tread, fuel tank level and mother's maiden name (okay, I made some of those up). Now, just the number plate is required, and the correct vehicle type is summoned from dark depths of the database.

Ours is the first valuation site to offer number plate lookup, but I'm sure it will catch on. The price for a valuation remains at GBP 2.95, which includes "3 condition adjusted Trade-in values and 1 Retail value".

Wednesday, April 13, 2005

CodeSmith

I've recently started using CodeSmith, which has saved me a bunch of time already. Today I was fiddling about with some XML schemas, and needed to generate a load more with one change in four places. As I dislike copying and pasting involving lots of files and intricate mouse selections, a quick and dirty CodeSmith template did the job.

It took about 4 minutes to create the template, and using it is enjoyable. The alternative would have been unenjoyable. Thus, using CodeSmith is enjoyable.

Wednesday, April 06, 2005

The Joel test

I did the Joel test while at my last job, and the company scored 2 out of 12. When I changed jobs, I counted 5 in the team I'm in, and having added a build machine, it is now 6. I think getting to 8 might be quite straightforward, but the last four range from hard to almost entirely impractical.

The Glassmatix software is shipped monthly on a CD, along with the latest valuation data. The process of collecting the data is very complex, and has many manual stages involving many people. The CD is prepared outside of the software team, and so we'll not pass test 2 for a while.

Our rural development offices are in a converted saw mill, and an adjacent converted barn. The view from my window is fantastic:



Being in rural Crowborough, the choice of office space is rather limited. We've got a room per team, but we'll never have separate offices like Joel's.

As for the "best tools that money can buy", I've got two monitors



and Paint Shop Pro, but compile times could be better. Actually, they don't make me grumpy, so I think I might count it. Final score of 7. I wonder how my colleagues would score it.

Friday, April 01, 2005

MSBuild woes

MSBuild is so nearly perfect, but not quite. I've got a fantastic build process now, that does all kinds of useful things, but it has a strange quirk. Quite often, the build fails. The only input into the process is the contents of the SourceSafe database, so the assumption would be that someone checked in something evil. Not so. Running the build immediately afterwards, the build succeeds.
The cause is a copy task that copies all files built in release mode into a directory on the same machine. The issue seems to be the Include="@(Source)\**\bin\Release\*.*". Sometimes it selects everything, sometimes it selects nothing (and yes, I have checked that there are files there).

I've tried using the standard copy task, and the SDC copy task, and both randomly fail. I hope this is sorted out in Beta 2: I don't want to redo it all in NAnt.