Tuesday, May 19, 2020

Highlights from BUILD 2020 (so far)

I'm missing being in Seattle for the BUILD conference this year. :(
It's normally one of my favorite events and a highlight of my year.

However, like most events this year, it's gone virtual. Anyone can watch online and there are likely to be many more things that are announced.
This is what's caught my attention initially.
  • Project Reunion - Unifying and evolving the Windows development platform.
  • WinUI 3 preview - The future approach to building native Windows apps.
  • WinGet - The new Windows Package Manager can change how we distribute and install apps.
  • MAUI - Xamarin.Forms is evolving and getting a new name.  github.com/dotnet/maui

more to come....

Wednesday, May 13, 2020

More fun with comments

This is probably the least interesting screenshot I've ever shared
and this one is only slightly more remarkable
Yes, it's the same method from the same file.
But, did you spot the difference?

It's only small.
Look at the left margin.
There are more of the little outlining boxes with minus signs in them in the second image.

The first image is the default behavior. It shows something I hadn't noticed before.
By default, in a method, only multi-line comments starting with a triple-slash can be collapsed.

And the second screenshot?
Well, it turns out that as I wrote a Visual Studio extension that works with comments, these are the kind of things I learn.
As such the second screenshot shows a minor feature of the latest version (1.8) of that extension. It now lets Visual Studio know how to collapse (and expand)  multi-line comments within method blocks. (That's not a piece of code I ever imagined writing!)

Additionally, it also:
- fixes a bug in how it identifies which block to expand and collapse.
- fixes a bug that affects anyone who uses tabs instead of spaces.

Now go: download, install and review the extension for yourself.

Sunday, May 10, 2020

Spaces beats tabs (by a factor of a thousand!)


Yes, there are reasonable arguments for each approach. I know that the accessibility argument for tabs is very strong. But I use spaces. It seems that so many people also do that I'm surprised that this is still an issue.

How many more? (Well, if the title wasn't a give-away) a thousand times more!!!

I have a Visual Studio extension for manipulating comments. It recently passed a thousand installs.
I also recently had a bug filed against it. The bug only affected code that used tabs instead of spaces.

Based on this single, unscientific data-point, it looks like there are at least one thousand people using spaces for each one using tabs.

Yes:
- this isn't scientific.
- this is me twisting the statistics to make a point.
- others may have encountered this but not reported a problem.
- installs and actuals use aren't the same things.

Why is this worth blogging about?
- This number is MUCH bigger than I was expecting.
- This debate is usually based on arbitrary preference and not on data. (I have data because I'm doing something that involves code manipulation and parsing.)


I'm not bothered about which you use (as long as it's not a mixture of the two--now that's barbaric!)