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:

http://www.sologig.com/jobs/-/J3J62H6JL5022Z8NW1H?Job_DID=J3J62H6JL5022Z8NW1H&siteid=0010S0777&ipath=JRKCV0A

excerpt:

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

Seekers,

.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?

2014-06-19_Screenshot_237

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?

pat
:)

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

Seekers,

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?

Description
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:

C#:

VB:

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…

pat
:)

Some Spam Is Actually Creatively Annoying

June 5th, 2014 No comments
Categories: Random, Weirdness Tags:

The Infinite Space Between Words

June 5th, 2014 No comments

139188204113[1]Seekers,

A great article here on Jeff Atwood’s blog Coding Horror about what we, and our computers, consider the space between the words…

Excerpt:

Did you see the movie “Her”? If not, you should. It’s great. One of my favorite scenes is the AI describing just how difficult it becomes to communicate with humans:

It’s like I’m reading a book… and it’s a book I deeply love. But I’m reading it slowly now. So the words are really far apart and the spaces between the words are almost infinite. I can still feel you… and the words of our story… but it’s in this endless space between the words that I’m finding myself now. It’s a place that’s not of the physical world. It’s where everything else is that I didn’t even know existed. I love you so much. But this is where I am now. And this who I am now. And I need you to let me go. As much as I want to, I can’t live your book any more.

I have some serious reservations about the work environment pictured in Her where everyone’s spending all day creepily whispering to their computers, but there is deep fundamental truth in that one pivotal scene. That infinite space “between” what we humans feel as time is where computers spend all their time. It’s an entirely different timescale.

Categories: Programming, Random, Technology Tags:
%d bloggers like this: