Code Adventure

Code Adventure Every adventure begins with a quest, perhaps a desire to build a game, develop a website, or automate a tedious task.
(1)

Along the way, you'll encounter obstacles that test your problem-solving skills and push you to expand your knowledge.

You can use IHttpClientFactory to create HttpClient instances in .NET.  The downside is you'll have to configure the Htt...
08/29/2026

You can use IHttpClientFactory to create HttpClient instances in .NET.

The downside is you'll have to configure the HttpClient every time.

If you want to get a pre-configured HttpClient, you can use named or typed clients.
Follow me for more videos and codes: Code Adventure



08/29/2026

Password strength checker for your login/signup screen in vanilla JS 🚀
Follow me for more videos and codes: Code Adventure

An entity isn't found. That's not an exceptional situation.But many devs still write `throw new TodoNotFoundException(id...
08/22/2026

An entity isn't found. That's not an exceptional situation.

But many devs still write `throw new TodoNotFoundException(id)`, and then we pay for it:

- The failure is invisible. Nothing in the method signature tells you it can happen.
- It is easy to forget the `catch`, and you find out in production.
- Throwing is slow when it happens a lot.

But my biggest gripe with this approach is the added indirection.

Using exceptions for flow control is a bad practice, and we should stop doing it.

The other option is to return the failure instead of throwing it.

`return Result.Failure(TodoItemErrors.NotFound(id));`

Now the failure is part of the type. The compiler makes the caller deal with it. And you can read a handler and see every way it can go wrong, without hunting for `throw` statements.

Exceptions still have a job. They are for real bugs, the things you did not plan for. My
template keeps that line clear: handlers return `Result`, and one global handler turns errors into a proper `ProblemDetails` response.

Every handler in my free Clean Architecture template already works this way:
Follow me for more videos and codes: Code Adventure



What is your preference?1⃣ ToList 2⃣ Collection expressionFollow me for more videos and codes: Code Adventure           ...
08/22/2026

What is your preference?

1⃣ ToList
2⃣ Collection expression
Follow me for more videos and codes: Code Adventure



08/22/2026

Responsive sidebar built with HTML, CSS and JavaScript🧑‍💻
Follow me for more videos and codes: Code Adventure

08/20/2026

Password strength checker built in HTML, CSS and JavaScript👨‍💻

Code built in HTML, CSS and JavaScript👨‍💻

08/19/2026

Messaging component built in HTML, CSS and JS 🚀

08/19/2026

Profile dropdown built in HTML and CSS 🧑‍💻
Follow me for more videos and codes: Code Adventure

Custom record ToString format sampleFollow me for more videos and codes: Code Adventure                                 ...
07/31/2026

Custom record ToString format sample
Follow me for more videos and codes: Code Adventure



07/31/2026

Responsive sidebar built with , and 🚀
Follow me for more videos and codes: Code Adventure

Address

Washington D.C., DC
20001

Alerts

Be the first to know and let us send you an email when Code Adventure posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Contact The School

Send a message to Code Adventure:

Shortcuts

Share

Category