On Csharp - Covariance and Contravariance

Author: Son Nguyen Hoang

Word: 1645

Language: English

Created On: 12 Jun 2024

Useful concepts for generic interface, delegates and more!

Recently I decided to teach myself some C# knowledge that I found my self lacking, including but not limited to Task (Concurrency), delegates and some Design Patterns. While reading books, I encountered two concepts that sound pretty weird. They are Covariance and Contravariance. What are these? Problem I didn’t find any good translation to Vietnamese of these two concepts. The first result from Google indicates that Covariance is related to statistic?...

Những Bóng Ảnh và Sao Mờ - Chuyện Bác T

Author: Son Nguyen Hoang

Word: 3142

Language: Vietnamese

Created On: 09 Oct 2024

Chuyện thứ nhất

Trước khi viết về bác T, quả thực tôi đã phải đắn đo ít nhiều. Phần lớn vì tôi, như lẽ thường tình, hoàn toàn chẳng có tư cách viết về bác. Tôi chẳng phải người thân thích và có lẽ số lần tôi gặp bác chỉ đếm trên đầu ngón tay. Mối quan hệ của tôi với bác thì lòng vòng, chỉ qua con gái bác và anh trai tôi....

Concurrency with C Sharp

Author: Son Nguyen Hoang

Word: 359

Language: English

Created On: 08 Jun 2024

Good practices to use C# with Task and more

After a while coding in C#, I think myself need to train hard on Concurrency. After, this is such a powerful concept but I never tried to grasp the ideas properly. I started teaching myself about Concurrency in C# using the book Concurrency in C#: Cookbook. This short article will summarize some practices and snipplets that I found useful. Some quick notes: Avoid async void (should be async Task ) Use Task<T> rather than ValueTask<T> (if possible) Becareful with ConfigureAwait() and its implementation on UI Threads....

Tech Journal - .Deleting Encrypts. files accidently remove $HOME in Linux mint

Author: Son Nguyen Hoang

Word: 245

Language: English

Created On: 18 May 2024

Why it happened? And how to solve?

Let’s say that you realized that 150GB of your hard drive had been used up in some sort of .encryptf files of your Linux Machine. This is already too much. You read article about this from https://wiki.archlinux.org/title/ECryptfs to make sure that the file can be deleted safely. As it said below 3.2 Removal of encryption There are no special steps involved, if you want to remove your private directory....


Back To Top