Data Type Should Not Be Considered As a Source of Its Behaviour

31 May 2020

When you start learning a programming language(or just programming in general), usually there are first few chapters in books that introduce us such thing like data types (or just types). And we don't focus on this subject as much as we should because it's so simple, right? Well… I think that there is one little detail which can lead to big mistakes of understanding what really data type is.

continue...

Object-oriented Programming. What Else Did You Expect?

2 April 2020

Object-oriented programming(and I am not going to cut it further in the article) is extremely complex subject to discuss. Not only because it has such term like object as the core idea of this paradigm, which can be interpreted in many different ways, but because even if there is some agreement about what object really is, there are a lot of questions on how to implement it technically.

continue...

What's Wrong With EO

22 February 2020

If you don't know what Elegant Objects(or EO) conception is, you should check these articles out in order to understand this particular article(I read them all). I will try to explain why the whole idea of EO is not solving the main problem that it's supposed to solve: maintainability.

continue...

EHTML: Front End Development Can and Should Be Simple

19 November 2019

Every moment a new JavaScript framework borns here and there, and all of them claim that they are better than other ones for different irrelevant and stupid reasons. The main problem with all those frameworks is JavaScript. And I like this language very much, but it's painful to maintain. Mostly because it's difficult(or even impossible) to make it completely declarative on the client side. On the other hand, HTML is a completely declarative language, it's easy to read and modify. So, why don't we try to replace JavaScript with HTML where it's possible (or just everywhere).

continue...

Why I Don't Use Promises and Async/Await Abstractions in Node

9 August 2019

In this article, I'll talk about callback hell again. But this time, I'll try to describe how I see this problem, and why I actually think that this is a problem. Also I'll explain why I think that abstractions such as Promise and async/await don't help us to structure our code in a better way. I'll demonstrate my solution that's based on ideas of declarative programming. And I'll show you why I think that declarative constructions is the only good way to write asynchronous code for big and complex applications.

continue...

Simple JWT Implementation in Node.js: Asymmetric Variation

7 April 2019

In the previous article, I explained how you can implement authorization and authentication via JWT using symmetric algorithms such as HS256. Now, I'll try to explain asymmetric approach (RS256).

continue...

Simple JWT Implementation in Node.js: Symmetric Variation

6 April 2019

In this article, I'll explain how easily you can implement authorization and authentication via JWT using only standard modules in Node.js. So, it might be interesting to you, if you really want to know how it works.

continue...

How I Control Quality of npm Packages via Travis CI

6 March 2019

Let's say you want to create an open source JS library and publish it to npm and also release it to GitHub. You can do it manually, but it's not convinient and you'll not be able to control quality of your project. I've created a solution that can help to automatize the whole process and allows to catch problems in code before it's released. In this article, I'll share my variation of configuration that I use in Travis CI and try to explain in detail how it works. You might find it very useful, especially if you use restricted master branch in your repo.

continue...

Page: Declarative Web Framework for Node.js

1 October 2018

I am glad to introduce my web framework Page. It can be described as a base for any applications on top of it with server and client in Node.js. It provides a lot of features and common scenarios for using web. It's completely based on the Async Tree Pattern that allows you to customize Page in any way you want, you can even throw it away and build other base core for your application. In another words, Page is just an example of how you can build your application using libraries that are based on cutie. In this article, I will list conceptual points why you should thnk about moving to such framework as Page.

continue...

Declarative REST API

16 June 2018

We all are used to MVC for building REST applications. In this article, I'll show how you can build REST API using declarative approach. It'll be demonstrated on my library cutie-rest which was released recently.

continue...

Convenient Test Executor for Node.js

6 May 2018

I was really surprised not finding a convenient test runner/executor in npm that can run test scripts in directory/directories recursively from the code. Also it would be nice to log how many tests are failed and passed, log stack traces of failed scripts, and log execution time. Moreover, I wanted to run scripts asynchronously. So, I decided that it's a great opportunity to create a such tool. I've called it test-executor, and it's iteresting that this name was available in npm. In this article I'll explain how this library works and how to use it.

continue...

As Conception in Async Tree

6 May 2018

If you don't know what async tree is, you definitely should take a look at this. So in short, it's a beautiful abstraction the main idea of which is to make our code declarative in asynchronous environment. So, assuming that you know (or just acquainted with) this conception, I want to describe how managing of cache could be implemented for this abstraction.

continue...