About Me - The Short Story

I was initialized as a pure C++ programmer and believed there is nothing better than that. Then I reimplemented myself into a Python coder and somehow ended up as a Java backend developer. I am currently working as an application engineer in a multinational company that specializes in the trading of energy commodities. My background is in finance. I got a diploma in financial management and before I became a developer I used to trade futures on CME derivative exchanges. I am interested in art, sport, meditation, hi-tech, nature and everything in between.

I will use this website both as a blog and as a hub to some of my work (project or demos). This web is written from scratch in Python Flask, my favourite web-framework.


Install dependencies from poetry to separated venv

Here is a short description on how to install all dependencies from project that uses poetry to a separated virtual environment. Even though it might seem straighforward, I spent quite a bit of time figuring it out.  Maybe it was due to...

poetry 
venv 
virtualenv 
pycharm 


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 


The quickest way to set up C++ on Windows

Let's say you have a new Windows laptop or a new VPS and you just want a quick, short and sweet set-up so that you can compile and run some C++ code in a minute.

Here is how you do it.

First, download VS Code. When you are...

c++ 
windows 
instalation 


Connect java to database (JDBC in 6 steps)

JDBC stands for Java DataBase Connectivity, which is a fancy name for a simple process - connecting a java app to a database. For connecting a java app to a database, you need to perform these steps. 

1] Load and register a driver...

java 
databases 
oracle 
jdbc 


Creating one to many relationship in Flask-SQLAlchemy

In this post, I want to make clear how to set up a one-to-many relationship in Flask SQLAlchemy. Properly placing the foreign keys and references to the parent tables might be confusing especially at the beginning. At least for me, it was....

databases 
sqlalchemy 
orm 
flask 


Observer design pattern in Python

The observer pattern is a useful design principle allowing some objects to be notified about a change that happens in another object. It provides a way to implement a "subscription mechanism", widely used in web, GUI, or...

python 
design patterns 
object-orientation 


Setting up PostgreSQL database on Fedora

How to do the initial set up for working with PostgreSQL on Fedora. I will cover the installation, creating a database, and binding that database to a particular non-root user so that it is easy to use. I will also show couple of basic...

databases 
postgres 
fedora 


Multithreading vs Multiprocessing. When to use what?

Multithreading and multiprocessing can be confusing because they aim to achieve the same - run your code faster. There is actually a huge difference between these two and in a way their use is quite opposite so if you mess up one with the...

python 
multithreading 
multiprocessing 


Tuple is not just an immutable list

All too often I see people referring to tuple as an immutable list. Also many tutorials on Python present tuples just as a list that cannot be changed. Although it is true that tuple is immutable, there is actually much more to...

python 
data-structures 
tuple 
list 


How to implement a tagging system in Flask

You have probably noticed that each article on this blog contains several tags, and these tags are hyperlinks so that when you click them, only articles containing the particular tag appears. Although it is very straightforward, at first I...

python 
flask 
jinja 


Filter a list based on a Boolean selector

I believe in code expressivity and this tip is exactly about that. Lately, I got into a situation where I had two lists and I needed to filter one based on the values of the other.

For that case, it is probably best to use compress...

python 
itertools 
compress 


Caveat when removing elements from Python list or dict

There is a caveat when removing duplications from a list in Python using for loop. One thing you have to keep in mind to make it correct is, that you need to iterate over a copy of the list, not the list itself.

Suppose you have this...

python 
data-structures 
list 
dict