🇰🇪 Mburu (@syntax_mburu) header
🇰🇪 Mburu (@syntax_mburu) profile picture

It's not a bug, It's an undocumented feature!!

Juja Central, Kenya
Joined August 2012
Photo by 🇰🇪 Mburu (@syntax_mburu)Photo by 🇰🇪 Mburu (@syntax_mburu)Photo by 🇰🇪 Mburu (@syntax_mburu)Photo by 🇰🇪 Mburu (@syntax_mburu)Photo by 🇰🇪 Mburu (@syntax_mburu)Photo by 🇰🇪 Mburu (@syntax_mburu)
🇰🇪 Mburu retweeted
Anyone who wants to go deep into databases should give this a read
2
30
436
45,977
🇰🇪 Mburu retweeted
Save this to understand how Database Connection Pooling works !!
20
152
10
1,191
98,815
🇰🇪 Mburu retweeted
I want an SMS outage to leave email alone. In A, a worker sends email, SMS and push as one job. If SMS keeps failing, the retry loop can hold up the rest of the job. A retry may also send an email that already went out. B gives each channel its own queue and worker. The topic sends a copy of the event to each queue, so each channel can move at its own pace. That changes how I store the result: - The email worker can send its message while the SMS worker waits to retry. - SMS can retry without rerunning the email step. - Each worker must track which events it has already handled. Three workers on a shared queue won't do this. They compete for jobs. You need a separate subscription or queue for each channel to get its own copy. I also keep a delivery record per channel. A single "sent" flag can't show which part of the job is still stuck. Try the Fan Out Notification Channels puzzle on Katabench: app.katabench.com/?p=fan-out…
5
5
30
1,869
🇰🇪 Mburu retweeted
Interviewed a Senior Backend Engineer today. Knew SQL, transactions, locking, all of it. Then I asked: Two admins open the same customer record. Admin A changes the phone number. Admin B changes the address. Both click Save, 5 seconds apart. Admin B's save sends the whole record, including the OLD phone number. Admin A's change is silently gone. No error. No warning. Nobody notices. The engineer said: use a transaction. Both transactions commit fine. The overwrite still happens. Silence. How do you stop the lost update? 👇
44
7
1
97
45,912
🇰🇪 Mburu retweeted
If you're writing certain lines of code over and over, you typically use a function instead. But what about a project file setup that you use again and again? Bash scripting to the rescue! Here, @ArnoldJabo shows you how it works by automating Docker image creation for Postgres with shell commands. freecodecamp.org/news/how-to…
1
38
265
14,835
🇰🇪 Mburu retweeted
Traditional layered architecture is like organizing a library by book size or color, while vertical slices are like organizing by subject. You don't need to rewrite your entire application overnight. Start with new features using vertical slices.
2
6
31
1,762
🇰🇪 Mburu retweeted
For all my Console projects I have the following setups which is part of a custom project template. In any of my code samples look at Classes\Program.cs
1
5
25
1,698
🇰🇪 Mburu retweeted
Keeping documentation up to date can be a time-consuming and frustrating manual process. But an approach called Documentation as Code helps streamline things with automation, versioning, and more. In this guide, @ezinne_anne explains how to set up docs as code with Docusaurus and GitHub Actions. freecodecamp.org/news/set-up…
2
57
419
19,164
🇰🇪 Mburu retweeted
Your app charges the customer's card. But the worker crashes before it can mark the job as done. Now the queue sends that job to another worker. Before I add retries, I check this gap. In B, the next worker can charge the same payment again. The queue can't know what the payment provider did. I choose A, with a stable key for each payment attempt: 1. A worker claims the key in a shared ledger with an atomic write. 2. It sends that same key with the charge request to a provider that supports it. 3. It saves the provider's reference and the result for later retries. The ledger stops two workers from starting the same job at once. The provider's key covers a different gap. The charge may succeed even when its reply never gets back to us. If the result is still unknown, I check the provider's state or retry with the same key within its allowed window. I don't create a new key just because a request timed out. Work through the Make Payment Idempotent puzzle on Katabench: app.katabench.com/?p=make-pa…
1
2
15
1,722
🇰🇪 Mburu retweeted
Junior uses async/await Middle uses ValueTask and cancellation Senior uses Channels and IAsyncEnumerable. Here's what each level gets wrong, and how to fix it 👇 👉 𝗝𝘂𝗻𝗶𝗼𝗿: 𝗮𝘀𝘆𝗻𝗰/𝗮𝘄𝗮𝗶𝘁 ❌ Calling .Result or .Wait() on a Task ↳ Blocks a thread. Under load, the thread pool runs dry and the whole app freezes. ✅ Use await all the way up, from the controller to the database call. ❌ Writing async void methods ↳ An exception there can't be caught by the caller and can crash the process. ✅ Return Task. Keep async void only for event handlers. 👉 𝗠𝗶𝗱𝗱𝗹𝗲: 𝗩𝗮𝗹𝘂𝗲𝗧𝗮𝘀𝗸 𝗮𝗻𝗱 𝗖𝗮𝗻𝗰𝗲𝗹𝗹𝗮𝘁𝗶𝗼𝗻𝗧𝗼𝗸𝗲𝗻 ❌ Accepting a CancellationToken but not passing it down ↳ The user closed the page. Your app still runs the 30-second query. ✅ Pass the token to every EF Core, HttpClient and Stream call. ❌ Awaiting the same ValueTask twice ↳ Undefined behavior. It can return wrong data or throw. ✅ Await a ValueTask once. If you need it again, call AsTask(). 👉 𝗦𝗲𝗻𝗶𝗼𝗿: 𝗖𝗵𝗮𝗻𝗻𝗲𝗹𝘀 𝗮𝗻𝗱 𝗜𝗔𝘀𝘆𝗻𝗰𝗘𝗻𝘂𝗺𝗲𝗿𝗮𝗯𝗹𝗲 ❌ Using an unbounded Channel between producer and consumer ↳ The producer is faster, so memory grows until the app dies. ✅ Use Channel.CreateBounded() so the producer waits when the queue is full. ❌ Loading 1 million rows with ToListAsync() to process them ↳ All rows sit in memory at once. ✅ Stream them with AsAsyncEnumerable() and await foreach. 📌 𝗧𝗵𝗲 𝗴𝗼𝗼𝗱 𝗻𝗲𝘄𝘀: You don't need Channels on day one. But blocking on async code is a bug on day one. Fix that first. Which async mistake have you seen in a real code review?
7
14
76
3,708
🇰🇪 Mburu retweeted
Backend interview question: Your UUID generator has never produced a duplicate. 3 years. 300 million records. Today it did. Mathematically, it shouldn't happen. But it did. What's the first thing you check?
32
1
41
30,155
🇰🇪 Mburu retweeted
EF Core 11 code sample has conversion github.com/karenpayneoregon/…
2
11
57
3,343
🇰🇪 Mburu retweeted
If you’re a developer and can’t spot the bug, you’re probably a vibe coder. Note: Not for vibe coders.
3
2
1
26
2,180
🇰🇪 Mburu retweeted
PostgreSQL developers: Your table has 500 million rows. You run: SELECT COUNT(*) FROM orders; Why can't PostgreSQL simply return the number of rows from table metadata?
9
1
1
45
12,740
🇰🇪 Mburu retweeted
Most .NET tutorials only teach the tip of the iceberg. Controllers and EF Core get your first API running. Production needs DI lifetimes, CancellationToken, thread pool starvation and a lot more under the water. I drew all 5 levels. Follow me for more .NET breakdowns.
7
11
85
2,609
🇰🇪 Mburu retweeted
Apps that handle user accounts need a secure way to tell who's who. This is what authentication is for. It tells you the person trying to access the app is who they say they are. In this article, @thejoanayebola teaches you how to build a secure authentication system with JWT and refresh tokens. freecodecamp.org/news/how-to…
2
42
2
387
17,742
🇰🇪 Mburu retweeted
QVAC SDK 0.24 is out, with vector search for RAG up to 8.2x faster and new image generation models. What's new: - TurboVec 1.1.2: RAG search in the SDK is now 2x to 8.2x faster, and more accurate - MegaLoc: a new model that recognizes places from a photo - Image generation: adds Flux 3 Klein, Qwen-Image-2.1 Turbo and MOSS-Image with layout control - qvac serve: better integration with tools such as Codex from @OpenAIDevs and @t3dotcodes - Sessions: one SDK runtime can now serve several apps at once, each with its own requests - Pocket TTS: now runs directly through the SDK, with streaming and cancellation - Cache sharing: conversations reuse each other's cache, so the start of a prompt they share is processed only once - AMD Ryzen AI NPU: Qwen3.5 can now use the NPU in recent AMD Ryzen AI chips, so your GPU stays free for another model - And several other developer experience improvements Learn more in the thread below. Complete release doc here: github.com/tetherto/qvac/rel… Star ⭐️ the repo to stay updated.
18
152
2
2,827
3,088,725
🇰🇪 Mburu retweeted
I don't mock the database in my tests anymore. A slice test sends a real HTTP request and asserts on the response and the rows it wrote, against Postgres in a container.
14
3
76
8,011
🇰🇪 Mburu retweeted
For years, a full outer join in LINQ meant stitching two queries together by hand. In .NET 11, it’s one method: FullJoin 👇 Before .NET 10, even a left join meant GroupJoin + SelectMany + DefaultIfEmpty. A full join? Do that twice, then Union the results. .NET 10 gave us LeftJoin and RightJoin. .NET 11 completes the set with FullJoin. It pairs rows with matching keys and keeps unmatched rows from both sides. I tried it on exports of invoices and payments. One query showed what’s paid, what’s unpaid, and which payments have no invoice. If you already use LeftJoin, the syntax is the same. And EF Core 11 translates it to a real FULL JOIN. (the SQL in the image is from PostgreSQL) Two things to watch: - Not every provider translates it yet, so check your generated SQL - In memory, the inner sequence is loaded into a lookup, so put the smaller one on the inner side Where would you use FullJoin first: reconciliation reports or data syncs? Subscribe to my newsletter: pavle.codes
1
5
38
1,529
🇰🇪 Mburu retweeted
Cloud APIs are powerful, but giving AI agents safe access to large infrastructure systems isn't simple. In this tutorial, @manishmshiva teaches you how AI agents can control cloud infrastructure through MCP. You'll also learn about sandboxed code execution + how to expose cloud operations safely with two MCP tools. freecodecamp.org/news/how-to…
10
39
302
16,745