Brainstorm Edge Cases for Testing With ChatGPT

Writing tests is one of those tasks that’s both crucial and easy to overlook. Most of us start with the “happy path” — the ideal scenario where everything works as expected. But real users don’t always follow the happy path, and that’s where edge cases come in.

The problem? It’s easy to miss unusual inputs, boundary conditions, or unexpected scenarios when writing tests by hand. That’s where ChatGPT comes in handy: it can brainstorm edge cases I might not immediately think of and help me write more robust test suites.

Here’s how I use it.

Continue reading “Brainstorm Edge Cases for Testing With ChatGPT”

Convert Code Between Tech Stacks With ChatGPT

One of the trickiest challenges in software development is switching between tech stacks. Sometimes you’re working in C#, then suddenly you need to port logic over to Python for a machine learning project, or convert a Node.js snippet into Go for performance testing.

Doing these translations by hand can be tedious, and searching online often leads to mismatched snippets. This is where ChatGPT has become a secret weapon — paste in code from one stack and it can rewrite the logic in another, complete with idiomatic conventions for that language.

Here are a few ways this can work in real-world scenarios.

Continue reading “Convert Code Between Tech Stacks With ChatGPT”

Generate Realistic Seed Data for Development With ChatGPT

When building new applications, one of the first hurdles I run into is testing with real-looking data. Empty databases don’t tell you much, and hardcoding “User1, User2” everywhere gets old fast. That’s where ChatGPT has become one of my favorite tools — it helps me generate realistic seed data quickly and in whatever format I need: JSON, CSV, or SQL insert statements.

This has saved me countless hours when mocking APIs, populating test environments, or demoing projects to stakeholders. Let me show you a few ways I use it.

Continue reading “Generate Realistic Seed Data for Development With ChatGPT”

Quickly Convert JSON into C# Object Models With ChatGPT

As a developer, one of the most common tasks I run into is working with JSON data. Whether it’s coming from an API response, a config file, or a third-party integration, I often need to convert JSON into strongly-typed C# object models. Doing this by hand can be time-consuming, and online converters sometimes generate clunky code.

That’s where ChatGPT has become a game-changer for me. I can paste in a JSON object, and within seconds, I get back a clean C# class structure that I can drop right into my project. From there, I can map or deserialize the JSON data using libraries like System.Text.Json or Newtonsoft.Json.

Let me walk you through a simple example.

Continue reading “Quickly Convert JSON into C# Object Models With ChatGPT”

5 Great Ways New Developers Can Use ChatGPT to Boost Their Work

Starting out as a developer is exciting, but it can also feel overwhelming. With so many programming languages, tools, and frameworks to learn, it’s easy to get stuck or spend hours searching for answers. That’s where ChatGPT comes in—it’s like having a coding mentor on call 24/7.

Here are five powerful ways new developers can use ChatGPT to make their journey smoother and more productive:

Continue reading “5 Great Ways New Developers Can Use ChatGPT to Boost Their Work”

Get Distinct Object by Id and Return Full Object with C# and EF

If you’re using Entity Framework Core in C# and you want to retrieve distinct items based on a specific property (e.g., ID) but still return the full object, you can use the GroupBy method along with First or FirstOrDefault. Here’s an example assuming you have a class named YourEntity with a property named Id:

Continue reading “Get Distinct Object by Id and Return Full Object with C# and EF”

Subscribe to EventStore catch-up subscription from the start with C# example

EventStore is an open-source database technology designed for storing, retrieving, and querying event data using a stream-based approach. In EventStore, a catch-up subscription is used to read events from a given point in a stream and catch up to the most recent events. When starting a catch-up subscription, you can specify the starting position using an event number or position. However, in some cases, you might want to start from the beginning or the very first event. Here’s how you can achieve that:

Continue reading “Subscribe to EventStore catch-up subscription from the start with C# example”