Samuel Bourdon (@sambrdn) header
Samuel Bourdon (@sambrdn) profile picture

System Architect / Salesforce B2C commerce / AI enthusiast / Sailor / Boardgame player. tweets about AI, code, accessibility, games and tech

Valenciennes - Lille
Joined January 2013
Photo by Samuel Bourdon (@sambrdn)Photo by Samuel Bourdon (@sambrdn)Photo by Samuel Bourdon (@sambrdn)Photo by Samuel Bourdon (@sambrdn)Photo by Samuel Bourdon (@sambrdn)Photo by Samuel Bourdon (@sambrdn)Photo by Samuel Bourdon (@sambrdn)Photo by Samuel Bourdon (@sambrdn)Photo by Samuel Bourdon (@sambrdn)Photo by Samuel Bourdon (@sambrdn)
Samuel Bourdon retweeted
Gemini can turn any book into an interactive mindmaps You can do it for books of hundreds of pages thanks to the massive context window and with a single prompt. Perfect for those who memorize better visually (demo and prompt below):
78
359
38
2,724
593,388
Samuel Bourdon retweeted
After years of building event-driven systems. Here are the top 4 mistakes I have seen: 1. Duplication Events often get re-delivered due to retries or system failures. Without proper handling, duplicate events can: • Charge a customer twice for the same transaction. • Cause duplicate inventory updates, messing up stock levels. • Create inconsistent or broken system states. Solution: • Assign unique IDs to every event so consumers can track and ignore duplicates. • Design event processing to be idempotent, ensuring repeated actions don't cause harm. 2. Not Guaranteeing Order Events can arrive out of order when distributed across partitions or queues. This can lead to: • Processing a refund before the payment. • Breaking logic that relies on correct sequence. Solution: • Use brokers that support ordering guarantees (e.g., Kafka). • Add sequence numbers or timestamps to events so consumers can detect and reorder them if needed. 3. The Dual Write Problem When writing to a database and publishing an event, one might succeed while the other fails. This can: • Lose events, leaving downstream systems uninformed. • Cause mismatched states between the database and event consumers. Solution: • Use the Transactional Outbox Pattern: Store events in the database as part of the same transaction, then publish them separately. • Adopt Change Data Capture (CDC) tools to track and publish database changes as events automatically. 4. Non-Backward-Compatible Changes Changing event schemas without considering existing consumers can break systems. For example: • Removing a field might cause missing data for consumers. • Renaming or changing field types can trigger runtime errors. Solution: 2. Not Guaranteeing Order • Maintain versioned schemas to allow smooth migration for consumers. • Use formats like Avro or Protobuf that support schema evolution. • Add adapters to translate new schema versions into older ones for compatibility. Every schema change is a test of your system's resilience—don't fail it. What other mistakes have you seen out there?
13
110
3
594
40,327
Samuel Bourdon retweeted
I don't think people are ready for the complete revolution of the advertising and model industry that is about to come. This is a model trained on Birkenstock shoes with @everartai and FLUX, using ONLY pictures of the object. The results are instagram ready.
55
127
27
1,465
269,138
Samuel Bourdon retweeted
People seem to be really confused about the "right way" to fetch data in React, specifically "fetch on render" vs "render as you fetch". I tried my best to diagram the difference
58
119
12
2,149
245,723
Screenity est un enregistreur d'écran open-source écrit en JS. Il permet aussi d'annoter les captures, zoomer, matérialiser le curseur de la souris, exporter en mp4, ... ⬇️ github.com/alyssaxuu/screeni…
7
30
179
13,146
Samuel Bourdon retweeted
I discovered a nice, easy-to-use feature on n8n that allows you to retry your failed workflows from the last point in case of an error. With this it is a matter of retrying the last execution with either the last workflow or a new modified version
3
2
672
Samuel Bourdon retweeted
Life comes with a great game pre-installed. It’s called Walking. All you have to do to start is go for a walk outside. Then it’s somewhat random, but every few thousand steps or so you will find yourself reliably rewarded with a great idea. It’s free to play, forever. @0FJAKE
10
62
7
578
55,484
Samuel Bourdon retweeted
I couldn't understand "Low coupling, high cohesion" until I saw this picture. Let's explain these two in simple terms. High Cohesion The idea is to make components or modules within a system responsible for a single/related task or data. Think of a well-organized toolbox where each drawer is dedicated to a specific type of tool - one drawer for screwdrivers, another for hammers, etc. Each drawer (module or class) is cohesive because it focuses on a specific group of related tools (functions or data). This way, you can easily find the tools you need for a job. High cohesion makes software components easy to understand, maintain, and reuse. Low Coupling Low Coupling is about reducing dependencies between different modules or components. So, changes in one module need minimal changes in others; this makes your system easy to maintain. Imagine a train; you can attach or replace individual cars with minimal effort. The same applies to modules to be modified or replaced with minimal impact on other system parts. Combining high cohesion within components with low Coupling produces: - Modular - Flexible - Maintainable system Components can be easy to understand and worked on alone, thanks to high cohesion. Components can easily be combined in different ways or replaced thanks to low Coupling. Keep coding! (In a modular way)
12
86
3
402
37,516
Samuel Bourdon retweeted
🚀 Architecture Antipatterns 🚀 Discover common architecture antipatterns, learn how to avoid them and overcome design pitfalls! 🔥 architecture-antipatterns.te…
2
38
1
144
15,573
Samuel Bourdon retweeted
Caching 101: The Must-Know Caching Strategies Fetching data is slow. Caching speeds things up by storing frequently accessed data for quick reads. But how do you populate and update the cache? That's where strategies come in. 🔍 Read Strategies: Cache Aside (Lazy Loading) - How it works: Tries cache first, then fetches from DB on cache miss - Usage: When cache misses are rare or the latency of a cache miss + DB read is acceptable Read Through - How it works: Cache handles DB reads, transparently fetching missing data on cache miss - Usage: Abstracts DB logic from app code. Keeps cache consistently populated by handling misses automatically 📝 Write Strategies: Write Around - How it works: Writes bypass the cache and go directly to the DB - Usage: When written data won't immediately be read back from cache Write Back (Delayed Write) - How it works: Writes to cache first, async write to DB later - Usage: In write-heavy environments where slight data loss is tolerable Write Through - How it works: Immediate write to both cache and DB - Usage: When data consistency is critical 🚀 Real-Life Usage: Cache Aside + Write Through This ensures consistent cache/DB sync while allowing fine-grained cache population control during reads. Immediate database writes might strain the DB. Read Through + Write Back This abstracts the DB and handles bursting write traffic well by delaying sync. However, it risks larger data loss if the cache goes down before syncing the buffered writes to the database. – Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/496keA7
6
175
3
748
38,406
Samuel Bourdon retweeted
👋Hey Software engineers, 🔄DRY, KISS, YAGNI, SOLID 🧪ACID, BASE, CAP, PACELC 🌱TDD, DDD, CQRS, Saga ⚓K8S, 12-FA, 2-pizza team, Conway's Law... Add to the list: 💰FRAL: The FRugal Architect Laws for cost-aware software thefrugalarchitect.com/
2
95
2
364
36,144
Samuel Bourdon retweeted
AI Text-to-Video with Pika 1.0, Anime Version. sign up at pika.art
129
436
194
2,811
836,567
How can you enforce your software architecture? When deadlines are tight, and you start cutting corners, that beautiful software architecture you built crumbles like a house of cards. But you can write Architecture Tests to fix this. Here's how: milanjovanovic.tech/blog/enf…
4
18
114
12,726
Samuel Bourdon retweeted
No-JS hamburger menu w/the popover API: Browser handles: - clicks on hamburger & close btns - esc key to exit - tab nav - spacebar + enter key toggle (open & close) - light dismiss (click away) close How: <btn popovertarget="menu">..</> <div popover role="menu" id="menu">..</>
57
290
45
1,891
379,808
"The 12 Factor App is a methodology for building SAAS applications by Adam Wiggins. We cover how they have since evolved, what we can learn from them today and how they changed the status quo of yesteryear." buff.ly/3yGGVKB (via @arcnotes and @myusuf3)
2
15
5,345
Samuel Bourdon retweeted
Slack traite 33 000 jobs / seconde, cet article décrit l'architecture de leur job queue : Les limites de leur architecture initiale avec Redis, et comment ils ont géré la migration de Redis vers Kafka. blog.quastor.org/p/slack-pro…
2
3
1,024