Posts
Fold and Reduce in LINQ
In functional programming languages, there are several difference betwee them. I was quite interested in functional programming, even I spent some time to learn haskel and scala. I knew what I can use Select for map, not sure about folder and reduce
FeatureFoldReduceInitial ValueRequires an initial value.Does not require an initial value.Function Signature(A, B) => A(A, A) => AApplicabilityCan be used on empty collections.Requires a non-empty collection.VariantsfoldLeft and foldRightreduceLeft and reduceRightStarting PointfoldLeft starts from the left.
Posts
streamline pack and install package to global-packages
Due to the nature that it is difficult to debug msbuild custom task, I thought if I can use it in a way to streamline my debug workflow. one pack command will complete the following steps. - pack - add the package into local feed source - add the package to global-packages folder
My current workflow is below. It is a manual process. It is realy a pain this way: - pack - nuget add [package-name] -source C:\nexus\.
Posts
msbuild custom task and runtime reflection
Most information about custom task of msbuild are quite basic, it will get complicated when it is involved reflection. I tried several ways according searching results and answers from chatgpt: reflection, assemblyLoadContext and mono cecil. The most promising one is mono.cecil.
I tried directly loading assemblies and via AssemblyLoadContext. They all failed to load some microsoft assemblies. It looks awkward even I can change my build scripts to copy those assemblies.
Posts
CICD
I shared one of CICD I designed and implemented in linkedin. It is good to keep here as well. I researched several options and put my thought at Reflection on implementation of CICD using argo-workflows
Nowadays, argo-workflows is quite mature. I will use argo-workflows for CI part in my future projects. It is definitely worth to invest one’s time on argo-workflow as it is widely used.
Posts
.Net sdk version vs runtime version
What will you do when you encountered a runtime version is disallowed for specific version say 8.0.6 in building environment? Install the specific runtime version, right? Please hold, I show you my story.
I initially thought I couldn’t run the below commands to install it, it is not. After several attempts, My colleague spotted the difference between runtime version and sdk version. They are different. A runtime version is supported by several sdk versions.
Posts
setup nuget local packages feed
Nuget local feed Prerequisites nuget.exe is installed in C:\packages and in the command search path.
Setup local feed Assume C:\packages\.nuget-local\packages will be the locations to install local packages. and several local dev packages need to install.
Packages below: - "C:\packages\test.4.1.0-beta-24159.1.nupkg" - "C:\packages\testa.4.1.0-beta-24159.1.nupkg" - "C:\packages\testb.S3.4.1.0-beta-24159.1.nupkg"
Run below commands to install above packages into source C:\packages\.nuget-local\packages
REM run command line with C:\packages as working directory nuget.exe add tes.
Posts
MACH (micro service based, API first, cloud native, headless)
Just an architecture style MACH got me attention. It is short for micro service based, API first, cloud native, headless. There are two of projects I involved one are in this architecture style. One is sitecore based, another one is developed. Kubernetes, nodejs, npm, strapi tsoa are used. Their mapping is as following.
micro services based: multiple services based on expressjs
api first: tsao
cloud native: more advanced than cloud native, kubernate native is used.
Posts
Recent learnings in dotnet and FHIR
In the past several months, I called it quite intensive. I need to master the knowledge of FHIR, advanced dotnet technologies (attributes, generator, reflection, code emit, expression tree, advanced linq, customized aspnet pipeline, nuget package), code optimization technologies and several aws technologies (DynamoDB, S3, glue, spark) in depth to meet the schedule of a project. You really can’t account on solution architects or support engineers from cloud providers. I don’t get one perfect answers from them so far when I used their services.
Posts
Accelerated learning in a new era with AGI
It is about three months now. I make reflections on things I have done well and bad. I will refine my learning workflow.
In the past, I used 2nd-brain, daily-logging, flashcard and spaced-repetition systems to help to accelerate my learning under the circumstance that I can’t get fully complete information from different stake holders. I was left with only way to find it out by myself. I read all material I thought will be useful and noted them down in my logseq vault.
Posts
DynamoDB predictable performance
I am passionate about technological details and how things work under the hood. Recently I didn’t get confirmative answers from AWS. I spent a half day to re-read the famous paper. and the new one Amazon DynamoDB: A Scalable, Predictably Performant, and Fully Managed NoSQL Database Service. I think the following several concepts can be helpful to under its predictable performance.
Consistent Hashing and zero hop DHT Storage node and 10G partition Typical flow of putItem I also put all of the three pictures into a slides and put refereneres at the last slides.