Dependencies Injection, MediatR+CQRS
Jun 21, 2020
- 8 min read
These are not easy subjects. I always wanted to write about them since a long time ago. These big subjects worth a series of Posts, but I don’t wanna make it too long.
I will just express some random thoughts about them in all kind of layers: principle’s, theories, code practices. so this posts wil be messy and un-structured!
Conforming Container (From the Mark Seemann’s blog post)
Once in a while, someone comes up with the idea that it would be great to introduce a common abstraction over various DI Containers in .
...
➦
C# System.Text.Json
Jun 18, 2020
- 2 min read
There is many Json Serializer for .NET out there.
Microsoft used to depend on the Newtonsoft.Json (aka. Json.NET) library. However, since the .NET Core 3, Microsoft introduced their own json serializer in the System.Text.Json package.
The Michael Blog’s post published some benchmark on differences .NET Json Serializers. His benchmark show that the new System.Text.Json of Microsoft is not the fastest one, but the speed favor appears to go to the jil serializer.
...
➦
How Did I Build My Blog
Jun 15, 2020
- 4 min read
None of the FREE blogging platforms fit my taste! As a fullstack developer it was a shame if I can’t built my own website..
Requirements for my Blog No-cost (otherwise it is a shame for me!) Easy-to-read interface. peoples with slight vision imperfections (eg. Color Vision Deficiency) should be able to read my blog without much effort. Manage content (CRUD) should not complicate. I usually write text and codes snippets so Markdown format is a no-brainer.
...
➦
C# (or Java) Programming Best Practices
Apr 25, 2020
- 7 min read
Base on my years experiences in codes review, I recognized some best practices which is really simple to apply to sanitize the codes, make them more testable or reusable. Experienced developers might apply some of them and don’t even realize it.
In this article I will expose some of the common coding mistakes which I often see in codes review sessions along with some simple / best practice to avoid them.
...
➦
Authentication Demystify
Nov 30, 2019
- 1 min read
In the process of revamping an old (classic) PHP application to a modern Single Page Application, I need to re-write the Authentication module.
This slide is my research on common questions / knowledege about Authentication:
How the Authentication happened in the old PHP application? How it handled expired users, and keep active users connect? What is the Oauth2, OpenId JWT What is 2-Factor authentication? How to implement it? The most important part is my Refresh-token strategy.
...
➦
Unit Testing
(vietnamese)
Nov 4, 2018
- 12 min read
Lúc mới vào nghề, có lần Sếp yêu cầu tôi viết Unit Test cho 1 ứng dụng cũ của công ty để tăng điểm Sonar. Sau nhiều cố gắng, các “Unit test” của tôi cũng chỉ phủ được khoảng 40% đám codes của ứng dụng cũ đó. Hơn nữa, muốn chạy được các “Unit test” đó, cần phải cấu hình CSDL, có dữ liệu mẫu và kết nối với các Ứng dụng ngoài (được phát triển bởi các nhóm khác)
...
➦
Unit Testing
(english)
Nov 1, 2018
- 9 min read
A long time ago, a certain CTO asked me to write unit tests for a legacy application in order to increase the Sonar rating.. I did all I could, and hardly covered up to 40% of the codes. My “unit tests” that I wrote can run only if the database was well configured with some specific data.. Many “unit tests” depend on the server of other teams..
At that moment I didn’t realize that the task was absurd.
...
➦
Yellow Style Modeling - Let's describe the World in some 2D tables
Mar 31, 2018
- 2 min read
Some friends asked me
How to optimize their Business process? How could we develop application on domains (finance, medical..) that we don’t have knowledge.. We’ve got an idea, a business project, how can we materialize it to an application? These questions come down to “How should we develop / organize / optimize DATA in applications?”. Developing the DATA is a natural way to develop + materialize your idea (or project features).
...
➦
Git Merge Conflicts
Mar 12, 2017
- 9 min read
I used Github for years. Most of my personals projects are on Github. However I’m only an amateur Git user who only knowledgeable enough to work with one-person projects. I suppose that many Github’s users (or evens a majority of them) are like me.
Now, I need to use Git in a team. Things become complicated: branches to merge, conflicts pop up, cryptic error messages or strange situations… I tried many GUI tools with hope that it will make Git more friendly.
...
➦
Git Revision Number
Mar 12, 2017
- 2 min read
As a former SVN user migrating to GIT, I miss the SVN revision number.
I usually put the revision number in the package name, and I can tell which package is the newest one because I know that the revision 18742 is newer than the revision 18730.
The SVN-revision number equivalent in GIT is the horrible SHA thingy, I cannot tell if the commit b3c76e is newer than df8ec9 (or am I?
...
➦