Merry Christmas Everybody!

You read that right! In fact, I wish everyone a Merry Christmas! I hope my wishes make you glad because othewise I have to wish you Merry Christmas again. No offense!

This time of year is also a good occasion to look back on the past year. Personally, I had a good start with Blazor and .NET before moving on to more habitual development with a React, TypeScript and Vite based customer project. Which is great! I am also glad to have learned many important things from my colleagues.

To mention some important stuff that I have learned during the year is the Neovim editor that I have recently started to use more and more instead of VSCode. I like it a lot due to its configurability. There are also many public online resources available to get started with Neovim. I want to specially mention Josean Martinez’s screencasts because they proved to be a great help for me adopting this tool and really understanding how to configure it without needing to rely on readily made distros. Of course distros are also good but if you want to understand more deeply, you just have to dig deeper. That’s life!

Advancements in Artificial Intelligence

The past year has been really good for artificial intelligence. The AI certainly isn’t a bubble or a flop and I don’t think it will go away at all. It’s also quite satisfactory that now it is possible to easily run language models on your own laptop or desktop PC, so you can you can use it in every day coding without needing to leak your customer’s propietary code to third parties like Open AI.

Configuring Neovim to Use Local AI

I have tested out various code assistants for the Neovim editor and I found Avante quite alright.

It seems CodeGemma performs quite alright on Geforce RTX 4070 GPU at least and generates acceptable templates to speed up productivity.

Avante

Avante seems to be rather straightforward to configure to use Open AI or Anthropic API. However, I had to think a little to figure out how to configure it to use local Ollama models. So let me show you my avante.lua configuration file, so you can get it working a bit easier than me.

return {
  "yetone/avante.nvim",
  event = "VeryLazy",
  lazy = false,
  version = false, -- set this if you want to always pull the latest change
  opts = {

    provider = "ollama",
    vendors = {
      ollama = {
        __inherited_from = "openai",
        api_key_name = "",
        endpoint = "http://127.0.0.1:11434/v1",
        model = "codegemma:latest",
      },
    }, -- add any opts here
  },
  build = "make",
  dependencies = {
    "stevearc/dressing.nvim",
    "nvim-lua/plenary.nvim",
    "MunifTanjim/nui.nvim",
    --- The below dependencies are optional,
    "hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
    "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
    "zbirenbaum/copilot.lua", -- for providers='copilot'
    {
      -- support for image pasting
      "HakonHarnes/img-clip.nvim",
      event = "VeryLazy",
      opts = {
        -- recommended settings
        default = {
          embed_image_as_base64 = false,
          prompt_for_file_name = false,
          drag_and_drop = {
            insert_mode = true,
          },
          -- required for Windows users
          use_absolute_path = true,
        },
      },
    },
    {
      -- Make sure to set this up properly if you have lazy=true
      "MeanderingProgrammer/render-markdown.nvim",
      opts = {
        file_types = { "markdown", "Avante" },
      },
      ft = { "markdown", "Avante" },
    },
  },
}

Progress on the .NET Platform

Let’s not forget Blazor and .NET yet. It looks like Blazor’s popularity has been steadily growing throughout the year. Although my first step with every PC is to erase Windows and rewrite the hard disk with Ubuntu Linux don’t get me wrong - I am not a Microsoft hater - find Microsoft’s .NET a great platform. It is really great that it is possible to develop .NET stuff with a Native Linux without any restrictions at all. Also, Microsoft’s Azure Cloud appears to be catching up with Amazon Web Services and even beating it in certain ways.

database under christmas tree

So let’s have an unforgettable New Year celebration by publishing something nice to Azure! Going back to the tropical climate of my previous example application Kalabaw Foods online store, let’s create a Postgres SQL instance in Azure.

To begin the celebration, preparation is key. Do a good deed this year and register your subscription to Microsoft’s PostgreSQL namespace:

az provider register --namespace DBforPostgreSQL

Get the popcorn popping now, the time has come to do it:

az postgres flexible-server create
    --resource-group kalabaw-foods-nova-resource-group
    --name kalabawFoodsPostgresServer
    --location northeurope
    --admin-user myadmin
    --admin-password the_secret_password_here_123
    --sku-name Standard_D2s_v3
    --tier GeneralPurpose
    --version 17

…Once you’ve done this and gone from a happy person to a happy person with a PostgreSQL data container on Azure cloud, the next naturally occuring question might be, what should I do with it?

From Terminal Commands to Release Pipelines

Now the pieces start coming together (once again) and our demo application’s imaginary entrepreneur is beginning to realize the urgent need for a robust version control and deployment management system to get all the pieces of his cash cow in place. Which naturally leads us to consider using proper release pipelines to help the entrepreneur continuously deploy the database migrations and generally speaking keep his sheep together.

As classic pipelines are so last year and everybody is adopting YAML pipelines these days, we will be eagerly looking forward to how to do it in practice.

What’s in the Pipeline?

A release pipeline is an automated workflow that deploys a new version of your software (or a part of it) to the production environment - or to some pre-production environment, such as staging or test environment. Each pipeline is triggered by a specific event, such as an update in the repository where your source code is maintained or whatever other event you want to use for triggering the pipeline. Each pipeline is further split into stages. Each stage consists of multiple jobs - and finally, every job contains one ore more steps, which are miniature sub tasks that need to be completed in order to get the job done. The steps might be something like executing a migration script, invoking an API etc.

The awesome thing is that you can easily configure all these things with a simple YAML file!

And what’s Next?

Coming up next year: how to match your web application and database with release pipelines.

But before that, Merry Christmas everybody once again!