Architecture Weekly #120 - 27th March 2023
Welcome to the new week! Let’s say that we’d like to enforce the uniqueness of the user email. Theoretically, you could query a read model keeping all users’ data and check if the user with the selected email already exists. Easy peasy? It sounds like it, but it’s not. Such an approach will give you a false guarantee. In the meantime, between you got the result, ran your business logic and stored new user information, someone could have added a user with the same email. Querying is never reliable; we should tell, not ask. So, in this case, claim the user email end either succeed or fail. Unique constraint validation is one of those things that looks simple but is not always easy. From my experience, a unique constraint requirement usually indicates that our business people bring us a solution instead of a problem. We should ensure that what we’re trying to provide here is a real requirement and ask enough whys before we commit to it. Still, sometimes we need to select the hill we’d like today for or just need to do our stuff. I struggled to create code for the starting phase showing the common architecture/implementation flaws. I was even considering paying some junior to write such. I needed a code to be the starting point for my new workshop, Event Sourcing in production. Now I found a solution and started to use ChatGPT. The code it generates seems to be a perfect match for such needs! Jokes aside. The tool is impressive, and I strongly believe it's a must-have nowadays as it speeds up boilerplate work enormously. I remember the days before there was StackOverflow, and we somehow could write code; we also weren't fired (as was predicted 10 years ago) because of it. Did our work change? Sure? Is it better or worse? It's different. And that's great; we just need to adapt and find a good way of using this tool. I'm considering it a chance to focus on what's important. Working with ChatGPT reminded me to pair coding with a skilled coder but a bad programmer. You will get decent results if you drive it well, but it won't set architecture for you. It's a tool that reminds me Memento plot. A guy that has old memories remember what happened a minute ago but forgets what we talked 10m ago and is not able because of that to be too creative. See the current result in the repo: https://github.com/oskardudycz/event-sourcing-on-prod-workshop/. If you’d like to learn more about why this code, even if it’s looking pretty well, has serious flaws to consider using on prod, contact me, and let’s organise the training for you and your colleagues. See details on my workshops page. See also more about the application code generation based on ChatGPT and related tools in: See also a great write-up to see how it works to understand its limitations: TLDR, no need to be afraid that we’ll be replaced; we’ll still need to move tickets in our backlogs, talk to humans and work with them. But the chance is that we’ll have more time for what’s more important and do it better, e.g.: We’ll still have dramas, like the latest Docker drama. Maybe they used ChatGPT to make decisions and write the email for them? Or maybe they did not but should have been?
I’m almost sure that no ChatGPT was involved in making such impressive migrations But no worries, no ChatGT was and will be involved in writing Architecture Weekly or my blog! Check also other links! Cheers p.s. I invite you to join the paid version of Architecture Weekly. It already contains the exclusive Discord channel for subscribers (and my GitHub sponsors), monthly webinars, etc. It is a vibrant space for knowledge sharing. Don’t wait to be a part of it! p.s.2. Ukraine is still under brutal Russian invasion. A lot of Ukrainian people are hurt, without shelter and need help. You can help in various ways, for instance, directly helping refugees, spreading awareness, and putting pressure on your local government or companies. You can also support Ukraine by donating, e.g. to the Ukraine humanitarian organisation, Ambulances for Ukraine or Red Cross. Architecture
DevOps
FrontendAI
.NETNode.js
WebAssemblyCoding LifeManagementTrivia |
Key phrases
Older messages
Architecture Weekly #119 - 20th March 2023
Monday, March 20, 2023
Architecture Weekly - links and resources to boost your knowledge and developer skills!
Architecture Weekly #118 - 13th March 2023
Monday, March 13, 2023
Architecture Weekly - links and resources to boost your knowledge and developer skills!
Architecture Weekly #117 - 6th March 2023
Monday, March 6, 2023
Architecture Weekly - links and resources to boost your knowledge and developer skills!
Architecture Weekly #116 - 27th February 2023
Monday, February 27, 2023
Architecture Weekly - links and resources to boost your knowledge and developer skills!
Architecture Weekly #115 - 20th February 2023
Monday, February 20, 2023
Architecture Weekly - links and resources to boost your knowledge and developer skills!
You Might Also Like
SRE Weekly Issue #422
Monday, April 29, 2024
View on sreweekly.com A message from our sponsor, FireHydrant: FireHydrant is now AI-powered for faster, smarter incidents! Power up your incidents with auto-generated real-time summaries,
Quick question
Sunday, April 28, 2024
I want to learn how I can better serve you
Kotlin Weekly #404 (NOT FOUND)
Sunday, April 28, 2024
ISSUE #404 28st of April 2024 Announcements Kotlin Multiplatform State of the Art Survey 2024 Help to shape and understand the Kotlin Multiplatform Ecosystem! It takes 4 minutes to fill this survey.
📲 Why Is It Called Bluetooth? — Check Out This AI Text to Song Generator
Sunday, April 28, 2024
Also: What to Know About Emulating Games on iPhone, and More! How-To Geek Logo April 28, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to your
Daily Coding Problem: Problem #1425 [Easy]
Sunday, April 28, 2024
Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Microsoft. Suppose an arithmetic expression is given as a binary tree. Each leaf is an
PD#571 Software Design Principles I Learned the Hard Way
Sunday, April 28, 2024
If there's two sources of truth, one is probably wrong. And yes, please repeat yourself.
When Procrastination is Productive & Ghost integrating with ActivityPub
Sunday, April 28, 2024
Automattic, Texts, and Beeper join forces to build world's best inbox, Reflect launches its iOS app, how to start small rituals, and a lot more in this week's issue of Creativerly. Creativerly
C#503 Building pipelines with System.Threading.Channels
Sunday, April 28, 2024
Concurrent programming challenges can be effectively addressed using channels
RD#453 Get your codebase ready for React 19
Sunday, April 28, 2024
Is your app ready for what's coming up in React 19's release
☁️ Azure Weekly #464 - 28th April 2024
Sunday, April 28, 2024
Azure Weekly Newsletter Issue #464 powered by endjin Welcome to issue 464 of the Azure Weekly Newsletter. In AI we have a good mix of high-level and deep-dive technical articles. Next-Gen Customer