Scott Hanselman

Using the Surface Pro 4 Type Cover with Fingerprint Reader on a Surface Pro 3

November 2, '15 Comments [21] Posted in Reviews
Sponsored By

Using the Surface Pro 4 Type Cover with Fingerprint Reader on a Surface Pro 3Last year in August I went and bought a Surface Pro 3 with my own money (it's not machine that work paid for) and I've been very happy with it. Now the Surface Pro 4 came out, and well, it's silly to upgrade for me when it's been just a year.

But. That Keyboard. The Surface Pro 4 has an all new Keyboard and Touch Pad.

The Surface Pro 3 keyboard is good, to be clear, but the touchpad sucks. After I used it for a few months I called it out as sucking. It's usable, but it's not fun to use.

Turns out that you can get a Surface Pro 4 Type Cover keyboard and it works and fits perfectly on a Surface Pro 3. You can upgrade your Surface Pro 3 (and pretend it's a 4, which is what I'm doing) by just adding the new Keyboard.

Fingerprint Reader

There's lots of new color Type Covers but the really interesting one is the Type Cover with Fingerprint Reader. Sadly, only available in Black, but it has an integrated Fingerprint Reader that lets you use the new "Windows Hello" login feature of Windows 10. Windows Hello means "using biometrics like fingerprints and faces and eye scanning to login to your computer."

It works and it works great. There was an Oct 26th "Firmware Update" in Windows Update that gives you the drivers you'll need. A Firmware Update for a Surface is essentially a "driver pack." Run Windows Update and attach the keyboard and you're set.

Windows Hello for Fingerprints

You enroll as many fingers as you want in Sign-In Options and that's it. Now you log in with your fingerprint. Lovely.

All new keyboard and touchpad

The picture before shows my original Surface Pro 3 Type Cover next to my new Surface Pro 4 Type Cover with Fingerprint Reader. First, the keyboard was already good on the Surface Pro 3, but it's just better on the 4. There are actual spaces between the keys, and you can see from the pic how the keys go even closer to the edge/bezel of the cover's surface. The keys are also slightly rearranged for the better. FN has been moved to the left, which makes sense, and a "context key" (which is effectively Shift-F10).

Another nice touch is that the FN key now has a light. On SP3 you had no way to see if it was locked, and you had to FN-CapsLock to force it on, and would have no visual indicator.

Finally, the silly Share and Settings secondary functions for Function F7 and F8 are gone and there's now an actual PrtScn button. It's the little things.

image

Now, to the touchpad. IT IS SO MUCH BETTER. It's actually usable. It's way larger (they say 40%) and it feels nicer. Before I always took another mouse with me because the SP3 touchpad was crippling. No longer. It's large enough for multi-finger gestures, including 3 and 4-finger taps. I'm still holding out for a "4 finger swipe" for Virtual Desktop switching, though.

One other subtlety that is worth pointing out...the fold. With the Surface Pro 3 Type Cover keyboard, when you fold it up to keep the Type Cover off the table, the fold makes it hard to press the "Start Button" on the screen because the keyboard butted right up against the screen. The Pro 4 Type Cover folds tighter and lower against the bottom bezel such that pressing icons in the taskbar and the Start button isn't a problem anymore. Subtle, but again, it's the little things.

I totally recommend this keyboard. It's given my Surface Pro 3 new life. It's the keyboard it should have always had.

* My links are Amazon Affiliate Links! Use them as they help support my blog and buy me tacos.


Sponsor: Big thanks to my friends at Octopus Deploy for sponsoring the feed this week. Build servers are great at compiling code and running tests, but not so great at deployment. When you find yourself knee-deep in custom scripts trying to make your build server do something it wasn't meant to, give Octopus Deploy a try.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

How to simulate a low bandwidth connection for testing web sites and applications

October 28, '15 Comments [26] Posted in Open Source
Sponsored By

Facebook just announced an internal initiative called "2G Tuesdays" and I think it's brilliant. It's a clear and concrete way to remind folks with fast internet (who likely have always had fast internet) that not everyone has unlimited bandwidth or a fast and reliable pipe. Did you know Facebook even has a tiny app called "Facebook Lite" that is just 1Mb and has good support for slower developing networks?

You should always test your websites and applications on a low bandwidth connection, but few people take the time. Many people don't know how to simulate simulate low bandwidth or think it's hard to set up.

Simulating low bandwidth with Google Chrome

If you're using Google Chrome, you can go to the Network Tab in F12 Tools and select a bandwidth level to simulate:

Selecting lower bandwidth in Google Chrome F12 Tools

Even better, you can also add Custom Profile to specify not only throughput but custom latency:

Custom Profiles for Google Chrome that control throughput and latency

Once you've set this up, you can also click "disable cache" and simulate a complete cold start for your site on a slow connection. 20 seconds is a long time to wait.

Google Chrome timeline showing my site on a 2G connection

Simulating a slow connection with a Proxy Server like Fiddler

If you aren't using Chrome or you want to simulate a slow connection for your apps or other browsers, you can slow it down from a Proxy Server like Fiddler or Charles.

Fiddler has a "simulate modem" option under Rules | Performance, and you can change the values from Rules | Customize Rules:

image

You can put in delays in milliseconds per KB in the script under m_SimulateModem:

if (m_SimulateModem) {
// Delay sends by 300ms per KB uploaded.
oSession["request-trickle-delay"] = "300";
// Delay receives by 150ms per KB downloaded.
oSession["response-trickle-delay"] = "150";
}

There's a number of proxy servers you can get to slow down traffic across your system. If you have Java, you can also try out one called "Sloppy." What's your favorite tool for slowing traffic down?

Conclusion

There is SO MUCH you can do to make the experience of loading your site better, not just for low-bandwidth folks, but for everyone. Squish your images! Don't use PNGs when a JPEG would do. Minify! Use CDNs!

image

However, step 0 is actually using your website on a slow connection. Go do that now.

Related Links


Sponsor: Big thanks to Infragistics for sponsoring the feed this week. Quickly & effortlessly create advanced, stylish, & high performing UIs for ASP.NET MVC with Ignite UI. Leverage the full power of Infragistics’ JavaScript-based jQuery/HTML5 control suite today.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

NuGet Package of the Week: Microphone registers and discovers Web APIs and REST services with Consul

October 27, '15 Comments [9] Posted in ASP.NET Web API | NuGetPOW | Open Source
Sponsored By

I'm sitting on a plane on the way back from a lovely time in Europe. I attended and spoke at some great conferences and met some cool people - some of which you'll hear on the podcast soon. Anyway, one of the things that I heard mentioned by attendees more than once was the issue of (micro) service discovery for RESTful APIs. Now if you lived through the WS*.* years you'll perhaps feel a lot of this is familiar or repeated territory, but the new stuff definitely fits together more effortlessly than in the past.

Consul is a system that does service discovery, configuration management, and health checking for your services. You can write Web APIs in lots of things, Rails, Python, and ASP.NET with WebAPI or NancyFX.

Microphone is a library by Roger Johansson that plugs into both WebAPI and Nancy and very simply and easily registers your services with Consul. It's recently been expanded to support CoreOs-ETCD as well, so it's really a general purpose framework.

I made a little .NET 4.6 console app that self hosts a WebAPI like this.

namespace ConsulSelfHostedWebAPIService
{
class Program
{
static void Main(string[] args)
{
Cluster.Bootstrap(new WebApiProvider(), new ConsulProvider(), "HanselWebApiService", "v1");
Console.ReadLine();
}
}

public class DefaultController : ApiController
{
public string Get()
{
return "Hey it's my personal WebApi Service";
}
}
}

Now my Web API is registered with Consul, and now Consul itself is a RESTful Web API where I can hit http://localhost:8500/v1/agent/services and get a list of registered services. It's the Discovery Service.

Consul reporting my WebAPI

Then later in a client or perhaps another Web API, I can ask for it by name and I'll get back the address and port that it's on, then call it.

var instance = await Cluster.FindServiceInstanceAsync("Heycool");

return String.Format("Look there's a service at {0}:{1}", instance.Address, instance.Port);

Here's an active debug session showing the address and port in the instance:

Using Microphone.WebAPI and Consul for Service Discovery

It will be interesting to see what will happen with Consul and systems like it if the Azure Service Fabric gains traction. Service Fabric offers a lot more, but I wonder if there is a use case for both, with Service Fabric managing lifecycles and Consul doing discovery.

This is all early days, but it's interesting. What do you think about these new discovery services for Web APIs?


Sponsor: Big thanks to Infragistics for sponsoring the feed this week. Quickly & effortlessly create advanced, stylish, & high performing UIs for ASP.NET MVC with Ignite UI. Leverage the full power of Infragistics’ JavaScript-based jQuery/HTML5 control suite today.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

It's happening - OpenSSH for Windows...from Microsoft

October 22, '15 Comments [25] Posted in Open Source
Sponsored By
OpenSSH for Windows

Back in June the folks over at the Microsoft PowerShell blog indicated they were going to support SSH in Windows soon. I read the post a few times and I must admit I read deeply between the lines and enjoyed the post very much. For example, this passage, with emphasis mine.

Finally, I'd like to share some background on today’s announcement, because this is the 3rd time the PowerShell team has attempted to support SSH.  The first attempts were during PowerShell V1 and V2 and were rejected.  Given our changes in leadership and culture, we decided to give it another try and this time, because we are able to show the clear and compelling customer value, the company is very supportive.  So I want to take a minute and thank all of you in the community who have been clearly and articulately making the case for why and how we should support SSH! 

Fast forward a few months and they've just released a VERY early version. It's not quite useful enough for a daily driver but it's heartening that it's happening. Sure, it's late, and ya, it should have happened years ago, but it's happening and it'll be built in. SSH will be one less thing to worry about.

Note as they said:

With this initial milestone complete, we are now making the code publicly available and open for public contributions. Please note that this code is still very early and should be treated as a developer preview and is not supported for use in production.

The repository is over at https://github.com/PowerShell/Win32-OpenSSH and the first release is here https://github.com/PowerShell/Win32-OpenSSH/releases. I just unblocked the zip and unzipped it into my c:\utils folder so it was in my path.

I SSH'ed into an Ubuntu machine I have running in Azure like this:

>ssh scott@foofoo.cloudapp.net -p 12345

I did have an issue immediately with an error and some formatting, which I filed and also discussed here. I was able to mostly work around with it "export TERM=xterm" but I'm sure they'll fix it, as again, it's super early.

As an alternative SSH client, try the Bitvise SSH Client. It has a command line app called "stermc" that acts like SSH. I made an ssh.bat file that contains just "stermc %1" and this let's me shush around nicely.


Sponsor: Many thanks to Atalasoft for sponsoring the feed this week. If your project requires image viewing, format freedom, scanning, or other document-centric workflows, Atalasoft’s document imaging experts can help. Evaluate their developer tools for 30 days with remarkable human support.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Integrating Visual Studio Code with dnx-watch to develop ASP.NET 5 applications

October 20, '15 Comments [20] Posted in ASP.NET | Open Source
Sponsored By

Visual Studio Code is a great cross platform code editor that is also free. You can get it at code.visualstudio.com for Mac, Windows, or Linux. It's great for web development, and particularly shines with node.js. Since ASP.NET 5 is still in active beta and moving very fast, some of the features I want when VSCode is used with ASP.NET aren't there yet. Fortunately VSCode is very configurable and I was able to get it to do what I wanted in about 10 minutes of messing around.

dnx-watch in VSCode

One of the promises of ASP.NET is the ability to write code, hit Ctrl-S (Save) in your editor and then hit F5 (refresh) in your browser to see the results. Rinse, repeat. Any "build" step should be basically hidden.

After you've got .NET Core and ASP.NET 5 with the DNX (for now, the "dotnet execution engine") you should take a look at the dnx-watcher command. It's a command you can install in one line:

dnu commands install Microsoft.Dnx.Watcher

This convenience command wraps dnx, so when you want to run your app rather than "dnx web" you'll say "dnx-watch web." It will watch your source files directory for changes. When you make a change, be it in VSCode or in Notepad, dnx-watch will kick the process and start it again so you can hit F5 in your browser.

Visual Studio Code doesn't have a Build or Debug menu for ASP.NET today, but I wanted to be able to "Ctrl-Shift-B" and build/start my web application. Specifically I wanted to run dnx-web on the current app.

Here's how you do that today. First, install dnx-watch as above.

This next part with tasks.js is totally optional, but I like it because it makes VSCode and the Ctrl-Shift-B hotkey I'm used to work the way I want.

Make a folder at the top of your project called ".vscode" and put a file called "tasks.json" inside it. This is a special file that lets you tell Visual Studio Code what gulp tasks it should know about.

Here I'm saying there's a task (that we'll create in a second) called "watch" (I decide on the name) and it's the Build command for this project. I could make a Test command if I wanted, as well. I want to see the output.

{
"version": "0.1.0",
"command": "gulp",
"isShellCommand": true,
"tasks": [
{
"taskName": "watch",
"isBuildCommand": true,
"showOutput": "always",
"isWatching": true
}
]
}

Now where does this "watch" task go? Well it goes in my project's gulpfile.js! It's a gulp task like any other.

I want to shell out and run dnx-watch, so I'll have to bring in a small library called gulp-shell by adding it to my package.json, then running npm.install. That will give me the ability to shell out to arbitrary command line apps like dnx-watch. Visual Studio Code will capture and stream the output as seen in the screenshot above.

Then I just add one line to my gulpfile after adding the appropriate require at the top.

gulp.task('watch', shell.task(['dnx-watch web']))

ASIDE: There is the beginnings of a gulp plugin for ASP.NET called "gulp-dnx" that knows about DNX and ASP.NET 5 but since I just wanted this one feature, this was easier. When gulp-dnx knows about dnx-watch, it might be easier, but the general flow would remain the same.

At this point, I can code all I want, press Save and dnx-watch will automatically restart my application. I can put Visual Studio Code side by side with my browser and Save/Refresh over and over.

Now you can always add your own keybindings by editing keybindings.js from File | Preferences | Keyboard Shortcuts. For example, here Ctrl-Q is bound to Terminate Task (that will let me stop dnx-watch). However, because we said "isBuildCommand: true" in the tasks.js file, we've told Visual Studio Code that our "watch" gulp command IS our project's command to build. You could add test commands, make your gulp file more sophisticated; the sky's the limit.

Give it a try!


Sponsor: Many thanks to Atalasoft for sponsoring the feed this week. If your project requires image viewing, format freedom, scanning, or other document-centric workflows, Atalasoft’s document imaging experts can help. Evaluate their developer tools for 30 days with remarkable human support.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.