Divide and Conquer

I work as a software developer and very often must solve big, difficult problems. In most cases, first look at the problem is: “what a crap, it’s impossible to do this!”. But it isn’t true, there are no impossible things. I always take a step back, wait a moment and try to see only one or few parts of issue. Now it’s much simpler. This is divide and conquer principle. Very useful not only in IT, but also on whole live, if you know how to use it.

Continue reading “Divide and Conquer”

Why you should use Cloudflare

Yes, I know, this blog post title looks like ad. But it isn’t ad, because I use only Cloudflare free version and don’t have any contact with this company (excluding support for services). I decided to write this post, because I’ve used Cloudflare for many years and I’m very happy – please treat this like small review, and also maybe “tutorial”, how you can make your websites faster, provide better security and remove spam. Installation is very easy and you can also use free SSL – it can be great alternative to Let’s Encrypt. Let’s see, what Cloudflare offers.

Continue reading “Why you should use Cloudflare”

PHP Money Library – safe money calculations

The basic question is: why should we use this type of library and why not use the float type instead? The problem is that computers are not able (and have never been) to handle floating point values with real accuracy. While for some insignificant data this should not be a problem, in the case of recalculating the amounts of money-related transactions, it is already a serious concern. This library frees us from issues related to currency operations, storing them (or just preparing for it), adding or converting. All this without fear about lack of precision.

Continue reading “PHP Money Library – safe money calculations”

PHP/Mongo – Nested set model

Last time I created some structure for linking different elements from similar groups. This project needed high performance and easy way to get elements hierarchy, but changes are not often. After consideration I decided to implement nested set tree model to do this. All is based on PHP and use Mongo database and I would like to show you some basis operations with that. It can be helful in some cases, and that model is very efficient in read operations.

Continue reading “PHP/Mongo – Nested set model”

Podstawowe informacje o webhostingu

Jak stali bywalcy zapewne wiedzą, od czasu do czasu opisuję na łamach bloga moje doświadczenia z różnymi firmami świadczącymi usługi hostingowe (ba, czasami nawet takich doświadczeń nie opisuję – wiecie, tajne sprawy rządowe i takie tam, nic godnego czyjejś uwagi :P). Ostatnio po rozmowach z kilkoma osobami poprzez komunikator zadałem sobie jednak pytanie: czy każdy od razu wie o jakim typie hostingu piszę, i w ogóle jak możemy je podzielić? Okazuje się, iż niestety nie. Z tego właśnie powodu postanowiłem przybliżyć Wam dzisiaj chociaż kilka podstawowych terminów oraz rodzajów, a przynajmniej to, co sam wiem. Zacznijmy od tego, że oferta wielu firm jest bardzo zróżnicowana, podobnie zresztą jak potrzeby klientów i właśnie z nich wynika to rozbicie na poszczególne usługi, które znacząco się od siebie różnią. Continue reading “Podstawowe informacje o webhostingu”