Welcome to another edition of Reading Notes! This week, dive into the latest updates on Azure DevOps, Docker best practices, System.Text.Json enhancements in .NET 9, AI innovations from GitHub Universe, and more.
GitHub Spark (Devon Rifkin, Terkel Gjervig Nielsen, Cole Bemis, Alice Li) - Fascinating news from GitHub Universe. A new spin on the lowcode app but with code. Looking forward to trying it and see what I can build with it.
GitHub Copilot in Windows Terminal (Christopher Nguyen) - There it is, Copilot making his entrance into our beloved Terminal. It's only in version Canary for now, but I'm sure it will help many of us when no sure what command to use, or the equivalent bash/ PowerShell.
Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.
Welcome to this week’s reading notes! In this post, you’ll find a curated selection of insightful articles and tutorials covering various topics in technology and programming. Whether you’re looking to enhance your testing skills with .NET Aspire, improve your code comprehension with GitHub Copilot, or explore the world of Docker for DevOps, there’s something here for everyone. Dive in and enjoy these valuable resources!
If you have interesting content, share it!
Suggestion of the week
Getting started with testing and .NET Aspire (Aaron Powell) - This is a great tutorial, with a video version if you prefer, to get us started with test when .NET Aspire is part obor solution.
Hosting a (DevOpsDays) Tech Conference (Dewan Ahmed) - I went to this even and you could feel it was prepared with patio and care. It very interesting to learn about the behind the scene and all the work put both before and after.DevOpsDay Halifax you won my heart.
It's Reading Notes time and this week we learn how to improve our experience and security while using AI and containers
a zip line spider?
Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.
Avoid These 5 Common AI Project Mistakes for Success (Narcosa Admin) - AI is a great tool and with it's new easy accessibility more are integrating it into there services, This post shares tips to give you more chance of success.
7 Best Practices for Using GitHub Copilot (Visual Studio Code team) - AI is a great tool, but to enjoy it as much as possible there are a few things we can do, This post shares those tips that could make the differences.
It's reading notes time! It is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.
Back from a two weeks time off it was nice to get back into tech read.
Adding .NET Aspire to your existing .NET apps (Jon Galloway) - This great post explains step by step how to add .NET Aspire to your existing app, saying what you gain and how it's helping you to be faster at buildinba better application.
Combining multiple docker images into a multi-arch image (Andrew Lock) - Another great article from Andrew that explains very clearly a Docker feature: generate multiple image under the same ta to target different OS and infrastructure (ex: x64,arm32)
Logging in Banana Cake Pop (Pascal Senn) - What a amazing new feature! This will greatly improve development and debugging productivity!
The ultimate guide to developer happiness (Jeimy Ruiz) - Many great tools and solution within GitHub "circle". This post provides best practices to improve developers productivity and announces when the next GitHub Universe is coming up.
In this edition of Reading Notes, we delve into a diverse range of programming topics, from stream manipulation in C# to the latest updates in Docker Desktop. Whether you’re interested in adding AI to your .NET apps or understanding the implications of .NET 6 reaching end-of-support, we’ve got you covered.
Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.
Add AI to Your .NET Apps Easily with Prompty (Bruno Capuano) - This is a nice tutorial to build an API using Semantic Kernel to communicate to Prompty and add AI to your project.
How use a Blazor QuickGrid with GraphQL (Frank Boucher) - QuickGrid is an excellent component that came recently in Blazor. Optimized and compatible with tons of modern patterns to display,sort,filter our data.This post share a few o those things filling the grid with a GraphQL endpoint.
Good Monday! This week Reading Notes are more listening notes 😅 and we go from .NET Aspire and containers, passing by communication with AI to camping!
Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.
Introducing .NET Aspire with Damian Edwards (Hanselminutes with Scott Hanselman) - Nice episode where .NET Aspire is really well explained, but yes it's kind of hard to say in a few words what it is.
CosmosDB and AI with Mark Brown (.NET Rocks!) - AI and data! AI and data! AI and data! It's not a typo, I wrote it 3 times... It's everywhere, evolving fast and you must look at it.
In this week’s Reading Notes, we explore cloud debugging, .NET Aspire, and more. Join us for insights, workshops, and podcasts covering a range of exciting topics! 🚀
Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.
Cloud
GalaSoft Laurent Bugnion (Laurent Bugnion) - Nice post debugging investigating a bug, that cannot be reproduce locally only in the cloud.... But with the right tools it's much easier.
Apprendre .NET Aspire en français (Frank Boucher) - Another shameless plug for French content this time. I did a 1h45 long video where I explain the basic of .NET Aspire by doing a workshop and providing details.
What is platform engineering? (Julia Kulla-Mader, Chuck Lantz) - Platform engineering is gaining in popularity, but what ibis really. This article gives a good explanation to start our learning journey.
Welcome to this week’s edition of Reading Notes! In this roundup, we explore a variety of topics across cloud, programming, databases, and AI. From understanding Docker’s USER instruction to styling Blazor components with CSS, I’ve got you covered. Let’s dive in!
Suggestion of the week
Understanding the Docker USER Instruction (Jay Schmidt) - A great post to that explains really clearly the basic usage of user when building our container. After reading this post you should feel confident to follow this best practices.
It's reading notes time! It is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.
You also read something you liked? Share it!
Cloud
It's Finally Possible To Hibernate Azure VMs (Sam Cogan) - This new feature must be such a relief for all the VM users. Make sure to read this post to know the requirements of the VM tone able to hibernate it.
I used to hardcode my password in my demos and code samples. I know it's not a good practice, but it's just for demo purposes, it cannot be that dramatic, right? I know there are proper ways to manage sensitive information, but this is only temporary! And it must be complicated to remove all the passwords from a deployment... It turns out, IT IS NOT difficult at all, and that will prevent serious threats.
In this post, I will share how to remove all passwords from a docker-compose file using environment variables. It's quick to setup and easy to remember. For production deployment, it's better to use secrets, because environment variables will be visible in logs. That said, for demos and debugging and testing, it's nice to see those values. The code will be available on GitHub. This deployment was used for my talks during Azure Developers .NET Days: Auto-Generate and Host Data API Builder on Azure Static Web Apps and The most minimal API code of all... none
The Before Picture
For this deployment, I used a docker-compose file to deploy an SQL Server in a first container and Data API Builder (DAB) in a second one. When the database container starts, I run a script to create the database tables and populate them.
As we can see, the password is in clear text twice, in the configuration of the database container and in the parameter for sqlcmd when populating the database. Same thing for the DAB configuration file. Here the data-source node where the password is in clear text in the connection string.
The easiest password instance to remove was in the sqlcmd command. When defining the container, an environment variable was used... Why not use it! To refer to an environment variable in a docker-compose file, you use the syntax $$VAR_NAME. I used the name of the environment variable MSSQL_SA_PASSWORD to replace the hardcoded password.
/opt/mssql-tools/bin/sqlcmd -U sa -P $$MSSQL_SA_PASSWORD -d master -i /startrek.sql
Second Pass: .env File
That's great but the value is still hardcoded when we assign the environment variable. Here comes the environment file. They are text files that holds the values in key-value paired style. The file is not committed to the repository, and it's used to store sensitive information. The file is read by the docker-compose and the values are injected. Here is the final docker-compose file:
Note the env_file directive in the services definition. The file .env is the name of the file used. The ${SA_PWD} tells docker compose to look for SA_PWD in the .env file. Here is what the file looks like:
SA_PWD=This!s@very$trongP@ssw0rd
Conclusion
Simple and quick. There are no reasons to still have the password in clear text in the docker compose files anymore. Even for a quick demo! Of course for a production deployment there are stronger ways to manage sensitive information, but for a demo it's perfect and it's secure.
During Microsoft Build Keynote on day 2, Julia Liuson and John Lambert talked about how trade actors are not only looking for the big fishes, but also looking at simple demos and old pieces of code, looking for passwords, keys and sensitive information.
It's reading notes time! It is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.
Use Azure DevOps Pipelines as a Serverless Compute Engine (Chris Pietschmann) - Do you know or use Azure DevOps Pipeline? They can read your code from most source repository and will execute tasks for you. Like CI-CD as explains in this post.
Docker Compose Profiles, one the most useful and underrated features (Oskar Dudycz) - Woah! For now on, I shall have a profile in all my docker compose file. We'll probably not all, but I'm definitely using them. This post is the perfect place to get started and understand what are profile and how to use it.
It's reading notes time! It is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.
An introduction to primary constructors in C#12 (Andrew Lock) - Wow! This post dig into what can and cannot do the new constructors in C#. Example by example trying more complex scenarios, fascinating!
DevOps
Use Azure DevOps Pipelines as a Serverless Compute Engine (Chris Pietschmann) - Do you know or use Azure DevOps Pipeline? They can read your code from most source repository and will execute tasks for you. Like CI-CD as explains in this post.
Miscellaneous
Introducing Plans on Microsoft Learn (Kaberi Bell) - Would it be to be a data engineer, AI specialist, app builder there's a plan for you and that's a very cool new feature on learn have a look this blog post explain all of it
How Do You Measure Developer Experience? (Jennifer Riggins) - An interesting article about what and how measure performance. I didn't know so many system and details concepts were that detailed.
It's reading notes time! It is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.
Think Faster, Talk Smarter with Matt Abrahams (Modern Mentor) - Interesting episode about how to become a better communicators in both formal and informal situations. Matt is the author a book on that topic.
DevOps Adoption for IT Managers (Chris Pietschmann) - Interesting post that shares the benefits of DevOps for your enterprise and how to approach it as a manager.
Cascadia Code 2404.23 (Christopher Nguyen) - I used to do ASCII art back on my C=64... Now that all those new fonts and symbols are added should I start again? Nice to have all the options available to be able to display everything we need|the console.
It's reading notes time! It is a habit I started a long time ago, close to 600 weeks ago in fact, where I share a list of all the articles, blog posts, and books that catch my interest during the week.
Syncing a git branch between Windows and WSL filesystems (Andrew Lock) - It's true that by habit or reflex most people will think of Git as centralized... But it's not! Once you understand that so many possibilities are available. This post both summarize that and shows and example.
Low Code
Testing Your Native AOT Applications - .NET Blog (Marco Rossignoli, Jakub Jareš, Jakub Chocholowicz) - With code ahead-of-time (AOT) we still need tests but how to do it with that stripped version. of .NET? This short tutorial shows how.
How to automate tasks in Windows (David Nield) - Seeing things getting done by some automation you built is a nice feelingThis short post introduces 4 tools that will get you started with automation.
It's reading notes time! It is a habit I started a long time ago, close to 600 weeks ago in fact, where I share a list of all the articles, blog posts, and books that catch my interest during the week.
If you think you may have interesting content, share it!
Is Your Container Image Really Distroless? (Laurent Goderre) - Nice post that explains a new way to improve security and more while building our container by going distroless.
Azure PowerShell Tips and Tricks (Paul Harrison) - PowerShell is a very interesting and useful script language.All those tips are pure wisdom!
DevOps
Beautiful .NET Test Reports Using GitHub Actions (Sean Killeen) - It's true that the unit test result in Azure DevOps looks amazing. Pretty nice adaptation in GitHub Action, could/ should it be native?
It is time to share new reading notes. It is a habit I started a long time ago where I share a list of all the articles, blog posts, and books that catch my interest during the week.
If you think you may have interesting content, share it!
Blazor and .NET 8: How I Built a Fast and Flexible Website (Jeffrey T. Fritz) - optimisation is often a step that people forgets, but it's one that is extremely rewarding.This series seams very interesting, we will s| more of those in the notes...
The FAST and the Fluent: A Blazor story - .NET Blog (Vincent Baaij) - Nice post that teach us a bit of history. I'm fan of Fluent UI and Blazor...and more recently of the Fluent UI Blazor library. I think it's a must for all Blazor developers.
It is time to share new reading notes. It is a habit I started a long time ago where I share a list of all the articles, blog posts, and books that catch my interest during the week.
If you think you may have interesting content, share it!
Planning for Resiliency with Azure OpenAI (Matthew Anderson) - Like everything else in the cloud we need to think about resiliency. This nice post get us started and explains 2 different architectures for our system.
My Top 10 NEW Visual Studio Features of 2023 for .NET Developers - .NET Blog (James Montemagno) - I don't code everyday and when I do it's on all kind of device and OS so I end up more often using VS Code. But, when I can use Visual Studio it's always a treat. In this post, James shares his favorite new features part of that great IDE. Those are only the recent ones, there are so much more!
Scaling Docker Compose Up (Milas Bowman) - Interesting post that do a deep dive into docker compose file.
It is time to share new reading notes. It is a habit I started a long time ago where I share a list of all the articles, blog posts, and books that catch my interest during the week.
If you think you may have interesting content, share it!
FluentUI.Blazor v4.3 (Denis Voituron) - I recently migrate one of my website to use FlunentUI Blazor, and the experience is amazing. It looks great and required less code from me.
WebAssembly: 4 Predictions for 2024 (Matt Butcher) - Nice post that review 2023 predictions and sets 2024 ones explaining why it could happened.
Dockerfiles have versions? (DevOps and Docker Talk: Cloud Native Interviews and Tooling) - Interesting episode about a little thing that could have a big impact in our CICD and I'm sure is overlooked.
How to Focus When the World Feels on Fire (Modern Mentor) - Quick thoughts and tips to stay focus. Sometimes it's harder and other times and having a fews tricks his always a good idea.
It is time to share new reading notes. It is a habit I started a long time ago where I share a list of all the articles, blog posts, and books that catch my interest during the week.
If you think you may have interesting content, share it!
Using the CLI to Build and Run .NET Applications (Dusko Mirkovic) - This is a short tutorial that shows the basics functionalities of the command dotnet... Its very useful and it works on al platforms.
Scanning Uploaded Files for Malware in C# (Vladan Petrovic) - This post shows how to use a pretty neat tools to improve security in our C# app. And there is a free version.
It is time to share new reading notes. It is a habit I started a long time ago where I share a list of all the articles, blog posts, and books that catch my interest during the week.
If you think you may have interesting content, share it!
Suggestion of the week
Getting Started with Blazor’s New Render Modes in .NET 8 (Jon Hilton) - Amazing post that covers the four rendering mode for Blazor in .NET 8.There just enough code to understand the concept and see the trade-offs and advantages of each options.
ai generated: melting snowman who love to read
Cloud
A Decade of Have I Been Pwned (Troy Hunt) - Congrats for this anniversary and what a journey it was.I remember reading with passion your tech blog describing the tech decision taken for the site.
Making Azure the Best Place to Observe Your Apps with OpenTelemetry (Matthew McCleary) - Looking back, tracking, monitoring, tracing are such important action when we think about application life cycle.I'm very happy to see Azure offers a great sets of tools to do it.