.NET Day Switzerland 2023

Time flies and so we’re approaching already the two months mark since the .NET Day Switzerland 2023 back at the end of August. Like last year I got to attend the one-day conference hosted in a cinema here in Zürich.

Slide with Damian Brady sitting in front saying "Your code is just a detail"

While I’m not good at networking, I still enjoyed the in-between talks parts, as it allowed me to (re)connect with people I know from previous projects, or with whom I went to university. This time around, I felt like there were enough snacks and drinks during the longer breaks.

I’ll briefly go over the sessions I’ve attended and link to the slides. Not sure if this year, everyone tried to beat the others with the longest session titles, but as you’ll see, some of them are indeed quite long.

Keynote: What’s new and coming soon in .NET

My two take away points from this keynote were:

  • .NET is releasing every year in November and every even version (4, 6, 8, …) becomes an LTS
  • Minimal APIs allow for building APIs with as little code as possible, putting it closer with scripting languages as in how little effort it takes to spin up a new API

I also got distracted by the amount of Preview software that Jon Galloway was running. Basically every Microsoft application had a “Pre” tag on it. I deem it as a good sign though, since it means that Microsoft really is dogfooding their own products.

LLMs, Data & APIs: Integrating AI power into your applications (with Semantic Kernel & LangChain)

Slide with Christian Weyer standing in front showing bullet points of the current state of LLMs: Fast moving and changing field, Closed vs open LLMs, Bias of the models, Finding the right prompt can be tedious, Context site is currently limited, SISO (Shit in, shit out)

I was a bit disappointed by Christian Weyer‘s session, not because of the talk, but more because of my expectations of some nice demos integrating various LLMs (Large Language Models) in .NET and hoping to see advanced use cases beyond “send some embeds”, even though the first slide presented (not incldued in the deck below) communicated clearly that there wouldn’t be any deep-dives. We did get a few demos, they were much simpler and a larger part of the presentation was focused on LangChain (Python) and less on Semantic Kernel (.NET) or similar .NET based tooling, by and large because Python really is the primary language used in the realm of LLMs.

What I want to further checkout are the generative AI audio tools which were mentioned by someone from the audience: Musico & Sounddraw

Clean as you Code: use Roslyn analyzers to focus on the code you modify

Slide with Andrei Epure standing in front saying "Clean as You Code - use Roslyn analyzers to focus on the code you modify"

The Evil_Hacker from last year returned, but this time just as normal Andrei Epure. This year’s topic was on one of Sonar’s current focus “Clean as you Code”, which essentially means what it says. Don’t try to “clean” all your code, but clean the code you’re touching/changing/adding. It’s similar to the Boy Scout Rule (“Leave the campground cleaner than you found it.”), but also expands to “quality” measurements/reports, e.g. from SonarQube. Don’t try to hit a 100% score, but just make sure all the new code hits that 100% score as often as possible.

One interesting statistic he presented that ties into this topic is, that over a time span of 3.5 to 5 years, you will be touching 50% of your code base. So following the “Clean as you Code” approach should guarantee that within 3.5 to 5 years, you’ll have cleaned up 50% of your code base, without investing dedicated clean up time otherwise.

Messaging: The fine line between awesome and awful – And how to stay on the right side of it…

Slide with Leila Bougria standing in front listing Causes of ordering issues: Latency, Processing time, Load increase, Concurrency, Retires, Service availability

Another familiar face from last year’s .NET Day; Leila Bougria, this time not with OpenTelemetry, but still in the world of messaging. Walking us through the three different messaging communication pattern:

  • One-way
  • Request-response
  • Publish-subscribe

And highlighting various messaging problems and offering potential solutions.

If you’re dealing with messaging, I highly recommend to familiarize yourself with everything mentioned in the talk and check out her GitHub repository with even more resources.

C# Lowering – What is it and why should I care?

Slides with Steven Giesel standing in front reading "Motivation: 'Understanding one level below your normal abstraction layer.' - Neal Ford" and having three point "Performance, Bugs, and Fundamentals"

Steven Giesel just recently left Zühlke, the company I work for, to become self-employeed. He held a very interesting talk on how quite a bit of C# is essentially just syntactic sugar that gets “lowered” into more basic C# constructs before compilation to IL code.

As an example, the follow things don’t “exist” in (lowered) C#:

  • var
  • foreach
  • async/await
  • using I(Async)Disposable
  • ?? / ?.
  • …and many, many more

When talking about pitfalls of not awaiting async functions, he showed a very interesting quote from Eric Lippert:

A stack trace does not tell you where you came from.

A stack trace tells you where you are going next.

Eric Lippert

While we usually use stack traces to figure out what happened before a certain exception was thrown, the stack trace is, as the name implies, a stack, and if the function hadn’t failed, it would reach the end of the function, pop the top entry off the stack and continue execution from the previous stack entry. As such the stack points to where we’re going next!

Steven also mentioned a pretty neat online tool to see exactly how this lowering plays out: https://sharplab.io/

Architecture Aspects Evolutionary Architecture

Slide with Urs Enzler standing in front with the title "Architectural Aspects" listing a lot of different aspects: Persistence, Translation (UI and data), Communication between parts, Scaling, Security, Journaling, auditing, Reporting, Data migration, import, Releasability, Versioning, Backward compatibility, Response times + Throughput, Archiving data, Data Validation, Distribution, Event Sourcing, Public interfaces, Time & Time Zones & Calendars, Monitoring & Health Checks, History, Exception Handling, Layering & Structure, and Testability

Initially, I wanted to round off the day with the session “The symbiosis of Continuous Deployment and Stability”, but then decided to pick the topic that was the only with “Architecture” in the title. Turns out, I might not have been the only one making that decision, but probably with different reasoning. I’m not sure how many people were at other sessions, since the room was packed full.

Urs Enzler walked us through nicely hand-drawn slides on how we can plan our architecture in such a way, so that it can evolve over time. He made some examples with data storage, layering & structure, scaling, and response times, showing for each, how you can start with a simpler solution, which doesn’t unnecessarily constrain you and allows for an evolution down the line.

In short: An evolutionary architecture is one that works for today and can adapt for the future.

One interesting point about making architectural decisions is to avoid dead ends, meaning that you need to think ahead and not pick an option, that has no possibility of evolving further.

Keynote: Your code is just a detail

The closing keynote was held by Damian Brady who is working at GitHub in Australia. “Your code is just a detail” is a bit provocative, but in a larger sense it’s certainly true. If you think about problems from a business perspective, it doesn’t really matter whether the written code is 1000 lines of C++ or some five-liner Python script, as long as it fulfills your needs as a business.

The keynote focused a lot on DevOps, how we should break down the walls between managers and developers and focus on the organization and delivery:

  • Optimize for context switching: How to reduce context switching
  • Optimize for developers: How to support the developers
  • Optimize for delivery: How do we ship stuff faster or better

Summary

Writing this post, I realized that I had already forgotten a lot of the things I heard and made notes of. While such a conference is rarely a life-changing experience, I do still enjoy expanding my understanding of the world, by listening to others and how they see it and what they’ve learned so far. If you’re working with .NET and live in or close to Zürich or Switzerland, I can highly recommend to join for next year!

Leave a Comment

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.