Jul 292015
 

Windows 10 backgroundWindows 10 is finally here.

And it is not a bang but a whimper for all those crazy enough to be in Windows Insider program. And frankly that is how it should be. Those yearning for excitement had their share in the last few months. Careful ones have always option of sticking with Windows 7/8/8.1 or upgrading to now officially RTM’d release.

For me personally this day brings absolutely nothing as every computer I have in my home has been running Windows 10 for a while now. July 29th is just another day.

Is Windows 10 perfect? Not really – even RTM version has a couple of issues bugging me still: Windows menu misbehaving if you don’t have internet connection and defaults that include the whole damn web in search. But it is a good OS in general and I see no major benefit in holding Windows 7 on same pedestal Windows XP once held. Yes, both were great OS of their days but lingering in past serves no purpose.

Free upgrade is a nice carrot Microsoft has placed in front of everybody and I suggest you take a bite. It is not clear how exactly mechanics are going to look and I can only hope clean install upgrade will be a possibility. If insider updates are anything to judge by, you will need at least 10 GB for it and that might be hard to find on old devices.

For insiders there are some rumors program will go on. And I will take that offer regardless of actually having enough Windows licenses for all my devices. Microsoft had system working perfectly and issues were both minor and rare. I really see no reason not be be on the Fast ring.

In any case, congrats to Windows 910. May you live to see a lot of updates.

PS: If you are wondering whether your system is eligible for free update, here is the handy guide.

PPS: There is Microsoft Media Creation Tool for those in need of a clean ISO.

Jul 272015
 

Most of the time advertisements are pain-in-the-butt. They sell you things you don’t want in a way you don’t care about. This goes double for YouTube where awful commercials are only matched by annoyance of having them repeated time after time.

But occasionally there comes something worth watching. For me this happened with HP Sprout commercial:

While technology does seem cool and I am looking forward checking it out in person, it was the song that piqued my interest. It was both familiar and new at the same time and it just grabbed the attention. And HP ad agency knew it would happen as they made another video with an “origin story“.

In the mass of the most boring ads, this one gave me a faith that ad industry still knows how to make stuff worth watching as it seems there is no escaping them anyhow. But then again it might be that this song stirred my inner optimist and I will get back to annoyed self after watching a daily dose of the usual crap YouTube serves. Regardless, I’ll enjoy it while it lasts.

PS: Those interested in song can also find it played by its composer.

Jul 212015
 

Visual Studio 2015Rejoice, Visual Studio 2015 is here.

Newest member of family is a Community edition and that one will probably be the most popular choice out there for all that can legally own it. Those working for “the man” will find Professional and Enterprise edition at their rather steep prices ($500 and $2500 respectively).

Pleasant surprise is that Express editions are also available for those who cannot use Community edition and their boss is too cheap to get them Professional. This is also an edition which comes with least strings attached so don’t discount it immediately.

There might be no revolutionary feature but lot of small improvements (mostly driven by Roslyn) do make it a slightly better environment for all things .NET.

Jul 182015
 

As I moved from Mercurial to Git I got hit with annoying problem. You see, in mercurial it is trivial to get commit number and commit hash. All you need is:

FOR /F "delims=" %%N IN ('hg id -i 2^> NUL') DO @SET HG_NODE=%%N%
FOR /F "delims=+" %%N IN ('hg id -n 2^> NUL') DO @SET HG_NODE_NUMBER=%%N%

Yes, it is not the most beautiful code but it does get the job done. With -i parameter we get hash and -n is what gives us commit number. And commit number is so useful for automated builds. Yes, hash will uniquely identify the build but humans tend to work better with numbers – e.g. setup-53-1d294c0f2737.exe is much better than setup-1d294c0f2737.exe alone. If numbers are there it becomes trivial to determine what is the latest build.

Mercurial has also one more trick in its sleeve. If changes are not committed yet, it will add small plus sign to its output, e.g. setup-53-1d294c0f2737+.exe. Now with one glance in a full directory you can determine order in which builds were done, what branch are they on, and if all changes were committed at the time of build.

How do you do the same in Git?

Getting revision number is trivial. Just ask git to count them all:

FOR /F "delims=" %%N IN ('git rev-list --count HEAD') DO @SET VERSION_NUMBER=%%N%

Getting hash is similarly easy:

FOR /F "delims=" %%N IN ('git log -n 1 --format^=%%h') DO @SET VERSION_HASH=%%N%

But there is one problem here. Hash is exactly the same whether all changes are committed or not, i.e. there is no plus sign if there are some uncommitted changes during build. And I believe such indication is crucial for any automated build environment. Fortunately Git will give you wanted information with a bit effort:

git diff --exit-code --quiet
IF ERRORLEVEL 1 SET VERSION_HASH=%VERSION_HASH%+

So final code to get Git hash and commit number equivalent to what I had in Mercurial was:

FOR /F "delims=" %%N IN ('git log -n 1 --format^=%%h') DO @SET VERSION_HASH=%%N%
git diff --exit-code --quiet
IF ERRORLEVEL 1 SET VERSION_HASH=%VERSION_HASH%+