tail -f thoughts.txt

Jacob Windle

The Project Continues: Using Blazor

The websocket server that I’ve been writing about in past posts will now need an integration point to continue testing. I’ve developed the protocol for this websocket communication, and it consists only of a server state, a timestamp, then additional data. Protocol Example message below: { "state": "Ready", "timestamp": "2023-08-20T13:56:45.5106278-05:00", "data": { "arbitrary": "object" } } I saw two alternatives when it came to designing this protocol, making the protocol stateless or stateful.

Cancellable ThreadPools and Work

Today I learned about how .NET wants you to manage cancellable work. I only found out because I tried to use Thread.Abort () and everything blew up on me :). .NET wants you to manage work through this concept of “Cancellable Tokens,” where any asynchronous task represents one cancellable unit of work that you can then stop once cancellation is desired. How did I end up needing this type of work?

WebsocketSharp Deep Dive

To implement the Websocket server from my last post, I’ll use WebsocketSharp https://github.com/sta/websocket-sharp. I’d like to know before I design the remainder of my server though, what actually happens when I call .Start () on my server. I have a snipped of code that looks like this: protected override async Task ExecuteAsync(CancellationToken stoppingToken) { _logger.Log (LogLevel.Warning, "Starting Server"); var server = new WebSocketServer (4546); server.AddWebSocketService<Service>("/service"); server.Start (); await Task.Delay (Timeout.InfiniteTimeSpan, stoppingToken); server.

Code Reading List

For the first time in my 10 year career, I’d like to get into code reading. Here is my list of repositories that are on the shortlist: https://github.com/ggerganov/llama.cpp - C++ https://github.com/clojure/clojure - Clojure https://github.com/sta/websocket-sharp - C#, related to my current project

Websocket Server C#/.NET: Part 1

I’m creating a background service that does some low-level stuff, and will be responsible for connecting with a client program. That background service is written in C#/.NET. The cross-platform story is great for the C# ecosystem, and the vendor of a particular eyetracker provides .NET bindings for their SDK. If I can write a cross-platform long-running service, that hooks into Windows and Systemd properly, that’s all that I really care about as an engineer on this project.

Junit5: Parameterized Testing with MethodSource

Today I had to write some test cases for permutations of configuration-driven code. There are currently only 2 configuration values, so the test only had 4 possible configurations. In my case, I wanted to drive these tests through paramterization. This allows me to have simple test code, while putting all the complexity in the test arguments. While working with JUnit5 at my unspecified big company, I learned today about ~@MethodSource~ annotation in Java, and precisely how it works.

TIL - Structured Clone

Too many times have I been bitten by modifying references to an object rather than a clone of the object. This isn’t a problem in languages like Clojure where everything is immutable by default, but when working with Python or JS, it certainly is. For a client here in my hometown, I wrote some Python code that read values from some JSON in a file into a list. Those values were then scaled in each loop iteration to match a “scale factor” that the code expected.

Update on Me

I’ve been doing a lot, and lately it’s felt like I can’t catch my breath. Between work at a FAANG company, a side project that I really believe in, and being a dad I don’t have much time for myself. Things that I need to be doing fall by the wayside while I re-evaluate priorities daily. Projects have been started and dropped. I’ve had habits get created and die. Lately I’ve been working on a major rules-engine in Java at work for processing images.

Chore Feed Project Plan

Problem I constantly see things that I need to fix around the house, then go on about my day and forget to fix those things. I won’t even write them down! I will do things that I am constantly reminded about. I’ve found some success with Ryder Caroll’s Bullet Journal method, but still then I have to remember to write in the bullet journal. How can I be constantly reminded about the things that I need to do around the house, and additionally increase engagement with household chores for my wife and I who both forget?

Flutter - Dependency Hell

With the recent move to Dart 3, many applications out there are upgrading to take advantage of null safety. Null safety IS awesome, but what isn’t awesome is the plethora of packages out there in Pub that don’t yet support these breaking changes. Why is this an issue? Because most Flutter apps built out there (particularly ones built by low-code tools) have tons of dependencies. Odds are one of these will break when performing a major upgrade like this.