New life

It's been a while since my last post. I was about to write a summary of the things that happened to me in 2018, but January was too eager to end. We have August now, but who cares.

How not to be productive

To me, it is quite clear how to be productive as a software developer. I need a plan of what to do, I need to prevent any distractions, use focused time to solve the problem and implement the solution. This is my take on the opposite perspective: How to benefit from not being productive.

How I moved my blog from Ghost to Hexo

I used to use a self-hosted Ghost blogging platform the last two years. I managed to ship it with my own theme and a few applications, even though they were experimental. The version 0.11 is abandoned now as its LTS support expired on 20th of March 2017. I also had a lot of problems with updating to the 1.0 branch, so I decided to move on to Hexo - a static page generator.

11 ways to improve code review process

Regardless of the team size, before any code can be merged to the version control system it should be reviewed. It's a great way to communicate, improve the code and share knowledge across the team.

Here is my subjective list of things you can do to improve that process.

Draggable with a link

The unwanted behavior

We have a draggable item and a link inside. When a user grabs a link and tries to move it, browsers like Chrome or Firefox provide a default behavior. Thanks to that you can for example move a link to the Bookmarks bar. In our case, it's something we would rather like to avoid.

3. Making assertions with Chai

Why Chai?

As mentioned in the structure, a test case goes red when anything in the it block throws an exception. First of all, by calling a function in specs we expect that it has been executed without any error. If the code seems to be pretty simple and writing specs for it sounds like a waste of time, it's still worth to have them, at least for this information.

2. The structure of a mocha test

As I said in the introduction you can select one of the various available interfaces. My favourite is BDD and this is the interface I'm going to present here. The main goal of this interface is to help you write specs as grammatically correct sentences.

1. An idea around specs

My intention is to create a practical guide to writing specs. More important than knowing how is knowing why to write specs.

Introduction to the BDD c(o)urse

As I wrote in the I do not write tests article, my favourite testing stack is Mocha with Sinon and Chai. Why? Each of the libraries is focused on a specific problem, they are highly customizable and their big community provides many add-ons and integrations. This makes them a truly universal stack.

Weekend on Mars

It could be possible now!

Last Thursday during a press conference the head of the Intergalactic Department of the IOC presented a project of a new spacecraft, which will allow us to visit distant parts of the Universe, explore The Unknown and bring a lot of The Something to the Earth to sell it for double the price.