Decorating an enum with the Description attribute for later use #csharp #dotnet

I had the need today to set a string value based on the value of an enum. Rather than creating the following code:

string myString = null;

switch(myEnum)
{
    case myEnum.Value1:
        myString = "value 1";
        break;
    case myEnum.Value2:
        myString = "value 2";
        break;
    case myEnum.Value3:
        myString = "value 3";
        break;
}

I wanted to do something simpler. So, I decided to add the System.ComponentModel.Description attribute to my enum, like so:

using System.ComponentModel;

public enum MyEnum
{
    [Description("value 1")]
    Value1,
    [Description("value 2")]
    Value2,
    [Description("value 3")]
    Value3
}

Then, to make it easy to use, I added an extension method to my enumerator:

public static string GetDescription(this MyEnum enumValue)
{
    Array Values = System.Enum.GetValues(typeof(MyEnum));
    string description = null;

    foreach(int val in Values)
    {
        if(val == (int)enumValue)
        {
            var type = typeof(MyEnum);
            var memInfo = type.GetMember(Enum.GetName(typeof(MyEnum), val));
            var attributes = memInfo[0].GetCustomAttributes(typeof(DescriptionAttribute), false);
            description = ((DescriptionAttribute)attributes[0]).Description;
            break;
        }
    }

    return description;
}

This will allow you to easily get the description of the current enum value. Here is how you would do that:

string description = null;
MyEnum testEnum = MyEnum.Value2;
description = testEnum.GetDescription();
// description will be "value 2"

As you can see, it’s pretty easy to decorate your enum values with string descriptions. This allows you a central location to set the value.

I can even see a custom description attribute class that retrieves the description from a database. The use cases are there.

Upgrading #ASPNET #Identity in #NuGet

This morning, when I went to upgrade the Identity system in my MVC application from NuGet, I ran into issues. When I ran the application that attempted to access roles, I got an error that the model backing the dbContext had changed and that I needed to run a code first migration.

I have very little experience with code-first EntityFramework as I have always used database-first. I just find it easier to set up my database with all the foreign keys and then create my data model from that. I haven’t yet learned the benefits of code-first.

So, to continue, I found the following two resources on the web that pointed me in the right direction:

Upgrading from EntityFramework Identity 1.0 to 2.0

and

Automatic Code-First Migrations

Within those articles, I found the following package manager console commands that helped me:

Enable-Migrations –EnableAutomaticMigrations
Add-Migration Nuget-Update-ASPNet-Identity

Since I had two contexts, it gave me a message that I needed to choose one or the other and even told me the exact command to use to do it. I just copied and pasted the command in the console and ran it.

Once I told it which context was my identity context, I then had to update the database. That was simple enough as all I had to do was use the following command:

Update-Database

That updated the identity database and allowed me to run my application again.

Now, whenever the identity system changes, I can easily update the data model. Though, I’m not quite sure what to do in situations where the changes are destructive (I could lose data). I need to learn more about this.

Vector #BoyScout logo in #SVG

I have created a Boy Scout logo in SVG for use on modern web pages. I did it by loading the RGB version of the logo in Adobe Illustrator. I then rasterized it and converted it using the 3 color image trace. After removing the white background, I then copied it to the clipboard and pasted it here.

To use it, simply paste the code below into your source code editor.

I believe that all you have to do to change the size is change the width, height, and the values in the viewBox attribute (I haven’t tested this).

As with any vector-based artwork, the main advantage of using this instead of an image is that when the user zooms in to the webpage, the image doesn’t lose its clarity. Unfortunately, I couldn’t embed the SVG into this page as WordPress does not allow for this. The logo below is a PNG, so zooming in would make it look bad.

BSA-Color-Logo

Here is the color version (there is a larger version below):

<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In  -->
<svg version="1.1"
	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
	 x="0px" y="0px" width="127px" height="146.6px" viewBox="0 0 127 146.6" enable-background="new 0 0 127 146.6"
	 xml:space="preserve">
<defs>
</defs>
<g>
	<path fill="#D5303D" d="M63.6,0c0.7,2.7,2,5.2,3.2,7.7c3.7,7.5,8.2,14.5,12,22c2.9,5.7,5.4,11.5,6.6,17.8c0.2,0.9,0.6,0.5,1,0.4
		c2.3-0.8,4.6-1.8,7-2.4c7.3-1.6,14.4-1.5,21.1,2.3c2.4,1.3,4.5,3,6.3,5.2c-2.3-0.2-4.6,0.5-7-0.8c-9.3-5-18.6-4.8-27.6,0.7
		c-1.2,0.7-2.3,1.5-3.6,2.4c-0.2-3.3-0.6-6.4-1.4-9.4c-1.7-6.6-4.7-12.7-7.9-18.7c-3.2-5.8-6.6-11.5-9.5-17.5
		c-0.1-0.1-0.2-0.3-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4c-2.2,0.5-4.4,0.2-6.6,0.4C105.1,67.4,103.9,67.4,102.9,68z"/>
	<path fill="#165291" d="M63.8,83.5c-4,0-7.9,0-11.9,0c-0.8,0-1.1-0.1-1.1-1c-0.1-2.1-0.2-4.1-0.1-6.2c0-0.4-0.1-0.8,0.5-0.9
		c3-0.4,5.9-1.5,8.8-2.2c3.4-0.9,6.6-0.3,9.9,0.6c2,0.5,4,1,5.9,1.4c0.6,0.1,0.8,0.3,0.8,0.9c0,2.2,0,4.5,0.1,6.7
		c0,0.9-0.5,0.7-1,0.7C71.8,83.4,67.8,83.4,63.8,83.5C63.8,83.5,63.8,83.5,63.8,83.5z M58,76.4c-0.4-0.3-0.7-0.8-1.1-0.8
		c-0.3,0-0.6,0.5-0.9,0.8c0.4,0.3,0.1,1.3,1,1.3C57.7,77.6,57.4,76.8,58,76.4z M71,81.3c-0.2-0.5-0.8-0.6-1.1-0.9
		c-0.3,0.3-0.9,0.4-0.8,0.9c0,0.6,0.5,0.9,1.1,0.9C70.7,82.2,70.7,81.6,71,81.3z M63.7,75.9c0.9,0.4,0.8-0.6,0.8-0.8
		c0-0.5-0.5-0.8-0.9-0.9c-0.4-0.1-0.8,0.4-0.7,0.9C62.9,75.4,62.8,76.3,63.7,75.9z M67.1,76.6c0.7,0.2,0.9-0.3,1-0.8
		c0.1-0.6-0.7-0.6-0.9-0.9c-0.2,0.4-1,0.3-0.8,1C66.5,76.2,66.3,76.9,67.1,76.6z M57.4,82c0.8,0.4,0.9-0.3,0.9-0.8
		c0-0.5-0.6-0.6-0.9-1c-0.3,0.4-0.9,0.5-0.9,1C56.5,81.6,56.6,82.3,57.4,82z M70.9,77.5c0.8,0.2,0.9-0.5,1-0.9
		c0-0.4-0.6-0.5-0.9-0.8c-0.3,0.3-0.9,0.4-0.8,1C70.2,77.2,70.2,77.7,70.9,77.5z M65.9,82.2c0.7,0,0.7-0.7,0.8-1
		c0.1-0.5-0.7-0.5-0.9-0.9c-0.3,0.3-0.9,0.4-0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5,0.9,1.1c0,6,0,12.1,0.1,18.1
		c0,0.9-0.3,1.4-1.2,1.4c-1,0.1-0.9-0.7-0.9-1.3C62.7,101.5,62.7,98.4,62.7,95.4C62.7,95.4,62.7,95.4,62.7,95.4z"/>
	<path fill="#D5303D" d="M60.9,94.8c0,2.8,0,5.6,0,8.4c0,1-0.3,1-1,0.6c-0.7-0.4-1.3-0.9-1.3-1.9c0.1-5.2-0.1-10.4,0.1-15.6
		c0-0.9,0.3-1.3,1.3-1.2c0.7,0.1,0.9,0.3,0.9,1C60.8,89.1,60.9,91.9,60.9,94.8C60.9,94.8,60.9,94.8,60.9,94.8z"/>
	<path fill="#D5303D" d="M66.8,94.6c0-2.8,0-5.5,0-8.3c0-0.7,0-1.2,1-1.2c1,0,0.9,0.6,0.9,1.3c0,4.9,0.1,9.8,0.1,14.8
		c0,0.4,0.1,0.8-0.2,1.2c-0.5,0.6-0.9,1.5-1.7,1.4c-0.5-0.1-0.2-1.1-0.2-1.6C66.8,99.6,66.8,97.1,66.8,94.6
		C66.8,94.6,66.8,94.6,66.8,94.6z"/>
	<path fill="#D5303D" d="M70.6,100c0-4.6,0-9.1,0-13.6c0-0.7,0.1-1,0.9-1c0.7,0,1.1,0,1.1,0.9c0,3.5,0.1,6.9,0.1,10.4
		C72.7,98.2,71.8,99.5,70.6,100z"/>
	<path fill="#D5303D" d="M56.7,92.6c0,2.2,0,4.3,0,6.5c0,0.2,0.1,0.6-0.2,0.7c-0.3,0.1-0.5-0.2-0.7-0.4c-0.9-0.9-1.3-1.9-1.2-3.2
		c0.1-3.3-0.1-6.6,0.1-10c0-0.8,0.2-1.2,1.1-1.1c0.7,0.1,0.9,0.3,0.9,0.9C56.7,88.3,56.7,90.4,56.7,92.6
		C56.7,92.6,56.7,92.6,56.7,92.6z"/>
	<path fill="#D5303D" d="M74.9,92.6c-0.1-2.2-0.3-4.3-0.1-6.3c0.1-0.8,0.3-1.2,1.1-1.1c1,0.1,0.7,0.7,0.6,1.2
		c-0.2,1.5-0.5,2.9-0.7,4.4C75.7,91.4,75.5,92,74.9,92.6z"/>
	<path fill="#D5303D" d="M52.5,92.7c-1-2.2-1.5-4.4-1.6-6.8c0-0.7,0.4-0.7,0.9-0.7c0.5,0,1,0.1,1,0.8C52.5,88.2,52.8,90.4,52.5,92.7
		z"/>
	<path fill="#FDFDFD" d="M70.9,77.5c-0.7,0.2-0.7-0.3-0.8-0.7c-0.1-0.6,0.5-0.7,0.8-1c0.3,0.3,0.9,0.4,0.9,0.8
		C71.8,77.1,71.7,77.7,70.9,77.5z"/>
</g>
</svg>

Here is a very large version:

<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In  -->
<svg version="1.1"
	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
	 x="0px" y="0px" width="527.4px" height="609.2px" viewBox="0 0 527.4 609.2" enable-background="new 0 0 527.4 609.2"
	 xml:space="preserve">
<defs>
</defs>
<g>
	<path fill="#D5303D" d="M264.2,0c2.8,11.3,8.4,21.5,13.5,31.9c15.4,31.1,34.2,60.3,49.9,91.2c11.9,23.6,22.4,47.8,27.3,74
		c0.7,3.6,2.4,2.1,4.3,1.5c9.7-3.4,19.2-7.6,29.2-9.8c30.2-6.8,59.7-6.2,87.5,9.5c9.9,5.6,18.6,12.5,26.1,21.5
		c-9.7-0.7-18.9,2.1-28.9-3.4c-38.5-21-77.1-20.1-114.8,2.9c-4.9,3-9.6,6.4-14.9,9.9c-0.8-13.6-2.6-26.4-5.8-38.9
		c-6.9-27.6-19.4-52.9-33-77.6C291.3,88.5,277,64.9,265.1,40c-0.3-0.6-0.7-1.1-1.6-2.2c-2.5,5-4.7,9.5-7.1,14
		c-13.4,24.6-27.1,49.1-40.3,73.8c-12.9,24.3-23.4,49.5-28,76.8c-1.4,8.1-2.1,16.3-3.2,25c-7.1-5-14-9.8-21.6-13.4
		c-31.4-14.5-63.3-17.9-96-4.7c-4.3,1.7-8.6,3.7-12.3,6.5c-9.2,6.9-19.3,3.6-30.5,4.3c7-8.3,14.1-14.2,22-19
		c34.1-20.3,69.8-22.1,106.8-8.9c5.5,2,10.9,4,16.3,6.1c2.1,0.8,3.3,0.9,3.8-1.8c7-37.1,24.3-70,42.7-102.4
		c14.1-25,28.9-49.6,40.2-76.1c2.5-5.9,4.7-12,7-18C263.5,0,263.9,0,264.2,0z"/>
	<path fill="#D5303D" d="M263.2,609.2c-5.9-6.7-12.1-13.2-17.8-20c-12.8-15.6-22.9-32.9-31.9-50.9c-1.6-3.2-2.7-3.8-6.2-2.3
		c-28.3,12.1-64.1,2.5-85.6-22.6c-14.9-17.4-20.8-38.2-21.9-60.6c-0.7-15.2,1.3-29.8,7.8-43.7c0.9-2,2.1-3.9,3.9-7.2
		c0.8,12.3,3.8,22.3,10.3,31c14.6,19.7,35.6,23.8,56.3,10.7c3.5-2.2,5.3,0.1,7.5,1.4c7.6,4.9,7.6,5,0.7,10.9
		c-18.2,15.5-46.3,15.7-64.8,0.4c-1.3-1.1-2.5-2.2-4.1-3.6c-1.4,4.9-0.5,9.4,0.3,13.8c4.7,23.8,16.6,42.5,39.2,53
		c19.9,9.3,38.7,6.5,56.1-6.6c5.1-3.8,5.1-4,7.6,2c7.6,18.2,17,35.6,27,52.5c3.7,6.2,9,11.4,13.4,17.2c2.4,3.2,3.9,3.4,6.6,0.2
		c13.1-15.2,23.4-32.1,31.8-50.3c3-6.5,5.7-13.1,8.4-19.7c2.3-5.4,2.2-5.4,6.7-2c7.3,5.6,15.1,10.6,24.4,11.7
		c25.6,3.2,45.3-6.9,59.9-27.6c8.1-11.5,12-24.7,13.4-38.6c0.1-1.5,1.4-3.5-0.7-4.4c-1.6-0.7-2.7,1-3.8,1.9
		c-12.3,10.2-26.1,15-42.1,11.9c-10.3-2-19.2-7.2-27.2-13.8c-2.4-2-2.1-3.4,0.1-5c2.6-1.8,5.2-3.5,7.8-5.4c1.4-1,2.3-0.5,3.5,0.3
		c27.7,19.1,55.7,1.6,63.5-23.9c1.6-5.3,2-10.7,2.8-16.2c2.2,0.9,2.6,3,3.4,4.7c18.9,38,10.7,97.6-35.1,123.5
		c-20.2,11.4-41.5,13.4-63.1,4.2c-2.9-1.2-4-0.7-5.4,1.7c-3.8,6.8-7.9,13.5-11.6,20.3c-10.3,18.5-22.7,35.5-38.3,50
		c-0.3,0.3-0.4,0.9-0.6,1.3C264.5,609.2,263.9,609.2,263.2,609.2z"/>
	<path fill="#D5303D" d="M0,267.2c2.2-6.2,4.1-12.5,6.6-18.5c3.9-9.5,3.8-9.3,10.8-1.9c3.3,3.5,3.8,6.3,2.3,11.2
		c-11.4,37.6-2.4,70.7,23.1,99.8c5.7,6.5,12.2,12.2,19.5,16.9c3.3,2.2,4.7,1.9,5.9-2.3c3.9-14.3,10.5-27.2,21.5-37.5
		c12.6-11.7,12.7-11.6,26.9-2.1c1.4,0.9,2.7,1.9,4.3,2.9c-30.6,14.1-42.8,37.4-36.1,70.8c-6.3-1.5-11.4-4.5-16.4-7.5
		c-32.1-19.3-55-45.9-65.5-82.4c-0.7-2.5-1.2-5.2-2.8-7.4C0,295.1,0,281.1,0,267.2z"/>
	<path fill="#D5303D" d="M527.4,305.1c-2.8,7.4-3.5,15.3-6.4,22.8c-12.7,33.1-35.1,57.4-66.2,73.9c-3.5,1.9-7.1,4.3-11.6,4.9
		c4.7-31.8-3.4-56.8-35.7-69.8c4.3-4.6,9.7-6.9,14.2-10.3c1.7-1.3,3.2,0.3,4.6,1c15.3,7.6,24.2,20.7,30.2,36.2
		c1.3,3.4,2.3,6.9,3.2,10.5c0.7,2.7,1.7,3.1,4.1,1.8c7.1-3.8,13.1-8.9,18.6-14.8c21.1-22.7,32.4-49,30.1-80.5
		c-0.6-7.7-1.5-15.4-4.6-22.3c-2.4-5.5-0.3-8.7,2.9-12.2c5.6-6.1,6.2-6,9.6,1.5c3.3,7.3,4.2,15.2,6.9,22.6
		C527.4,281.8,527.4,293.4,527.4,305.1z"/>
	<path fill="#165291" d="M427.3,282.5c13.3,0,26.6,0,40.7,0c-5.4,9.4-13.3,13.1-22.7,14.6c-7.6,1.2-15.2,0.9-22.9,1
		c-4.8,0.1-9.6,0-15.3,1.7c13.1,2.2,25.4,0.3,38.1,1.8c-5.1,6.9-11.7,9.8-19.1,11.4c-6.5,1.4-13.2,1.7-19.8,2
		c-5,0.2-9.9,0.7-14.9,2.3c9.6,0.5,19.1,1.1,29.7,1.7c-14.3,15.8-33.6,12.9-52.2,16.8c7.9,0.4,14.4,0.7,21.3,1.1
		c-7.2,8.5-18.6,12.9-42.2,17c2.4,0.2,4.8,0.4,7.5,0.6c-1.2,3.2-3.5,5.1-6.4,6.7c-6.1,3.3-12,7.1-18.1,10.5c-3.6,2.1-3.6,4.2-0.7,7
		c10.6,10.5,21.1,21.2,31.8,31.6c2.3,2.2,2.8,3.8,0.8,6.6c-7.4,10.2-16.6,18.4-27.4,25.1c-2.3,1.4-3,0.8-4-1.4
		c-5.6-13.1-11.2-26.2-16.9-39.3c-0.6-1.5-0.8-2.7-0.1-4.3c8.4-18.2,10.3-37.6,10.6-57.3c0.1-9-0.1-17.9,0.1-26.9
		c0.1-3.4-1.1-5.3-4.4-6c-18-3.9-36-7.9-54-11.8c-3-0.7-5.9,0.7-8.8,1.3c-16.4,3.4-32.8,6.9-49.2,10.2c-3.3,0.7-4.5,1.8-4.6,5.4
		c-0.4,18.3-1.6,36.5,0.9,54.7c1.4,9.8,3.7,19.2,8,28.1c0.6,1.2,1.4,2.2,0.8,3.7c-6.2,14.6-12.4,29.3-18.7,44.2
		c-11.6-7.5-22.3-15.2-29.7-26.7c-1.7-2.7-1.7-4.3,0.8-6.6c10.7-10.2,21.6-20.2,31.2-31.5c3.6-4.2,3.5-5.1-1.3-7.8
		c-9-5-18-9.9-27.7-15.2c5.4-1.9,10.2-0.4,15.7-1.2c-6.1-3-12-2.9-17.6-3.2c-8.8-0.4-15.7-4.9-22.9-8.9c-1.6-0.9-2.5-2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17.2-0.5-25.9
		c0.1-1.6-0.3-3.4,2.2-3.7c12.5-1.8,24.4-6.2,36.6-9.3c14.1-3.6,27.6-1.4,41.2,2.3c8.2,2.2,16.4,4,24.7,5.7c2.4,0.5,3.4,1.3,3.5,3.8
		c0,9.3,0.1,18.6,0.4,27.9c0.1,3.6-2,3.1-4.1,3.1c-16.6,0-33.2,0-49.8,0C264.9,346.7,264.9,346.8,264.9,346.9z M240.7,317.4
		c-1.5-1.2-2.9-3.1-4.5-3.3c-1.1-0.1-2.5,2-3.8,3.2c1.8,1.4,0.5,5.3,4,5.3C239.7,322.6,238.6,318.8,240.7,317.4z M295,337.8
		c-1-2.2-3.3-2.5-4.7-3.9c-1.1,1.3-3.6,1.6-3.5,3.7c0.1,2.7,2,3.8,4.6,3.8C293.7,341.3,293.9,339.2,295,337.8z M264.6,315.3
		c3.9,1.5,3.3-2.4,3.4-3.5c0.1-1.9-2.3-3.5-3.8-3.7c-1.5-0.2-3.3,1.8-3,3.7C261.5,313.4,260.8,316.9,264.6,315.3z M278.9,318.4
		c2.8,1,3.9-1.1,4.2-3.2c0.3-2.3-2.7-2.4-3.8-3.9c-1,1.5-4.1,1.4-3.4,4C276.3,316.6,275.4,319.6,278.9,318.4z M238.6,340.5
		c3.3,1.8,3.6-1.3,3.7-3.2c0.1-2-2.6-2.5-3.7-4c-1.1,1.5-3.7,2-3.7,4C234.9,338.9,234.9,341.8,238.6,340.5z M294.5,322.1
		c3.3,0.9,3.8-2,4-3.7c0.1-1.7-2.6-2-3.7-3.4c-1.4,1.2-3.7,1.7-3.5,4C291.4,320.7,291.8,322.9,294.5,322.1z M273.9,341.4
		c2.8,0,2.9-2.8,3.2-4.1c0.4-1.9-2.8-1.9-3.8-3.5c-1.1,1.4-3.7,1.7-3.6,3.7C269.8,339.7,271.2,341.5,273.9,341.4z M308.4,341.2
		c3.4,1,3.5-2.1,3.6-3.7c0.1-1.5-2.1-2.5-3.6-3.4c-0.7,1.8-4,1.5-3.6,3.9C305.1,339.5,305.2,342.4,308.4,341.2z M220.6,340.8
		c2.3,0.5,3.8-0.7,4-3.3c0.2-2.5-2.6-2.6-3.6-4.1c-1,1.4-3.9,1.7-3.3,3.9C218,338.5,216.7,341.7,220.6,340.8z M255.4,314.7
		c-1.7-1.3-3.1-3.1-4.7-3.2c-1.1-0.1-3.6,1.3-3.3,3.4c0.2,1.7,0.5,3.5,3.4,3.7C254.3,319,253.2,315.7,255.4,314.7z M308.7,325.5
		c2.1,0.5,3.3-1.6,3.3-3.8c0-1.7-2-2.7-3.5-3.7c-0.9,1.7-4,1.8-3.6,4C305.3,323.1,304.9,326,308.7,325.5z M256,340.9
		c3,1.3,3.7-1.4,4-2.9c0.4-2.6-2.6-2.7-4.1-3.3c-0.8-0.4-3.8,0.6-3.5,2.5C252.6,338.8,252.7,341.9,256,340.9z M220.7,323.9
		c3.8,2.1,3.4-2,3.7-3.2c0.4-1.9-2.5-2.2-3.6-3.5c-1.2,1.2-3.5,1.6-3.5,3.7C217.3,322.7,217.4,325.1,220.7,323.9z"/>
	<path fill="#165291" d="M173.3,491c-6.8-2.6-9.5-10.6-5.7-16c1.5-2.2,3.5-2.7,6-2.5c5.6,0.5,11.3,0.4,16.7-1.4
		c5.2-1.7,9.3-4.9,12.5-9.4c1.7-2.4,1.8-4.2-1.2-5.4c-2.5-1.1-4.2-2.7-2.9-5.8c6.2-15,12.5-29.9,18.8-45.1c3.6,2.7,5.4,6.3,7.7,9.5
		c4.1,5.6,8,11.5,13.4,15.9c1.5,1.2,1.9,2.3,1.1,4.2c-3.6,8.9-7.1,17.9-10.5,26.9c-1.8,4.9-5.4,3.4-8.7,2.4c-6.8-2.1-7.1-2-10.6,3.8
		c-1.4,2.4-0.6,3.2,1.5,4c1.9,0.8,3.9,0.5,5.9,0.5c3.6,0,7.7-0.7,9,4.1c1.6,6-0.3,10.7-5.3,13.3c-1.3-2.2,1.7-4.9-0.8-6.8
		c-2.6-2-5.7-1.4-8.6-1.4c-10.3,0.1-20.6,0.2-30.9,0.3C171.9,482,171.9,482,173.3,491z"/>
	<path fill="#165291" d="M310.4,405.7c6.7,15.6,13,30.3,19.3,45.1c1.3,3.1-0.5,4.8-2.9,5.9c-3.3,1.5-2.9,3.4-1.3,5.8
		c4.1,6.4,10.4,9,17.5,10.1c3.9,0.6,7.9,0.7,11.9,1.2c2.3,0.2,5.2-0.7,6.4,2.5c1.3,3.6,1.5,7.2-0.8,10.4c-1.2,1.7-2.9,3.1-4.5,4.7
		c-1.2-1.7-0.2-2.9-0.1-4.1c0.2-3.5-1.3-5.3-4.9-5.3c-12.9,0.2-25.9,0.4-38.8,0.4c-4.5,0-6.1,1.7-5,6c0.2,0.7,1,1.5-0.1,2.1
		c-0.9,0.4-1.6-0.2-2.2-0.8c-3.2-3.5-4.9-7.5-3.2-12.3c1.6-4.7,5.5-4.6,9.4-4.4c0.3,0,0.7,0.1,1,0.1c2.4-0.2,5.3,0.5,7-1.5
		c1-1.3-0.7-2.6-1.6-3.8c-1.9-2.4-3.4-4.8-7.6-3.6c-8.7,2.5-8.9,2.1-12.7-6.2c-3.2-6.9-6.1-14-8.3-21.3c-0.4-1.4-1.4-2.7,0-4.1
		C296.7,424.5,303.5,415.5,310.4,405.7z"/>
	<path fill="#D5303D" d="M264.1,63.7c1.8,1.3,1.2,2.9,1.3,4.2c3.2,46,6.3,92,9.6,138c0.3,4.4-0.6,6-5.2,5.5c-3.9-0.4-8-0.2-11.9,0.1
		c-3.4,0.2-4.7-0.7-4.4-4.4c1.5-20.2,2.7-40.4,4.1-60.6c1.8-26.3,3.6-52.6,5.5-78.9C263.1,66.5,262.8,65.1,264.1,63.7z"/>
	<path fill="#D5303D" d="M443.9,310.9c5.1-0.3,10.2-1,15.3-0.8c4.2,0.2,5.9-1.7,7-5.3c1.6-5,3.6-9.9,5.5-15.3
		c3.2,3.7,3.3,8,4.5,11.8c2.3,7.4,4,8.7,11.6,8.8c4.1,0,8.2-0.7,12.9,1.2c-4.3,3.5-8.2,6.9-12.3,9.8c-3.2,2.2-4.2,4.3-2.5,8.2
		c2,4.5,3,9.4,4.8,15.1c-5.8-3.6-10.7-6.5-15.5-9.7c-2.1-1.5-3.6-1.5-5.7,0c-4.8,3.4-9.9,6.6-16,10.5c2-6.4,3.5-11.7,5.3-16.9
		c1-2.8,0.6-4.5-1.9-6.3c-4.6-3.2-9-6.7-13.4-10C443.8,311.7,443.9,311.3,443.9,310.9z"/>
	<path fill="#D5303D" d="M36.8,344.4c1.9-6.3,3.1-11.2,4.8-16c1.5-4,0.9-6.7-3.1-8.9c-4-2.3-7.5-5.2-11.9-8.3
		c5.4-1.8,10-1.3,14.6-1.2c4.6,0.1,7.4-1.5,8.8-6c1.5-4.7,3.5-9.3,5.5-14.5c2.9,5.3,4,10.6,5.8,15.7c1,2.7,2.4,3.9,5.2,4.3
		c5.8,0.8,11.5,0.4,18,0.4c-3.2,4.7-7.5,7.1-11.6,9.5c-4,2.3-5.2,5.2-3.8,9.5c1.5,4.9,3,9.7,4.6,15.2c-5.7-2.1-10-5.7-14.3-9.1
		c-2.5-1.9-4.4-2.3-7.1-0.4C47.7,337.5,42.9,340.4,36.8,344.4z"/>
	<path fill="#165291" d="M267.1,464.7c-8.8-0.1-17.4-0.9-26-2.7c-2.9-0.6-3.5-1.7-2.8-4.3c1.6-6.1,3.7-12,6.6-17.6
		c1.1-2.1,2-2.9,3.9-1.1c0.4,0.3,0.8,0.5,1.2,0.8c9.2,7.9,18.7,9.2,28.4,0.8c3.1-2.7,4.8-2,6,1.9c1.6,5.2,3.6,10.3,5.7,15.3
		c1.2,2.8,0.9,4-2.3,4.7C280.9,464,274,464.8,267.1,464.7z"/>
	<path fill="#D5303D" d="M260.5,396.3c0-12.6,0-25.2,0-37.8c0-3,0.5-4.8,4.3-4.8c3.9,0,3.7,2.1,3.7,4.7c0.1,25,0.2,50.1,0.5,75.1
		c0,3.7-1.4,5.8-4.9,6c-4,0.2-3.8-2.7-3.8-5.5c0-12.6,0-25.2,0-37.8C260.4,396.3,260.4,396.3,260.5,396.3z"/>
	<path fill="#D5303D" d="M252.9,393.8c0,11.6-0.1,23.2,0.1,34.8c0.1,4-1.3,4.1-4.3,2.4c-3.1-1.7-5.4-3.9-5.3-7.7
		c0.6-21.5-0.5-43.1,0.4-64.6c0.2-3.7,1.1-5.3,5.2-4.9c3.1,0.3,3.9,1.3,3.9,4.2C252.8,370,252.8,381.9,252.9,393.8
		C252.9,393.8,252.9,393.8,252.9,393.8z"/>
	<path fill="#D5303D" d="M277.3,393.1c0-11.5,0-22.9,0-34.4c0-2.8,0.2-5.1,4.3-4.9c4.2,0.2,3.8,2.5,3.9,5.2
		c0.1,20.4,0.3,40.9,0.5,61.3c0,1.6,0.4,3.4-0.7,4.8c-1.9,2.5-3.6,6.4-6.9,5.6c-2.3-0.5-0.8-4.5-0.9-6.8
		c-0.1-10.3-0.1-20.6-0.1-30.9C277.4,393.1,277.4,393.1,277.3,393.1z"/>
	<path fill="#D5303D" d="M293.2,415.3c0-19.2,0.1-37.9-0.1-56.7c0-2.8,0.5-4.2,3.7-3.9c2.8,0.2,4.5,0.1,4.5,3.8
		c-0.1,14.4,0.3,28.9,0.4,43.3C301.8,407.9,298.4,413.3,293.2,415.3z"/>
	<path fill="#D5303D" d="M235.6,384.7c0,9,0,17.9,0,26.9c0,1,0.6,2.5-0.8,3.1c-1.4,0.6-1.9-0.9-2.7-1.7c-3.7-3.6-5.3-7.7-5.1-13.2
		c0.6-13.8-0.4-27.6,0.4-41.4c0.2-3.2,0.9-4.8,4.7-4.5c2.8,0.2,3.6,1.1,3.6,3.9C235.5,366.7,235.6,375.7,235.6,384.7
		C235.6,384.7,235.6,384.7,235.6,384.7z"/>
	<path fill="#D5303D" d="M311.1,384.6c-0.6-9.1-1.1-17.7-0.3-26.3c0.3-3.3,1.2-4.8,4.7-4.5c4,0.3,2.8,2.8,2.5,5
		c-1,6.1-2,12.1-3.1,18.2C314.4,379.6,313.8,382.3,311.1,384.6z"/>
	<path fill="#D5303D" d="M217.9,385c-4.3-9-6.3-18.4-6.6-28.3c-0.1-3.1,1.7-3,3.8-3c2.1,0.1,4.3,0.4,4,3.2
		C217.9,366.2,219.1,375.6,217.9,385z"/>
	<path fill="#FDFDFD" d="M294.5,322.1c-2.8,0.8-3.1-1.3-3.3-3c-0.2-2.3,2.1-2.8,3.5-4c1.1,1.4,3.8,1.7,3.7,3.4
		C298.3,320.1,297.8,322.9,294.5,322.1z"/>
</g>
</svg>

 

Introduction to the #programming merit badge

We’re having a recruitment drive this coming Friday at the Church for the Boy Scouts troop.

I needed to come up with an activity, so I just put together some JavaScript code that introduces that Programming merit badge for the Boy Scouts.

It is a simple bit of code that challenges the user to change the message that is displayed with a bonus to change the color of the Boy Scout logo on the top of the page.

It uses a textarea to contain the JavaScript code that the code on the page will then execute (using the JavaScript eval() function). I used SVG that I created using Adobe Illustrator by using the ImageTrace functionality. I then copied the logo into the clipboard and pasted it directly into the code editor.

There is also a Spanish and Korean version of the page.

I’m pleased with the results.

The code is up on GitHub and has an MIT license.

Here is a screenshot:

ProgrammingChallengeScreenshot2

Korean page:

ProgrammingChallengeScreenshot-Korean

Changes in how we consume entertainment

I remember the days when I had a Dolby Digital 5.1 stereo setup in my media room and a large screen TV to watch movies on. I used to live for that setup.

Now, it seems like I’m never using it.

We’re moving away from being centered around our TV and getting more engaged in our electronic devices. Laurie watches her entertainment on her iPad and I will watch on my tablet and on my PC. We don’t have the need for a TV anymore, so we’re probably going to let my brother-in-law borrow it for his setup. He plays a lot of console video games and is currently using a 32″.

I’ll still use the stereo tuner to listen to my turntable, but it will no longer be used to pump cinema sound through the speakers.

Playing #ESO and Getting more mileage from my Dell XPS 420

I bought my desktop PC in 2007. I bought a Dell XPS 420 with 2 GB of RAM in it. It’s a quad core Pentium i5 running at 1.2 GHz. A few years later, I upgraded the video card to an NVidia GTX 550 Ti and upgraded the RAM to 4 GB (the most Windows 7 could recognize. I’ve since changed the OS to 64-bit).

The other day, I bought Elder Scrolls Online: Tamriel Unlimited so I could get back into playing games. I have played World of Warcraft and Star Wars: the Old Republic, but those get to be too difficult after a while. There’s just more to keep up with than I’m comfortable with. They started to feel more like jobs than games. So, ESO is a simple game to play and it has great voice acting in it (much like SWTOR). I like how there are fewer things to worry about in ESO.

After trying to play on High graphics settings, I noticed a lot of jerkiness while playing. It had some lag, too. So, I set the graphics at Medium hoping it would make a difference. It made the game run smoother, and it still looks pretty good, but I’d like to upgrade the graphics card a little.

I think for financial reasons, I’ve chosen the NVidia GeForce GTX 970. It’s a good price for speed and I’m hoping I can push the graphics quality to Ultra.

I’m also going to upgrade my RAM to 8 GB. That’s the maximum my motherboard will allow, unfortunately. Otherwise, I’d spend the same money and get 16GB. I have to buy special RAM for the Dell (at least that’s what I’ve come to understand). I have to buy 4 sticks of that RAM.

On the Disk side of things, I’m going to upgrade my boot drive to an SSD. I saw an article (some people in the comments accuse it of being an advertorial) on Ars Technica yesterday highlighting what looks like a good drive. It looks pretty solid to me. I already have two drives on my system, so I’d have a leftover HDD once I finished the upgrade and cloned my existing boot drive. I guess I could use that for some other purpose at a later date.

As time goes on, I’d like to be able to buy more PC games that look great on my machine. Upgrading it with these changes should give me a few more years of use out of it.

However, I will probably build my own gaming rig over the next year, so having parts I can reuse would be best. I’ll have to re-buy the RAM, but I can my another one of those graphics cards and set up SLI on them. I can reuse the drives, too.

Initial thoughts on #ASPNET #MVC versus #WebForms

We recently switched our project from VB.NET WebForms to C# MVC 5. I couldn’t be happier with the results.

Not having to deal with the page life-cycle and viewstate has been a dream. Everything “just works” with MVC. If you need to do something, the solution is right at your fingertips.

Combine MVC with WebAPI and client-side JavaScript and you get a very powerful solution for communicating with the server. You can also communicate with your MVC controller, as well.

For instance, I set up a drag and drop system for panels on the page. All I had to do was set the draggable=”true” attribute on the <div> and wire up drag and drop functionality. As part of that, I made an AJAX call to /api/MyController/DoMove method and pass in a json formatted string containing the data required for the move. It’s a bit more involved as I used PartialViews to build the page.

It’s so nice to work with PartialViews and Actions instead of “stateful” controls. Everything is just nice and neat. It’s hard to explain until you actually use it every day and start to get the hang of it, but MVC is far superior to WebForms, hands down.

I’m sure WebForms will be around for a long time, but if you get the chance to start a new project, I strongly urge you to switch to MVC for your solution.