10 Ways to Write Better Emails

January 3rd, 2015 No comments
Career Guidance - 10 Ways to Write Better Emails (and Just Maybe Change the World)

10 Ways to Write Better Emails (and Just Maybe Change the World)

By Alexandra Franzen, December 30, 2015

Categories: Random, Social Media, Technology Tags:

My Code Doesn’t Work…

November 4th, 2014 No comments
Categories: Programming, Sales Engineering Tags:

Another Example of What A Sales Engineer is NOT

July 6th, 2014 No comments

Another company that is confused about the difference between an Account Rep and a Sales Engineer:



Essential Duties and Responsibilities include the following. Other duties may be assigned.
Perform sales support to consistently meet overall area sales goals.

  • Make regular sales calls on existing major accounts and establish contact with new accounts.
  • Make effective customer presentations, proposal pricing is accurate and technically correct.This may include walk-through customer site, and field visits.
  • Sell maintenance engineering services and professional services.
  • Develop new accounts, sell national accounts and make sales calls at the VP level.
  • Perform marketing support to promote the Companys image throughout the industry.
  • Implement area-marketing plan on a monthly basis.
  • Assist Corporate needs in new service assessments, marketing research and literature development.

As Sales Engineers, we really need to educate these companies.  By doing so, not only do they appear to understand their industry, but it also highlights why Sales Engineers offer so much more, and more different, services and opportunities that the Account Reps they are being confused for…


Categories: Sales Engineering Tags:

Equals() and GetHashCode() for Custom Objects in VB

June 19th, 2014 No comments


.Equals() is a strange animal. It’s used like:

And for standard objects it works fine:

The are equal.

But what about something non-standard?

Should be pretty easy.. We’ll just make 2 objects, both having I equal the same thing… We’ll compare with:

Result? in-equal Whuh?

They aren’t different, really, are they?

Well, yes, but the reason why is long & boring and we really don’t care in the end. We just need a way to get around the .NET internals so when WE think 2 objects are equal, they really are considered so by our programs.

So the only question that remains is: How does .NET compute equality?

Actually, the answer is: Pretty simply! There are 2 things that are used, and they both live on your instantiated objects already.

Have you ever scrolled down an object’s list of methods & variables and seen a few yuo never mess with? How about .Equals and .GetHashCode?


For our simple class, we know what .ToString and .I do, but what about those others we always breeze by without noticing?

.Equals() – Returns a Boolean after determining if the 2 objects are equal (A.Equals(B))

.GetHashCode() – Returns an integer representation of a Hash of the object. Not perfect, but fast & good enough to determine equality by comparison.  2 different objects will produce (virtually) different hashes.

.GetType() – Returns a System.Type that says what kind of class this instance came from. In our case, the Foo() class.

“Equality” is based on the results of the GetHashCode function. Luckily, we can override them!

Here then is a complete example that shows how to override not just GetHashCode & Equals, but also ToString:

Note: Just holler if I need to explain any of it, OK?


Categories: .NET (VB & C#), Cisco, News, Programming Tags:

How To Make ConcurrentDictionary(Of T, T) As Fun As Dictionary(Of T, T)!

June 6th, 2014 No comments


I often need a dictionary to hold stuff, but the annoying thing about Dictionary is that if you try to update an existing key, it unceremoniously barfs.

So doing lots of multi-threaded apps these days, I’m using the Concurrent Collections, among them, ConcurrentDictionary.

But there is a little surprise… Where adding to a Dictionary is really simple:


…it is not ready for prime-time with multi-threads:

A Dictionary(Of TKey, TValue) can support multiple readers concurrently, as long as the collection is not modified. Even so, enumerating through a collection is intrinsically not a thread-safe procedure. In the rare case where an enumeration contends with write accesses, the collection must be locked during the entire enumeration. To allow the collection to be accessed by multiple threads for reading and writing, you must implement your own synchronization.

For thread-safe alternatives, see the ConcurrentDictionary(Of TKey, TValue) class or ImmutableDictionary class.

No surprise there. So what about the Add() in ConcurrentDictionary?

AddOrUpdate(TKey, Func(Of TKey, TValue), Func(Of TKey, TValue, TValue)) Uses the specified functions to add a key/value pair to the ConcurrentDictionary(Of TKey, TValue) if the key does not already exist, or to update a key/value pair in the ConcurrentDictionary(Of TKey, TValue) if the key already exists.
AddOrUpdate(TKey, TValue, Func(Of TKey, TValue, TValue)) Adds a key/value pair to the ConcurrentDictionary(Of TKey, TValue) if the key does not already exist, or updates a key/value pair in the ConcurrentDictionary(Of TKey, TValue) by using the specified function if the key already exists.

There is no Add()?! Why not?

…or if this is easier to read:

ConcurrentDictionary(Of TKey, TValue).AddOrUpdate Method (TKey, TValue, Func(Of TKey, TValue, TValue))

This looks hard, and all I wanted to do was add stuff. And hey, if I already have a key in there the same as what I want to add, let’s just call it an update, fair? I mean, having to check for a duplicate key (or somehow keep track?), then deal with the 2 values every blessed time is a huge waste of time…

In most cases, you just want to add a new key, or update the value of an existing key… If this is your situation (and I bet it is), then this article is for YOU!

Beating my head against the wall a few minutes ago, I stumbled upon some gold on StackOverflow by the CEO of Slicify, Steve. His approach to this dilemma is nothing short of inspiring, and I am really confused as to why M$ failed to even point out that what he did was possible.

His approach (in C#) was to simply override the default behavior of .AddOrUpdate like so:



So what does this mean to us? Well, it means that this:

Turns into this:

I’m just now learning about ExtensionMethods, as another good one I saw revently dealt with LINQ queries not natively coming with a .ToDataTable Fluent option…

Throw this somewhere into your project, and you will!

Software is Poetry…


%d bloggers like this: