This is something that has made my integration tests better. You define a test method to run in transaction and rollback at the end of each test. This makes it possible to write integration tests that write to the database. And tests won't leave any "garbage" there because rollback at the end of the test undoes all database updates (and inserts and deletes). If this is possible in your language and testing framework I strongly recommend it. In this blog post I will explain how you can do it with NUnit in C#.
I wrote a book review of The Clean Coder by Robert C. Martin ("Uncle Bob"). It tells what makes programmer a professional programmer and gives practical advice. Professional programmer takes responsibility for his/her work and improves himself/herself constantly. Someone who cares about his/her career as a programmer. The book is relatively short (210 pages) and easy to read. I recommend it to all software developers. My rating: 4/5.
This was really interesting and educational book about functional programming. What makes this book really good is that it is really practical. I wrote about what was most interesting in this book. And how it opened my eyes that functional programming is useful even for object-oriented programmers like me. I deeply recommend this book to every C# developer.
The most important thing for a software developer is his knowledge. Unfortunately it will expire sooner or later if we don't maintain and improve it. But problem is that we are often too busy to improve. Working on the important and non-urgent is one solution to improve even if you are busy.
SonarQube has two rules about constant and static readonly: - Public constant members should not be used and - Static readonly constants should be const instead. I wrote this blog post to learn these rules and their difference. Now I know when to use const and when to use static readonly.
I didn't clearly understand what is field and property in C#. So I decided to write this blog post to finally learn what is field and what is property and how I should use them.