James Michael Hare

...hare-brained ideas from the realm of software development...
posts - 166 , comments - 1458 , 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

Article Categories

Archives

Post Categories

.NET

CSharp

Little Wonders

Little Wonders

vNext

C#

Entries dedicated to C# topics.
C#/.NET Little Wonders Anthology
The following is the complete anthology of Little Wonders, Pitfalls, and Presentations. Enjoy! A new little puzzler will be coming out this week. The C# 6 Little Wonders C#/.NET Little Wonders: Auto-property initialization in C# 6 C#/.NET Little Wonders: String Interpolation in C# 6 C#/.NET Little Wonders: Getting the Name of an Identifier in C# 6 C#/.NET Little Wonders: Exception Filtering in C# 6 C#/.NET Little Wonders: Static Using Statements in C# 6 C#/.NET Little Wonders: Indexer Initializer ......

Posted On Tuesday, April 19, 2016 11:13 AM | Comments (4) | Filed Under [ My Blog C# Software .NET Little Wonders Little Pitfalls ]

C#/.NET Little Wonders Anthology
The following is the complete anthology of Little Wonders, Pitfalls, and Presentations. Enjoy! A new little puzzler will be coming out this week. The C# 6 Little Wonders C#/.NET Little Wonders: Auto-property initialization in C# 6 C#/.NET Little Wonders: String Interpolation in C# 6 C#/.NET Little Wonders: Getting the Name of an Identifier in C# 6 C#/.NET Little Wonders: Exception Filtering in C# 6 C#/.NET Little Wonders: Static Using Statements in C# 6 C#/.NET Little Wonders: Indexer Initializer ......

Posted On Tuesday, April 19, 2016 11:13 AM | Comments (4) | Filed Under [ My Blog C# Software .NET Little Wonders Little Pitfalls ]

Amazon.com Recruiting Event Coming to St. Louis in April
Hey all my friends and readers in the St. Louis area, my team from Amazon is heading to St. Louis to do an in-person hiring event in April!Have you always wanted to work in a place that hires and develops the best? That lets builders be builders? That has excellent benefits and salary/bonuses? That has a clear technical path all the way from entry-level developer to architect and beyond?If you're a developer who loves to solve problems and learn new skills, and be in an environment that encourages ......

Posted On Wednesday, March 23, 2016 11:02 AM | Comments (0) | Filed Under [ My Blog C# C++ .NET Little Puzzlers Technology CSharp ]

Amazon.com Recruiting Event Coming to St. Louis in April
Hey all my friends and readers in the St. Louis area, my team from Amazon is heading to St. Louis to do an in-person hiring event in April!Have you always wanted to work in a place that hires and develops the best? That lets builders be builders? That has excellent benefits and salary/bonuses? That has a clear technical path all the way from entry-level developer to architect and beyond?If you're a developer who loves to solve problems and learn new skills, and be in an environment that encourages ......

Posted On Wednesday, March 23, 2016 11:02 AM | Comments (0) | Filed Under [ My Blog C# C++ .NET Little Puzzlers Technology CSharp ]

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 (7) | 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 (11) | 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 (6) | 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 ]

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 ]

C#/.NET Five Little Wonders That Make Code Better (1 of 3)
We all have those little wonders in our .NET code, those small tips and tricks that make code just that much more concise, maintainable, or performant. Many of you probably already know of some of these, but many folks either overlook them or just don't know about them, so this article is a refresher. I'm planning on making this a three-part series encompassing 15 little wonders that I had thought of, though I'm very curious to hear the little wonders you can think of as well. Update: Part 2 is now ......

Posted On Thursday, August 26, 2010 6:32 PM | Comments (64) | 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: Parameters Passing Nuances
Last week I went into quite a bit of detail on C# struct (here) and the consequences of using a struct versus a class to represent complex data types. In the course of that article, I had a section describing the differences between value types and reference types and thought I would expand upon one of the ideas in there which seems to confuse some folks who are new to C#: parameter passing nuances. But first, let's lay the groundwork with some definitions: Parameter - the variable defined in a method ......

Posted On Thursday, August 5, 2010 6:18 PM | Comments (1) | Filed Under [ My Blog C# Software .NET Fundamentals ]

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 (1) | Filed Under [ My Blog C# Software .NET Little Wonders vNext ]

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 (11) | 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 (3) | 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 (4) | Filed Under [ My Blog C# Software .NET Little Wonders vNext ]

Visual Studio Little Wonders: Box Selection
So this week I decided I’d do a Little Wonder of a different kind and focus on an underused IDE improvement: Visual Studio’s Box Selection capability. This is a handy feature that many people still don’t realize was made available in Visual Studio 2010 (and beyond). True, there have been other editors in the past with this capability, but now that it’s fully part of Visual Studio we can enjoy it’s goodness from within our own IDE. So, for those of you who don’t know what box selection is and what ......

Posted On Tuesday, October 30, 2012 7:26 PM | Comments (6) | Filed Under [ My Blog C# Software .NET Little Wonders ]

C#/.NET Little Wonders: Using ‘default’ to Get Default Values
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. Today’s little wonder is another of those small items that can help a lot in certain situations, especially when writing generics. In particular, it is useful in determining what the default value of a given type would be. The Problem: what’s the default value ......

Posted On Thursday, October 18, 2012 8:29 PM | Comments (2) | Filed Under [ My Blog C# Software .NET Little Wonders ]

Full C# Archive

Powered by: