Problems with mutable shared state are often discussed in a concurrent programming context. However, those who are lucky enough to avoid concurrent programming can still fall in trouble because of mutable shared state. First pitfall is a global variable. Everyone knows global variables are bad. Although in software design there is no absolute truth or principle, this statement is almost always true. But why are they bad? The full list of reasons can be looked up here, but in a few words – it is because…Continue Reading “On mutable shared state”

C# has a very nice little feature named implicit user-defined type conversion. By far not every developer knows about its existence because its application is very limited. However, sometimes it can be very handy to help you increasing the readability of the code by removing unnecessary clutter. For example, you have to write many functions, which take double[ ][ ], transform it in some way and return double[ ][ ]. Very soon you will want to extract low-level operations on double[ ][ ] into separate…Continue Reading “C# implicit user-defined type conversion”

In this post, I would like to share the list of my 7 favorite authors on code design. Books, articles, and courses from these guys made a huge impact on the way I code today. All of them have written at least one book which focuses on code design for maintainability, understandability or readability. These books are very interesting to read. When you finish them, you feel enlighted. Robert C. Martin. It is hard to explain why I like this guy so much! I believe he has…Continue Reading “My 7 favorite code design authors”