First Steps into Blazer as an Experienced ASP.NET Developer

I have about 10 years of experience with ASP.NET, but I have never used Blazor. After a few hours, this is what I created: This very simply demos a standalone piece of client-side interactivity. How? To get started I followed the command line interface version of the official tutorial. As the very first step, I used winget to upgrade to dotnet 8. $> winget install Microsoft.DotNet.SDK.8 Next, I used the dotnet CLI to create and run the app that the tutorial suggested....

June 11, 2024

Helping a Friend Do Hello World with Rust and WASM

A friend of mine and I spent about five hours building this into Hugo. Here is Jamin’s version. You can find the source code on GitHub here. Incredibly, we embedded WASM running from Rust into this Hugo blog post. The most difficult part involved shoe-horning the WASM into Hugo. It uses three files: 0.wasm-game-of-life.js b5c3cfdbd4523a4f1959.module.wasm wasm-game-of-life.js <--- Previously known as bootstrap.js We build those in a separate apps/ directory and copy them over....

February 8, 2024

Helping a Friend Create a New Blog with Hugo and GitHub Pages

These very high level steps helped a friend set up a Hugo site. Set up Your GitHub Pages Create a new GitHub account. Create a GitHub public repository for GitHub Pages. Clone that repository to your local machine. Publish your first plain text file as a GitHub Page. Done. Milestone achieved! Get distracted by learning PowerShell, Git, and NeoVim. Yah! Set up Your Hugo Site Install Hugo! (choco install hugo)....

February 6, 2024

Personal Anki Tips

After 1,176 cards and 91 days of studying with Anki I now use these guidenlines. Revision of cards is key: create cards, review cards, suspend cards, revise cards. Guidelines Make cards very, very easy. Prefer cloze deletions. Minimize words. When reviewing, suspend cards I dislike. Set a very low bar for suspension. Revise suspended cards, then unsuspend ’em for a second chance. Change Note Type Ctrl + Shift + M Toggle Suspend Ctrl + J Preview Clozes Ctrl + L If a card seems unsalvagable, delete or archive it....

January 17, 2024

List git branches with the date and author of the last commit

git branch --all --sort=creatordate --sort=committername ` --format "%(align:20) %(creatordate:short) %(end) %(align:25) %(committername) %(end) %(refname:lstrip=-1)" See also:

July 24, 2023

On the effectiveness of positive feedback

Positive feedback helps because: it reinforces existing good behavior, it communicates that someone inspects the work, and it opens the apperture to receive corrective feedback. Reinforcing existing good behavior helps maintain it. Managers can reasonably expect staff to complete 60% of assigned tasks; we want to preserve that good behavior. If we focus on correcting the missing 40%, most people will perform worse. Build foundations; reinforce the existing good stuff....

February 27, 2023

Answer the question and shut-up

This is advice for myself. When PhD students do their thesis defense, experts fly in to grill the student. Good thesis advisors train students to answer each question and then shut-up. Students almost always feel a temptation to elaborate. Examiner: Why did you use that particular statistical test? Student: We used regression because our data met its requirements for establishing cause-and-effect. Examiners: Silence. Student: We designed our data collection to adhere to parametric test requirements....

February 21, 2023

Reduce and/or aggregate in PowerShell

PowerShell’s built-in ForEach-Object provides a reduce/aggregate routine. In short-form it looks like this to sum a range of numbers. @(1, 2, 3) | ForEach-Object { $sum = 0; } { $sum += $_; } { $sum; } If we break it out with comments, we can see three blocks. @(1, 2, 3, 4, 5) | ForEach-Object { # Begin. Here we set up the accumulator. $sum = 0; } { # Process....

January 5, 2023

Set image metadata with exiftool

Install it from here Find available tag names here The following example sets the IPTC:Keywords attribute. exiftool(-k).exe .\turtles-climbing-hills.png -IPTC:Keywords="Absurd"

January 5, 2023

Debug legacy .NET Framework with VS Code

Build your app with a portable Program Database (PDB) output. msbuild ` /property:Configuration=Debug ` /property:Platform=x64 ` /property:DebugType=portable ` /t:Clean,Build ` /p:DeployOnBuild=true ` /p:WebPublishMethod=Package ` /p:PackageAsSingleFile=false ` C:\dev\MyApp In VSCode, Create ./.vscode/launch.config with this content. { "version": "0.2.0", "configurations": [ { "name": ".NET Attach", "type": "clr", "request": "attach", "processId": "${command:pickProcess}" } ] } In VSCode, Use <CTRL> + <SHIFT> + <P> to enter the command palette. Then choose Start Debugging. Then attach to your particular app....

December 16, 2022