Good Monday, it's time to share new reading notes. Here is a list of all the articles, blog posts, and podcast episodes that catch my interest during the week.
If you think you may have interesting content, share it!
Keep your experiments separate (Jessica Joy Kerr) - This post shares good practices when adding features to our app... Because we never know the full impact when we start.
Static code analysis with NDepend (Andreas Nesheim) - I'm always curious about those tools. I think they could also be useful when connected to your CICD and automation processes.
When WebAssembly Replaces Docker (B. Cameron Gain) - Interesting post that explains why WASM is indeed more interesting than docker in some scenarios.
Good Monday, Already time to share new reading notes. Here is a list of all the articles, blog posts, and podcast episodes that catch my interest during the week.
If you think you may have interesting content, share it!
The Suggestion of the week
Incremental ASP.NET to ASP.NET Core Migration (Taylor Southwick) - Migrating an application is not an easy task. This post shares the new GitHub repos that the .NET team puts in place with guidance, pattern, and toolings to help us. Really interesting, bookmark that one for future references.
Good Monday, Already time to share new reading notes. Here is a list of all the articles, blog posts, and podcast episodes that catch my interest during the week.
If you think you may have interesting content, share it!
Cloud
Azure Container Apps is GA (Sam Cogan) - Wow, already GA! Learn more about all the feature-packed of this service in this short post.
Not feeling valued at work? (Modern Mentor) - A nice episode that will certainly inspire a few of us to reach out and talk.
S2E3: Responding Instead of Reacting (The Greg McKeown Podcast) - What an interesting topic! I love it great episode with a nice story but more importantly great topic.
307: All in on .NET MAUI (Merge Conflict) - .Net MAUI is there... Let's learn more about it! The perfect episode just for that.
Yes I know one day later, but it's still time to share my reading notes.
Those are a curated list of all the articles, blog posts, podcast episodes, and books that catch my interest during the week and that I found interesting. It's a mix of the actuality and what I consumed.
If you think you may have interesting content, share it!
Cloud
50 shades of .NET on AWS (François Bouteruche) - A nice, like-real, story that helps understand how decisions are taken when planning in cloud architecture (here AWS).
Development Container CLI (Brigit Murtaugh) - Oh! This is fantastique, I need to try that, I'm assuming we will be able to give a name to the instance and that it will make reopening a container easier.
The Azure Cosmos DB Journey to .NET 6 - .NET Blog (Vinod Sridharan) - Learn how Azure Cosmo DB API gateway is low latency and use .Net in many different scenarios to achieve great performance, in this post.
Good Monday, Already time to share new reading notes. Here is a list of all the articles, blog posts, and podcast episodes that catch my interest during the week.
If you think you may have interesting content, share it!
I love Dev Containers, I use them a lot for most of my development. One of my favorite options is to clone a repository directly in a docker volume.
It takes a few seconds and you can work on your code without installing any SDKs or language that your current machine doesn't have. Marvelous!
Ideally, at the end of your session, you push your code to another repository (ex: GitHub). However, sometimes I forget or am interrupted I start working on something else, and my changes are not pushed.
How do you re-open that environment?! In this post, I want to share two ways that I use.
Open Recent
The first method is to use the history of the editor! For example, here in Visual Studio Code, select the File menu and Open Recent.
If you didn't open too many files since you used that dev container, it should be present as displayed in the image. It should look like: <Name of the repository> in a unique [Dev Container].
Make sure docker is already running and select it. Voila, in a snap you are back into the dev environment with your last changes waiting for you.
Open the Container
There are a few different options to do the next solution, I will share the one I consider the easiest for the people who are not Docker experts.
First, if not already present to your VSCode, add the Docker extension identifier:
ms-azuretools.vscode-docker. Then from this new extension in the top section named containers search for your container. It should start with "vsc", for Visual Studio Code, then hyphen the name of the repository you cloned. Right-click on it and select start. After a few seconds, the container should have a little green triangle on its side and be ready to continue.
The next step consists of attaching the container to VSCode. Once more, from the Docker extension, right-click on the container and select Attach Visual Studio Code.
This will open a new VSCode window, we are mostly done but there is one last step to do. You will notice that the file explorer is empty. No worries we will fix everything with this last step. The terminal should be open in the home folder of the root user. Let's open our project folder by executing the command:
cd /workspaces/<repository-name>
Then the final command is to re-open VSCode in this folder and let the Dev Container do his magic. Execute the command:
code . -r
(the -r is to re-use the same VSCode windows. It's optional, if not provided it will open a new VSCode instance.)
And voila! The Dev Container is just as it was before.
If you know other ways to achieve this, leave a comment or reach out, I'm always happy to learn more.
Asynchronous Programming in C# (Sukhrob) - A good post that takes the time to explain the why.Why we should complexify our code to make it asynchronous.
ASP.NET Core CRUD with NoSQL: Part 3 (Matthew Groves) - We continue to learn, this time, a bit more about the sql+ and the create of the crud API.
Visual Studio on an ultra-wide monitor - Visual Studio Blog (Mads Kristensen) - It's not a "problem" I particularly have because I used 2 regular monitors, but I heard about it. It's really nice to see that so many possibilities are available to us.
Podcasts
Docker Desktop for Linux is Here! (DevOps and Docker Talk) - Great episode so much energy! Discussion about the brand new Docker Desktop for Linux, who to report bugs, ask for a new feature, and the DockerCon!
Épisode 15 - Gengis Khan (Les Pires Moments de l'Histoire) - I keep those episodes very preciously as a threat, and this one was such a good one! It's in French and the topic is the biggest empire that ever existed... No, it's the Romain.
Comparing Infrastructure-as-Code with Chris Klug (.NET Rocks!) - Terraform, Pulumi, ARM, and Bicep... All those are mentioned because it's all about Infrastructure-as-Code. Interesting talk about the different options we have.
Miscellaneous
Understanding the Role of a Developer Evangelist (Karl Hughes) - As a cloud advocate, I don't remember how often I explained what is my role. This 360-degree post covers all angles and provides a really good answer.
Good Monday, Already time to share new reading notes. Here is a list of all the articles, blog posts, and podcast episodes that catch my interest during the week.
If you think you may have interesting content, share it!
Build configuration for Azure Static Web Apps (craigshoemaker, anthonychu, Reshmi-Sriram, changeworld) - Continuous deployment is so powerful it is very useful to understand the options and how you can set your things together.
Good Monday, Already time to share new reading notes. Here is a list of all the articles, blog posts, and podcast episodes that catch my interest during the week.
If you think you may have interesting content, share it!
ASP.NET Core CRUD with NoSQL: Part 2 (Matthew Groves) - In this second post of the series, we learn how to set an index and how to prepare our select to read our data.
An Introduction to JSON (Jack Wallen) - I thought it was a bit older than that. Nice post th o learn more about something we all use.
It's Monday, time to share my reading notes. Those are a curated list of all the articles, blog posts, podcast episodes, and books that catch my interest during the week and that I found interesting. It's a mix of the actuality and what I consumed.
If you think you may have interesting content, share it!
Configure Azure Cosmos DB Continuous Backups (Rajendra Gupta) - Backup can be so powerful! You could return in time just before an error to understand what happens... Or so many other scenarios.
How To Run PowerShell Scripts (Brien Posey) - A script can be frightening at first, but this nice post will help you to understand them better. Perfect for less technical people.
Introducing Qodana for Azure Pipelines (Anastasia Khramushina) - Qodana is can analyze your code in CICD on many platforms, and now also in the Azure DevOps.
I recently wanted to create animated GIFs from videos. The idea was to get video previews, in a very lightweight file. After a quick search online, I found FFMPEG, a fantastic multimedia framework to manipulate media. There is also a few wrappers that exists in different languages (ex: C#, JavaScript) but you still need to install FFMPEG locally, and I didn't want that. In fact, I wanted a simple solution that doesn't require any installation locally and something in the cloud. In this post, I want to share how I achieved the first one.
All the code and the container are available on Github and Docker Hub.
First Contact
The ffmpeg framework is very powerful and can do so many things; therefore it's normal that it has a ton of possible parameters and extensions. After time spent on the documentation and a few trials and errors, I found how to do exactly what I needed calling it this way:
This will create a five second animated GIF from a video. It speeds up the video and lowers the framerate of the GIF to keep the output lightweight. Here is an example.
This is great, but this is not very friendly. How can someone who only creates a video once in a while be expected to remember all those parameters?! And even harder, when the video is vertical some parameters have different values. It was time to simplify, and here is how I did it. Note that I'm a Docker beginner and if you think there is a simpler or better way to do some steps, let me know, and let's learn together.
The Plan
The plan is simple: execute a simple Docker command like docker run fboucher/aciffmpeg -i NotInTheSky.mp4 and generate a video preview. To build our ephemeral container we will start with something lightweight like alpine, install ffmpeg and add a script that would be executed as the container runs. That sounds like an excellent plan, let's do it!
Writing the Script
The script is simple, but I learned a few things writing it. This is why it's included in this post. The goal was simple: execute the ffmpeg command using some values from the parameters: file path, and if the video is vertical. Here is the script:
#!/bin/sh
while getopts ":i:v" opt; do
case $opt in
i) inputFile="$OPTARG"
;;
v) isVertical=true
;;
\?) echo "Invalid option -$OPTARG" >&2
exit 1
;;
esac
case $OPTARG in
-*) echo "Option $opt needs a valid argument"
exit 1
;;
esac
done
if [ -z "$isVertical" ]; then isVertical=false; fi
# used for bash
#IFS='.'
#read -a filePart <<< "$inputFile"
#outputFile="${filePart[0]}.gif"
# used for dash
filename=$(echo "$inputFile" | cut -d "." -f 1)
outputFile="$filename.gif"
if $isVertical
then
ffmpeg -r 60 -i $inputFile -loop 0 -vf scale=-1:320 -c:v gif -f gif -ss 00:00:00.500 -r 10 -t 5 - > $outputFile
else
ffmpeg -r 60 -i $inputFile -loop 0 -vf scale=320:-1 -c:v gif -f gif -ss 00:00:00.500 -r 10 -t 5 - > $outputFile
fi
Things I learned: Parameter without values
The script needs to be as friendly as possible, therefore any unnecessary information should be removed. Most videos will be horizontal, so let's make the parameter optional. However, I don't want users to have to specify the value script.sh -i myvideo.mp4 -v true but instead script.sh -i myvideo.mp4 -v. This is very simple to do, once you know it. On the first line of code when I get the parameters: getopts ":i:v" notes that there is no ":" after the "v". This is to specify that we are not expecting any values.
Things I Learned: Bash and Dash
As mentioned earlier the container will be built from Alpine. And Alpine doesn't have bash but instead uses dash as a shell. It's mostly the same, but there are some differences. The first one will be the shebang (aka "#!/bin/sh" on the first line). And the second was the string manipulation. To generate a new file with the same name but a different extension of the script, split the file name at the ".". This can be done IFS ... read... <<< command (commented in the script) on bash but this will give syntax error: unexpected redirection and this is because there is no <<< in bash. Instead, you need to use the command cut -d "." -f 1 (where -d specifies the CHAR to use as the delimiter, and -f return only this field).
Building the image
It's now time to connect all the dots in the dockerfile.
FROM alpine:3.13
LABEL Name=aciffmpeg Version=0.0.2
RUN apk add ffmpeg
COPY ./src/myscript.sh /
RUN chmod +x /myscript.sh
ENTRYPOINT ["/myscript.sh"]
The file is not extremely complex but let’s pass through it line by line.
We start FROM Alpine version 3.13 and apply a LABEL.
RUN Will execute the command to install ffmpeg. The apk is the default utility on Alpine to install apps just like apt on Ubuntu.
COPY Is copying the script from our local machine into the container at the root.
The second RUN command is to make sure the script is executable.
Finally, ENTRYPOINT will allow us to configure the container to run as an executable in this case as the script. All parameters passed to Docker will be passed to the script.
The only things left now are to build, tag, and push it on Docker Hub.
And now to create a preview of any video you just need to map a volume and specify the file path and optionally mention if the video is vertical.
On Linux/ WSL the command would look like this:
docker run -v /mnt/c/dev/test:/video fboucher/aciffmpeg -i /video/sample.mp4 -v
And on PowerShell like that:
docker run -v c/dev/test:/video fboucher/aciffmpeg -i /video/sample.mp4 -v
I learned a lot about Docker doing that project and now I have a very useful tool. What are the tools you built using containers that simplify your life or work?
Good Monday,
Already time to share new reading notes. Here is a list of all the articles, blog posts, and podcast episodes that catch my interest during the week.
If you think you may have interesting content, share it!
Cloud
Azure Functions V4 Versus V3 (Mengyang Chen) - Important and interesting short post for all Azure Functions users.
How to Access Query Strings in Minimal APIs (Shawn Wildermuth) - Those posts are the best! When we can not only learn the solution but also from the tests along the way. Great post.
Working on two git branches at once with git worktree (Andrew Lock) - Wow, there are so many things possible with Git. Personally, I think I would just work in containers... But it's nice that other options are possible for other scenarios.
Podcasts
Running a developer community (Software Engineering Unlocked) - Wow! Very impressed by all that structure and great community. So inspiring.
It's been five hundred weeks, this is more than nine years! Who knew I will keep doing that for so long...
If you are new around here, welcome, The Reading Notes are a curated list of all the articles, blog posts, podcast episodes, and books that catch my interest during the week and that I found interesting. It's a mix of the actuality and what I consumed.
If you think you may have interesting content, share it!
Cloud
Bicep Access policies and Managed Identity (Gregor Suttie) - This is a nice post that connects docs pages and different blog posts and information so we have the big picture.
Cloud-Native Application Security (Samir Behara) - This post is listing so many best practices, patterns, and anti-patterns, it is a must for any "cloud-native people".
Greg on The Genius of Routine (What's Essential) - Habits are very powerful tools in our toolbox for so many things... It's worth learning more about it.
time to share my reading notes. Those are a curated list of all the articles, blog posts, podcast episodes, and books that catch my interest during the week and that I found interesting. It's a mix of the actuality and what I consumed.
You think you may have interesting content, share it!
Cloud
Automate your work day with workflows in Teams (Harysh Menon) - I’m a big fan (and user) of automation with Power Automate or Logic Apps there is so much we can do! This short post will give you a few ideas for sure.
Why you should ship your silly side projects (Salma Alam-Naylor) - Refreshing post…And go see that website if Geocities means something to you. Totally agree with the shipping project; it is an excellent source of joy and you always learn new stuff.
Miscellaneous
New data: What makes developers happy at work (David Gibson) - Interesting post. So many details…are developers are that different compared to other workers? I feel most people want the same…
Monday means it's reading notes times. Those are a curated list of all the articles, blog posts, podcast episodes, and books that catch my interest during the week and that I found interesting. It's a mix of the actuality and what I consumed.
You think you may have interesting content, share it!
Azure Apps Autopilot (Justin Yoo) - A great DevOps post that great an automatic deployment process. Very inspiring, I think I may is some of it for my AzUrlShortener.
Windows Package Manager 1.2 (Demitrius Nelon) - I just try it and it works so well. This is good news and there are already so many packages available.
Entrepreneurship as a developer - (Software Engineering Unlocked) - WHat does it means to think at scale. I am not quite sure I would enjoy doing it his way, but it's definitely working.
Negative Space Scheduling (Oren Eini) - Very cool real-life scenario. So true! If you ever have worked on a scheduler, you know.
vscode.dev Visual Studio Code for the Web (Chris Dias) - There was already some kind of flavor of vscode with the dev.github.com, but there is something amazing about the standalone version. Brilliant!
Miscellaneous
5 Tips on Managing a Remote-first Development Team (Marcelo Wiermann) - As all of us have been working remotely for a while, it's a good moment to remember how communication is important and understand that in a more normal situation being remote can be good.
Already time to share new reading notes. Here is a list of all the articles, blog posts, and podcast episodes that catch my interest during the week.
You think you may have interesting content, share it!
Cloud
How to Upload a File to Azure Blob Storage (Claudio Bernasconi) - A nice tutorial that builds using .NET a little application to interact with Azure blob storage. And there is also a video.
Serverless Kubernetes with Azure Container Apps (Michael Ridland) - Now I understand not only how to create a container App but where does it fit in all the container services available in Azure. Very nice post.
Programming
.NET GitHub Actions: Intro to GitHub Actions for .NET (David Pine) - This is a great post to get started with GitHub action. Thus one is about .Net o but of course, many other languages are supported. Right now the only thing I want is to add more workflow and improve the existing ones...
Differences Between != And Is Not Operators in C# (Code Maze) - My first thought when I saw the title was well they are the same... And then I remember the differences. Great post the really take the time the explain the similarities and the differences.
A Practical Guide to Dapper (Camilo Reyes) - A nice tour of the functionalities of the tool. It's clear how it can be useful in a Data Access Layer pattern. Not to be confused with Dapr.
time to share my reading notes. Those are a curated list of all the articles, blog posts, podcast episodes, and books that catch my interest during the week and that I found interesting. It's a mix of the actuality and what I consumed.
You think you may have interesting content, share it!
A Full-Stack Web App Using Blazor WebAssembly and GraphQL: Part 2 (Ankit Sharma) - This second post is in a series where there build a real-life type of application. Really interesting to see all pieces go together (have you ever noticed are package names are funny?). Nice work.
Upgrading an ASP.NET Core Web API Project to .NET 6 (Christian Nagel) - This post is not about changing the version of the package, but how to use all those features to make you more productive with fewer lines of code.
Podcasts
Modern Code Generation with Jordan Adler (Hanselminutes with Scott Hanselman) - Very interesting discussion about code generation, the different pattern, difficulties, and so much more.
Make money with open source software (Software Engineering Unlocked) - Open source software is another world: Unknow, different, scary. This week guest shares his experience and story, while transitioning into Open-Source.
Happiness with Arthur Brooks (A Bit of Optimism) - It's important to love what we do, as in has an huge impact on our level of happiness.
Already 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, podcast episodes, and books that catch my interest during the week.
Suggestion of the week
Include diagrams in your Markdown files with Mermaid (Martin Woodward, Adam Biagianti) - This is very interesting. For a simple little diagram, we can now do that in text in the same document... Looking forward to trying it. Mermaid is also supported in Azure DevOps
Cloud
Azure CLI: Delete All Resources Within Resource Group (Chris Pietschmann) - Nice tips to delete all resources in a resources group. However I prefer deploying an empty resource group with override, work each time, and the command seems simpler.
Isolated Azure Function in .Net 6 (Paul Michaels) - A nice short post that highlights the differences between these two types/versions of functions
Start Creating Azure Bicep Modules for Code Reuse (Chris Pietschmann) - That looks amazing, and simple to do. I have a few complex ARM templates, I should try to break them down in bicep to make them easier to read and maintain.
Programming
Observer Design Pattern in C# (Code Maze) - A really clear tutorial. I've been waiting for this kind of refresh to implement this pattern in a text-based game I was building... Maybe now is the time.
Disguising Podman as Docker Desktop on Windows (Mark Richards) - Nice! A Docker alternative that could potentially interest many, but for myself, I will stick to Docker. I'm an occasional citizen, and I feel there will be more docs with the current favorite.
Happy 20th Anniversary, .NET! (Beth Massi) - Very happy to see .NET reaching 20 so strong. Nice post, nice video packed with interesting anecdotes and nice moments.
Introducing FakeAuth for .NET Core (Caleb Jenkins) - That looks very interesting! For PoC, demo, or temporary solution it's brilliant. Code and sample in GitHub.
This autobiography is funny, light, interesting, and even weird at some moments. But you know what? I liked it. I totally kept some quotes, as I found them good. I partially read it and listen to it. The audio version is done by Matthew and it's nice to hear him telling us his story.
Good Monday,
Already 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, podcast episodes, and books that catch my interest during the week.
Just for the of it, I did a little funny video to answer the question: Where really is cloud computing?
Comparison of Dependency Injection in .NET (Nickolas Fisher) - A very complete tutorial, with all the required code even the GitHub reference. The perfect example to get started.
291: GitHub Actions All The Things (Merge Conflict) - Sometimes building a CI-CD feels too cumbersome, but it's probably worth it. In this episode Frank and James share and they found their balance.
Greg on The Power Of The Graceful No (What's Essential) - It's so hard some time to say this simple word... But it is an important, nice episode.
Shaun Walker on Blazor and Oqtane - Episode 179 (Azure DevOps Podcast) - Nice discussion with the creator of DotNetNuke and more recently Oqtane, about .Net and Blazor for today's solution.
Game Console 2.0: A Photographic History with Evan Amos (Hanselminutes with Scott Hanselman) - Really interesting interview about... yes, photography. Scott is chatting with the photographer of those amazing images of the game consoles.
Already 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, podcast episodes, and books that catch my interest during the week.
You think you may have interesting content, share it!
CRUD operations on PostgreSQL using C# and Npgsql (Davide Bellone) - This post is a very good tutorial about how to make a simple query with all the code and explanation required for a great start.
How to get the optimal image size for web (Joel Hans) - So many options are possible. This post explains the impacts of different contexts and provides guidance on how we could improve, or what we should look at.
Podcasts
Ximena Vengoechea On How To Hear What Really Matters (What's Essential) - Very interesting conversation. Ximena is the author of the book Listen Like You Mean It. Well... It's just get added to my to-read list.
Languishing? Here’s How to Turn it Around (Modern Mentor) - There is a name for feeling "meh"! And there are also things we can do to feel better. Very captivating, and now I want to learn more about it.
My True Crime Episode with David Mittelman (A Bit of Optimism) - When I saw the title of the episode I was a bit confused... True Crime? WHat's the connection? But it was fascinating, so much passion!
Windows Terminal Preview 1.13 Release - Windows Command Line (Kayla Cinnamon) - Amazing post, yes we learn about the new features, but we also read about the learning and experimentation of this team and collaborators involvement. Great work.