Blog Archive
  • Using AI in a C# app

    January 6, 2026
    AI .NET csharp

    Following on my from my previous introduction to AI post I thought I would now introduce how to use the AI providers in a C# application.

    We may want to build some AI features inside a new or existing app and so where do we start as a C# developer?

    This blog post will go through a fairly simple example just to illustrate the “how” and then you can adapt it for your needs and maybe I’ll add some more thought out examples in other posts.

    Read more →
  • Introduction to AI

    December 23, 2025
    AI .NET csharp

    If you can’t beat them, join them is probably the best quote to sum up my experience with AI.

    We have known for a long time AI is changing the way we work however, we all know how unreliable it is and personally I have seen that for a long time when it “helpfully” suggests code suggestions as I type. I have also seen how unreliable it is when using an AI Assistant to do something for me.

    My conclusions have been “this thing is not going to take away people’s jobs or take over the world, it’s absolutely useless”.

    However, as time has gone on and models have got better and clearly AI is not going away, I decided I better try and learn some fundamentals of AI and try to find ways in which I can test it out.

    Therefore, this post will be an introduction for those still in the “this is useless” mindset which might help explain some concepts and how to use it so it can be more effective for you.

    Read more →
  • Using Azure AD authentication for a Go API

    January 29, 2022
    golang authentication auth golang

    So after a long time I thought I’d take another look at Go and whilst struggling to think what little app should I write to get back in the saddle with, the legend that is Christos Matskas mentioned he wanted to try using a Go api against Azure AD for authentication. So I fired up GoLand and got to work writing an API.

    Setting up Azure AD

    1. You will need to create an Azure Directory in your account which is pretty straightforward. The only user in the directory will be you.
    2. Inside the directory you will then need to register an application, again pretty straightforward.
    3. Next under Certificates & Secrets, you will need to create a secret, this will be used as part of the auth handshake. Give it a name and Azure will create the value. Take a copy of it ready for your API
    4. On the Overview page take a copy of the Application (client) ID
    5. On the Overview page take a copy of the Directory (tenant) ID
    6. Go to Expose An API
    7. Click Add a scope
    8. Create something like “allow_user” and choose Admins and users
    9. Go to API Permissions and click Add a Permission
    10. Select My APIs and select your application/API
    11. Tick the scope you just created
    12. Now here’s a weird thing, if you don’t see your scope, try going to another tab in your browser or refresh you Azure Portal page. Something is broken IMO in that it takes time or needs refreshing for it to show up
    13. Click Manifest on the left hand side
    14. Change accessTokenAcceptedVersion to 2 and click Save
    Read more →
  • Terminology Glossary

    April 13, 2021
    glossary terminology

    This page will list and describe common words and terms that you might come across as a software developer which you can refer to at a later date knowing there’s a place to go to when someone uses a term that you don’t know, are unsure of or can’t remember

    Terms

    Cohesion -
    Composition Root -
    Coupling -
    Cross-Cutting -
    KPI -
    Lift & Shift -
    OKR -
    Orthogonal -
    Projection -
    Shift Left -

    Read more →
  • Tracing IO in .NET Core

    January 29, 2021
    OSS Carter OpenTelemetry

    I was made aware of OpenTelemetry a while ago by a blog series Jimmy Bogard and put it in my favourites to read at a later date. Of course I didn’t really get back to it in depth and gave it a quick scan at the time although it is a well written in depth blog series so I suggest you do check it out. A while later I saw a blog post by Rehan Saeed which gives an introduction on what OpenTelemetry is and how it works and the concepts behind it and is definitely worth a read. At the same time I saw a YouTube video by Elton Stoneman that whilst more aimed at using tracing using Kubernetes he demonstrates a .NET app running and the tracing details appear in Jaeger

    Read more →
  • Understanding type aliases

    August 7, 2020
    OSS fsharp csharp

    I recently wrote a single case discriminated union which is what I wanted but was also confused why it didn’t behave like a type alias and then learnt that these two are different things.

    type CustomerId = int

    type CustomerId = CustomerId of int

    I was aware of both syntaxes and from a quick scan they look the same however they behave differently and rightly so. As I travel the F# road there is more emphasis on creating types for your functions. I have used this approach in C# to enforce type discrimination but it seems less prevalent in the mainstream from my experience. For example think of this:

    Read more →
  • Understanding F# applicatives and custom operators

    July 17, 2020
    OSS fsharp

    After discussing something with Ian Russell he suggested I take some time to read through another fine blog post he has written and understand F# applicatives and custom operators. I found myself in familiar territory when reading F# blog posts and it’s something similar to the five stages of grief. Nod, Nod, I understand what’s going on, Umm, WTF is going on. As Ian did in his Intro to F# series he sets out a simple domain problem and goes about how to address it. We want to return a ValidatedUser from a function but if the user fails validation we return a list of validation errors.

    The code in the blog post was pretty self explanatory until, it wasn’t, which I have pasted below:

    Read more →
  • Understanding F# map/bind

    June 28, 2020
    OSS fsharp

    This blog post aims to explain map/bind in F# in a code only example. It took me a while so I’m writing it up here so I can come back to it and re-read it for the 100th time most likely!

    Read more →
  • Feature Management in F#/Giraffe/ASP.NET Core

    June 18, 2020
    OSS fsharp giraffe

    Following on from Joe’s post I thought I’d see how one would do this in F# and Giraffe because why not? Turns out its quite simple. First, create a features.json file:

    Read more →
  • Goodbye NancyFX, Hello F#!

    June 16, 2020
    OSS fsharp nancyfx

    As some of you may already know, NancyFX has been archived 11 years after its first commit. You can read the announcement here for further information but I will never forget what I learnt from this codebase, the community around it and most especially the people involved with it. I am very proud and honoured to have been involved with it and a massive thank you to Andreas HÃ¥kansson for teaching me plenty via the 1:1 Skype calls we had in the early days. As many of you also know I created Carter which in my mind was Nancy v2 but sat on top of ASP.NET Core with the same approaches as Nancy, offering many things a web framework should have. The usage of Carter has steadily increased which is good to know people value similar things we achieved with Nancy. However, paradoxically I have had a feeling brewing for sometime that this effort is almost futile.

    Read more →
← Newer 1 / 7 Older →

© 2026 Jonathan Channon's Blog. All rights reserved.