Today I had the opportunity to organise a programming with your kids event for Bergler. It was fun to see the chidren play with Scratch, Code.org and the Microbit.
Introduction A lot of developers do not like to write unit tests. Generative AI tools like GitHub Copilot can help you write unit tests. At least that is what these tools promise. In this blog post, I will write some unit tests using Github Copilot (with Chat) for a simple example to check if the promise is kept and what kind of changes to the generated code I have to make as a developer to get decent unit tests. Example For this blog post, I will use a probably familiar example of order and orderline items. First tests This code does not have a lot of logic to test. So let's add some logic to the order class. I ask GitHub Copilot to generate the code for calculating the total price for an order. In this code, I also changed the public list into a private one. I can now ask Copilot to generate a unit test for this code using the prompt: "Can you generate a xunit test for the order and orderlineitem class where the order has 2 orderlineitems". Three unit tests were gen...
If you are building a modern web application, you will often need a frontend and a web API. I always want to keep these projects apart to maintain separation of concerns but to enable easy code sharing and developer focus, I also like to keep the projects in one solution. I love to use Azure DevOps for my CI/CD work, so I want to deploy these artifacts with one pipeline. In this post, I will show you, how you can do this. I do expect some basic knowledge about setting up a build and release pipeline in Azure DevOps. Visual Studio Solution For this blog post, I created the following solution. The solution contains a web application and a WebAPI. Both projects share the Domain class library. Build pipeline The solution can be built with the classic workflow or using the new yaml templates. For this post, I use the classic editor with the template for ASP.NET Core. The default settings for the build can be used. By default, all projects will be built and all p...
Introduction This blog post is part of the Festive Tech Calendar 2024 . Christmas is a time when many people gather to share meals and create lasting memories. Unfortunately, some individuals face loneliness during this festive season, while others have an extra seat at their table. To bridge this gap, I built a simple web application that connects families with spare seats to people seeking companionship, enabling them to share the warmth of Christmas together. While it would have been possible to create this application using a simple Blazor App with server-side rendering (requiring minimal code), I wanted the development process to be enjoyable and educational. For this reason, I opted to build it using Azure Static Web Apps, Blazor WebAssembly, Azure Functions, and CosmosDB. To further enhance productivity, I utilized GitHub Copilot Workspace as an experiment. This version of Copilot is still in private preview, but I’ll share some insights and code snippets with you. Azure S...
Comments
Post a Comment