Single Responsibility Principle (or SRP) is one of the most important concepts in software development. The main idea of this concept is: all pieces of software must have only a single responsibility.

Why SRP is important? It is the main idea that stands behind software development. Decompose complex tasks to the set of simple building blocks to compose complex software from them back again. Just like we can compose lego or builtin functions:

print(int(input('Input number: ')))

This article will guide you through a complex process of writing simple code. I personally consider this article rather complicated and hard to percept…

Repo link:

My story

It was an early morning. I was drinking my first cup of tea and reviewing a pull request from another developer.

It looked pretty well. Just some new python dependencies to generate beautiful reports. And a bunch of new alpine libraries to make sure everything will work.

So, I have merged it without any hesitations.

Several hours later I have found out that our image size increased from ~200 MiB to ~1.5 GiB in size. This is unacceptable!

So, I have written this script to restrict the maximum image size in the future:

SIZE="$(docker image…

Agile people are obsessed with writing user stories. And it is a powerful instrument indeed. But, from my practice a lot of people are doing it wrong.

Let’s see an example:

As a user 
I want to receive issue webhooks from Gitlab
So that I can list all current tasks

Seems like a valid user story, doesn’t it? In fact, this tiny story contains multiple issues. And if you cannot find at least 8 mistakes in it — this article will be worth reading for you.

This article is split into three main parts:

  1. Getting better with the default user…

What is a slug?

The term “slug” comes from the world of newspaper production. If you have ever created a simple “Blog” application you have already reinvented it.

When you need to access any post at some URL you need to identify it somehow. The simplest idea is to identify them by id, but that does not seem too pretty. It would be better to identify your posts based on its title or content. So, a blog post with a title “Creating slugs for Ecto models” would be accessible via a nice-looking URL: Where creating-slugs-for-ecto-models is a slug. Pretty cool, isn’t it?


Some time ago I was faced with a task of testing a bash script. At first I decided to use Python unit-tests, however, I was reluctant to bring external technologies to the project. Therefore I had to go with the testing framework written in the notorious bash.

Overview of the existing solutions

After googling available solutions, I was presented with very scarce options. We are going have a closer look at some of them.

Which criteria are going to be important?

  1. Dependencies: when taking a bash testing framework you wouldn’t want it to drag python, lua, and a few more systems packages along with it

When npm@5 was just released this question was the first one I have googled. No doubts it comes to mind since new npm version introduced a lot of yarn’s features. In other words: should I still use yarn after installing npm@5?

Yarn features

Why do people use yarn in the first place? npm had some known issues. Well, we all have been there: downloading and installing packages for hours, resolution hell, not using essential --save and --save-dev by default, and many others.

When yarn was first released it solved many of these issues completely. It offered multiple improvements:

  1. yarn add saves a…

Phoenix Framework always has been awesome. But it was never as awesome as the new 1.3 release (which is rc1 right now actually).

There are a lot of significant changes. Chris McCord made a great job writing a complete migrating guide. Inspired by it and by the talk Chris gave at the LonestarElixir this article will try to guide through the most important changes in the phoenix project.

Let’s get started!

Problems to solve

phoenix is new. And naturally it has some issues. The core team has worked really hard to solve some of the most curial ones in the newest release. …

Псс, парень, не хочешь немного brew?

Вступление к серии

Передо мной недавно встала задача, как распространять одну консольную утилиту? Обычные мои инструменты вроде pip, npm и gem не подходили в силу языка самой утилиты — bash. Тогда стало понятно, что нужно распространять свое приложение в том числе и через системные пакетные менеджеры. Для Mac — в силу отсутствия встроенного — таких пакетных менеджеров несколько. И у каждого из них есть свои особенности и недостатки. И в первой части я хочу более подробно остановиться на Homebrew, и как создавать пакеты для него.

Ну а чтобы установить приложения на Linux, то нужно будет собирать пакеты…

Organize Django settings into multiple files and directories. Easily override and modify settings. Use wildcards and optional settings files.

Managing Django’s settings might be tricky. There are severals issues which are encountered by any Django developer along the way.

First one is caused by the default project structure. Django clearly offers us a single file. It seams reasonable at the first glance. And it is actually easy to use just after the start. But when it comes to the real-world it only causes misunderstanding and frustration .

At some point, you will need to put some kind of personal settings in the main file: certificate paths, your username or password, database connection, etc. But putting your user-specific values…

Nikita Sobolev co-founder, ElixirLangMoscow co-organizer, open source developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store