The weather outside is frightful

With news and Twitter reports of snow coming to the mid and eastern parts of North America, I’m reminded of when my family moved (temporarily) from Canada to St. Louis Mo. (okay, really a suburb of St. Louis). St. Louis is a Midwestern city in the United States.  As such, it gets a “different” amount of snow than we were used to.  Sure enough, the first few months we were there it snowed.  Nothing major in our books.  About 6 inches, if memory serves. Well, if our neighbours hadn’t thought this was some sort of natural disaster!  At the time, … Continue reading The weather outside is frightful

TechDays Canada 2009 Developer Foundations Call For Speakers

We need speakers for Vancouver and Toronto for the Developer Foundations track for TechDays Canada 2009. We’re finalizing the abstracts right now; but, it looks like there will be four sessions in this track. SOLID : the five OO principles that will change your life forever. Will cover Single Responsibility, Open-Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion.  What they are, how to use them, examples, etc. Refactoring for Fun and Profit How to improve your existing code and architecture through refactoring and avoid “another re-write”. Advanced .NET (C# and VB) Advanced generics, lambdas and anonymous methods, LINQ to Objects, … Continue reading TechDays Canada 2009 Developer Foundations Call For Speakers

Why Fundamentals are Important to Microsoft’s Bottom-line

Justice Gray recently blogged about his concern of lack of SOLID coverage at TechDays despite how Joey Devilla blogged about SOLID principles (and then went on to say that “Maaaaaaaaaaaaaaaaaaaaaaaaaaybe” SOLID would be covered in the TechDays Canada tracks this year).  Joey Devilla retorted with an open letter. Justice’s concerns are well founded; TechDays is a “showcase current Microsoft tools and technologies” and that’s primarily what it does.  Most sessions cover how to use Microsoft tools and technologies.  But, most sessions don’t do it in a way that exemplifies what many consider fundamentals.  Most sessions cover using Microsoft technologies procedurally. … Continue reading Why Fundamentals are Important to Microsoft’s Bottom-line

Thread.Sleep is a sign of a poorly-designed program, redux

My post on Thread.Sleep was a slight generalization.  I say that Thread.Sleep is a sign of a poorly design program because *usually* when Thread.Sleep is used it used for timing and not used for what it’s can safely be used for. Using Thread.Sleep with a timeout other than 1 usually means the developer doesn’t understand what Thread.Sleep does.  A value other than one means the system might pause the thread for that number of milliseconds.  In reality it might be less than the requested milliseconds and in all likelihood it will be more–potentially much more. I won’t get back into the … Continue reading Thread.Sleep is a sign of a poorly-designed program, redux

Working with Children

Every so often I work on a team with a member who cannot act professionally and is compelled to act childish. For me, there’s different stages to dealing with people like this.  Ignoring the behaviour is the fist stage.  If they’re simply looking to get a rise out of your or are simply looking for attention, ignoring them sometimes makes the behaviour go away. For people who are acting this way not to get attention or to get a rise, talking to them sometimes solves the problem.  Approaching them and simply saying “Your behaviour is not very professional.  It’s disturbing … Continue reading Working with Children

visual studio jedi 2

Project Naming When you create a project that project name is also the name of the namespace.  If you want a particular namespace, enter it with the project name.  If you don’t want your binary to contain that namespace, it’s easier to rename that in the project properties Build tab than it is to change the default namespace, edit the class files, rename the project, rename folders, etc. Solution Naming When creating solutions it’s often best to name the solution differently than the project that you’re creating.  When I create a project it will be contained within a solution.  Once … Continue reading visual studio jedi 2

Closure Tip

In C# 2 and greater you have the ability to write closures.  A closure is a function that is evaluated in an environment containing one ore more bound variables[1].  In C# 2 this is done by creating an anonymous method that accesses a variable declared outside the body of the anonymous method.  Writing closures (which can evolve from an anonymous method that is not a closure) must be very deliberate and must be given great attention.  Closures offer a very specific way of essentially creating code at runtime based on runtime values.  But, with closures, they can be bound to … Continue reading Closure Tip

IS prolific use of inheritance a sign of a poorly design program?

A principle that is used to validate inheritance is Liskov Substitution principle (LSP).  Basically, it implies that a subtype must be interchangeable with its super-type without adverse side effect. With this principle in mind it’s easy to discount many particular sub/super-type inheritances.  The quintessential Uncle Bob example of a Liskov Substitution violation are Rectangle and Square.  In geometry a Square is a type of Rectangle (and Rectangle is a type of polygon, etc…); but that maxim doesn’t hold true in most OO implementations in light of LSP. Let’s say we implement a Rectangle class like this:     public class Rectangle … Continue reading IS prolific use of inheritance a sign of a poorly design program?

Transparency in Software Products

Lack of transparency leads to an "us and them" attitude.  It breeds contempt for your customer.  Customers are forced to provide feedback at a point when changes are very high friction and hard to manage.  It forces the development team to follow through with undesired functionality simply because "its too late in the development cycle". No one disputes that iterative development is a bad methodology; but some organizations simply don’t follow it.  They promote iterative development and say they’re iteratively developing; but they aren’t.  They periodically provide their releases and sometimes publicly available betas; but that’s not iterative.  Iterative development … Continue reading Transparency in Software Products

Getting the most out of Reflector

Reflector has been out for years now.  It’s ubiquitous and a staple for many .NET developers.  But, I think it’s taken for granted because of it’s ubiquity.  I’ll outline how I use Reflector and show how I wouldn’t be able to develop .NET software as well without it. Understanding Language Constructs In the days of .NET 1.x, what the .NET languages produced mapped, more-or-less, one-to-one with the language constructs of Intermediate Language (IL or MSIL).  That is, it was easy to reverse from IL back to C#.  View Code From the Point Of View of a Previous Language Version Viewing … Continue reading Getting the most out of Reflector