The secret of the macOS Monterey network quality tool

Dan Petrov found a cool new utility:

It seems that Apple has quietly added a new tool in macOS Monterey for measuring your device’s Internet connectivity quality. You can simply call the executable networkQuality, which executes the following tests:

– Upload/download capacity (your Tx/Rx bandwidth essentially)
– Upload/download flows, this seems to be the number of test packets used for the responsiveness tests
– Upload/download responsiveness measured in Roundtrips Per Minute (RPM), which according to Apple, is the number of sequential round-trips, or transactions, a network can do in one minute under normal working conditions

The capacity is roughly the same metric you could expect from tools like Fast.com from Netflix, or OOkla’s Speedtest.

Go to your terminal on your MacBook running macOS Monterey and type in networkQuality and hit enter and viola:

➜ ~ networkQuality
==== SUMMARY ====
Upload capacity: 1.136 Mbps
Download capacity: 204.729 Mbps
Upload flows: 16
Download flows: 12
Responsiveness: Medium (544 RPM)

Things to read for Week 44

Github gets a new CEO

GitHub CEO Nat Friedman is stepping down from his role on November 15 to become the Chairman Emeritus of the Microsoft-owned service. Thomas Dohmke, who only recently became GitHub’s chief product officer, will step into the CEO role.

Great to see a product person stepping into the shoes of a CEO.


Tesla is letting non-Tesla EVs use its Supercharger network for the first time

Tesla’s Supercharger network is often held up as the best possible example of an EV charging network: fast, reliable, and plentiful. But Tesla’s network is also exclusive to Tesla owners, meaning someone driving a Volkswagen or Ford EV wouldn’t be able to use it. But that’s now starting to change.

So how long until we start hearing about standardized car chargers?


How to design a good API and why it matters:

If you find yourself in charge of building an API for your application and need a good reference, this is a great start.


Toxiproxy

Toxiproxy is a framework for simulating network conditions. It’s made specifically to work in testing, CI and development environments, supporting deterministic tampering with connections, but with support for randomized chaos and customization.

This is a good library to have in your arsenal whether you are an Engineer, PM or QA. Testing on different network conditions is important.


Why you should develop a UX roadmap:

Thinking ahead to next quarter, consider collaborating with your fellow designers, researchers, and content strategists to develop a UX roadmap. This will prompt you to review potential work against user and business goals and prioritize the most important items. From there, you can share your draft with key stakeholders and see if they agree. Developing and refining this roadmap will help you become more strategic and focused, while helping you develop your collective perspective and voice.

Its not easy to change the culture of how things are built. It’s hard but its important to start doing this.


6 things a Product Manager is not:

4. A product manager isn’t an agile fascist

Agile and lean are all-the-rage and de rigueur in modern software development. The next statement will probably be an unfashionable one but agile isn’t the only way to build web products and waterfall isn’t evil. Product managers shouldn’t be wedded to cult agile.

This made me chuckle. Good read.


First companies and now cities battling for top talent. Good times.


Prioritize health over work. It’s important.

Learning golang – my journey

As a product manager by trade, I don’t need sit and learn programming languages as I’m not expected to site down and write code. But the engineering in me wants to keep building.

Looking at data is a big part of my day-to-day work. You might have a data analyst to help you with this, but the analysis of the data and understanding you get of your customer is not something you can delegate. Thus, most cases I take matter into my hands.

Now there is only so much SQL queries you can write and run daily. At some point in time you want to store these values and trend over time. Chances are you have system that will do the job for you, but when you don’t you take matters at hand.

Python was a go to choice, but I wanted to build a cli tool that would allow me to run cURL like commands to an API and capture some of the timing metrics as well. At times I would have 100’s of URL’s that I did like to check.

I also wanted to pull RUM data from our vendor tool for pages of my SaaS application and correlate that data that I pulled from the database.

I had Grafana and MySQL set up to view this data, but I needed something that would run my queries, cURL my API endpoints and pull data from 3rd party application into this MySQL database.

After talking to a few friends, I looked into golang as a means to do whatever automation I needed to do at my end. One of the biggest reason to consider golang was the concurrency – easy to understand and implement.

I have a full fledged system set up today that allows me to look into trends in my SaaS applications with multiple data sources contributing to these dashboards. Here are a few links I used to get myself started into golang.

First, head to golang.org and install the framework from the download page.

Go by Examplehttps://gobyexample.com
Literally from basics. I read this just to get a hang on their syntax and how to structure code.

The Go+ language for engineering, STEM education, and data sciencehttps://github.com/goplus/gop
Yet another library that cuts down the learning by focusing on the most basics of things. Really good library.

How to write go codehttps://golang.org/doc/code
When you first start writing go code and everything is in a single file; it woks like magic. When you start separating your layers, is when you get into trouble. This tutorial form Google was one of the best to get me started and understanding how to structure my code.

SOLID Go Design by Dave Cheney – https://dave.cheney.net/2016/08/20/solid-go-design
Once you get a hang of things, follow Dave Cheney’s blog. This will get you started in golang design patters and most important concurrency.

How to create a CLI in golang with cobrahttps://towardsdatascience.com/how-to-create-a-cli-in-golang-with-cobra-d729641c7177
I wanted to build a CLI tool and there is no better library then cobra and viper. I have no moved away from these libraries and build everything thats available in golang; but these libraries will get you started quickly and also help you understand how to build cli tolls and read settings from a config file.

Viper for config file settings – https://github.com/spf13/viper
Cobra for building a CLI tool – https://github.com/spf13/cobra

Lastly an example of golang CRUD using MySQL form scratchhttps://www.golangprograms.com/example-of-golang-crud-using-mysql-from-scratch.html
This will give you a basic understanding on pushing data into a database.

It is always good to refer to codebases as well to get an understanding of how to structure your code or to simply see deeding patters. Some code bases I looked into were Kubernetes and Elastic’s Beats.

Measuring your WiFi Quality

I have been using the router provided by my ISP provider (out of laziness) for the past few months. Those routers aren’t bad, but they do not work for every home environment. I live in a townhome and this router sits on the first floor. With all of us working from home; the connection has been spotty in some of our rooms. The download speed is great when you get a good connection but the stability is worst.

When it comes to networking, I know the basics and I know enough to understand the issue with my WiFi connection and that I need a stronger router. Before I got my Eero; I wanted to check my WiFi quality through out the house. Even if you have a stronger signal everywhere, one has to consider the noise. The amount of devices connected to WiFi one has these days is mind boggling. I counted 27 devices connected to my WiFi network including 9 WeMo switches, a ring doorbell and a Nest thermostat.

macOS has a utility to check your wifi connectivity – airport. Running this will show important metrics that you need to understand the quality of your WiFi Network:

$>/System/Library/PrivateFrameworks/Apple*.framework/Versions/Current/Resources/airport -I
     agrCtlRSSI: -40
     agrExtRSSI: 0
    agrCtlNoise: -93
    agrExtNoise: 0
          state: running
        op mode: station
     lastTxRate: 234
        maxRate: 867
lastAssocStatus: 0
    802.11 auth: open
      link auth: wpa2-psk
          BSSID: 1x:1x:1:1x:11:1
           SSID: XXXXXXXXXX
            MCS: 5
        channel: 48,80

Two numbers are most important here. agrCtlRSSI (Received Signal Strength Indicator) is the power of the received signal in the wireless network. It uses a logarithmic scale expressed in decibels (db) and typically ranges from 0 to -100. The close this number is to 0 the better quality of signal.

The second is Noise or agrCtlNoise; is the impact of unwanted interfering signal sources, such as distortion and radio frequency interference. This is also measured in decibels (db) from 0 to -120. The lower the value i.e closer to -120 means little to no noise in the wireless network.

Once you have these two values, you can now measure the Signal to Noise Margin (SNR Margin) with the simple formula agrCtlRSSI - agrCtlNoise.

Higher value means better WiFi Signals.

To truly monitor the quality of this, I wanted something that could track the wifi quality continuously. Not much could truly give me WiFi Quality so I had two choices. Write a simple shell script that could continuously run, capture the two metrics and provide me with the SNR Margin. Which would mean I had keep the terminal open and let that run.

Since I have been tinkering with golang, this was a good way to learn something new. I found a golang library getlantern/systray that allows you to run a golang app in the system tray. I then used mholt/macapp that allows me to build a macOS application. Now I have a continuous running application that update the WiFi signal every 15 seconds. You can download the code or the WiFiQuality.app on my GitHub.