How to

Hexo git deployer removes commits history? Let's do something about that!

I have found Hexo a great tool for building a blog and apply many well-known software development principles. One of them is automation. This is why I have decided to integrate this blog with Travis CI to perform a deployment to GitHub pages. It was a great decision, however a few days later I have noticed one significant issue - deploying a new version of the blog from the CI server caused removing all commits from master branch and starting with initial commit over and over again. It took me a while to find working solution to this problem. This blog post explains a simple solution to this problem.

Read more →

Programming tips

How Groovy's equal operator differs from Java?

One of the first mistakes people do when starting their journey with Java programming language is using == to compare objects instead calling a.equals(b). When you begin playing around with Groovy you quickly notice that equal operator == is used to compare objects in place of calling a.equals(b). "Finally something more intuitive!" you might think. In today’s article we will dig a little bit deeper to learn avoiding problems equal operator in Groovy may produce.

Read more →

Programming tips

Groovy: static propertyMissing and methodMissing methods - limitations and possible issues

Some time ago I have found another interesting Groovy related question on Stack Overflow. This time someone was asking about static variants of popular propertyMissing and methodMissing methods. The official Groovy documentation does not explain how to do it - it only explains how to add any static method through metaClass. Today we are going to learn how to define these methods in two different ways.

Read more →

Software developer career boost

365 consecutive days on Stack Overflow - what I have learned from this experiment

A few days ago I have reached 365 consecutive days on Stack Overflow. In the beginning of July 2017 I have decided to run an experiment - visit Stack Overflow every single day and do something useful to other community members (answer a question, review one of the queues, edit and improve existing questions and so on). Now it is the best time to summarize this experiment and share my thoughts with you.

Read more →

Programming tips

Count frequency of a digit in a factorial of number using Haskell

Some time ago I was interviewed to one of the Java-based projects and I was asked to solve this pretty interesting puzzle. The question was "how to count frequency of a digit in a factorial of number, let’s say 1000". I tried to solve it using Java 8 Stream API, but I guess you see how bad decision it was. Problems like that can be easily solved with pure functional languages and today we are going to find out how to solve this puzzle with Haskell.

Read more →