Long Awaited Improvement

Illustration

With every new Windows there is a part that gets no attention at all. Good old command prompt keept the same look-and-feel for a decade or so. But Windows 10 are about to change this.

Most noticeable improvement is that Quick edit mode is turned on by default. Yes, there is a semi-good historical reason why this “had to be off” but limiting progress because of a few DOS-era tools is simply unreasonable.

More of good stuff awaits if you decide to turn on the Experimental settings. Most noticeable improvement is the ability to change the window size dynamically. Yes, it took until 2014 to have a command prompt window that can be resized using the mouse.

Interesting choice is that all standard copy/paste keys work. This is a slightly unfortunate in the case of Ctrl+C that traditionally has a slightly different role in the command prompt. For this reason I think that good old Ctrl+Insert and Shift+Insert would be a better choice, although sometimes I feel I am the only one still using them.

It is not all good though. Annoying error that is bound to get fixed really soon is not being able to see last few text rows when Command window is maximized. And I cannot really go over the fact that the window bezel is impossibly thin, practically non-existent. Looks ugly and makes the resize difficult without any reason. And the font selection is still defaulting to raster font and it is unnecessarily limited.

Regardless of these minor issues, these changes are a breath of fresh air for code I though of as abandoned. I just hope all these improvements make it to the final version.

Developer for $20

Finally somebody in Microsoft got their head from the dark place and decided to do what had to be done. There is no more yearly subscription for developing Windows Store applications. All you need is a one-time fee of $20 (close to $25 Google charges) and you are set. All current developers are automatically freed from their yearly burden.

Microsoft wouldn’t be Microsoft if they wouldn’t release multiple editions. This time everything gets divided into Explorer, Expert and Master levels. Everybody, including those that already have published applications, start as Explorer. Quite a nice touch is that you immediately get Architecture and Design Guidance offers. I haven’t tried it but it looks as if developer might get to discuss things with an actual human being. Sweet!

Going toward Expert level seems to depend onto you publishing your application and, I assume, well-being of that application. Master level is black magic and actual details are still somewhat fuzzy.

It is really hard to tell whether this will improve Windows Store or not. My bet is that it won’t change much immediately because Microsoft was giving registration benefits for free even before. Every single developer I know that had Windows Store application published, got to do that at no cost. Rumors are that some were even payed to do it.

Official removal of subscription does lower the bar a bit for hobby developers who, seeing the $100+ cost per year, just gave up and dealt with Android instead. If Microsoft gets those guys interested in platform again, I can see many new applications coming in. Yes, most of them will be bad (as they are in Android store) but with time store will get bigger and there will be more enthusiasm. And that will bring better quality.

Internal IPv6 Router Advertisement

I have fully functioning IPv6 network at home for a while now. I used to do tunneling but for last year or so, I have native IPv6 to my home router. And everything works really nice. Problem arises when I am not at home and I want to do some IPv6 development and I want some proper (other than link-local) IPv6 addresses assigned. There are many ways to deal with this, but I found that virtual IPv6 router works the best for me.

For this I started with preparation of the VirtualBox machine (any virtualization environment will do) for the 64-bit Linux Red Hat. Only change to the defaults was enabling the second network interface (either Bridged or Internal). That was the network I intend to use for the IPv6 router advertisement.

After installing the CentOS 7.0 Minimal Install Image onto the newly created virtual machine, there are a few manual steps needed.

First was actually enabling DHCP so additional packets can be installed. After verifying which network interfaces are present using the ip addr (I had enp0s3 and enp0s8), I edited both network startup files (/etc/sysconfig/network-scripts/ifcfg-enp0s3 and /etc/sysconfig/network-scripts/ifcfg-enp0s8) by changing the ONBOOT setting to yes followed by a network restart:

service network restart
 Restarting network (via systemctl):    [  OK  ]

With Internet working, I was ready for installing IPv6 Router Advertisement Daemon:

yum install radvd
 …
 Complete!

In /etc/radvd.conf I added the following content:

interface enp0s8
{
    AdvSendAdvert on;
    MaxRtrAdvInterval 5;
    prefix 2001:db8:42::/64;
};

This is followed by service start (and enabling it on boot):

systemctl start radvd.service
systemctl enable radvd.service
…

Now any IPv6 capable network adapter sharing the same network with second VirtualBox network interface will get our defined IPv6 prefix.

PS: Advertisement time is intentionally kept very short. I find it useful to get quick unsolicited router advertisement messages for the demonstration purposes.

What Every Developer Has To Know About IPv6

Illustration

Today I gave a talk at the Seattle Code Camp. Wonderful atmosphere, excellent organization, and a plenty of fun. Only bad thing was that it ended too soon (single day only).

My session was mostly geared toward the beginners and it covered just the basics of IPv6 and how we can use it from C#. I can only hope I lit some IPv6 fire in the great crowd that came.

I went to many other sessions myself and, while they did vary in quality, there was not a single bad one. My day was definitely fulfilled.

Feel free to download slides and examples.

Creating the Self-signed Key for the TLS

In my last post I described how to do the client-authenticated TLS and one of magic ingredients there was a certificate with the private key in the form of .pfx files.

Server and client certificates are essentially the same but I’ll show creating of both anyhow. For this I will assume that your Windows SDK files are in the C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\ and that we are storing files in the root of the drive D:

cd "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\"

makecert -n "CN=MyServer" -r -sv D:\server.pvk D:\server.cer
 Succeeded

makecert -n "CN=MyClient" -pe -r -sv D:\client.pvk D:\client.cer
 Succeeded

pvk2pfx -pvk D:\server.pvk -spc D:\server.cer -pfx D:\server.pfx

pvk2pfx -pvk D:\client.pvk -spc D:\client.cer -pfx D:\client.pfx

DEL D:\client.cer D:\client.pvk D:\server.cer D:\server.pvk

This results in the server.pfx and client.pfx files. We can opt to import them into the Windows Certificate Store (also possible with makecert command) or to use them directly as in this example.