askaitobuild

Before I Ask AI to Build, I Ask It to Challenge

Early in my career, I built a feature that was supposed to change everything.

The stakeholder was convinced. “This will transform how the team works,” they said. I took it at face value. We spent weeks on it. Good code, solid architecture, all the edge cases handled. Shipped it. Nobody used it.

The feature fixed a symptom, not the actual problem. By the time I’d finished building, someone else had solved the root cause a different way. The feature just sat there, working perfectly, doing nothing.

That experience stuck with me. I’d built exactly what was asked for without questioning whether it was the right thing to build.

AI makes this mistake easier to make. AI can generate specs, scaffold code, write tests. The gap between “someone suggests a feature” and “feature is built” keeps shrinking. But speed doesn’t help if you’re heading in the wrong direction.

How common is the wrong direction? Pendo analyzed 615 SaaS subscriptions and found 80% of features are rarely or never used. An average of 12% of features generate 80% of daily usage volume. They measured click frequency, so a compliance tool clicked once a quarter could still matter. But the pattern is clear. Most of what gets built does not get pulled into anyone’s week. Pendo 2019 Feature Adoption Report

Read More »

Beyond Caching: Building an ASP.NET Core 7 Blazor App with Redis for Real-Time Updates

Introduction

Recently, I’ve been exploring Redis and its potential beyond merely being a cache service. In this post, I’ll show you how to use Redis as a fast and scalable data store for your .NET 7 applications. We’ll create a Blazor Server application with a .NET 7 minimal API back end that uses Redis to implement a real-time scoreboard for multiple players. I’ll also discuss why and when to use Redis, and how it differs from other data stores.

Redis: What’s the Big Deal?

Redis is a fully managed, in-memory data store providing high performance, availability, and scalability for your applications. It supports various data structures such as strings, hashes, lists, sets, sorted sets, bitmaps, hyperloglogs, streams, and geospatial indexes. Additionally, it supports transactions, Lua scripting, Pub/Sub messaging, and cluster mode for horizontal scaling and high availability.

While commonly used as a cache service to reduce latency and load, Redis can serve as a primary data store for specific use cases that require rapid and frequent read/write operations on small pieces of data.

Read More »

Using Playwright and the WebApplicationFactory To Test Your Blazor Application

There are many posts around Playwright .NET. These cover set up and running it against hosted sites.

What I didn’t find many posts on, was running Playwright .NET using Microsofts WebApplicationFactory. Why? Because it isn’t as simple as implementing the WebApplicationFactory with Playwright .NET and hitting run.

I’ll show how you can create a CustomWebApplicationFactory that will allow you to run your Playwright .NET tests locally using the WebApplicationFactory in .NET 6.

Before getting into the post, I want to give a shout out to Martin Costello. By viewing his solution in GitHub I was able to get my solution working and to write up this post.

Read More »

Running Docker Containers from within your .NET Core Application using Docker.DotNet

In the past, I’ve run into trouble running integration tests against docker containers. Let me give you a recent example, I’ve been working with AWS DynamoDB, when it comes to testing, I don’t want to run my integration tests against either a real or a mocked DynamoDB table. It just so happens that AWS provides us with a DynamoDB docker image, this allows us to spin up a local instance of DynamoDB inside a Docker container.

Read More »

AWS DynamoDB – Add and Get Items in .NET Core Using the AWS SDK for .NET

In this blog post we are going to look at the Put and Get DynamoDB operations. First we will look at how to Add ‘Put’ an item onto a DynamoDB table, then cover how we ‘Get’ either a single item or all items from a DynamoDB table.

If you haven’t already read my previous blog post on Creating an AWS DynamoDB Table in .NET Core that is a good place to start. We covered creating a DynamoDB client and assigned Access and Secret keys to the client. We then used the client to create a DynamoDB table.

Let’s start this post by looking at DynamoDBs PutItem.

Read More »

DynamoDB – Creating Tables Using the AWS SDK for .NET in .NET Core

Amazon Web Services (AWS) is a cloud services platform, they offer compute power, database storage, content delivery and other functionality that help users build and host infranstatuce.

This blog post is the first part of a series where I will go through how to interact with different components that AWS offer.

The first part of the series will look at DynamoDB, this series will also be broken into separate parts so each blog post will focus on one or two pieces of functionality from each feature.

In this blog we will be looking at creating a DynamoDB client, then using that client to create a DynamoDB Table.

Read More »