Tumbleweed Technology

The random nonsensical musings of a professional software engineer that will most likely be read by absolutely noone.

email: contact@schroederspace.com
github: jpschroeder
linkedin: john-schroeder

Copy Paste with Neovim and Kitty on MacOS


The kitty terminal emulator has great support for copy and paste using cmd+c and cmd+v on macOS. Neovim has a very robust clipboard system using y and p. Neovim users can configure y and p to integrate directly into the system clipboard. However, I wanted to keep neovim’s default clipboard register separate from the system clipboard. I wanted to use y and p inside vim only, then use cmd+c and cmd+v to copy and paste between neovim and the rest of the system. This turned out to be surprisingly complicated.

read more

Abusing CSharp Query Expressions


C# query expressions are usually used for slicing and dicing enumerables or running database queries with entity framework. However, query expressions can be used with any object that has a Select method. Even though C# is a statically typed language, some of its built in forms like this resemble duck typing. Taking advantage of this feature, I figured out a way to make a function builder entirely using query expressions.

read more

Experimenting with dotnet scripts


I have been writing some c-sharp scripts recently using the dotnet-script project. Small .csx files are great for experimenting with new concepts using C#. There is no project file, so I had a folder of scripts that could all be run interactively and independently. See the project page for the basics on installing and running csx files. In this post I wanted to document some of the tips and tricks that help when working with c-sharp scripts.

read more

The Smallest Possible ASP.NET Web Application


One of the things that I like about Go is the minimalistic http support built into it’s standard library. I wanted to see if I could replicate this style of development in C#. Now that ASP.NET comes with the .NET SDK, I believe this is possible. The first step in this journey was to ask the question: What is the smallest amount of code in C# to make a Hello World web application.

read more

Does HTTP 1.1 Support Full Duplex Communication?


Surprisingly enough, I think the answer is Yes. Chunked transfer encoding allows a client to upload chunks of data to the server. It also allows a server to download chunks of data to the client. I think it is valid for them to do this at the same time. The client has to initiate the connection, but the server can begin sending chunks of data while still reading chunks from the client. Even though HTTP is traditionally thought of as a request-response protocol, you can actually get bi-directional full-duplex communication.

read more

Pipe To Me - Stream Data over HTTP using curl


I built a thing! It’s called pipeto.me. It allows you to stream data from the command line over HTTP in real time. It’s built in Go. It uses no client-side javascript. It has no external dependencies beyond the Go standard library. All of the code is hosted up on github. Check it out.

read more

Real-time Data Streaming from SQL Server


Have you ever wanted to stream data asynchronously out of SQL Server to an external application for some kind of background processing? Maybe you want to send email notifications. Maybe you want to feed data into something like redis, rabbitmq, or kafka. You can use a simple table as a queue, but you are always stuck with polling the table every so often. SQL Server actually has built in support for realtime asynchronous messaging through a less used feature called Service Broker.

read more

Losing Weight


After struggling with my weight for about 10 years, I finally figured out something that worked for me. Over a year’s time I lost over 100 pounds. What follows is an overview of what worked and lessons learned.

read more

CGI: A Blast From the Past (with Go)


CGI (Common Gateway Interface) is one of the original ways to develop dynamic web applications. Although the industry has generally moved on from this style of web development, playing with CGI is a fun historical activity.

read more

Go Blog Already


I built a blog engine! In classic programmer fashion, instead of actually writing a blog, I decided to use a bit of golang to build myself a blog engine. Yes, this is definitely a prime example of yak shaving, but it’s been a a fun endeavor.

read more

Git Repositories in Dropbox


I sometimes find it useful to push git repositories into a shared Dropbox folder instead of pushing them to an actual git server like Github. Note that these instructions are not specific to Dropbox. I will describe the basic process for pushing to a local folder that can be shared.

read more

Closures in Javascript


When I was interviewing for my last job, one of the companies I interviewed with asked me to describe what closures were in javascript. I wasn’t really happy with the answer that I gave at the time. I am aware that there are countless places that describe closures across the internet. Mozilla has very good write-up [on their site][closures]. However, since one of the best ways to learn something is to explain or teach it, I wanted to write up a simple description myself.

read more

Bulk Upsert with Dapper and Sql Server


In this post, I will discuss a method that I use to perform bulk upsert (insert or update) of data into sql server. I will be using c# and the awesome dapper library. This is useful when doing an import from a csv or excel file into a database table. I might, at some point in the future, show some code for the actual file parsing. For now, you can find all of the code used in this post here.

read more

Talking with Tumbleweeds


Hello World! This is the first post for my new experimental blog, Tumbleweed Technology. I named it this way because I assume that absolutely no-one is going to actually read it. I plan to post here about various techie things that I come across day to day. It could be random technology that I think is cool; It could problems that I encounter; It could just be things that I don’t want to forget.

read more