James Michael Hare

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

My Links

News

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

Archives

Post Categories

.NET

CSharp

Little Wonders

Little Wonders

vNext

Software

General programming and design topics.
Solution to Little Puzzlers - Lowest Common Ancestor
This is the way I went about the "Lowest Common Ancestor" problem. However, keep in mind there are multiple ways to solve this, so don't worry if your solution has variations and it’s entirely possible there are more efficient ways. Feel free to suggest your solution in the comments here or in the original post, but please be respectful of others’ efforts. The Solution The first tendency in this problem is to want to walk back up the tree. This is obviously problematic because we do not have a parent ......

Posted On Thursday, August 27, 2015 12:52 AM | Comments (0) | Filed Under [ My Blog C# Software .NET Little Puzzlers Technology ]

Solution to Little Puzzlers–“List All Anagrams in a Word”
This is the way I went about the "List all anagrams in a word” problems. However, keep in mind there are multiple ways to solve this, so don't worry if your solution has variations and it’s entirely possible there are more efficient ways. Feel free to suggest your solution in the comments here or in the original post, but please be respectful of others’ efforts. The Solution There are many ways to tackle this problem. Ultimately, the main goal of this problem was to be able to return all the anagram ......

Posted On Tuesday, August 4, 2015 4:22 PM | Comments (6) | Filed Under [ My Blog C# Software .NET Little Puzzlers Technology CSharp ]

Little Puzzlers–List all anagrams for a word
I like to keep my brain sharp by working on programming puzzlers. On off weeks I'm going to start posting programming puzzlers I've collected over the years. Hopefully you'll find them as entertaining as I do. The Problem Given a file of all valid words in the English language, write an algorithm that would be suitable for a web page that will list all valid English words that are complete anagrams of the word entered by the user on the page. That is, if the user visits the page and types in POST, ......

Posted On Tuesday, July 28, 2015 1:43 AM | Comments (10) | Filed Under [ My Blog C# Software .NET Little Puzzlers Technology ]

Solution to Little Puzzlers–Find the Majority Element
This is the way I went about the "The Majority Element” problems. However, keep in mind there are multiple ways to solve this, so don't worry if your solution has variations and it’s entirely possible there are more efficient ways. Feel free to suggest your solution in the comments here or in the original post, but please be respectful of others’ efforts. A Linear-Time, Linear-Space Solution As with so many puzzlers, there is more than one way to tackle this problem. Let’s first consider the more ......

Posted On Monday, July 20, 2015 10:53 AM | Comments (5) | Filed Under [ My Blog C# Software .NET Little Puzzlers Technology ]

No new Little Wonders of C# 6 this week
Sorry folks, I totally intended to write a new Little Wonders of C# 6 post this week, but have been ill.  I fully intend to continue next week with a new puzzler and a new Little Wonder.

Until then, check out my previous post on The Little Wonders of C# 6 - a Presentation.

Thanks!

-Jim

Posted On Thursday, April 30, 2015 7:58 PM | Comments (2) | Filed Under [ My Blog C# Software .NET Little Wonders vNext .NET vNext Little Wonders ]

St. Louis .NET User Group
Hey folks, I won’t be posting a new Little Wonders of C# 6 post (you can see my previous posts here) this week. I’ve been preparing a presentation for the St. Louis .NET User Group about all the new C# 6 goodness. If you’ve enjoyed these posts and are in the St. Louis area on April 27th, feel free to pop in and have a listen! I’ll be covering some new wonders I haven’t had a chance to blog about yet. For more information, go to the St. Louis .NET User Group site here. Hope to see you there! Stay ......

Posted On Thursday, April 23, 2015 10:59 AM | Comments (0) | Filed Under [ My Blog C# Software .NET Little Wonders vNext ]

C#/.NET Little Wonders: The DateTime TryParse() and ParseExact() Methods
Once again, in this series of posts I look at the parts of the .NET Framework that may seem trivial, but can help improve your code by making it easier to write and maintain. The index of all my past little wonders posts can be found here. A while back I talked about some goodies in DateTime, mostly the properties that let you split out just the date or time. This week, I wanted to look at a couple more methods of the DateTime struct that give you additional control over parsing an input string into ......

Posted On Thursday, January 5, 2012 6:34 PM | Comments (9) | Filed Under [ My Blog C# Software .NET Little Wonders ]

C#/.NET Fundamentals: Unit Testing with Func<TResult> Generators
The C#/.NET Fundamentals series is geared towards examining fundamental concepts in using C# (and .NET in general) to produce effective solutions. I wanted to attempt a brief post before the holidays, so I decided to quickly revisit part a post I wrote a few weeks back on The Generic Func Delegates, and in particular, the sidebar on using Func as a generator for unit testing. At the time, I did not give that short sidebar the attention I really wanted, including showing the setup of the unit tests ......

Posted On Thursday, December 22, 2011 5:33 PM | Comments (12) | Filed Under [ My Blog C# Software .NET Fundamentals ]

C#/.NET Fundamentals: Returning Zero or One Item As IEnumerable<T>
The C#/.NET Fundamentals series is geared towards examining fundamental concepts in using C# (and .NET in general) to produce effective solutions. There are times when we are writing a method that returns a sequence of items, that it occasionally becomes necessary in base-class, interface implementation, error, or default conditions to return a sequence of only one or even zero items. There are many ways to do this, of course, which begs the question of which way is best, in terms of readability, ......

Posted On Thursday, December 8, 2011 6:32 PM | Comments (9) | Filed Under [ My Blog C# Software .NET Fundamentals ]

C#/.NET Fundamentals: Safely and Efficiently Raising Events
The C#/.NET Fundamentals series is geared towards examining fundamental concepts in using C# (and .NET in general) to produce effective solutions. A couple of posts ago, I discussed the EventHandler<TEventArgs> and EventHandler delegates, and in particular at one point mentioned in a sidebar that you need to watch out for thread-safety in order to safely raise events in a multi-threaded environment. There was an interesting discussion in the comments about different ways that people achieve ......

Posted On Thursday, December 1, 2011 8:10 PM | Comments (15) | Filed Under [ My Blog C# Software .NET Fundamentals ]

C#/.NET Little Wonders: The Predicate, Comparison, and Converter Generic Delegates
Once again, in this series of posts I look at the parts of the .NET Framework that may seem trivial, but can help improve your code by making it easier to write and maintain. The index of all my past little wonders posts can be found here. In the last three weeks, we examined the Action family of delegates (and delegates in general), the Func family of delegates, and the EventHandler family of delegates and how they can be used to support generic, reusable algorithms and classes. This week I will ......

Posted On Thursday, November 24, 2011 9:03 PM | Comments (3) | Filed Under [ My Blog C# Software .NET Fundamentals Little Wonders ]

C#/.NET Little Wonders: The EventHandler and EventHandler<TEventArgs> delegates
Once again, in this series of posts I look at the parts of the .NET Framework that may seem trivial, but can help improve your code by making it easier to write and maintain. The index of all my past little wonders posts can be found here. In the last two weeks, we examined the Action family of delegates (and delegates in general), and the Func family of delegates and how they can be used to support generic, reusable algorithms and classes. So this week, we are going to look at a handy pair of delegates ......

Posted On Thursday, November 17, 2011 7:20 PM | Comments (9) | Filed Under [ My Blog C# Software .NET Little Wonders ]

C#/.NET Little Wonders: The Generic Func Delegates
Once again, in this series of posts I look at the parts of the .NET Framework that may seem trivial, but can help improve your code by making it easier to write and maintain. The index of all my past little wonders posts can be found here. Back in one of my three original “Little Wonders” Trilogy of posts, I had listed generic delegates as one of the Little Wonders of .NET. Later, someone posted a comment saying said that they would love more detail on the generic delegates and their uses, since ......

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

C#/.NET Little Wonders: The Generic Action Delegates
Once again, in this series of posts I look at the parts of the .NET Framework that may seem trivial, but can help improve your code by making it easier to write and maintain. The index of all my past little wonders posts can be found here. Back in one of my three original “Little Wonders” Trilogy of posts, I had listed generic delegates as one of the Little Wonders of .NET. Later, someone posted a comment saying said that they would love more detail on the generic delegates and their uses, since ......

Posted On Thursday, November 3, 2011 8:14 PM | Comments (12) | Filed Under [ My Blog C# Software .NET Little Wonders ]

C#/.NET Little Wonders: TPL Wonders - The Parallel.For() Method
Once again, in this series of posts I look at the parts of the .NET Framework that may seem trivial, but can help improve your code by making it easier to write and maintain. The index of all my past little wonders posts can be found here. Previously, I had created some posts about the Task Parallel Library’s Concurrent Collections – which are very efficient collections designed for concurrent use with minimal contention – but in this next series of Little Wonders posts, I’d like to explore the parts ......

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

Little Puzzlers–Largest Square of ‘1’s in a Matrix
I like to keep my brain sharp by working on programming puzzlers. On off weeks I'm going to start posting programming puzzlers I've collected over the years. Hopefully you'll find them as entertaining as I do. Another fun one that I enjoyed solving. As usual with these problems, there’s a fairly straightforward solution -- and a very efficient but harder to find solution. The Problem Given a square 2D array of 1s and 0s, find the starting position (top left row, column) and size of the largest, solid ......

Posted On Monday, April 20, 2015 11:38 AM | Comments (8) | Filed Under [ My Blog C# Software .NET Little Puzzlers ]

C#/.NET Little Wonders: Static Using Statements in C# 6
Once again, in this series of posts I look at the parts of the .NET Framework that may seem trivial, but can help improve your code by making it easier to write and maintain. The index of all my past little wonders posts can be found here. Visual Studio 2015 is on the horizon! In fact, some of you may already have played with the preview and seen some of the many neat new things to come – both in the IDE and in the C# language. For those who haven’t been keeping up with the announcements, I’m taking ......

Posted On Thursday, April 16, 2015 8:14 PM | Comments (9) | Filed Under [ My Blog C# Software .NET Little Wonders vNext ]

Solution to Little Puzzlers–Largest Puddle on a Bar Chart
This is the way I went about the “Largest Puddle on a Bar Chart” problem. However, keep in mind there are multiple ways to solve this, so don't worry if your solution has variations and it’s entirely possible there are more efficient ways. Feel free to suggest your solution in the comments here or in the original post, but please be respectful of others efforts. My Approach Of course, the most straight-forward approach could be performed by taking each bar, and finding the pool starting at that bar ......

Posted On Monday, April 13, 2015 8:56 PM | Comments (2) | Filed Under [ My Blog C# Software .NET Little Puzzlers ]

C#/.NET Little Wonders: Exception Filtering in C# 6
Once again, in this series of posts I look at the parts of the .NET Framework that may seem trivial, but can help improve your code by making it easier to write and maintain. The index of all my past little wonders posts can be found here. Visual Studio 2015 is on the horizon! In fact, some of you may already have played with the preview and seen some of the many neat new things to come – both in the IDE and in the C# language. For those who haven’t been keeping up with the announcements, I’m taking ......

Posted On Thursday, April 9, 2015 6:36 PM | Comments (3) | Filed Under [ My Blog C# Software .NET Little Wonders vNext ]

A Change of Seasons...
As some of you already know, today is my last day at Scottrade. It has been a great place to work and I'll miss all the relationships I've formed over the last 5 years immensely! Starting Monday, I will be taking a new position at Amazon.com in Seattle. It should be an exciting new adventure and I look forward to sharing more about my experiences in the days to come! I do intend to continue blogging (after the move settles down) about C# as I'm able, and may mix in some Java as well as I rekindle ......

Posted On Tuesday, November 20, 2012 9:36 AM | Comments (6) | Filed Under [ My Blog Software ]

Full Software Archive

Powered by: