Yegor Bugayenko's Blog, page 20
May 9, 2017
How Does Inversion of Control Really Work?
IoC seems to have become the cornerstone concept of many frameworks and object-oriented designs since it was described by Martin Fowler, Robert Martin and others ten years ago. Despite its popularity IoC is misunderstood and overcomplicated all too often.
[image error]Le conseguenze dell'amore (2004) by Paolo SorrentinoLook at this code:
print(book.title());It is very straight forward: we retrieve the title from the book and simply give it to the print() procedure, or whatever else it might be. We...
How Does Inversion of Control Really Work
IoC seems to have become the cornerstone concept of many frameworks and object-oriented designs since it was described by Martin Fowler, Robert Martin and others ten years ago. Despite its popularity IoC is misunderstood and overcomplicated all too often.
[image error]Le conseguenze dell'amore (2004) by Paolo SorrentinoLook at this code:
print(book.title());It is very straight forward: we retrieve the title from the book and simply give it to the print() procedure, or whatever else it might be. We...
May 1, 2017
A Remote Slave Is Still a Slave
Working remotely is definitely a trend, according to the BLS and my personal observations. "Let them work from home" seems to be the silver bullet for every second startup and even some big companies like Buffer, Automattic, Groove, and many others. However, in most cases, the replacement of a brick-and-mortar office with a virtual one doesn't help companies and their slaves employees become more productive.
[image error]Happiness (1998) by Todd SolondzWorking from home, also known as work...
April 24, 2017
SixNines.io, Your Website Availability Monitor

Availability is a metric that demonstrates how often your website is available to its users. Technically, it's a ratio between the number of successful attempts to open the website and the number of failed ones. If one out of a hundred attempts failed, we can say the availability is 99 percent. High-quality websites aim for so-called "six nines" high availability, so named by the number of 9s in the ratio: 99.9999 percent. We created a service that helps you measure this metric...
April 17, 2017
Why I Won���t Help You Via Email
I've been blogging and writing for almost three years now, and a few times a week I get emails or Facebook and Telegram messages from people I don't really know. They ask questions about Java, management, object-oriented programming, and other things they believe I understand and can help them with. Well, my contact details are published right in the header on my blog—what else would I expect, right? True, but even though I always reply to them, I never answer their questions.
...April 10, 2017
Flexibility Equates to Lower Quality
There are two opposing mindsets: "If it works, it's good" vs. "If it's good, it works;" or "Make it work" vs. "Make it right." I'm talking about the software source code. I've been hearing this almost every day in blog comments: Why do we need all those new OOP principles if our code works just fine without them? What is the point of introducing a new way, which is supposed to be "better," if the existing, traditional, semi-obj...
April 4, 2017
PDD in Action

Puzzle-driven development (PDD) is a methodology we've been practicing on our teams for more than seven years. Using PDD, we delegate the responsibility of task decomposition to its performers, eliminating the role of a project manager. We've been using our proprietary software for that. A month ago, we made it public, open source, and free. It is available as 0pdd—a GitHub-based chat bot.
[image error]0pdd.comHere is how you configure it, in two steps. First, you grant read-only access t...
March 27, 2017
SOLID Is OOP for Dummies
You definitely know the SOLID acronym. It stands for five principles of object-oriented programming that, if followed, are supposed to make your code both legible and extensible. They were introduced almost 30 years ago, but have they really made us better programmers in the time since? Do we really understand OOP better thanks to them? Do we write more "legible and extensible" code? I don't think so.
[image error]Dumb & Dumber (1994) by Peter FarrellyLet's go one by one and see ho...
March 23, 2017
The TDD That Works for Me
Test-driven development (a.k.a. TDD) was rediscovered by Kent Beck and explained in his famous book in 2002. In 2014, David Heinemeier Hansson (the creator of Ruby on Rails) said that TDD is dead and only harms architecture. Robert Martin (the inventor of the SOLID principles) disagreed and explained that TDD may not work only in certain cases. A few days later, he even compared the importance of TDD with the importance of hand-washing for medicine, and added that "it would not surprise...
March 6, 2017
Traits and Mixins Are Not OOP
Let me say right off the bat that the features we will discuss here are pure poison brought to object-oriented programming by those who desperately needed a lobotomy, just like David West suggested in his Object Thinking book. These features have different names, but the most common ones are traits and mixins. I seriously can't understand how we can still call programming object-oriented when it has these features.

First, here's...