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 |
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
🕹️ Retro Consoles Worth Collecting While You Still Can — Is Last Year's Flagship Phone Worth Your Money?
Saturday, November 23, 2024
Also: Best Outdoor Smart Plugs, and More! How-To Geek Logo November 23, 2024 Did You Know After the "flair" that servers wore—buttons and other adornments—was made the butt of a joke in the
JSK Daily for Nov 23, 2024
Saturday, November 23, 2024
JSK Daily for Nov 23, 2024 View this email in your browser A community curated daily e-mail of JavaScript news React E-Commerce App for Digital Products: Part 4 (Creating the Home Page) This component
Not Ready For The Camera 📸
Saturday, November 23, 2024
What (and who) video-based social media leaves out. Here's a version for your browser. Hunting for the end of the long tail • November 23, 2024 Not Ready For The Camera Why hasn't video
Daily Coding Problem: Problem #1617 [Easy]
Saturday, November 23, 2024
Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Microsoft. You are given an string representing the initial conditions of some dominoes.
Ranked | The Tallest and Shortest Countries, by Average Height 📏
Saturday, November 23, 2024
These two maps compare the world's tallest countries, and the world's shortest countries, by average height. View Online | Subscribe | Download Our App TIME IS RUNNING OUT There's just 3
⚙️ Your own Personal AI Agent, for Everything
Saturday, November 23, 2024
November 23, 2024 | Read Online Subscribe | Advertise Good Morning. Welcome to this special edition of The Deep View, brought to you in collaboration with Convergence. Imagine if you had a digital
Educational Byte: Are Privacy Coins Like Monero and Zcash Legal?
Saturday, November 23, 2024
Top Tech Content sent at Noon! How the world collects web data Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today, November 23, 2024? The HackerNoon
🐍 New Python tutorials on Real Python
Saturday, November 23, 2024
Hey there, There's always something going on over at Real Python as far as Python tutorials go. Here's what you may have missed this past week: Black Friday Giveaway @ Real Python This Black
Re: Hackers may have stolen everyone's SSN!
Saturday, November 23, 2024
I wanted to make sure you saw Incogni's Black Friday deal, which is exclusively available for iPhone Life readers. Use coupon code IPHONELIFE to save 58%. Here's why we recommend Incogni for
North Korean Hackers Steal $10M with AI-Driven Scams and Malware on LinkedIn
Saturday, November 23, 2024
THN Daily Updates Newsletter cover Generative AI For Dummies ($18.00 Value) FREE for a Limited Time Generate a personal assistant with generative AI Download Now Sponsored LATEST NEWS Nov 23, 2024