- MindByte Weekly Pulse: Quick GitHub, Azure, & .NET Updates
- Posts
- Building Async and Cloud Native organizations - Issue #12
Building Async and Cloud Native organizations - Issue #12
What is IssueOps and how does it help in getting your features deployed? Do you already use TestContainer in your integration tests?
Welcome to my weekly newsletter! Every week, I bring you the latest news, updates, and resources from the world of coding and architecture. I'm so glad you've decided to join me, and I can't wait to share my insights and expertise with you.
I hope you'll find this newsletter to be a valuable resource, and I welcome your feedback and suggestions. If there's something you'd like to see more of, or if you have any questions or comments, please don't hesitate to reach out to me.
Thank you for joining me, and happy reading!
REST and APIs
Do you have an API with v1 GUIDs? Like using them for password reset or password less access? Then they might not be that unpredictable as you think:
Authentication is a broad concept and has many implementations. Eric Burel takes you along the different options:
Coding technicalities
The below guidance by David Fowler keeps being a great resource on how to use async constructions in .NET. Like when to dispose CancellationTokenSource or how to correctly cancel a timedout task. Or do you return Tasks or do you async/await then?
One of the oldest kind of browser authentications; basic authentication. In which a username and password are encoded and passed along in the header. Although there are better alternatives out there, it is interesting to see how you could implement this kind of authentication.
When you test your code with a unit test, you try to test the smallest piece of code and mock/fake/stub any dependencies. When you want to test a larger part using an integration test, you might need access to a real database, queue, search engine etc. But how do you spin up this dependency as part of your tests?
One way is to connect to a real instance, or start one before you commence testing, but that is a tricky timing issue and needs clever cleanup.
What if you could use a container and even manage that container as part of your unit tests? Testcontainers is a library that helps with unit testing by creating and managing a throw away container running your dependency like a database.
Building a function that returns a collection of something, then what kind of collection type should you use? I wondered that myself so often and nowadays mainly use IEnumerable or the IReadOnlyList, but why are those the most appropriate ones?
GitHub related
In most traditional deployment models, code is first created and reviewed on a feature branch. A pull request is created and eventually merged into main. From the main branch, the deployment to production will occur.
Another approach is the branch deploy model or also known as the GitHub flow. Although main is still the always stable branch, it is merged to main when the feature is actually deployed from the feature branch itself.
This model is used by GitHub self and by using ChatOps, they instruct a system called HuBot to roll out feature branches to environments. If you want to do something similar but do not have HuBot running, then there is another way; GitHub Actions and comments. We can trigger on specific comments added to a pull request and then invoke certain operations. This is called IssueOps, as issues are used to instruct a system to do operations.
Like requesting a lock so you are the one able to deploy for a certain time, asking the feature branch to be rolled out to a certain environment, or even to rollback a stable version (your main branch). This is all possible by using the new GitHub action called branch deploy (https://github.com/github/branch-deploy).
It will parse the commands you add to the comments, handle the different actions and update the status as a comment in your PR. Your main branch stays safe and stable, so no need to revert a PR to get things back in order.
Read more about this kind of IssueOps at the GitHub blog. What do you think, will this be suitable for your workflow?
Small UI improvement; you now have the ability to add up to four social accounts. It even detects the type, which is useful as it also helps you verify Mastodon links.
As you can see, the GitHub link is now a verified link as my GH profile has a link back.
The Project boards in GitHub keep on improving. We now have the public preview of Roadmaps!
An interesting way to visualise your work on a timeline. You do need a date field on the issue, but when set, you can see a month, quarter or year view of the items and drag them to your liking.
Computing in general
An important take away from the below article; A back-to-back calendar is not a proxy for how important you are. Having an empty agenda makes you a more productive leader:
Tech Debt, Bit Rot or Software entropy; we all seen it and know that it can be killing your productivity. We also know we need to handle it somehow before we lose to much room and it becomes unworkable. So what if you invested 10%, like a Friday every other week, to clean up the tech debt?
Helpers and utilities
The FastTrack checklist are a great way to start a review of a system. This repository contains a number of them with tooling to collect data and generate reports.
Computer laws
The time spent on any agenda item will be in inverse proportion to the sum of money involved
This law is also known as bike-shedding. People spent easily more time on the bike sheds for a nuclear reactor plant, than on the design of the reactor itself. The first one is easier to fit in your head, while the latter is a hard problem that requires more time. So people tend to spend more time on small decisions than they should, and less time on big decisions than they should.
I hope you've enjoyed this week's issue of my newsletter. If you found it useful, I invite you to share it with your friends and colleagues. And if you're not already a subscriber, be sure to sign up to receive future issues.
Next week, I'll be back with more articles, tutorials, and resources to help you stay up-to-date on the latest developments in coding and architecture. In the meantime, keep learning and growing, and happy coding!
Best regards, Michiel
Reply