Scott Hanselman

The Squishy Side of Open Source

February 21, 2018 Comment on this post [9] Posted in Open Source
Sponsored By

The Squishy Side of Open SourceA few months back my friend Keeley Hammond and I did a workshop for Women Who Code Portland called The Squishy Side of Open Source. We'd done a number of workshops before on how to use Git and the Command Line, and I've done a documentary film with Rob Conery called Get Involved In Tech: The Social Developer (watch it free!) but Keeley and I wanted to really dive into the interpersonal "soft" or squishy parts. We think that we all need to work to bring kindness back into open source.

Contributing to open source for the first time can be scary and a little overwhelming. In addition to the technical skills required, the social dynamics of contributing to a library and participating in a code review can seem strange.

That means how people talk to each other, what to do when pull requests go south, when issues heat up due to misunderstandings,

Keeley has published the deck up on SpeakerDeck. In this workshop, we talked about the work and details that go into maintaining an open source community, tell real stories from his experiences and go over what to expect when contributing to open source and how to navigate it.

Key Takeaways:

  • Understanding the work that open source maintainers do, and how to show respect for them.
  • Understanding Codes of Conduct and Style Guides for OSS repos and how to abide by them.
  • Tips for communicating clearly, and dealing with uncomfortable or hostile communication.

Good communication is a key part of contributing to open source.

  • Give context.
  • Do your homework beforehand. It’s OK not to know things, but before asking for help, check a project’s README, documentation, issues (open or closed) and search the internet for an answer.
  • Keep requests short and direct. Many projects have more incoming requests than people available to help. Be concise.
  • Keep all communication public.
  • It’s okay to ask questions (but be patient!). Show them the same patience that you’d want them to show to you.
Keep it classy. Context gets lost across languages, cultures, geographies, and time zones. Assume good intentions in these conversations.

Where to start?

What are some good resources you've found for understanding the squishy side of open source?


Sponsor: Get the latest JetBrains Rider for debugging third-party .NET code, Smart Step Into, more debugger improvements, C# Interactive, new project wizard, and formatting code in columns.

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

One Email Rule - Have a separate Inbox and an Inbox CC to reduce email stress. Guaranteed.

February 19, 2018 Comment on this post [16] Posted in Productivity
Sponsored By

Two folders in your email client. One called I've mentioned this tip before but once more for the folks in the back. This email productivity tip is a game-changer for most information workers.

We all struggled with email.

  • Some of us just declare Email Bankruptcy every few months. Ctrl-A, delete, right? They'll send it again.
  • Some of us make detailed and amazing Rube Goldbergian email rules and deliberately file things away into folders we will never open again.
  • Some of us just decide that if an email scrolls off the screen, well, it's gone.

Don't let the psychic weight of 50,000 unread emails give you headaches. Go ahead, declare email bankruptcy - you're already in debt - then try this one email rule.

One Email Rule

Email in your inbox is only for email where you are on the TO: line.

All other emails (BCC'ed or CC'ed) should go into a folder called "Inbox - CC."

That's it.

I just got back from a week away. Look at my email there. 728 emails. Ugh. But just 8 were sent directly to me. Perhaps that's not a realistic scenario for you, sure. Maybe it'd be more like 300 and 400. Or 100 and 600.

Point is, emails you are CC'ed on are FYI (for your information) emails. They aren't Take Action Now emails. Now if they ARE, then you need to take a moment and train your team. Very simple, just reply and say, "oops, I didn't see this immediately because I was cc'ed. If you need me to see something now, please to: me." It'll just take a moment to "train" your coworkers because this is a fundamentally intuitive way to work. They'll say, "oh, make sense. Cool."

Try this out and I guarantee it'll change your workflow. Next, do this. Check your Inbox - CC less often than your Inbox. I check CC'ed email a few times a week, while I may check Inbox a few times a day.

If you like this tip, check out my complete list of Productivity Tips!


Sponsor: Unleash a faster Python Supercharge your applications performance on future forward Intel® platforms with The Intel® Distribution for Python. Available for Windows, Linux, and macOS. Get the Intel® Distribution for Python* Now!

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Surface Book 2 Developer Impressions and the Magic of USB-C

February 15, 2018 Comment on this post [27] Posted in Reviews
Sponsored By

Surface Book 2 15"I recently got a updated laptop for work, a 15" Surface Book 2. It's quickly become my go-to machine, and I'm often finding myself using it more than my main desktop machine.

I considered myself reasonably familiar with the Surface product line as I bought a Surface Pro 3 a few years back for myself (not a work machine), but I am genuinely impressed with this Surface Book 2 - and that surprised me.

Here's a random list of a tips, tricks, things I didn't realize, and general feelings about the 15" Surface Book 2.

15" is a NICE size

After years of "Ultrabooks" I missed an actual high-powered desktop replacement laptop. It's just 4.2 lbs and it doesn't feel unwieldy at all.

There are TWO Surface Connect ports

Legit had no idea. You can charge and dock the tablet part alone.

There's a full sized SD card reader and a 3.5mm headphone jack

Which sadly is more than I can say for my iPhone 8+.

Having a 15" screen again makes me wonder how you 11" MacBook Air people can even concentrate.

3240 x 2160, (260 PPI) is a weird resolution to be sure, but it's a hell of a lot of pixels. It's a 15" retina display. 

The high resolution issues in Windows are 90% handled IMHO

I wrote about how running any DPI greater than 96dpi on Windows has historically sucked back in 2014, but literally every little Windows Update and Office update improves it. Only the oldest apps I run have any real issues. Even WinForms has been updated to support HighDPI so I have zero HighDPI issues in my daily life in 2018.

More RAM is always nice, but 16 gigs is today's sweet spot.

I have had zero RAM issues, and I'm running Kubernetes and lots of Docker containers along size VS, VS Code, Outlook, Office, Edge, Chrome, etc. Not one memory issue.

3.84 GHz or more

Battery Life and Management is WAY better

Power Mode SliderBattery Life on my Surface Pro 3 was "fine." You know? Fine. It wasn't amazing. Maybe 4-6 hours depending. However, the new Battery Slider on Windows 10 Creators Edition really makes simple and measurable difference. You can see the CPU GHz and brightness ratchet up and down. I set it to Best battery life and it'll go 8+ hours easy. CPU will hang out around 0.85 GHz and I can type all day at 40% brightness. Then I want to compile, I pull it up to bursts of 3.95 Ghz and take care of business.

HD Camera FTW

Having a 1080p front facing camera makes Skype/Zoom/etc calls excellent. I even used the default Camera app today during an on-stage presentation and someone later commented on how clear the camera was.

USB-C - I didn't believe it, but it's really a useful thing

Honestly, I wasn't feeling the hype around USB-C "one connector to rule them all," but today I was going to pull out some HDMI and Ethernet dongles here at the Webstock Conferences in New Zealand and they mentioned that all day they'd been using a Dell USB-C dock. I plugged in one cable - I didn't even use my Surface Power Brick - and got HDMI, a USB hub, Ethernet *and* power going back into the SurfaceBook. I think a solution like this will/should become standard for conferences. It was absolutely brilliant.

I have read some about concerns about charging the Surface Book 2 (and other laptops with USB-C) and there's a reddit thread with some detail. The follow says the Apple USB-C charger he bought charges the SurfaceBook at 72% of the speed of the primary charger. My takeaway is, ok, the included charger will always charge fastest, but this work not only work in a pinch, but it's a perfectly reasonable desk-bound or presenter solution. Just as my iPhone will charge - slowly - with aftermarket USB chargers. If you're interested in the gritty details, you can read about a conversation  that the Surface has with an Apple Charger over USB as they negotiate how much power to give and take. Nutshell, USB-C chargers that can do 60W will work but 90+W are ideal - and the Dell Dock handles this well which makes it a great flexible solution for conferences.

Also worth pointing out that there wasn't any perceptible "driver install" step. I got all the Dell Dock's benefits just by plugging it in at the conference. Note that I use a Surface Dock (the original/only one?) at home. In fact, the same Surface Dock I got for my personal Surface Pro 3 is in use by my new Surface Book 2. Presumably it doesn't output the full 95W that the Surface Book 2 can use, but in daily 10+ hour use it's been a non issue. There's articles about how you can theoretically drain a Surface Book 2's batteries if you're using more power than it's getting from a power supply, but I haven't had that level of sustained power usage. Haven't needed to give it a thought.

The i7 has a NVidia 1060 with 6 gigs of RAM, so you can install GeForce and run apps on the Discrete GPU

You can go in and control which apps run on which GPU (for power savings, or graphical power) or you can right click an app and Run on NVidia.

You can control which GPU on a program by program basis

or right click any app:

Right Click | Run with Graphics Processor

It has an Xbox Wireless Adapter built in

I got this for work, so it's not a gaming machine...BUT it's got that NVidia 1060 GPU and I just discovered there's an Xbox Wireless Adapter built-in. I thought this was just Bluetooth, but it's some magical low-latency thing. You can buy the $25 USB Xbox Wireless Adapter for your PC and use all your Xbox controllers with it - BUT it's built-in, so handled. What this means for me as a road warrior is that I can throw an Xbox Controller into my bag and play Xbox Play Anywhere games in my hotel.

Conclusion

All in all, I've had no issues with the Surface Book 2, given I stay on the released software (no Windows 10 Insiders Fast on this machine). It runs 2 external monitors (3 if you count its 15" display) and both compiles fast and plays games well.


Sponsor: Get the latest JetBrains Rider for debugging third-party .NET code, Smart Step Into, more debugger improvements, C# Interactive, new project wizard, and formatting code in columns.

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Why should I care about Kubernetes, Docker, and Container Orchestration?

February 08, 2018 Comment on this post [37] Posted in Docker | Kubernetes
Sponsored By

A person at work chatted me, commenting on my recent blog posts on the Raspberry Pi Kubernetes Clusters that are being built, and wondered "why should I care about Kubernetes or Docker or any of that stuff?"

WOCinTech Chat pic used under CC

Great question, and I'm figuring it out myself. There are lots of resources out there but none that spoke my language, so here's my thoughts and how I explain it.

"Hey, I have this great new blog app!"

"Fab, gimme!"

"Sure, first make sure you have this version of Windows/Linux, this version of .NET/Python/Node, and these prerequisites."

"Hang on, lemme call you next week when that's handled."

This is how software was built for years. Now let's deploy it.

"Here's the code/dlls/application zipped up."

"Lemme FTP/SFTP/Drag this from one Explorer Window to another."

"Is this version of that file set to this?"

"Wait, what?"

"Make sure that system/boss/dll/nounjs is version 4.5.4.1, they patched it."

"Ok, Imma shush* into production."

Again, we've all been there. It's 2018 and there's more folks doing this than you care to admit.

Enter Virtual Machines! Way better, right? Here's a USB key with a  file that is EVERYTHING you need. Handled.

"Forget that, use this. It's better than a computer, it's a Virtual Machine. But be aware, It doesn't know it's Virtual, so respect the lie."

"OK, email it to me."

"Well, it's 32 gigs. Lemme UPS it."

Your app is only 100 megs, and this VM is tens of gigs. Why does a 150 pound person need a 6000lb Hummer? Isolation, I guess.

"The app is getting more complex, but it's cool. There's four VMs now. One for the DB, one for Redis, and a front end one, and the shopping cart gets one. It's microservices!"

"I'm loving it."

"Here's a 2 TB drive."

Nice that we're breaking it up, but not so nice that we're getting bloated. Now we have to run apt upgrade/windows update on all these things and maintain them. Why drive a Hummer when I can get a Lyft?

"Ok I got them all running on this beefy machine under my desk."

"Cool, we're moving to the cloud."

"Sigh. I need to update all these connection strings and start uploading VMs."

"It'll be great. It's like a machine under your desk, except your desk is in the cloud."

"What's the cloud?"

"It's a server room you can't see. Basically it's the computers under your desk. But invisible."

Most VM infrastructure is pretty sloppy. It's hard coded IP addresses, it's poorly named VMs living in the same subnets, then we'll move them to the cloud (lift and shift!) but then they are still messy, but they're in the Cloud™, right?

"You know, all these VMs are heavy. I have to maintain and move a bunch of stuff that ISN'T the app. Containers are the way. Just define the app's base requirement and share everything else."

"I've been hearing about this. I can type "docker run hello-world" and on any machine it'll load the hello world image (based on Ubuntu) from a central hub and run it in a mostly isolated way. Guaranteed to work and run, even as time passes."

"Nice, because more and more parts of our app are in .NET Core on Linux, but there's also some Python and node."

"Yep and it'll all just run as the prerequisites are clearly listed in the container...and the prereqs are in fact references to other container images."

"It's containers all the way down."

Now the DB, Redis, the front end, and the shopping cart can call be defined in some simple text files. Rather than your Host OS (the main computer...the metal) loading up a bunch of Guest OS's (literally copies!) and then loading all the apps and prerequisites, you'll share  OSes, and when appropriate, the binaries and libraries.

"OK, now we have a bunch of containers running in Docker, but sometimes they go down or stop."

"Run them again?"

"It's more that that, we need to sometimes have 3 shopping cart containers, and other times we need 2 or more DB containers. Plus their IPs sometimes change"

"So we need something to keep them running, scale or auto-scale them, as well manage networking and naming/dns."

Enter a container orchestrator. There's Docker Swarm, Mesos/Marathon, Azure Service Fabric, and others, but for this post we'll use Kubernetes.

"So Kubernetes runs my containers, keeps them running, and helps manage the network?"

"Yes, and no. Parts of Kubernetes - or k8s, as cool people like me who have been using it for nearly 3 hours say - are part of the master components, like etcd for key value storage, and the kube-scheduler for selecting what node to run a "pod" on (a pod is cooler to say than container, but sometimes a pod is more than one container. Still, very cool.)

"I'll need to make a glossary."

"Darn tootin' you will."

Kubernetes has basically pluggable everything. Don't like their networking setup? There's literally over a dozen options. Want better charts and graphs? Whole world of options.

Just as one Dockerfile can explain declare what's needed to run an app, a Kubernetes YAML file describes not only the containers, but the ports needed, the number of replicas of each (think web farm), names, environment variables, and more. Here's a file that shows a front end, back end, and load balancer. Everything is there, connection strings become internal DNS lookups, every service has a load balancer (if you like), and you can scale manually or auto-scale.

"Ok so why should I care?"

"A few reasons. In the past, to install our app I'd need to give you a Word document and a weekend. Now you type kubectl apply theapp.yaml and it's running in less than a minute."

"I'm still billing for the weekend."

Simply stated, we are at the beginning of a new phase of DevOps. One that is programmatic, elastic, and declarative. It's consistent and clear and modular.

I recommend you check out Julia Evans' "Reasons Kubernetes is cool" as well as reading up on how to make a Kubernetes cluster (and the management VMS are free) in Azure.

* I'm trying to make shush a thing. We don't Es Es Eaytch into machines! We shush in! It's pronounced somewhere between shush and shoosh. Make sure you throw in a little petit jeté when you say it.

* Pic used under CC


Sponsor: Unleash a faster Python Supercharge your applications performance on future forward Intel® platforms with The Intel® Distribution for Python. Available for Windows, Linux, and macOS. Get the Intel® Distribution for Python* Now!

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Everyone should get a Dashcam

February 05, 2018 Comment on this post [33] Posted in Reviews
Sponsored By

A clean dashcam installationI've put Dashcams in both my car and my wife's car. It's already captured two accidents: one where I was rear-ended and one where someone fell asleep as they were driving a few cars ahead of me on the freeway.

After these two experiences, I will never drive a car without a dashcam again. Case in point - being rear-ended. I was at a red light, it turned green, and as I accelerated I got nailed from behind, pushing me into the intersection. The gent jumped out and started yelling and waving his arms, saying I backed up (!), and I said, "I'm sorry, but I've got a dashcam both front and back." He got really quiet, and then we exchanged information. When I called the insurance company on Monday and told them I had not only Dashcam footage but that the cam recorded date and time, gps coordinates, speed and 1080p video both front and back, including the face and license plate of the other driver...I had a check that Thursday afternoon.

I was driving at night on I5 from Seattle to Portland and noticed a truck two or three (long) car lengths ahead of me start to drift, drift, drift off to the side...and then suddenly jerk hard to the left, cross all lanes of traffic and slam into the median in a shower of sparks and eventually balance on top of the center median. While I wasn't involved in the accident, I pulled over and dropbox'ed the video to the cops right there. The officer on duty said that dashcam footage made things 100% easier.

A cropped and somewhat compressed version of this video is embedded below, and also linked here. Now, it was late at night and I've cropped it, but you can see the car get "sleepy" and slowly float across all lanes to the right, hit the right side, then overcompensate and hit the center. This contradicted the driver's statement that he was hit by another car.

Disclaimer: This is older DR650 footage in the dead of night that's been cropped to remove identifying info. Check out this example Dashcam footage of a DR750 for a better sense of what to expect.

411gAnMBbaLI've put Blackvue Dashcams in both our cars. I put a Blackvue DR750S-2CH with Power Magic in car. A PowerMagic will power the dashcam while the car is parked, and catch anything that happens even if the car is off, and it will shut off if it detects that it's in any way discharging the 12V battery below a set voltage. I like the DR750 because it's 60fps 1080p on the front, and it can optionally buffer the video to memory so it's not beating on the SD card and shortening its life. It also has g-force and impact sensors, so as you get in the car it'll say (literally speak) "an impact was detected while in parking mode."

My wife didn't care about these more advanced features so she got the Blackvue DR650S-2CH. It's last year's model but still does 1080p front and back. There's a main wire that handles power for the main unit (either from a 9V cigarette lighter or the PowerMagic), then there's a long, long wire that you'll fish though the plastic panels of your car that will power and run the back camera.

It only took about two hours for me to install the camera, per car, and installation consisted mostly of hiding wires in the existing plastic panels and pushing the wires out of sight. The final look is very sanitary and requires zero maintenance.

The camera has wifi built-in and there's a free app to download. You connect your phone (whenever necessary) to the camera's wifi and download videos as needed. That's why it was super easy for me to Dropbox the footage without connecting to a PC. That said, there are Blackvue desktop apps that will show you maps with your position and speed and allow you to stitch footage together. You can also stamp date, time, speed, and custom text to the footage so it's embedded in the resulting MP4s.

I've had zero issues with my dashcams, and as I said, I'm sold. It's a no-brainer and frankly, it should be built into every car. I'll be installing a dashcam in whatever car my soon-to-be teenager drives, count on it.

Maybe you won't get into an accident (hopefully!) but you could catch a meteor on your dashcam!

* I use Amazon links to products. When you use them, you're supporting this blog! Thanks!


Sponsor: Get the latest JetBrains Rider for debugging third-party .NET code, Smart Step Into, more debugger improvements, C# Interactive, new project wizard, and formatting code in columns.

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

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