close
Image

Myth: Cosmos DB Is Expensive. Reality: Containers Aren't Tables

"We evaluated Cosmos DB and it's way too expensive."

I feel like I hear this a lot and it always surprises me. But I think I might have figured out the pattern and it's driven by relational database thinking in a document-centric database. Someone on the team started sketching out their database design, counted the tables, and then created one Cosmos DB container for each one.

More

Posted by Benjamin Day on 05/20/20260 comments


Image

Stop Sprinkling Magic Strings Through Your Configuration Code

Here's a fun debugging exercise. Rename a section in appsettings.json from BlobStorage to AzureBlobStorage. Perfectly reasonable change. Build the app. No compiler errors. Run the tests. They pass. Deploy it. It starts up fine.

Except the code that reads that configuration still says this:

More

Posted by Benjamin Day on 04/28/20260 comments


Image

The Builder Pattern: Stop Fighting With Constructors

I just wanted to get my app to talk to the Cosmos DB emulator. That's it. Just run my app locally against the emulator and see if my code worked.

But first, I had to configure 12 things:

  • Endpoint
  • Account key
  • Database name
  • Container name
  • Partition key path
  • Automatic structure creation
  • Database throughput
  • Gateway mode
  • Hierarchical partition keys
  • Bulk execution
  • Default Azure credentials
  • Camel case serialization
More

Posted by Benjamin Day on 03/30/20260 comments


Image

Estimates Are Lies (And What to Do Instead)

I have a confession: I've spent hundreds of hours of my life in estimation meetings.

Planning poker. T-shirt sizing. Fibonacci sequences. Heated debates about whether something is a 5 or an 8. Entire afternoons lost to the question "but what does a 3 even mean?"

And after all that time, you know what I've learned?

More

Posted by Benjamin Day on 02/04/20260 comments


Image

The Tech Debt Trap (And the Rewrite Trap That Makes It Worse)

If you've ever been to Boston, you know we've got a lot of old stuff. About 20 years ago, I bought a condo in a 120-year-old building. The toilet wouldn't flush very well. Old toilet, old house -- I figured I'd just replace it. Bought a new toilet, had it delivered, plumber showed up.

He took one look and said, "I can't do this."

More

Posted by Benjamin Day on 01/21/20260 comments


Image

The Nerdy Magic of .NET Garbage Collection (That You Probably Don't Know)

I've been working on an intro to C# and .NET programming series on YouTube lately. I'm trying to remember what it was like picking up C# and .NET at the very beginning. When you work with a technology for a long time, you just don't realize all the things that you 1) know but don't REALIZE you know, 2) kinda sorta know but they don't really matter so you can let the details slide, and then 3) stuff that you don't know that's really insanely cool. I came across one of those topics that live in 'category 3' -- garbage collection in .NET.

More

Posted by Benjamin Day on 12/08/20250 comments


Image

Taming the Type Explosion: Managing Message Classes in REST-Heavy Applications

Building HonestCheetah.com (my GitHub project metrics tool) has taught me a lot of lessons, but one of the most annoying problems I've run into is what I call "message type sprawl." When you're making dozens of different REST and GraphQL calls to various APIs, you end up with an explosion of similar-but-not-quite-the-same classes for deserializing JSON responses.

More

Posted by Benjamin Day on 12/01/20250 comments


Image

Skip the String Constants: Managing GraphQL, SQL, and Other Text Files in C#

Lately, I've been working on a bunch of tools to analyze GitHub Issues and GitHub Project data to calculate and report on project management metrics. I don't know if you've ever tried to get this data out of GitHub before via their public APIs but -- well -- you end up needing to write a LOT of GraphQL queries. Which then begs the question: where do you actually put these queries so that you can use them from C#?

More

Posted by Benjamin Day on 10/22/20250 comments


Image

LINQ Methods You're Not Using (But Should Be)

I've been writing C# for decades and I still discover LINQ methods that make me think "where have you been all my life?" Just last week, I was doing a code review and saw someone write a 10-line loop that could've been replaced with a single LINQ call.

LINQ has been around since 2007 but there are still a bunch of methods that fly under the radar. Sure, everyone knows Where(), Select(), and FirstOrDefault(). But there's a whole pile of other methods that can save you time and make your code cleaner.

More

Posted by Benjamin Day on 09/24/20250 comments


Image

Why Use It? Understanding C# Interfaces, Delegates and Dependency Injection

A working knowledge of C# can take you a long way -- but many developers hit a wall when it comes to truly understanding why they should use certain language features and design patterns. It's one thing to know how interfaces or dependency injection work in principle. It's another to understand their practical value in writing maintainable, testable, and adaptable code. And that "why" is often what separates an intermediate developer from an advanced one.

More

Posted by David Ramel on 09/11/20250 comments


Keep Up-to-Date with Visual Studio Live!

Email Address*Country*
Image Please type the letters/numbers you see above.