Monthly Archives: February 2017

Story II

Steve is Kevin’s boss.  They work in an office.

Steve: “Morning, Kevin.  Is that the new monitor I approved for you a couple months ago?  Looks great.”

Kevin: (with a big smile) “It just came in yesterday.  It’s going to be great for that PhotoShop project I’m working on.  The color fidelity is fantastic.”

Steve: “You’re right…I really like it.  My photos would look perfect on it.  Tell you what: I’m going to be in a meeting for the next hour.  When I come out, have it set up at my desk as my primary monitor.  I’ll keep the current one as a secondary.”


Would you expect Kevin to experience an emotion as a result of this event?  What should Kevin say in response?  Would it be wise to express his feelings?  Should Kevin show honor to his boss?  How?

Would the story be different if the monitor was to be delivered to the office of Steve’s boss?  What if it were to be delivered to Steve’s friend who works in a different department?

Was it within Steve’s rights to order Kevin to relocate the monitor?  Was Steve’s request wise?  Did Steve make Kevin feel respected?

Simple AlphaNumeric Encoding Scheme

Some time ago I wrote a pair of C# functions that allow you to encode a ANSI string into only alphanumeric characters, no symbols.  This way string encoded this way would not change when URL encoded and decoded. Here they are:

public static string SimpleCharDecode(string msg)
{
	string str = "";
	for (int i = 0; i < msg.Length; i++)
	{
		char chr = msg[i];
		if (msg[i] != 'x')
		{
			str = string.Concat(str, msg[i]);
		}
		else
		{
			string str1 = "";
			for (i++; i < msg.Length && msg[i] != 'x'; i++)
			{
				str1 = string.Concat(str1, msg[i]);
			}
			str = string.Concat(str, (char)((ushort)int.Parse(str1)));
		}
	}
	return str;
}

public static string SimpleCharEncode(string msg)
{
	string str = "";
	for (int i = 0; i < msg.Length; i++)
	{
		int num = msg[i];
		if (!Util.isGood(num))
		{
			object obj = str;
			object[] objArray = new object[] { obj, "x", num, "x" };
			str = string.Concat(objArray);
		}
		else
		{
			str = string.Concat(str, msg[i]);
		}
	}
	return str;
}