James Michael Hare

...hare-brained ideas from the realm of software development...
posts - 166 , comments - 1431 , trackbacks - 0

My Links


Welcome to my blog! I'm a Sr. Software Development Engineer in the Seattle area, who has been performing C++/C#/Java development for over 20 years, but have definitely learned that there is always more to learn!

All thoughts and opinions expressed in my blog and my comments are my own and do not represent the thoughts of my employer.

Blogs I Read

Follow BlkRabbitCoder on Twitter

Tag Cloud


Post Categories



Little Wonders

Little Wonders



There are 15 entries for the tag Development
C++ Little Wonders: The C++11 auto keyword redux
I’ve decided to create a sub-series of my Little Wonders posts to focus on C++. Just like their C# counterparts, these posts will focus on those features of the C++ language that can help improve code by making it easier to write and maintain. The index of the C# Little Wonders can be found here. This has been a busy week with a rollout of some new website features here at my work, so I don’t have a big post for this week. But I wanted to write something up, and since lately I’ve been renewing my ......

Posted On Thursday, March 15, 2012 6:21 PM | Comments (2) | Filed Under [ My Blog C++ Software Little Wonders ]

C#/.NET Little Wonders: The ConcurrentStack and ConcurrentQueue
Once again we consider some of the lesser known classes and keywords of C#. In the next few weeks, we will discuss the concurrent collections and how they have changed the face of concurrent programming. This week’s post will begin with a general introduction and discuss the ConcurrentStack<T> and ConcurrentQueue<T>. Then in the following post we’ll discuss the ConcurrentDictionary<T> and ConcurrentBag<T>. Finally, we shall close on the third post with a discussion of the ......

Posted On Thursday, February 10, 2011 7:30 PM | Comments (3) | Filed Under [ My Blog C# Software .NET Little Wonders ]

C#/.NET Little Wonders: Fun With Enum Methods
Once again lets dive into the Little Wonders of .NET, those small things in the .NET languages and BCL classes that make development easier by increasing readability, maintainability, and/or performance. So probably every one of us has used an enumerated type at one time or another in a C# program. The enumerated types we create are a great way to represent that a value can be one of a set of discrete values (or a combination of those values in the case of bit flags). But the power of enum types ......

Posted On Thursday, December 9, 2010 5:50 PM | Comments (5) | Filed Under [ My Blog C# Software .NET Little Wonders ]

C#/.NET Little Wonders: DateTime is Packed with Goodies
Once again lets dive into the Little Wonders of .NET, those small things in the .NET languages and BCL classes that make development easier by increasing readability, maintainability, or performance. Today I’m going to focus a bit on the System.DateTime. This nice little value type (struct) has been in the BCL since the beginning, and while being broadly used to represent an instance of a date and time, there are many great properties, methods, and operators in this class that perhaps folks are less ......

Posted On Thursday, November 18, 2010 6:45 PM | Comments (8) | Filed Under [ My Blog C# Software .NET Fundamentals Little Wonders ]

C#/.NET Fundamentals: Returning an Immutable Collection
Last week we discussed returning immutable POCOs from an enclosing class so that you can prevent someone who asks for your class’s data to mutate it out from under you. Now we’re going to get a little more complex and talk about returning immutable collections from an enclosing class for the same reasons. I will discuss several different methods for returning collections in a read-only fashion with their pros and cons, including performance implications. The Problem Many times you will create a type ......

Posted On Thursday, November 4, 2010 7:04 PM | Comments (9) | Filed Under [ My Blog C# Software .NET Fundamentals ]

C#/.NET Five More Little Wonders That Make Code Better (2 of 3)
So last week I began my series with a post (here) on those little wonders in .NET/C# -- those small tips and tricks that make code either more concise, maintainable, or performant. This is the second of my three-part series, though there are so many things that make .NET (and in particular C#) a great development platform that I'm sure I could carry this blog on ad infinitum. Once again, many of these are ones you may already know, but hopefully some of you will find something new or be reminded ......

Posted On Thursday, September 2, 2010 6:20 PM | Comments (33) | Filed Under [ My Blog C# Software .NET Fundamentals Little Wonders ]

10 Things C++ Developers Learning C# Should Know
After taking a lot of time with C# fundamentals, I decided to go down a different road this week and talk about some of the differences in C# that can be troublesome to people who are used to C++ development but are learning C#. My first post on this blog months ago was just a simple piece on how I divorced C++ as my first-love language (here). This is not to say that C++ is not still a valuable language, in fact as far as object-oriented languages go C++ is still king of performance. That said, ......

Posted On Thursday, August 12, 2010 5:34 PM | Comments (4) | Filed Under [ My Blog C# C++ Software .NET Fundamentals ]

C# Fundamentals: The Joys and Pitfalls of Enums
Continuing on the same vein as my last topic where I discussed differences between C# const and readonly keywords (here) and their uses, today I’m going to look at C# enums and their pitfalls. I will only be discussing the basic enums today (the post got kind of long so I’ll discuss enums marked with the [Flags] attribute next post). Quick Recap of Enums First, a quick recap of enums for those who are brand new or less familiar with them. Basically, enums a great way to declare a variable of a type ......

Posted On Thursday, July 8, 2010 5:53 PM | Comments (5) | Filed Under [ My Blog C# Software .NET Fundamentals ]

C# Fundamentals: Beware Of Implicit Hiding
C# Fundamentals Genesis I’ve decided to begin a line of back-to-basics blogs that I hope to post regularly. I used to teach C++ Programming, Algorithms, and Data Structures courses at Webster University in the evenings here locally, and have missed those teaching and mentoring moments when I had to stop teaching after the birth of my twins (no more free time for me!). While some of these fundamentals will be obvious to those who know the languages well (I hope to post C# and C++ tidbits), I’m hoping ......

Posted On Thursday, June 24, 2010 6:11 PM | Comments (4) | Filed Under [ My Blog C# Software .NET Fundamentals Little Pitfalls ]

C#: System.Collections.Concurrent.ConcurrentQueue vs. Queue
I love new toys, so of course when .NET 4.0 came out I felt like the proverbial kid in the candy store! Now, some people get all excited about the IDE and it’s new features or about changes to WPF and Silver Light and yes, those are all very fine and grand. But me, I get all excited about things that tend to affect my life on the backside of development. That’s why when I heard there were going to be concurrent container implementations in the latest version of .NET I was salivating like Pavlov’s ......

Posted On Monday, June 7, 2010 8:37 PM | Comments (10) | Filed Under [ My Blog C# Software .NET ]

A Good Developer is So Hard to Find
Let me start out by saying I want to damn the writers of the Toughest Developer Puzzle Ever – 2. It is eating every last shred of my free time! But as I've been churning through each puzzle and marvelling at the brain teasers and trivia within, I began to think about interviewing developers and why it seems to be so hard to find good ones. The problem is, it seems like no matter how hard we try to find the perfect way to separate the chaff from the wheat, inevitably someone will get hired who falls ......

Posted On Wednesday, June 2, 2010 9:09 PM | Comments (1) | Filed Under [ My Blog Software ]

Code Reuse is (Damn) Hard
Being a development team lead, the task of interviewing new candidates was part of my job. Like any typical interview, we started with some easy questions to get them warmed up and help calm their nerves before hitting the hard stuff. One of those easier questions was almost always: “Name some benefits of object-oriented development.” Nearly every time, the candidate would chime in with a plethora of canned answers which typically included: “it helps ease code reuse.” Of course, this is a gross oversimplification. ......

Posted On Thursday, May 27, 2010 8:48 PM | Comments (11) | Filed Under [ My Blog Software ]

C#: Adding Functionality to 3rd Party Libraries With Extension Methods
Ever have one of those third party libraries that you love but it's missing that one feature or one piece of syntactical candy that would make it so much more useful? This, I truly think, is one of the best uses of extension methods. I began discussing extension methods in my last post (which you find here) where I expounded upon what I thought were some rules of thumb for using extension methods correctly. As long as you keep in line with those (or similar) rules, they can often be useful for adding ......

Posted On Wednesday, April 28, 2010 10:58 PM | Comments (1) | Filed Under [ My Blog C# ]

C#: LINQ vs foreach - Round 1.
So I was reading Peter Kellner's blog entry on Resharper 5.0 and its LINQ refactoring and thought that was very cool. But that raised a point I had always been curious about in my head -- which is a better choice: manual foreach loops or LINQ? The answer is not really clear-cut. There are two sides to any code cost arguments: performance and maintainability. The first of these is obvious and quantifiable. Given any two pieces of code that perform the same function, you can run them side-by-side and ......

Posted On Friday, April 23, 2010 6:54 AM | Comments (30) | Filed Under [ My Blog C# Software .NET Fundamentals ]

Of C# Iterators and Performance
Some of you reading this will be wondering, "what is an iterator" and think I'm locked in the world of C++. Nope, I'm talking C# iterators. No, not enumerators, iterators. So, for those of you who do not know what iterators are in C#, I will explain it in summary, and for those of you who know what iterators are but are curious of the performance impacts, I will explore that as well. Iterators have been around for a bit now, and there are still a bunch of people who don't know what they are or what ......

Posted On Monday, April 19, 2010 10:12 PM | Comments (4) | Filed Under [ My Blog C# ]

Powered by: