Light property grid with fluent validation

C#, .NET Core, WPF,

Hi Everyone.
And here one more PropertyGrid. This time it is a tiny mini lib. Nevertheless that allows supporting all common cases of PropertyGrid requirements. There are no details of implementation only examples of how to use and what it capable of. If you need small lib with PropertyGrid this is for you.

Read More →

Became part of big old project? How to not fuck up all codebase? Tips & tricks and some practices.

C#, Architectural pattern, Best Practices,

Hi Everyone.
In the beginning, being a part of any big project we know nothing about the codebase, of course, we have some guesswork and we know architecture approaches which must be in there but it is always not as we expected. We face a huge amount of code and the help of other devs are not always help because they already work on the project and explanation is based on their experience and we have to investigate the codebase by ourselves. Nevertheless, it is possible to follow some simple rules to handle your tasks on a new project without messing up. This post most for juniors devs but hope experiences devs also can find something interesting.

Read More →

Finding the shortest path with Ant colony optimization algorithm

C#, algorithms,

Hi Everyone.
How often do we use graph algorithms in your daily coding? Not so often if you are a software developer as I am, most of the tasks are business logic, framework integration, or bug fixing. However, it possible to face with kind of task where graph algo is perfectly suitable certainly it is finding a short path.
Interesting? I will demonstrate a simple approach to implement the Ant colony optimization algorithm or just AOC. Hope you will find something useful for yourself in this article.

AOC has many variations some of them you can read in wiki. I'm gonna describe two of them Ant System (AS) and Ant Colony System (ACS) these approaches allow us to understand the common ideas of AOC and if you want to implement another variant or invent your own I think it is not getting trouble.

Read More →

Parsing with ReadOnlySpan and first try of OBJ reader

C#, Performance, Unmanaged, Parser, Span, 3D, .NET Core,

Hi Everyone.
I think every one of us at least one time did your parser of some text format csv/xml/html/ etc. to learn format or to learn language approach to do that or just for fun.

I did that many times, but always I didn't have enough time or/and patience to lead it to production-ready or just find better implementation. Nevertheless, I got the experience and have no regrets about it.

For your attention, my way to implement parser with Span and some tricks.

All things I demonstrate below were used for implementing 3D OBJ format reader.

Read More →

Handling unmanaged resources with Dispose & Finalize

C#, Performance, Unmanaged, GC, SharpDX, Architectural pattern,

Hi Everyone.
We all work in a managed world we do not control objects' lifetime do not worry about memory allocation (in most cases). We have GC and it does its work excellent. But the unmanaged word still exists and often we forced to interact with it. Let's talk a bit about unmanaged resources and managed approaches to acting with it.

Read More →

Struct as Key in Dictionary

C#, Performance, .NET Core,

Hi Everyone.
Due to my position often I investigate performance issues, one of it I think to be interesting to be described on an article. In this article we figure out how important to use correct struct declaration which uses in Dictionary as Key. Then we'll measure speed of different realizations as well.

Read More →