In response to Request for Comments: Issues with .NET and Microsoft Product Versioning

I started writing a comment on Scott Hanselman’s blog post Request for Comments: Issues with .NET and Microsoft Product Versioning, but it got too long so I decided to make my own post about it.

A few thoughts to throw on the pile of comments already there:

I like semantic versioning like 4.1.2, but I could see that maybe the marketing department would want to make the name a little friendlier. If some words are in there, keep it simple and consistent. Wiz Bang 2011 SP 2 Beta 3 is the most complex I should ever have to parse. And that’s if I want to get all technical and play with pre-release software.

I think the most a non-developer, like your boss or manager, should really care about is two numbers. One for the version of the product, Office 2010 for example, and one for updates of at least moderate size that increments the SP or .x number.

Lose the acronyms. How many people know what CTP or PU or even R stand for? At least stick with SP like Windows had been doing for years. Couldn’t CTP be replaced with the word Beta, or Preview?

Put the numbers in descending order of importance. If it’s going to be Wiz Bang 2011, fine, I’ll treat 2011 as the major version that I am using. Wiz Bang 2011 SP1 would be alright too if it’s a collection of medium to small changes. If it’s a new, incompatible version that’s being sold separately, don’t add an R2, change the major number from 2008 to 2010.

And finally if you’re already using decimal notation, like 3.5, don’t throw other numbers around. Update that number or tack another .1 on there. 3.5.1 means it’s a little bug fix update. 3.5 R2 means “say what?”

Posted in Technology | Tagged , | Leave a comment

So I’ve been playing around with IPv6 at home lately

IPv6, if you haven’t heard, is supposed to be the future protocol of the internet. Currently we’re all using IPv4 to talk to servers and such online. IPv4 has a limited number of addresses and there’s enough computers online these days that we’re running out. IPv4 has the familiar address format like 192.168.1.1, where IPv6 supports many more addresses and has a format like fe80::202:b3ff:fe1e:8329. The Wikipedia article might be a good place to start if you’d like to know more.

Thanks to Linode, I now have a native IPv6 address on my server. (You should be able to load this site over IPv6 if have it or you could use a proxy.)

I checked with my ISP to see if they had any kind of IPv6 trial going on, but no luck there. Not too surprising really.

So I decided to see if my new ASUS RT-N16 could do IPv6 through a tunnel. I’d installed the TomatoUSB firmware on it and heard some talk about IPv6 with it, but found no settings for it. I finally downloaded a pre-release build of the firmware and that had settings.

The image I used specifically was tomato-K26USB-NVRAM60K-1.28.9055MIPSR2-git-13042011-Ext.trx from http://manveru.pl/tomato/index.html

6to4

I found an IPv6 tab under the Basic category and decided to try 6to4 Anycast Relay and checked Enable Router Advertisements. I went to ipv6.google.com and it worked! I was surprised it was that easy.

Then I learned how 6to4 works. It sets up a tunnel to the hardcoded address 192.88.99.1. Apparently there are a handful of providers out there operating at this address and my traffic got routed to the nearest one.

Now 6to4 did have a few problems. 1) I could not ping back to my router’s address or any internal address from the public internet. And 2) modern operating systems try to avoid 6to4 if they can. By that I mean that if a website has both an IPv4 and an IPv6 address, it’ll use the IPv4 address every time. Apparently this is because the tunnel is not entirely reliable (and will likely be slower.) This makes sense and it’s designed to not annoy end users.

6in4

So after that I decided to see if I could do any better. Another option TomatoUSB had was 6in4 Static Tunnel. For this to work I had to setup a tunnel with a company and enter in a bunch of numbers. I used tunnelbroker.net. After I registered a tunnel, it was a simple matter of copying all the addresses into TomatoUSB. After I did that it all worked!

I could ping any public IPv6 address, any public IPv6 address could ping any of my internal machines. And my laptop would prefer IPv6 if the site supported it.

Posted in Technology | Tagged , | 5 Comments

Okay, so this place is pretty dead… Time for an experiment!

When I started up this new blog, I figured it’d be slow but I would post every once in a while. That hasn’t really happened, it’s been six months since I last posted. That’s partly due to being too busy, partly due to being to tired, and partly because I didn’t know what to write about.

I still don’t know exactly what this place is going to be. I figured I could post coding tutorials and thoughts since Facebook pretty much covers personal stuff. But then every time I got an idea for something to write, I’d throw it out because it wouldn’t meet that narrow focus.

I’m going to try posting once a week and see how it goes. I do have a bunch of thoughts to get down on paper and I think making my online presence larger would be good for me.

I’m not counting this as my post for the week either, right now I have two posts about this blog and only one post about anything useful. What will it be? Who knows. Maybe about coding, or home servers, or D&D, or even a recipe.

Posted in Meta | Tagged | Leave a comment

It’s a new year, time to archive last year’s email

The last few years I’ve taken to backing up all of the previous year’s email and deleting most of it. This keeps my exchange account from taking up too much space, Outlook from bogging down, and I can still find those old emails if I really do need them someday.

My basic process has been to create a new .pst file, then copy my top level folders one by one via drag and drop with shift held down. Then I’ll make a search folder in the .pst for anything older than last year, 2010 in this case, and delete it all. After all that I can detach the .pst, zip it, and store it on a separate drive.

After everything is backed up I’ll use a few search folders in my Exchange account to delete any huge emails and really old emails. I tend to do a little more cleanup at this time too like deleting folders for really old projects.

I never needed to do this in the beginning, but these days I’m getting more email and it builds up eventually. I’ll delete a lot of it and I try to keep my inbox empty, but there are certain times it’s been useful to dig out that odd old email I thought I wouldn’t ever need again.

There’s likely a simpler way to do all this with auto-archiving or something, but this has been working well for me and it keeps everything nice and organized just the way I want it.

Posted in Technology | Tagged , , | Leave a comment

Some Parameters for msdeploy.exe

I’ve been trying to get msdeploy working for me at work.  Hopefully it will be able to replace some PowerShell/Robocopy scripts I have for updating our servers.

To deploy/update an existing site to local:
msdeploy.exe -verb:sync -source:Package="<Package.zip>" -test:iisApp='<Website>'

To deploy/update an existing site to a remote server:
msdeploy.exe -verb:sync -source:Package="<Package.zip>" -test:iisApp='<Website>',computername=<Server>,userName='<Domain>\<Username>',password='<Password>'

To recycle a local web:
msdeploy.exe -verb:sync -source:recycleApp="<Website>" -dest:auto

To recycle a remote web:
msdeploy.exe -verb:sync -source:recycleApp -dest:recycleApp="<Website>\<App>",computername=<Server>,userName="<Domain>\<Username>",password="<Password>"

And to make msdeploy not delete existing files when upgrading, add -enableRule:DoNotDeleteRule

Maybe this will help somebody out. It took me quite a bit of poking around to get everything working like I wanted.

Posted in Software Development | Tagged | Leave a comment

Starting up a new blog

So I’m finally getting a new blog going.  My old blog has been dead for almost 3 years now.  I always intended to move it over to this site, but I never got around to it.  There have been times I wanted to post something now and then, half the time for my own reference, but I kept waiting until I got the new blog going for some reason.

Like that blog, this will probably mostly be technical posts related to my work as a software developer.  However, I’m not limiting myself to just that and if I have something more personal or random to post, I will.  Short thoughts and friends-only stuff is going to stay on Twitter and Facebook though.

Posted in Meta | Tagged , | 1 Comment

Internet Explorer 7 usage stats

So Internet Explorer 7 has been out for over a year (it was released on October 18th), yet there are still enough IE6 users that we still have to code for it. IE6 has some horrible rendering inconsistencies and bugs that have to be worked around and unfortunately it was out for so long and had so much market share that it’s just not going away. IE7 was a little better, but not great.

I’m hopeful for IE8, but who knows. IE 8, if you haven’t heard has a third rendering mode, in addition to standard and quirks modes, that is triggered by a meta tag (see this A List Apart page for some details.) I’m not terribly fond of the new meta tag, but I can live with it I guess.

My IE stats

A few months ago my blog’s stats were showing a 50/50 split between IE6 and IE7. Now it’s closer to 75% IE7 and 25% IE6. The browser stats page at W3Schools has IE6 ahead of IE7 with 33.2% 21.0% of the total market.

Anyway, a few days ago I saw a story on Slashdot saying Microsoft is going to IE7 updates. I assume this just means they will make it a high priority update. Hopefully this will make the IE6 market share small enough that we can finally ignore it.

Posted in Software Development | Tagged , , | 1 Comment

So Who Reads This Thing Anyways?

I recently got to wondering who, if anyone, out there is reading my blog. I’ve just been thinking about it and was getting curious.

I know at least one colleague at work that does. I think there’s a few developers in the .net community that are subscribed by now. Anyone else from Bend? Any of my friends in Eugene?

Anyway, if you feel like it and have the time, could you leave a short comment?

Posted in Meta | Tagged , | 11 Comments

The Fun Part of Having People You Know Read Your Blog

Me: I started digging into some Reflection.Emit stuff the recently.

Him: I think I just saw a post about that the other day.

Me: Was it the one I wrote last night?

Him: Was that you? I didn’t even realize it. (Goes to Google Reader to look up said post) Hey, it was yours.

Posted in Meta | Tagged , | 1 Comment

Check This Out (Simple Reflection.Emit Stuff)

public class HelloModifier
{
    public static Target CreateTarget()
    {
        AssemblyName assemblyName = new AssemblyName("MyDynamic");
        TypeBuilder typeBuilder = AppDomain.CurrentDomain.
            DefineDynamicAssembly(assemblyName,
                AssemblyBuilderAccess.Run).
            DefineDynamicModule(assemblyName.Name).
            DefineType("TargetOverride", TypeAttributes.Class,
                typeof(Target));
        MethodBuilder hello = typeBuilder.DefineMethod("Hello",
            MethodAttributes.Public | MethodAttributes.HideBySig |
            MethodAttributes.NewSlot | MethodAttributes.Virtual,
            CallingConventions.Standard, typeof (string),
            Type.EmptyTypes);
        ILGenerator il = hello.GetILGenerator();
        il.Emit(OpCodes.Ldstr, "Hello, World!");
        il.Emit(OpCodes.Ret);
        typeBuilder.DefineMethodOverride(hello,
            typeof(Target).GetMethod("Hello"));
        return (Target)Activator.CreateInstance(
            typeBuilder.CreateType());
    }
}

public class Target
{
    public virtual string Hello()
    {
        return "sorry";
    }
}

[TestFixture]
public class NeatTests
{
    [Test]
    public void SayHello()
    {
        Target target = HelloModifier.CreateTarget();
        Assert.AreEqual("Hello, World!", target.Hello());
    }
}

OK, so it’s not that revolutionary, but I’ve never had to dig into the Reflection.Emit namespaces before. I tried once before, but never got that far. It does seem hard to find good, useful documentation and examples on it.

This isn’t really all that useful here, but I could come up with some imaginative uses for it if it was more dynamic.

Oh, and with DynamicProxy HelloModifier looks like this:

public class HelloModifier
{
    private static readonly ProxyGenerator _generator =
        new ProxyGenerator();

    public static Target CreateTarget()
    {
        return (Target)_generator.CreateClassProxy(
            typeof(Target), new HelloInterceptor());
    }

    private class HelloInterceptor : IInterceptor
    {
        public void Intercept(IInvocation invocation)
        {
            if (invocation.Method.Name == "Hello")
                invocation.ReturnValue = "Hello, World!";
        }
    }
}
Posted in Software Development | Tagged , | Leave a comment