Yield in C#
The yield keyword is used when the method or accessor is an enumerator. Using yield return returns one element at a time.
I'm a Cloud Solution Architect, Speaker, Teacher, Learner, Engineer, Craftsman, Whovian with his head in the Cloud.
The yield keyword is used when the method or accessor is an enumerator. Using yield return returns one element at a time.
Test Driven Development (TDD) is a development/design approach in which we write our tests first, then implement the code to make these tests pass. These initial tests we write are not unit tests in the traditional sense. I'll repeat that... TDD tests are not unit tests.
The 12 Factor App guidelines suggest separating configuration from code as a best practice. More specifically, it should be deployed separately as well. We shouldn't have to redeploy the entire application in order to make a configuration change. Ideally, we don't want to have to restart our app either. This eliminates downtime when making configuration changes that don't otherwise require downtime such as timeout values, retry configuration, logging level, and distributed trace sampling rate.
The web is riddled with articles on this very topic, yet it bares repeating--never use float for money. I repeat--never never never never never use a floating point data type to represent monetary values or do financial math. So how do we handle money?
Every few years, I find myself having to write an AES256 encryption routine for a project. I always end up having to lookup the specifics, so I thought I would write it down this time.
It seems the big debate lately is monolith vs microservices. Academically, each at the opposite end of the spectrum--the massive, single deployable unit monolith on one end and the highly decomposed highly distributed microservices on the other. Each come with their pros and cons and serve teams better depending on team size, skill level, and goals.
I've been using JetBrains Rider for a bit. Here's my impressions on the popular IDE for dotnet.
After playing with Rider for a while, I decided to play around with Linux again to see what .Net development is like on Linux rig in 2020. So I fired up an Ubuntu 20.04 LTS VM and started installing.
Let's take a look at how constants work in C# and why using static readonly might be better some cases.