Skip to content

Duong's Blog

About technology stuff that piqued my interest

  • English
  • Vietnamese
  • About me

Type erasure và reified trong Kotlin

December 28, 2022December 28, 2022 duongnt.bk1 Comment on Type erasure và reified trong Kotlin

Trong Kotlin ta không thể sử dụng type information của hàm generic tại runtime. Trừ phi ta dùng từ khoá reified trong hàm inline.

Java/Kotlin, Vietnamese generic, Kotlin, reified, type erasure

Type erasure and reified in Kotlin

December 28, 2022December 29, 2022 duongnt.bk1 Comment on Type erasure and reified in Kotlin

Due to type erasure, we cannot access type information of generic methods at runtime. Unless we use the reified keyword inside an inline method.

English, Java/Kotlin generic, Kotlin, reified, type erasure

FastAndFaster and dynamic code generation

December 2, 2022December 2, 2022 duongnt.bk1 Comment on FastAndFaster and dynamic code generation

FastAndFaster is a library to create objects and invoke their methods using dynamic code generation. Its performance is very close to static C# code.

C#, English C#, dynamic, il

FastAndFaster và dynamic code generation

December 2, 2022December 2, 2022 duongnt.bk1 Comment on FastAndFaster và dynamic code generation

Thư viện FastAndFaster sử dụng dynamic code generation để tạo object và gọi hàm của chúng tại runtime. Tốc độ của nó không thua gì static code.

C#, Vietnamese C#, dynamic, il

Kluent – FluentAssertions cho Kotlin

November 13, 2022November 17, 2022 duongnt.bk1 Comment on Kluent – FluentAssertions cho Kotlin

Unit test không chỉ cần đúng mà còn phải dễ đọc. Với Kluent, chúng ta có viết những assertion nghe giống như ngôn ngữ tự nhiên.

Java/Kotlin, Vietnamese Kluent, Kotlin, testing

Kluent – FluentAssertions for Kotlin

November 13, 2022November 17, 2022 duongnt.bk1 Comment on Kluent – FluentAssertions for Kotlin

A unit test not only needs to be correct but also needs to be readable. With Kluent, we can write assertions that sound like natural language.

English, Java/Kotlin Kluent, Kotlin, testing

Lỗi datetime trong .NET 6 và PostgreSQL

October 17, 2022October 17, 2022 duongnt.bkLeave a Comment on Lỗi datetime trong .NET 6 và PostgreSQL

Trong lúc nâng cấp một project lên .NET 6, tôi gặp phải lỗi datetime khi sử dụng provider npgsql efcore. Hôm nay, chúng ta sẽ tìm cách sửa lỗi này.

C#, Vietnamese bug, C#, datetime

Datetime error with .NET 6 and PostgreSQL

October 17, 2022October 17, 2022 duongnt.bk1 Comment on Datetime error with .NET 6 and PostgreSQL

While upgrading a project to .NET 6, I ran into an datetime issue with the latest npgsql efcore provider. Today, we will look at the cause and try to fix it.

C#, English bug, C#, datetime

Use SecureString to store secrets in C#

September 20, 2022September 21, 2022 duongnt.bk1 Comment on Use SecureString to store secrets in C#

If we store passwords in string objects, we cannot control when the corresponding memory is reclaimed. The SecureString type can partially solve this issue.

C#, English C#, password, security

Dùng SecureString trong C# để bảo mật dữ liệu

September 20, 2022September 21, 2022 duongnt.bkLeave a Comment on Dùng SecureString trong C# để bảo mật dữ liệu

Khi lưu mật khẩu bằng string thì ta không biết được bao giờ bộ nhớ tương ứng sẽ được giải phóng. Kiểu SecureString có thể giải quyết một phần vấn đề này.

C#, Vietnamese C#, password, security

Posts navigation

Older posts
Newer posts
Copyright © 2025 Duong's Blog All rights reserved. Theme: Flash by ThemeGrill. Powered by WordPress