Scott Hanselman

Finding the Perfect Mouse

March 9, '16 Comments [108] Posted in Hardware | Reviews
Sponsored By

I have a small problem. I'm always looking for great computer mice. I've tried a number of mice (and keyboards!) over the years.

Five black computer mice, laid out left to right, and described in order below

Here's the current line up.

But the left one...oh this mouse. That's the Logitech MX Master Wireless Mouse and it's really top of the line and it's my current daily driver. It's usually $99 but I've seen it for $74 or less on sale.

The Logitech MX Master is a high end mouse, but rather than catering to gamers as so many mice do, it seems to be aimed more towards creators and makers. Prosumers, if you will.

Highlights

  • The MX Master has rechargeable LiPo batteries that are charged with a simple micro USB cable. So far they've lasted me two weeks or more with just a few minutes of charging. Plus, you can use the mouse with the cord attached. There's a 3 light LED on the side as well as software support so you won't be surprised by a low battery.
  • Fantastic customizable software.
    Exceptional Logitech Mosue Customization Software
  • Uses the "Unifying Receiver" which means a single dongle for multiple Logitech products. I also have the Logitech T650 Touchpad and they share the same dongle.
  • Even better, the MX Master also supports Bluetooth so you can use either. This means I can take the mouse on the road and leave the dongle.
  • Tracks on glass. My actual desktop is in entirely glass. It's a big sheet of glass and I've always had to put mouse pads on it, even with Microsoft Mice. This mouse tracks the same on a pad or a glass surface.
  • Heavy but the right kind of heavy. It's about 5 oz and it has heft that says quality but not heft that's tiring to push around.

One of the most unusual features is the Scroll Wheel. Some mice of a smooth scroll wheel with no "texture" as you scroll. Others have very clear click, click, click as you scroll. The MX Master has both. That means you can use "Ratchet" mode (heh) or "Freespin" mode, and you can assign a Mode Shift. If I click the wheel you can hear a clear mechanical click as (presumably) a magnet locks into place to provide the ratcheting sound and feel which is great for precision. Click again and you are FLYING through long PDFs or Web Pages. It's really amazing and not like any mouse I've used in this respect.

On top of that there is a SmartShift feature that automatically switches you between modes depending on the speed and vigor that you spin the wheel. All of this is configurable, to be clear.

It's a nice mouse for advanced folks or Devs because not only can you change basically every button (including a unique "gesture button" at your thumb where you click it and move the mouse for things like 'Next Virtual Desktop') but you can also have...

image

...configurations on a per-application basis!

image

This is fantastic because I want Chrome to scroll and feel one way and Visual Studio to scroll and feel another.

It's been 6 weeks with this new mouse and it's now my daily driver for code, blog posts, Office, and everything.

Trying out this new @Logitech MX Master mouse. This thing is SO SMOOTH.

A photo posted by Scott Hanselman (@shanselman) on

 

What's your favorite mouse or pointing device? Let's hear it in the comments!


PSA: Be sure to check out http://MarchIsForMakers.com all month long for great hardware podcasts, blogs, and videos! Spread the word and tweet with #MarchIsForMakers!

* Referral links help me buy mice. Click them for me please.

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 ORCS Web

The Importance of the LED Moment - I DID THAT

March 2, '16 Comments [27] Posted in Hardware | Open Source
Sponsored By

Last March my friend Saron and I created MarchIsForMakers.com and spent the whole month creating and learning with hardware.

It's March again! We're going to spend the whole month of March adding to http://www.marchisformakers.com.

If you want to support our project, make sure you tell teachers, schools, family and friends about us, and tweet with the hashtag #marchisformakers.

Here's some of the highlights of this fantastic project from March of 2015. You can get ALL the content on our site, so bookmark and visit often.

Getting Started

You may have heard of Raspberry Pis and Arduinos, and perhaps considered doing a little tinkering, either with the children in your life or on your own? Where do you start?

What's "Hello World" in the world of hardware? It's making an LED light up!

I optimize my workflow for lots of tiny victories.

There's a moment when your tinkering. Getting that first program to compile or that first light to light up. Saron and I call it the LED Moment. When you are teaching a kid (a 100 year old kid or a little kid) how to successfully control an LED they'll light up..."I DID THAT." I pushed a button or ran a program or just plug it into a battery. There's a moment when a person see they can take control of the physical word, harness electricity, combine hardware and software and TURN A FREAKING LIGHT ON. That's the moment we are going for. Let's do it.

Arduino and an LED

Check out the article on CodeNewbies about Raspberry Pis and Arduinos by Julian. Arduinos are inexpensive and open source microcontrollers that are VERY affordable. I've got 4 or 5 around the house!

91goKoGWHtL._SL1500_

You'll want an Arduino UNO to start with. They are about $20 on Amazon but they don't include a USB cable (perhaps you have one) or an optional power supply. If you're planning on tinkering you might consider getting a "Super Starter Kit" or a Starter Kit WITH the Arduino that has all sorts of fun stuff like buttons and cables and fans and resistors.

For our little LED project you'll just want:

Ask around, you may have friends with these in their junk drawers so don't spend money unnecessarily.

Don't have an Arduino or can't get one? Fear not, you can simulate one in your browser for free! Check out http://123d.circuits.io/
image

Ok, if you have a physical Arduino, go download the free Arduino Software for WIndows, Mac or Linux.

Different Boards

There are a number of different flavors of Arduino boards. Lots, in fact! Since it's an open source hardware spec anyone can make one and add their own special sauce. Here is just a few of the dozens of boards.

  • Arduino Uno - Arguably the most popular introductory model. It connects via USB and looks like a standard COM port to your computer. No wi-fi, no ethernet, although you can get an "Arduino Shield" add-on board that snaps on top to extend it to do most anything.
  • Arduino Yun - A fancy Arduino with a micro-SD slot, Wi-Fi, Ethernet, and more. It even supports an OpenWRT Linux called Linino.
  • Intel's Arduino 101 Kit - This board is an Arduino from Intel that adds Bluetooth Low Energy AND a 6 axis Accelerometer.

I have an Intel board with me today, so I need to tell the Arduino Software about it by downloading an "Arduino Core." You'll want to tell the software which board YOU are using.

I go Tools | Boards | Board Manager and search for "Intel" and install it. This tells the Arduino Software what it needs to know for my board to act right.

image

Plug the board in using a USB cable and make sure that you've selected the right board and the right port in your Arduino software.

I'm going to take my LED and put the short leg - that's the negative leg - into Arduino's GND, or Ground. Then I take the long or positive leg of the LED and connect it to the resistor,  then put the resistor into the Arduino's pin 13. We are going to control that pin with software we write!

BlinenLights

We are going to pulse the LED by turning pin 13 HIGH, waiting a second, then going low. Like this, within the Arduino Software:

void setup() {
pinMode(13, OUTPUT);
}

void loop() {
digitalWrite(13, HIGH); // turn LED on (HIGH voltage)
delay(1000); // wait a second
digitalWrite(13, LOW); // turn LED off by making voltage LOW
delay(1000); // wait a second
}

Press Upload and my little Arduino Sketch is sent to my board and starts running! And here it is!

#MarchIsForMakers @intelIoT @arduinoorg #video

A video posted by Scott Hanselman (@shanselman) on

Again, every board is different. In my case, my Intel Arduino 101 board also has that gyroscope/accelerometer built in. I'll try playing with that soon!

What are you going to make this Month?

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 ORCS Web

Benchmarking .NET code

February 25, '16 Comments [40] Posted in Open Source
Sponsored By
You've got a fast car...photo by Robert Scoble used under CC

A while back I did a post called Proper benchmarking to diagnose and solve a .NET serialization bottleneck. I also had Matt Warren on my podcast and we did an episode called Performance as a Feature.

Today Matt is working with Andrey Akinshin on an open source library called BenchmarkDotNet. It's becoming a very full-featured .NET benchmarking library being used by a number of great projects. It's even been used by Ben Adams of "Kestrel" benchmarking fame.

You basically attribute benchmarks similar to tests, for example:

[Benchmark]
public byte[] Sha256()
{
return sha256.ComputeHash(data);
}

[Benchmark]
public byte[] Md5()
{
return md5.ComputeHash(data);
}

The result is lovely output like this in a table you can even paste into a GitHub issue if you like.

Benchmark.NET makes a table of the Method, Median and StdDev

Basically it's doing the boring bits of benchmarking that you (and I) will likely do wrong anyway. There are a ton of samples for Frameworks and CLR internals that you can explore.

Finally it includes a ton of features that make writing benchmarks easier, including csv/markdown/text output, parametrized benchmarks and diagnostics. Plus it can now tell you how much memory each benchmark allocates, see Matt's recent blog post for more info on this (implemented using ETW events, like PerfView).

There's some amazing benchmarking going on in the community. ASP.NET Core recently hit 1.15 MILLION requests per second.

That's pushing over 12.6 Gbps a second. Folks are seeing nice performance improvements with ASP.NET Core (formerly ASP.NET RC1) even just with upgrades.

It's going to be a great year! Be sure to explore the ASP.NET Benchmarks on GitHub https://github.com/aspnet/benchmarks as we move our way up the TechEmpower Benchmarks!

What are YOU using to benchmark your code?


Sponsor: Thanks to my friends at Redgate for sponsoring the blog this week! Have you got SQL fingers?Try SQL Prompt and you’ll be able to write, refactor, and reformat SQL effortlessly in SSMS and Visual Studio. Find out more with a free trial!

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 ORCS Web

The Joy of Live Coding - CodePen, REPLs, TOPLAP, Alive, and more

February 17, '16 Comments [36] Posted in Open Source
Sponsored By

A few weeks ago I talked about Interactive Coding with C# and F# REPLs. There's a whole generation that seemingly missed out on LIVE CODING. By that, I mean, writing and running code at the same time.

Lots of folks used C, C++, Delphi, C#, Java, etc over the last 15-20-30 years and had a pretty standard Write, Compile, Walk Away, Run process working for them. Twenty years ago I was often waiting 30 min or more for stuff that takes seconds now. Many of you today may have to wait hours for compilation.

However, there's so many environments available today that can allow us to write code while it runs. Instant satisfaction...and the browser is becoming a fantastic IDE for Live Coding.

When I use the term "Live Coding" though, there's actually a couple of definitions. I'm conflating them on purpose. There's Live Coding as in "coding LIVE while people watch" and there's "coding and watching your program change as you type." Of course, you can do them both, hence my conflating.

Live Coding - Music and Art

Mike Hodnick mentioned Live Coding to me in the context of music and art. Live Coders use a wide array of languages and tech stacks to make music and art, including JavaScript, Ruby, Haskell, Clojure, and a number of DSL's. Here is a YouTube video of Mike - Live Coding music using Tidal, a language for musical improvisation.

Resources

  • Overtone - Collaborative Programmable Music.
  • TOPLAP - An organization dedicated to live coding.
  • Cyril - Live Coding Visuals
  • SuperCollider - Real time audio synthesis
  • Tidal - Live Coding Music

Some prominent live coders:

Live Coding - JavaScript and Experimentation

There's another kind of live coding that makes me happy, and that's things like CodePen. Sometimes you just want to write some HTML, CSS, and/or some JavaScript. No IDEA, no text editor...AND you want it to be running as you type.

Code and Watch. That's it.

Some of you LIVE in CodePen. It's where most of your work and prototyping happens, truly. Others who read this blog may be learning of CodePen's existence this very moment. So don't knock them! ;)

CodePen is lovely

CodePen is a "playground for the front-end side of the web." There have been a number of Live Coding Playgrounds out there, including...

But it's fair to say that CodePen has stayed winning. The community is strong and the inspiration you'll find on CodePen is amazing.

Oh, and just to end this blog post on a high note, ahem, and combine Live Coding of Music with  ahem, here's a Roland 808 (that's a Rhythm Controller) written entirely in CodePen. Ya, so. Ya. And it works. AWESOME. Here's the code you can play with, it's by Gregor Adams.

Magical Roland 808 written in CodePen

There's even Live Coding in Visual Studio now with the "Alive" plugin at https://comealive.io.

What kinds of Live Coding tools or experiences have YOU seen, Dear Reader? Share in the comments!


Sponsor: Thanks to my friends at Redgate for sponsoring the blog this week! Have you got SQL fingers? Try SQL Prompt and you’ll be able to write, refactor, and reformat SQL effortlessly in SSMS and Visual Studio. Find out more with a free trial!

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 ORCS Web

GitHub Activity Guilt and the Coder's FitBit

February 9, '16 Comments [61] Posted in Open Source
Sponsored By

I got an interesting email today from Corey P., reprinted in part here, with permission.

I’m curious, how you feel about GitHub’s activity graph? I’ve found myself getting increased levels of guilt/stress over that graph. So much so I’m considering not using GitHub for personal projects (only use it for contributing pull requests, reporting issues, etc.). 

I can’t help but feel like others judge me by it (phony syndrome?). I have this gnawing feeling that I need to do something in the open so I can have some sort of paper trail or else I’ll be looked down upon by people (perspective employers? colleagues?).

This is a great question. Let's look at my GitHub Graph.

235 Total Contributions

Yikes. Is this good or bad? It's pretty spartan over Sep-Nov, although I was travelling a lot.

Maybe Damian Edwards? He leads ASP.NET, although he isn't technically a dev (as far as HR is concerned). He's got me beat by double.

564 Total Contributions

OK, what's a serious contender look like? Here's Monica Dinculescu, Googler and dev on Polymer:

3244 Total Contributions

or David Fowler, architect and dev on ASP.NET

1885 Total Contributions

What's our takeaway here? That I suck and Monica's amazing? (True, though, I do suck, and please have a listen to Monica as she explains Web Components to me on a recent podcast episode)

Here's what I think about charts like this, and I'm interested in your opinion.

  • GitHub's activity chart shows public repos, not private activity.
  • I have a lot of small projects I work on during the week in private or local repos. and sometimes I don't make them public due to (slight) embarrassment at my works in progress.
  • It's not always healthy to measure yourself against others, particularly if it makes you feel bad or is somewhat unhealthy.
  • Jobs vary. Being a manager does take you away from coding sometimes.
  • If it bothers you, set a reasonable goal and work towards it, but do it for a good reason. (See how Reason and Reasonable factor in greatly there?)

Will I ever be as prolific as Monica or David? Likely not, but it's cool to know what the top of the bar is. Also, we have different jobs. Monica is working actively on a public open source project, while I'm not currently committing code to ASP.NET Core. Even Damian, a Lead PM on ASP.NET Core gets caught up in the "management" of it all. I doubt he gives his green chart a second thought.

My job currently doesn't have me committing to public repros as often as I'd like, but I'm not going let this chart dictate my value to the team. I will use it as one of many measuring sticks and I'd encourage you to as well. Perhaps set a goal to commit to an OSS project a few times a week?

GitHub Acitivty as it relates to Hiring

Sasha Laundy brought up a number of important points on Twitter about your GitHub Activity graph. She says:

If GitHub commits are only side projects, what kinds of people have time to put towards that? and if you can be silently discredited in hiring because of your public profile, how does that impact equity & diversity?

She has a great point. It's worth arguing that given the GitHub Activity Graph shows only public activity, making judgments based on it would naturally skew towards:

  • The already skilled vs. the codenewbie
  • People with more spare time, e.g. young, single, etc
  • Folks who work on OSS full-time (their company pays them to commit publically to code)

To her point, if your GitHub Activity page is given similar weight as your LinkedIn, how will you ever know if you've been quietly excluded from a job based on this chart? If you're just getting started or if you're a 20 year Enterprise software developer you may end up with an empty graph and find an uninformed recruiter glossed over your potential or experience based how much "green" they see.

What do YOU think of this? Does your GitHub Activity Graph stress you out like getting 10,000 steps on your FitBit? Or do you just roll with it? Sound off in the comments.

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 ORCS Web

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