Flavours of rounding

How often do you round various numbers in your day-to-day job? Do you know what type of rounding do you actually use? Let’s compare several programming languages and their default (meaning without additional parameters if the rounding function allows it) rounding techniques. I’ll use two notions of rounding: banker’s rounding and round half up. More info about different techniques can be found on Wikipedia. .NET In dotnet (Framework, Core, 5+) banker’s rounding is used by default....

August 20, 2021 · 2 min

Postgres pg_stat_statement setup via docker

Sometimes we want to track and analyze SQL in postgres. It may be that you use some fancy ORM and all SQL is abstracted away, but then you begin to notice some performance drops and you’re starting to suspect that the SQL you expected to be run “very efficiently”, in fact performs poorly. That’s how I’ve got acquainted with pg_stat_statements tool. I suggest to read about it on the official site....

January 27, 2020 · 3 min