Căutare
Categorii
Blogroll
Category Archives: .NET
Span in .NET, C# and other languages
By now probably most .NET developers have heard about the new Span classes, that will be added in the upcoming .NET and C# versions (C# 7.2 to be more precise). I won’t go into details about what it is and … Continue reading
Detecting code smells with NDepend
I recently had the opportunity to play again with NDepend. From my experience in many companies the developers, even if they find NDepend useful, don’t push enough the management to buy it, for various reasons: ‘we have free/built-in similar tools’, … Continue reading
Posted in .NET, Code Quality, design
Tagged .NET, code review, code smells, NDepend, solid, static analysis, tools
1 Comment
When the length of a database field can be misleading
The length of a database field, at least on MS SQL Server, is not what many people think it is. Let’s say that I have a 10 character field: nvarchar(10): Surely we can insert a row with 5 chars in … Continue reading
Debugging a performance issue in production
One of the projects I’m working on has a component that has a very simple task: reads a record from a database table and based on it, send a message to Microsoft Windows Service Bus. Then the next record is … Continue reading
NameOf and Obfuscators
I was wondering some time ago how the new ‘nameof‘ operator from C# 6.0 works when using .. obfuscators. Let’s write some code to verify this. I included a few other methods to get the member name (VS2015 RC was … Continue reading
Patterns and frameworks
Many people, when they first start to study design patterns (usually in university), dive into the ‘Gang-of-four’ reference book and if they have the energy to read it all, in the end they think something like: ‘well, very cool and … Continue reading
On closures and captured variables
A few days ago, on the project I’m working on, I’ve stumbled on an interesting bug – an example of why it pays off to learn the ‘deeper’ areas of C# language (or any other language). Greatly simplified (and with … Continue reading
On assumptions and formats
In .NET (and any other framework for that matter), it’s better to never assume anything, but to check twice. Let’s take an example – what do you think, will the following unit test always pass? . . . . . … Continue reading
How developers start to ignore code smells
Many people wonder how some developers blissfully ignore some best practices when writing code, or aren’t too bothered when they see a code smell in their project. There are many explanations, but an old one is the code they see … Continue reading
Service Bus for Windows Server: How to define authorization rules at topic level
This is just a ‘reminder’ post for myself (and maybe others) when encountering the same issue. For Service Bus 1.0 for Windows Server (not Azure), at least on a server not joined to a domain, when using local (workgroup) Windows … Continue reading