Why your code fails… and works again on the second run | Issue #84


Sometimes your code fails, you change absolutely nothing, and on the next run everything works again. If that sounds familiar, this week’s video is for you.

These kinds of failures usually have nothing to do with bad code. They come from the outside world: APIs that time out, networks that briefly misbehave, or LLMs that occasionally return something almost structured, but not quite. It’s frustrating, because the failure feels random, and those types of failures are really annoying to debug!

In the video, I break down the Retry Pattern step by step. You’ll see how to add simple retries, improve them with exponential backoff, turn the logic into a clean decorator, and finally introduce a fallback strategy for cases where retrying the same thing doesn’t help anymore.

I hope this gives you a few ideas to make your own projects more robust :).

Enjoy the video, and have a great weekend!

Cheers,

Arjan

NVIDIA Nemotron 3: Open Models Built for Real-World AI Systems

(sponsored)

If you’re building AI systems beyond simple demos (think agents, multi-step reasoning, or production workloads), NVIDIA just released something worth paying attention to: NVIDIA Nemotron 3.

Nemotron 3 is a new family of open models designed specifically for efficient, accurate, and scalable agentic AI. What I like about it is that NVIDIA isn’t treating this as a black box. The models, data, and training techniques are open, so you can actually understand why they behave the way they do and adapt them to your own use case.

A few things I found interesting:

  • You get access to model weights, training recipes, and datasets. That makes it a great choice if you care about transparency, fine-tuning, or running models in your own environment.
  • Nemotron 3 uses a hybrid mixture-of-experts approach to balance performance and cost. This means better throughput and accuracy without just throwing more compute at the problem.
  • Nemotron 3 Nano is available to download on Hugging Face, and you can already try it today via OpenRouter. The model is optimized for long-context reasoning, tool usage, and multi-step decision-making, making it well suited for coding tasks, powering AI assistants, and building AI agents for targeted use cases such as transaction monitoring in banking, fraud detection in cybersecurity, and checkout processing in ecommerce.

From smaller, faster models to more powerful variants (with larger versions coming next), Nemotron 3 lets you choose the right trade-off for your application.

If you want a high-level overview of what Nemotron is, how the model family is structured, and where it fits in the broader NVIDIA AI ecosystem, click here to learn more:

And if you want to go deeper into the technical details (including some of the training techniques, data curation, and efficiency optimizations) NVIDIA also published a solid engineering deep dive (definitely worth a look!).


Do you enjoy my content on YouTube and would you like to dive in deeper?

🚀 Check out my online courses

My courses have helped thousands of developers take the next step in their careers. Check out these courses to help grow your skills and become a senior developer:

👕 Clean code and clean clothes

The ArjanCodes merch store features T-shirts, hoodies, hats, and more for the clean-code-obsessed. Careful though: you'll look dangerously professional while reviewing PRs.

👉 Check out the store here and grab something before your stand-up call starts.

Unsubscribe | Sent by ArjanCodes

Wolvenplein 25, Utrecht, UT 3512 CK

The Friday Loop

Every Friday, you'll get a recap of the most important and exciting Python and coding news. The Friday Loop also keeps everyone posted on new ArjanCodes courses and any limited offers coming up.

Read more from The Friday Loop

Have you ever looked at a Python script and thought: “Why is this slow? The logic is trivial.” Very often, the problem isn’t what your code does, but how often it does expensive work. In this week’s video, I start with a deliberately inefficient example: parsing a large CSV file multiple times. From there, I use it as a vehicle to introduce 10 powerful Python features that many developers either don’t know about or don’t know when to apply. I look at things like: • caching expensive...

I almost didn’t publish this week’s video. It’s about the Specification design pattern, and if I’m honest, the final version of the code scared me a little. It’s complex, abstract, and in many cases… absolutely overengineered. But there’s a reason I still decided to share it. In the video, I explore how the Specification pattern tackles a very real problem: business rules duplicated across different parts of a system, slowly drifting apart and becoming harder to change safely. Is this...

Most Python developers know dataclasses. Or at least… they think they do 🙂. You add @dataclass, define a few fields, and enjoy writing less boilerplate. But dataclasses hide a lot more power than most people realize and some of that power can quietly bite you if you don’t understand what’s really going on. In this week’s video, I walk through 7 lesser-known dataclass features that make your code safer, clearer, and easier to maintain. I start with common pitfalls like mutable defaults, then...