Linear Operations

<rant> We all know O(n) = O(2n), right?  I mean, we’re talking about how algorithms scale here.  Linear is linear.  I add 100 more elements to my dataset and the time to finish what ever I was doing scales linearly. Now that’s all fine and good but think a bit when working with code. Just […]

.

Read more

Top 25 Most Dangerous Programming Errors

Follow the below link, read it, consume it, grok it. 2009 CWE/SANS Top 25 Most Dangerous Programming Errors (If it doesn’t come up be patient. It looks like the server is getting hit pretty hard with bloggers like myself linking to it.) Or read a summary of it and then go to the link over […]

.

Read more

Extension Methods Practically Applied

It seems odd to me that I’ve never spoken on extension methods considering the broad range of subjects I’ve covered. So here I am writing on them. So what are extension methods? They are methods you can tack on to existing objects to extend their functionality without having to extend them. “Brian, if you want […]

.

Read more

Making Classes and Properties Immutable

Update 2024-02-16:Rereading this far into the future from when it was written is kind of prophetic. We would just use Record now in .NET but it’s still an interesting bit of history. In the article I refer to .NET 2 and 3 but obviously I’m referring to .NET framework. Hopefully we all know string is […]

.

Read more

foreach loops on arrays

Just a quick note here on foreach loops. Not sure if you knew this but foreach loops can be used to iterate over multidimensional arrays. Imagine you have: you can iterate over the whole 3D array here in a single foreach: The resulting output is: 012345012345. This will only work for multidimensional arrays. For jagged […]

.

Read more

Microsoft’s 101 LINQ samples

I wanted to let you all in on a little secret.  When I am feeling the urge to write a linq post and can’t find something write about I go to Microsoft’s 101 LINQ samples.  For the most part they’re simple examples of a lot of the features that LINQ has to offer.  The list is […]

.

Read more

Databinding, ListView/GridView and Converter

Had some trouble with using a converter when databinding on a GridView yesterday so I thought I’d do a quick write up. Imagine for one instance you have the following class: Now imagine you have the following xaml: To bind to the grid all you would have to do on the window load event is: […]

.

Read more

T1, T2, T3, T4, TResult, Hut, Hut, Hike

This post is kind of not LINQ related, kind of LINQ related. I’ve mentioned lambdas before but wanted to move more into what is more at the core of lambdas. That is more along the lines of delegates. We all know about delegates, don’t we? “No Brian, we don’t.” “Ivan is that you?” (Yes, I’ve […]

.

Read more

The lambda says, “baaaaa”

LINQ allows you do define simple functions/methods in-line with the query you are doing.  These are called lambda expressions. They have a special format to allow for in-line expressions.   Take a look at: Basically this is: Rather then complicating things with full-blown LINQ queries lets cheat and just use simple arrays. For example: The where […]

.

Read more

Tiptoe Through the Tulips … LINQeses…es

As most can attest when launching into the world of WPF you have to jump in and hope you can figure out how to swim before you drown.  It has a huge learning curve but the end results are usually pretty amazing. LINQ, on the other hand, you can slowly dip a toe in, see how […]

.

Read more
FormatException

928 East Plymouth Drive Asbury Park, NJ 07712