Showing posts from 2016

Derbyshire Dot Net Talk - Writing Robust Systems

I talked at the end of the month at Derbyshire Dot Net. It was a first for me in the sense that I have never delivered someone elses talk. The talk was originally scheduled to be Andrew Bullock but I had agreed to cover it.

It was an interesting experience but I think the topic was general enough for anyone au fiat with the main points to deliver. Especially as I am a keen proponent on many of the points made in the talk.

Anyway, the crowd was either pleased or very understanding (I'll take the former thanks) and the evening was hosted in an excellent pub called the Brewer Tap which definitely help take the edge off any nerves I had.

The slides for the talk are here:  (I can't take any credit for them but I thought they were excellent slides by Andrew).

Dealing with DataTables

The nice thing about having someone join in a junior position at work is that it gives you a lot to blog (or repeat yourself) about. We've discussed a lot of subjects this week. One; was them being burned by some terrible old code that involved DataTables. There were a series of enormous (and broken) methods that accessed DataRows directly using the integer column index. There was a large amount of calculations directly on these items but the reason behind any of it was meaningless. The underlying Stored Procedure had changed causing an invalid cast exception. In light of this, I thought it might be nice to go through a bit of a process of some different options of still using and why you might choose the options what the pitfalls were. Staying on topic, we didn't opt to use an SqlDataReader which would probably be the next option to go for considering how much faster that it. We talked about speed over maintainability, but I think even when we were programming on th…

Making your domain less mutable

This happens regularly to me (and from my anecdotal investigation everyone involved in large / old projects). We need a new piece of functionality. I write it, it's beautiful and I win the internet. I have estimated 8 days (or 22.23 lol-points depending on how you live) and it's only taken 4 days. Ah, but then a very small; mostly ignored and very unimportant detail rears it's cruel head. You need to make it work with the code that exists already. This is normally in the form of saving to some pre-existing entities. Oh dear. You save everything through the various management / service classes that exist already and nothing works. So begins the next couple of days of horror. You find that you didn't set the work = true. Most of my woes in this area are caused by modifications at layer further down (or the stored procedure it finally ends up in) changing the object that I was trying to save or not saving part of the object because of some rule. So many errors are…