code programming

Developer Day Scotland Review

Developer Day Scotland > Home

Here’s a quick summary of the talks I attended and what I thought, will a little help from the twitter hashtag for developer day scotland.

Web Client Software Factory

The first talk I attended was an excellent overview of the Web Client Software Factory by Gary Short. He was brave enough to give a live demo, and was the only presenter to type longhand, with spelling errors and all, like a real programmer 😉 The Web Client Software Factory itself looks interesting, although I’m not sure if I’ll have much use for it myself in the short term. The basic concept is to provide a common platform so that multiple devlopment teams can create web-based applications around a single architecture, so the factory packages up all the database, logging, look-and-feel and other functionality into a visual studio project that developers can then use as the basis for their development, saving them the repetitive tasks that are the plumbing behind the application rather than the business logic that forms the application requirements.

Transaction and Error Handling in SQL Server

The second talk was about Transaction and Error Handling in SQL Server by Martin Bell. The talk started off a little uneven, but given the wide range of topics that had to be covered to introduce the subject, I can’t criticise that too heavily. Once he started discussing best practice and worked through examples of error handling code, it was clear he was a lot more comfortable, and it was an interesting talk. There was a lot of criticism of what seems to have become standard practice amongst some programmers, which is to ignore return values rather than check for errors. I’m sure part of this is due to the fact that many code samples leave these out for clarity, and there is little recognition that this should be recognised as bad style. SQL Server 2005 helps alleviate this somewhat by adding exceptions, which can’t just be ignored (although a catch-all is just as bad), but as the examples in the talk showed, there are a lot of occasions where exceptions are not thrown, and code has to rely on error handling anyway.

C#3.0 highlights

I then attended the C#3.0 highlights talk from Oliver Sturm. I’ve been reading enough blogs that most of the stuff was at least familiar, but the talk did have some great demonstrations of the new features, and he loved showing off his animations of how much code disappears when you use the new features. It looks an even more dramatic a hit to coding speed that Java’s introduction of autoboxing and generics.

Extension Methods

The extension methods look interesting, if dangerous. They allow methods to be added to classes using a python-like method(self, args) format, which is nice, but they’re not guaranteed as any method on the original class will supercede the extension methods. So they would seem to suit only APIs that don’t change and code saturated with unit-tests for boundary cases. The only real use case I can see for them, except for the generics used by LINQ, would be to backport a new feature onto an old API so that you can code your library to the latest version, yet still provide legacy support. Oh, and extension methods can extend primative types 42.0.ToString() anyone?

Object initialization

This looks like one very useful feature. We’ve got a lot of test code in our suites that call back to database objects, which in turn have a lot of nullable foreign keys. As an example, think of Employee(id, address, supervisor, companycar, departments, roles) where departments and roles are many-to-many. At the moment, we either need to generate one constructor for every combination of possible values, or have a lot of constructor code that looks like new Employee(0, new Address(...), null, null, new List(), new List()). With object initialization we only need 2 constructors: default and full, and our previous example can look like new Employee(0) { Address = new Address(...) }; Less code, easier to maintain, and still type-safe. Best of all, I no longer need to remember the order of the arguments to the constructor, because I can name them. Much clearer. Feels even more like python 🙂 But then

Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified bug-ridden slow implementation of half of Common Lisp.
Philip Greenspun, often called Greenspun’s Tenth Rule of Programming[19] (via Wikipedia)

Lunch : Grok Talks


Smalltalk is a great language. I’ve heard to here, and I heard it from Alan Kay. It goes back to the Common Lisp quote above. Everything that was cool about smalltalk is finally making it into other languages. Never used it in anger myself, but I’m interested in how it will work on .Net, especially as it works on an global image which contains all data and objects whereas .Net is divided discretely into DLLs with their own versions. It’ll be a project to watch I think.

Redgate SQL Data Generator

Nice looking tool. Give it a database schema and a couple of rules and it will generate real-looking data (which will validate if required), handling one-to-many and many-to-many relationships through constraints. Very nice way to set up test data. I’ve already been looking at the SQL Compare and SQL Data Compare, so this might be another one to add to the list.


It’s cmd.Net. Looks about as compatable as the VB->VB.Net transition, but it pretends it’s UNIX/DOS friendly. It’s .Net so it returns objects instead of text, which can then be manipulated via filters. The filter thing does look cool. They work well for sound and graphics, so why not command line objects? But as windows already has VBscripts and .Net supports IronRuby and IronPython, is creating a powershell scripting language overkill? So long as cmdlets are accessable throughout .Net, I can’t see powershell being much more than a quick-and-dirty prototype / debug environment, without the IDE.


Wouldn’t it be cool to ship .Net apps to any machine, via the browser, using javascript? Forget the download size for a minute, and that’s the idea behind Microsoft’s Volta. One unified .Net-based framework to share between client and server. Yeah, big deal. But here’s the cool bit: because it’s a unified framework, you can profile code across client and server, and with a couple of clicks you can refactor code between systems. Don’t know if it handles distributed servers, but the idea of optimising your code across the entire environment, with refactoring support, is a little mind-blowing. Don’t know if it’ll go the way of other Microsoft research, but it’s a neat little project.

But it works on my PC or Continuous Integration to improve quality.

The Continuous Integration talk by Richard Fennel was a good though mainly evangelical talk on why continuous integration is a good idea (short summary: Reduces last-minute surprises, doesn’t rely on human intervention to check the build, allows building and testing of things automatically overnight if tests are slow to run, and there’s other reasons too). I think I was already sold on the idea, having seen the difference between project with and without CI, but there were a few interesting things in the talk that I hadn’t considered. He recommended writing installers early on and keeping them up to date via agile methods, so you always know you have something you can install and test. This also means installers are included in the build, so you can see if and when they break. He also mentioned the Simian tool for detecting similar code blocks demonstrating cut-and-paste coding and areas ripe for refactoring. He closed the talk with a short discussion of Microsoft’s all-in-one development system Visual Studio Team Server which now includes continuous intergration and testing that covers SQL server, which is an interesting idea.

Red, Green, Refactor

This was a powerful, evangelical talk by Ben Hall on why writing tests first leads to cleaner, more effective coding. With the right tools in place, I can see it’s a very powerful way of programming, particularly when it’s against requirements, as you can start from the requirement and work down to the pieces you really need to do the work. The unit testing stuff should be second nature to most of the crowd by now, but he makes a strong case for writing test first, and making sure they fail, so that you have confidence the test works and can trust it when the code passes. There was also a good discussion of the supplimentary tools that come into play when dealing with databases, such as using stubs, mocks and proper clean-up to ensure proper testing of each layer in isolation. He also suggested that there have to be tests that do hit the real database as conditions (including, e.g. foreign key constrains) are too complex to be tested by mocks alone.


It was a very interesting day, and there’s a lot of things I’m going to have to follow up on as I come to them in my projects. I’d definitely recommend attending one of these events in the future. The next one, I believe, is in Reading in November, which I won’t be able to attend, but I’ve got my mouse finger ready for the Scotland event next year. I’ll also be following the link at the top for the slides of the talks I missed. I heard good things about the anti-patterns, user experience, regular expressions and parallel extensions sessions, so it’ll be nice to see what the fuss was about for those.

Technorati tags: , , , , , , , , , , , , , , , ,

Blogged with Flock

Blogged with the Flock Browser

Tags: , , , , , , , , , , , , , , , ,

1 reply on “Developer Day Scotland Review”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.