Browse by Tags

All Tags » Software Development » Design/Coding Guidance (RSS)

Becoming a Visual Studio Jedi Part 1

Becoming a Visual Studio 2008 (and often Visual Studio 2005) Jedi In much the same grain as James' Resharper Jedi posts, I'm beginning a series of posts on becoming a Visual Studio Jedi. It involves getting the most out of Visual Studio off-the...

The winds of change are blowing

The essence of ALT.NET, or at least the essence that people made use of, was that it was a venue for improving one's skills.  There has always been an undercurrent of other agendas there; but they never really took root. The problem with the...

Law of Reversibility of Attributes

I've come up with a simple law called Law of Reversability of Attributes. It’s based on the physics law of a similar name. Basically what the law means is that the inverse of a transformation should result in a return to the original state....

DataGridViewColumn.Frozen

DataGridViewColumn.Frozen is documented as "When a column is frozen, all the columns to its left (or to its right in right-to-left languages) are frozen as well." Which is nice until you think of the consequences. The consequences being that...

ITSWITCH #1: Answer

Last post I detailed some code that may or may not have something wrong in it.  If you thought InitializeOne and IntializeTwo are semantically identical (e.g. they differ only by performance), you'd be wrong. If you simply ran the code, you'd...

ITSWITCH: #1

A short pop quiz on design/coding in C#...

Nested Types

Recently Michael Features blogged about nested types . The title was almost "nested types considered harmful". I don't agree. I don't agree that they're any more harmful than any other C# construct (except goto...). Nested types...

Entity Framework Petition of Vote of Non Confidence

I had intended to be happy simply being a signatory of ADO .NET Entity Framework Vote of No Confidence. But, there's people suggesting signatories of this petition are wackos or on the fringe. Do yourself a favour and read the petition . Read what...

Fundamentals of OOD Part 3: Method Cohesion

Single Responsibility Principle (SRP) helps us write more cohesive types and methods. Cohesion is the relatedness of the members of a type to each other and the relatedness parts of a method's code to other parts. Method cohesion Often times a method...

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...

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...

Single-Entry, Single-Exit, Should It Still Be Applicable In Object-oriented Languages?

Before the modern high-level languages Edsger Dijkstra came up with "Structured Programming". This programming methodology relied on the programmer to form and enforce most of the structure of the program--manually keeping sub-structures and...

A Time and Place for Code Comments

I've dealt with more than one person who believes all code comments are bad. The first person I encountered who said that also asked me to explain why a particular algorithm was used instead of another because there were no comments explaining it...

Thread.Abort is a Sign of a Poorly Designed Program

Continuing the theme of Thead.Sleep is a sign of a poorly designed program , I've been meaning to provide similar detail on Thread.Abort and not just allude to it in other posts like 'System.Threading.Thread.Suspend() is obsolete: 'Thread...

Exception Logging

There is often a requirement for an application to log unhandled (and sometimes "handled") exceptions. This logging could occur to a log file, to the Event Log, a logging server, etc. There's great reasons to log exceptions but logging exceptions...

The Religion of Class Member Prefixing

The periodic identifier naming/prefixing/Hungarian-notation religious discussion reared its head recently on Eric Gunnerson's blog . This particular discussion revolves around the Microsoft-based guideline/anti-guidance of prefixing class member names...

DateTime.ToUniversalTime *Should* Throw Exceptinos.

A recent .NET Base Class Library blog post points out that DateTime.ToUniversalTime does not throw an exception for overflow values. This circumvents different Microsoft-sanctioned guidelines about using exceptions for exceptional situations, error reporting...

Accumulative Construction

A while back someone asked for guidance on what order should polymorphic construction occur in C# classes. I guess I had never really put much thought into it before and have never seen other guidance on the topic; but, I can see where this can become...

Writing Solid Code

My apologies to Steve Maguire for "borrowing" a title. I constantly see code, examples, and advice that perpetuate unsafe coding practices. As programmers we have the habit of getting something to a "working" state and call it "done"...