• The road to wisdom

    Well, it’s plain and simple to express: Err and err and err again, but less and less and less.

    --- Piet Hein

    Continue   
  • How to avoid concurrency issues in React

    5adaf9bed8150valentino rossi alvaro bautista motogp racing 62686

    React proposes a simple declarative way to build an application’s view. It’s straightforward to write a hierarchy of stateless components or to change a state synchronously. The whole app works as an integration of two pure functions “state(event)” and “view(state)“. The behavior is testable and predictable. But you can’t make something complex without depending on an external data sources integration: side effects come into the stage. Beware, you’re approaching the Dark Zone of functional programming now :) 

    Continue   
  • Server-side Google Analytics

    5a75d16261704analytics

    Usually, people integrate Google Analytics into their shops via simple pre-generated client-side javascript snippet. It’s pretty straightforward, easy to use and works most of the time correctly from the box. So why would anyone want to use a server-side integration? There could be a helluva lot of reasons for that. For example, you may want to track some events from your server-side workers — it would be ugly and unreliable to involve a browser here. Or you may want to implement a complicated funnel for your sales, mixing client-side events with your CRM events. So, is it possible? Sure, it is, and we’ll use Measurements Protocol for this. At the time, it’s a most modern way to save raw analytics data to Google Analytics from whatever environment you want. I’ll use PHP with Guzzle for code examples, but you surely can use any language and any library: there are no differences in principle at all. And let’s assume that you already have the perfectly working client-side integration.

    Continue   
  • Windows workspace with WSL and Docker

    Introduction

    5a721f2ec51aasandwich

    As a web developer, I frequently use a lot of command line tools to make my life easier. I prefer to be able to assemble a computer from whatever hardware I want, so I don’t like Macs and stuff like this. Linux desktops are good enough our days, but I love to play video games from time to time, and it wouldn’t be effortless to keep two different operating systems for work and entertainment. My best compromise was to use Windows.

    Continue   
  • Using Letsencrypt with Docker

    5ada4af31481fpexels photo 892548

    Who needs all those paid certificate providers while we have such a brilliant project as Letsencrypt? It allows a domain owner to obtain a valid certificate for his domain in a matter of seconds without the boring stuff like generating CSR, making DNS verification records or even passing documents to the certificate issuer center. However, paid certificates most often have an expiration time of a year. And free Letsencrypt certificates live only for a couple of months. But it’s definitely not a huge problem if there is a way to automate the renewal process. And there it is.

    Continue   
  • Books

    Books were hard to get at a time when I was a kid. They were expensive and, moreover, there was a complete lack of them. Many people owned no books at all, and some other copied them manually (by hand). But there always were a lot of books in our family, and it was shocking to me back then — to see no books at all in a room.

    Continue   
  • A Few Notes on Composition of Reducers

    5ada4a05c5b4apexels photo 355288

    Managing the state of an application with libraries like redux is awesome. It provides a really easy way to write simple and testable code for state transitions. You only need to decide on a structure of the desired state and write a corresponding pure function.

    Continue   
  • How To Update Cloudfront Certs With Letsencrypt

    Letsencrypt is an excellent service for obtaining totally free security encryption certificates. Fortunately, it also has a marvelous client named Certbot. Let’s install it.

    Continue   
  • Just saying «Hello» and chilling around

    I have never been really good at writing. I won some rewards in my childhood. I wrote some shitty verses in my youth. None of those achievements really were significant for the universe around me. It was all like a silly child play with the symbols I barely know. Move one back and another forward, make a stanza, make another one, make them a little bit more shiny. I experienced that well-known fear of a blank page. And I experienced that recursive «oh, I can do this paragraph better» annoying thing too. But I love writing, I really do. I have dreamt about writing a book all my life long just like my grandfather had dreamt before me. That’s why I have decided to write my thoughts in English: to master my slack skills with practice that makes me happy.

    Continue   
  • Как я перестал бояться и полюбил конфиг

    Как правило, наибольшего успеха добивается тот, кто располагает лучшей информацией

    Бенджамин Дизраэли

    Лишь совсем простые приложения могут обойтись без файла конфигурации. У остальных всегда найдется, что хранить в конфиге: настройки окружения, настройки логики, часто меняющиеся фрагменты текста, etc. Словом, вопроса «что хранить в конфигурации» обычно не возникает: кандидатов достаточно. А вот вопрос «как хранить конфигурацию» возникает часто и еще чаще решается не самыми оптимальными способами. В этой статье я хотел бы рассмотреть варианты хранения конфигурации приложения, их плюсы и минусы.

    Continue   
One is the pinnacle of evolution; another one is me

One on the picture is the pinnacle of evolution; another one is me: inspired developer, geek culture lover, sport and coffee addict