Quantcast
Channel: Code – no dogma blog
Browsing all 132 articles
Browse latest View live

Executing a Method on All Implementations of an Interface

Full source code available here. Have you ever wanted to execute a method on all implementations of an interface? Say you have an interface called IGenerator and four implementations of it –...

View Article


Dependency Inject a Service from Startup back to Program in .Net Core 3.1

Full source code available here. Over the past couple of years I wrote a few posts about Dependency Injection in .Net Core 2.1, and this week I received comments from a reader telling me that some of...

View Article


DynamoDb, Reading and Writing Data with .Net Core – Part 1

Full source code available here. A few weeks ago I started playing with DynamoDb in a .NET application. I read through the AWS documentation but felt it was incomplete and a little out of date. This...

View Article

Enum ToString(), Caching for Performance

Full source code available here. A while ago I was working on a program that had to convert enums values to strings as it saved data. When I removed the enum value from the data that was saved it went...

View Article

Synchronous For Loop in Node.js

Full source code available here. In C# it is very easy to avoid doing something asynchronously, but I found out that this is not the case with JavaScript and Node.js. I wanted to load a large amount of...

View Article


DynamoDb, Reading and Writing Data with .Net Core – Part 2

Full source code available here. A few weeks ago I posted about reading and writing data to DynamoDb. I gave instruction on how to get create tables on localstack and how to use the AWS Document Model...

View Article

Getting Started with ElasticSearch, Part 1 – Seeding

Full source code available here. This is the first in a short series of blog posts that will get you started with ElasticSearch. In this you will deploy seed and query ElasticSearch from your own...

View Article

Getting Started with ElasticSearch, Part 2 – Searching with a HttpClient

Full source code available here. In the previous blog post I showed how to setup ElasticSearch, create and index and seed the index with some sample documents. That is not a lot of use without the...

View Article


Image may be NSFW.
Clik here to view.

Entity Framework Core 3.1 Bug vs 2.2, Speed and Memory During Streaming

Full source code available here. A while ago I wrote a blog post about the advantages of streaming results from Entity Framework Core as opposed to materializing them inside a controller and the...

View Article


The Simplest Hello World in Node.js

Full source code available here. I am learning Node.js and have found it a bit of a struggle to locate good, simple documentation. It feels like most people writing in the space assume a lot of...

View Article

Image may be NSFW.
Clik here to view.

Getting Started with ElasticSearch, Part 3 – Deploying to AWS with Pulumi

Full source code available here. This is part 3 of my short introduction to ElasticSearch. In the first part I showed how to create an ElasticSearch index, mapping, and seeded it with data. In the...

View Article

Working with JSON in .NET, a better way?

Full source code available here. Two recent experiences with C# and JSON frustrated me with how difficult it is to work JSON inside an application. I have also been learning Node.js and contrasting the...

View Article

Working with JSON in .NET, Infrastructure as Code with Pulumi

Full source code available here. This is a follow up to my previous post where I used dynamic and JSON files to make querying ElasticSearch with a HttpClient much easier. To deploy my ElasticSearch...

View Article


Reading CSV Files into Objects with Node.js

Full source code available here. As I am learning Node.Js I am constantly surprised by how easy it is to do some things, and how difficult to do others, and how poor the examples out there are. Case in...

View Article

Image may be NSFW.
Clik here to view.

VS Code Bug – Interpolation and Commented Lines, Workaround

This is a quick post with a workaround to a bug in VS Code that occurs when you use string with @$ – the verbatim character and the interpolation characters. If you have a piece of code that looks like...

View Article


Indexing the Works of Shakespeare in ElasticSearch – Part 1, Infrastructure...

Full source code available here. WARNING – be careful when using this, Kinesis costs money and is not on the AWS free tier. At time of writing a couple ElasticSearch instance types are included with...

View Article

Indexing the Works of Shakespeare in ElasticSearch – Part 2, Bulk Indexing

Full source code available here, look inside the lambda folder. This is part two of my series on indexing the works of Shakespeare in ElasticSearch. In part one I setup the infrastructure as code where...

View Article


Indexing the Works of Shakespeare in ElasticSearch – Part 3, Sending the...

Full source code available here. In this, the third part of the series, I show how to read from the Shakespeare CSV file where each row represents a line from a play, (download here), and send these...

View Article

Indexing the Works of Shakespeare in ElasticSearch – Part 4, Searching via...

Full source code available here. This is part four of my four part series on indexing the works of Shakespeare in ElasticSearch. In this I’ll show how to use the ElasticSearch “low level client” to...

View Article

Polly and Blazor, Part 1 – Simple Wait and Retry

Full source code available here. A few weeks ago I gave a talk on Polly at Dotnetconf (you can check it out here), at the end I got many questions about using Polly with Blazor, I had never tried it,...

View Article
Browsing all 132 articles
Browse latest View live