MongoDB – Natural sort

One of the most common problems with databases are sorting. Let’s see an simple example: we use MySQL/MariaDB and have table with some data. We want to sort this data. Everything is ok if we use only values in the same type in field, for example numeric (maybe some amount?), strings (titles), dates, keys etc. But what if field is custom, user-typed data and may contain many types? In that case, we have big problem, because standard sorting is not enought, it will not work. Example, value: “11”, “1”, “2”, “3”, “2a” will be sorted in order: 1, 11, 2, 2a, 3, not as we expected i.e. 1, 2, 2a, 3, 11. The solution is to use natural sorting.

Continue reading “MongoDB – Natural sort”

Small story about and life decisions and cheese

Cheese

It’s very small story based on one part of one Polish book. Imagine, that there is a local shop with thousands kinds of cheese. You are shopping in this store every day. And every fuc*** day in your life, you choose gouda cheese. Always, every time, your whole life.

Imagine, you are dying. Will you happy knowing, that every day you was secure, you made secure, proven choice? Or maybe you will regret all these, wasted days?

Bryton Rider 530 – Review

Bryton Rider 530

As a very active cyclist, I use computer bike. Tried many solutions during last year and can say something about that. First was standard, digital Sigma, but without any connections, any synchronization etc. It was just simple, wireless computer bike with speed and cadence sensors. Then I tried to use old Sony Xperia. It supports ANT+, it’s small and can work some time on battery. Good? Not exactly, it was terrible. After that I use two watches – Garmin Vivoactive and Vivoactive HR after upgrade. Of course, both with special adapter. The last was Bryton, and this is small review of this computer bike.

Continue reading “Bryton Rider 530 – Review”

My first time in the USA

First time in USA

Last time I was in Chicago, USA. It was my first time not only in this city, but also on this country. I’m from Poland, so, it was very exciting for me and provided a lot of new experiences. In many cases, it was like something completely new, like conquering “The New World”. This was also an opportunity to verify some of my expectations. In this post, I would like to share some of my observations, some opinion. For readers from the USA may be a little strange, but… it will show you some important differences. If somebody thinks, that world is always and everywhere similar, that people are always similar, makes a big mistake.  Ok, let’s see, what can I tell about that trip.

Continue reading “My first time in the USA”