James Michael Hare

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

.NET

CSharp

Little Wonders

Little Wonders

vNext

March 2015 Entries

Solution: Little Puzzlers–Is tree a Binary Search Tree?
This is the way I would go about the “Is tree a Binary Search Tree” problem if I were asked to perform it at an evaluation. However, keep in mind there are multiple ways to solve this, so don't worry if your solution has variations. The Wrong Path The temptation here is to naively think of a BST as simply having the restriction that the left child of x must be < x and the right child of x must be > x. The problem is that this is not the accurate definition. The definition of a BST is that the ......

Posted On Monday, March 30, 2015 12:22 PM | Comments (9) | Filed Under [ My Blog C# Software .NET Little Puzzlers ]

C#/.NET Little Wonders: String Interpolation 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, allow me ......

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

Little Puzzlers–Is Tree a Binary Search Tree?
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 standard definition of a binary tree node, i.e.: 1: public class Node<T> 2: { 3: ​T Data { get; set; } 4: Node<T> Left { get; set; } 5: Node<T> Right { get; set; } 6: } And a reference to the root of the tree: 1: Node<T> root = ....; Write a method ......

Posted On Monday, March 23, 2015 9:05 AM | Comments (21) |

C#/.NET Little Wonders: Auto-property initialization 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, allow me ......

Posted On Thursday, March 19, 2015 4:19 PM | Comments (4) | Filed Under [ My Blog C# Software .NET Little Wonders vNext ]

Solution–Little Puzzlers: First Non-Repeating Character
This is the way I would go about this problem if I were asked to perform it at an evaluation. However, keep in mind there are multiple ways to solve this, so don't worry if your solution has variations. When solving these sorts of problems, the first thing you should do before writing any code is test your assumptions and clarify requirements. Often times tech companies use these sort of questions to see if you just dive into coding with no set design, or if you really think out the edge cases. First ......

Posted On Sunday, March 15, 2015 8:54 PM | Comments (21) | Filed Under [ My Blog C# Software .NET Little Puzzlers ]

Little Puzzlers: First Non-Repeating Character
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 an unbounded sequence of characters, find the value and position of the first non-repeated character. e.g., in the stream: A,B,C,D,C,B,A,F,A,F the first non-repeated character is D. For the purposes of this exercise, consider the following interface as the source of the stream: ......

Posted On Monday, March 9, 2015 9:22 AM | Comments (22) | Filed Under [ My Blog C# .NET Little Puzzlers ]

Powered by: