The Two Types of Collection

When I was at university our very forward thinking lecturer (Dr Bacon as I remember) introduced us to the most amazing up-to-date programming environment: C on UNIX. Storing an item in a collection meant declaring an array, or if you are really being adventurous, using malloc to dynamically allocate memory. That was it. Back then it was practically state of the art. As well as making for the kind of excellent training that you curse at the time but realize 10 years later you should be eternally thankful for having been made to do it.

What a difference from today when the .NET Framework comes with so many collection classes out of the box that Continue reading “The Two Types of Collection”

Single Responsibility Apps

If you wrote a class that had more than one responsibility, chances are that your colleagues would be pouncing on it in your next code review, eagerly pointing out what a terrible programmer you are because you’ve broken the single responsibility principle. So if single responsibility is great for classes, why do we so happily accept apps and services that have more than one responsibility? Continue reading “Single Responsibility Apps”

Office Programming in .NET: The Easy Way

Imagine you’re a .NET developer working for WeLikeReports inc. Suddenly you get taken over by BigCompany Ltd, and the new managers want to review all your documentation. Yes, I know, you never got round to writing the documentation. Just pretend you have some. All your documentation is stored as Word documents which happen to be headed with your old company name WeLikeReports, and your line manager thinks it’d really impress his new boss if that was replaced by the text BigCompany Ltd in every document. Of course you’re the one that gets asked to do the work. And being a developer, the idea of manually making the same edits to dozens of documents fills you with horror so you look for an automated solution.

Welcome to the world of Office programming.

Continue reading “Office Programming in .NET: The Easy Way”