The ‘Golden Hammer‘ is a very common anti-pattern, which can be best summed up by the phrase “if all you have is a hammer, everything looks like a nail“. This anti-pattern occurs when the perpetrator has typically learned a particularly powerful technique or design (the hammer), which they then go on to apply blindly to [...]
I encountered some truly hideous source code today in a programming language in which I wouldn’t have thought hideous obscure code was possible: C#. It was my first real experience of abject horror when looking at the source code of a C# application. Obviously with hindsight it would seem that you can write hugely, dense, [...]
Monday, February 16, 2009
A very common trap to fall into while implementing a new system or feature is to add functionality to ‘future proof’ your code for a use case that you imagine in may be required in the future. The future for the purposes of this post is any time that is not in your current development [...]
Thursday, January 8, 2009
Many modern programming languages feature some form of exception handling facility, and although I am going to be talking particularly about C# in this post, it can probably be applied to any language that has exception handling. Exception handling is very useful for the graceful handling of unexpected errors (exceptions) during program execution, however [...]
Thursday, November 27, 2008
I was explaining this to some junior programmers the other day and it’s worth repeating. Failure is fine in software engineering, in fact it is expected: I get nervous if something works first time these days as I know my limits and expect to make mistakes. However I think that new programmers don’t always realise [...]