ProgrammingPure Functions And Side EffectsMarch 10, 2019ProgrammingIn 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 doeOpen/Closed Principle - SOLIDNovember 13, 2017ProgrammingOCP 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 modulDon't Mock What You Don't OwnNovember 11, 2017ProgrammingI 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 mightLiskov Substitution Principle - SOLIDNovember 10, 2017ProgrammingIn 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