Spaces or Tabs?

In this day and age it seems silly to get into a discussion about whether your companies coding guidelines should have a section mandating either spaces or tabs for indents.  Tabs are clearly more flexible, but I really don’t think it matters at all; people can easily read code that contains spaces or tabs. But, Microsoft has departed from what seems to be the rest of the world and is mandating spaces in their new Microsoft Source Analysis Tool for C#. Word is that an update will not only mandate spaces but mandate 4 for indents. Again, I don’t think … Continue reading Spaces or Tabs?

Resharper 4.0 EAP Settings and Installing Latest Build

The 4.0 EAP tends to do a full uninstall before installing (it’s pre-beta, pre-alpha even; so it’s no wonder). This tends to blow away your settings changes.  If that’s a pain point for you, the settings are stored in “%userprofile%\application data\jetbrains\resharper\v4.0\vs9.0”.  There are a couple of xml files in there that store your settings.  Before you upgrade to the latest build, just copy those to another directory.  It’s very likely that the format of these files has changed since the last build so copying the backups over the new version could possibly make Resharper to blow-up.  So, use with caution.

DevTeach Toronto 2008

Well, DevTeach Toronto 2008 is just wrapping up.  It was a fantastic conference, many world-class developers, world-class presenters, and world-class topic.  Congrats to all.  It was well organized that the tracks that I took part in were well designed. What’s special about conferences like this is the ability to interact with peers and leaders from across our industry, something you can’t get any other way.  If you went to the conference and didn’t talk to anyone, you really missed out. The next is DevTeach Montreal in December.  I highly recommend it.

en POCO

First of all, let me describe what a POCO is. “POCO” is a Plain-Old-CLR-Object.  This means that it does nothing more than be that encapsulated type implemented by that class.  It has SRP and has no other responsibility than that responsibility for which is abstracts.  It has no coupling to other assemblies that are outside of it’s responsibility, and ignorant of anything else.  POCO is the .NET side of POJO (Plain-Old-Java-Objects) on the Java side.  POJO was a response to the huge problems that occurred years ago with certain persistence frameworks and a requirement for those classes to know about … Continue reading en POCO

RFC: Conditionals on false

Just a small request for comments.  Oren prefers     if (GetTrueOrFalse() == false) …instead of     if (!GetTrueOrFalse()) Coming from 18+ years of C/C++ based language programming, I find either equally readable; but, I’m not always the one reading my code. What are you thoughts?  Do you prefer the negation operator (!) or explicitly comparing with the false keyword?

Fundamentals of OOD, Part 2 – Encapsulation Scope

Let’s look at the ubiquitous Person concept.  It might seem logical that an application that deals with people should have a Person interface for classes to implement.  For example: public interface IPerson{                String GivenName { get; set; }                String SurName { get; set; }                IAddress Address { get; set; }} At first glance this seems fine.  The IPerson interface defines attributes that the application uses with most scenarios dealing with types of IPerson, it’s “well encapsulated”.  But, the person concept is much more broad than what IPerson is modeling.  IPerson hasn’t fully encapsulated the person concept.  A person could have … Continue reading Fundamentals of OOD, Part 2 – Encapsulation Scope

Fundamentals of Object-Oriented Design (OOD) Part 1

With increased usage of patterns and situationally specific strategies, people sometimes lose sight of the concepts and principles behind these patterns and strategies and fail to follow them when they’re not using patterns or strategies.  I feel it’s good to periodically review the fundamental concepts and first principles. Object Oriented Design (OOD) attempts to help with the complexity of designing, writing, and maintaining software.  It attempts to allow building of software by modeling real-world objects.  As with any tool, it can be used improperly, but OOD attempts to facilitate simplicity, robustness, flexibility, etc..  OOD has many fundamental concepts.  Some of … Continue reading Fundamentals of Object-Oriented Design (OOD) Part 1