Scott Hanselman's Blog Note

Scott Hanselman's Blog

The given link is to the personal blog site of Scott Hanselman, an American author, advocate for computer science in schools, and Microsoft Developer Community Program Co-Vice Chair for many years. The blog primarily focuses on discussing various aspects of computer programming, software development, and the latest trends in technology.

Thread Of Notes

The user experienced extremely slow file transfer speeds, around 100-200 megabits per second, despite having a 10 gigabit network setup. Initially, the user suspected the Unifi UNAS Pro 8 NAS, its RAID 6 configuration, or NVMe cache, as well as the Immich application. Troubleshooting steps like changing cache settings and stopping Immich yielded no improvement. The problem persisted even after ruling out the NAS by performing an iperf3 test between the desktop and a miniPC.This direct network test revealed an asymmetrical speed issue, with download speeds being very low and upload speeds significantly better but still not optimal. Examining the Intel NIC statistics showed a high number of discarded packets. The user increased the receive buffer size on the NIC, which eliminated discarded packets in one direction but didn't fully resolve the speed issue.The breakthrough came when disabling Large Send Offload (LSO) V2 for IPv4 on the Intel NIC. This single change dramatically increased the download speed from 313 megabits per second to 7.03 gigabits per second. LSO is designed to reduce CPU load by letting the NIC handle packet segmentation, but in this specific configuration, it was hindering performance. After this adjustment, real-world file copy speeds to the NAS improved significantly to approximately 350 megabytes per second, or 2.8 gigabits per second. The key takeaway is that when facing storage performance issues, it's crucial to isolate the network and test it independently, as sometimes network adapter settings like LSO can be the bottleneck.
The author begins by appreciating the traditional craftsmanship exemplified by Japanese woodworking and the personal workshop activities of his father, contrasting this hands-on creation with mass-produced items like IKEA furniture. Despite having coded professionally for 35 years, the author notes that modern computing systems remain overly complicated, with both machines and humans continuing to make errors. This persistent complexity is compared to historical technological shifts in programming, such as the transition from assembly language to C, and the introduction of tools like syntax highlighting, IntelliSense, and the widespread use of Stack Overflow-driven development.The core assertion is that genuine value still lies in good taste, craftsmanship, and sound human judgment, regardless of technological advancements. Building a cohesive system is described as analogous to interior design—a non-trivial task requiring skilled assembly. The author warns against being deceived by simplistic tools and "one-shot" software solutions, emphasizing that software development remains inherently difficult, even though developers are no longer constrained by input/output speed.He predicts significant future work involving cleaning up the "slop" created by rushed development. However, the author believes that for those who possess deep understanding, AI-augmented development promises incredible results. He is currently enjoying the learning process during this era shift, confirming that the underlying craft of software development endures.
The author of the text created a Windows Edge Light App and wanted to add a feature that would give it a virtual ring light, similar to the Mac Tahoe's Edge Light feature. To make the app more trustworthy, the author decided to use Azure Trusted Signing, a cloud-based code signing service provided by Microsoft. This service allows for automatic certificate management, GitHub Actions integration, and is trusted by Windows, which helps to prevent SmartScreen warnings. The author found that Azure Trusted Signing was less of a hassle than traditional code signing methods, but still required some setup and configuration. To use the service, the author had to register the resource provider, create a trusted signing account, complete identity validation, and create a certificate profile. The author then used the Azure CLI to assign the correct role and login with the correct scope, and installed the sign tool to sign the executable. The author also set up automated signing with GitHub Actions, which required creating a service principal with signing permissions. The process involved several steps, including verifying the setup and troubleshooting common issues. Overall, the author found that Azure Trusted Signing was a useful tool for adding trust to their app, but required some technical expertise to set up and configure. The author's experience with Azure Trusted Signing was mostly positive, but highlighted the need for careful attention to detail and troubleshooting to overcome common issues.
CdXz5zHNQW_skY9OmNcGf.png
Mastodon is a decentralized, open-source social networking service that leverages the WebFinger protocol to facilitate user discovery and access. WebFinger enables users to find information about other users on the Mastodon network by utilizing their email addresses or other identifying information.WebFinger operates through a simple HTTP-based protocol where a user sends a request to a server using the email address or identifier of the user they seek. The server responds with a JSON object containing the requested information, known as a resource descriptor.The resource descriptor provides various details about the user, including their name, profile picture, social media links, and public key for establishing secure connections.When searching for a Mastodon user, the network queries the user's server using a specific endpoint format. The user's server then returns a WebFinger response containing the necessary information.To implement WebFinger, users can create a WebFinger API endpoint on their own domain and define a JSON file that provides the required information.Alternatively, users can utilize the WebFinger response from their Mastodon server and save it as a static JSON file on their own server.WebFinger is essential for user discovery and access on the Mastodon network, allowing users to locate and follow each other regardless of their server location.Mastodon offers a Twitter-like experience with the added benefits of decentralization and adherence to web standards like ActivityPub.For those new to Mastodon, a comprehensive guide is available to assist in getting started.