About Me - The Short Story

I am a lonely Python/C++ coder with a background in financial markets and an interest in modern art. I am an application-driven guy, not a computer scientist. Sure I have many gaps in my knowledge, but I strive to do my best to fill them. I keep learning new things, listening to smart guys, correcting my mistakes, and pushing myself to the limits. I enjoy it.

I will use this website both as a blog and as a hub to some of my projects. It is written from scratch in Python's Flask, my favourite web-framework.


Use std::map to calculate density of elements

Often there might be a need to calculate how many times each element from a particular collection appears in that collection. For example, having a string, we might want to how many times each letter appears, or how many times each word...

c++ 
stl 
map 


Map function to a particular value in C++

Imagine a simple task. You have a bunch of values, for example, strings (but it can be any other object, int, float, whatever..) and you a have a bunch of functions, (more generally callables, so it can be a functor, lambda.. etc.) and you...

c++ 
stl 
map 
function 
bind 


Normalize strings in a container effectively

Having a container of string (vector of emails) and you need to make all the letters uppercase or lowercase or perform whatever else. 

You want to do it as effectively as possible, no copying, no raw loops. Quite a typical use...

c++ 
stl 
algorithms 


Structured binding to access multiple return values

In C++ quite often you may want to return multiple values from a function and access it afterward. Here are few options for how things were done before C++ 17 structured binding was introduced.

Let's say we have a function like this...

c++ 
c++17 
stl