Blog | About

Jon Kuhn


gRPC Streaming Lessons Learned

Over the past few years I have worked with building services that communicate with each other via gRPC. This post focuses on some lessons I have learned related to designing RPCs that utilize gRPC server side streaming. gRPC supports multiple types of streaming and server side streaming is the one that allows the server to stream back multiple responses to a single RPC request from the client.

Read More

TDD Part 3 - Writing The Simplest Code To Pass The Test

This is the third of three posts discussing my thoughts on getting started with TDD. In this post I will discuss how writing very simple, even “silly”, implementations to make a test pass can help you learn about your test coverage and decide what test to write next.

Read More

TDD Part 2 - Writing The First Test

This is the second of three posts discussing my thoughts on getting started with TDD. In this post I will discuss what I think is one of the most difficult parts of getting started with TDD: writing the first test.

Read More

Think Twice Before Deduplicating Code

As software engineers when we see duplicate code we tend to immediately have an impulse to de-duplicate the code by extracting a function and then calling that function from all the places where the code was duplicated. This is often a good idea, but there are important trade-offs to consider. Removing code duplication can sometimes lead to more problems in the future if the trade offs are not carefully considered and if the responsibility of the shared code is not clearly communicated.

Read More

C# Yield Return Demystified

One C# language feature that can initially seem like magic is yield return. This feature is very similar to generators in Python. Generators (in Python) and yield return (in C#) allow you to write very simple-looking functions to implement behavior that normally would require more complex stateful iterator objects. This post will explain the behavior of a function using yield return and then explain what code would be required to implement this behavior without yield return.

Read More

7 Things to Consider Before Modifying Existing Code

The thing we do most often as software engineers is change existing software. The most obvious way to change software is directly modifying the existing code without doing any refactoring. This can be a good approach in some situations, but the way software is changed has important implications both for the stability of the change we are making and for how easy it will be to make changes in the future.

Read More

C# Generics For Python Developers

One of the more difficult features to understand in statically typed languages like Java and C# is Generics. This is especially true for folks whose experience is mostly with dynamically typed languages like Javascript, Python, Ruby and PHP. The first time you encounter generics is almost certainly an instance of a generic collection like List<string>.

Read More