• Posts
  • Javascript
  • React
  • About
  • Videos

Programming

Pure Functions And Side Effects

March 10, 2019Programming

In computer programming pure function is a function that satisfies two conditions: It is deterministic , which means that for any given input it will always return same output. It has no side effects . Which means it doe

Open/Closed Principle - SOLID

November 13, 2017Programming

OCP states that software entities (classes, modules, functions) should be open for extension, but closed for modification. Let's figure out what exactly does it mean… That basically means that you should write your modul

Don't Mock What You Don't Own

November 11, 2017Programming

I was refactoring specs of some Rails application when I decided to mock the ImageUploader class of CarierWave. I wanted to be able to check for specific image url. But was it a good idea? No, Don't Do It I know it might

Liskov Substitution Principle - SOLID

November 10, 2017Programming

In 1988 Barbara Liskov wrote something that now stands for L in SOLID principles. Let's dive in and learn what is it and how does it relate to TDD . Here is the original formulation: "If for each object o1 of type S ther