DENROX
  • Programming
  • Book reviews
  • Notes
Tell don't ask design principle
In this post, I'm going to talk about the design principle called "tell don't ask".
Dependency Injection, SRP, lowering code coupling
In this post we will discuss what the dependency injection is and how it relates to the Single Responsibility Principle from SOLID and inversion of control.
Liskov Substitution Principle and the robustness principle
Let's talk about the Liskov substitution principle. Liskov substitution principle is the L in the SOLID object-oriented design principles. In fact, the principle is actually really really simple.
ES6: not so good parts
In this post I propose to talk about ES6. ES6 gave us a lot of features that are definitely very cool. For me, these are a "map", "set", "weak map", "weak set", some functional programming elements (new.target, Symbol.species, etc), Symbol, the spread operator and possibility to use it for breaking strings into tokens. But in this post, I want to talk about those main features of es6, which, in my opinion, have small downsides.
Data Clumps code smell
Let's talk about data clumps. Data clumps are a code smell, and we remember that a code smell is an indicator that something may be poor about the architecture of your code. It's not necessarily that it's definitely is poor, it's just an indicator that it might be so.
Message obsession and primitive obsession
I came across the super interesting blog post about a concept the guy called message obsession. So it's a code smell that the guy claims to have invented, and he puts it in contrast to the code smell called primitive obsession.
Directive for tracking outside click in angular 5.
Let's say we use angular 5 or greater and we want to track clicks outside of specific elements. And even more. Sometimes we need to track outside clicks which happened only on specific area.
Setting up gogs with nginx in docker containers
I looked for analogues for gitlab because of some issues which I experienced while managing my git repos with it.

I stopped on gogs because it is more lightweight and works much faster comparing to gitlab-ce.

Here is a short note of how to get dockerized gogs running.
Transform nested objects with mongoose
Mongoose does not have a possibility to configure your schema to transform nested arrays of objects. In this post we will look at a possible workaround for this.
E-Type, P-Type, S-Type systems
In 1970s Manny Lehman suggested a set of Lehman's laws of software evolution. These laws only apply to a certain type of systems so he divided the systems into three categories:
- E-type
- P-type, and
- S-type systems
Primitive obsession explanation
Let's talk about primitive obsession. So primitive obsession is when you are using primitives to represent domain concepts. We'll talk about examples, but let's first talk about it.

So let's start with the question what is a domain concept.
CQS - trivial habbit which keeps your code from failure
Let's talk about CQS (command query separation). Command query separation is a term first formulated by Bertrand Meyer who is the creator of "eiffel" programming language. Command query separation essentially states that you should separate your queries from your commands. Is is kind of intuitive name right? But what does that actually mean?

Let's first get it clear that what we are talking about in this post is methods.
Moving rc-style angular4 project to loadChildren usage
Let's say you try to move some existing project to lazy loading modules using "loadChildren" property of your routes.
In this post you can find few typical errors which you may get while moving angular 2 project to lazy loading modules in routes.
Why your drag and drop can be laggy in Angular 2, ngZone example
Example of drag and drop directive implementation in Angular2+. Includes example with HostListener and a bit better example with NgZone.runOutsideAngular
Notes from "CSS secrets" by Jeffrey Zeldman (part1)
This part of notes covers following topics: using css4 variables, using currentColor reference, using gradients for creating interesting backgrounds, implementing inner rounded corners without extra html, etc.
© 2019 denrox.com All Rights Reserved
My name is Denis Bashkatov,
You can contact me via email deba@denrox.com