Why I Don't Publish E-Books

  • 811 words
  • 4 minutes to read
  • comments

Very often readers of my books ask me why I don’t publish them in digital format as e-books for Amazon Kindle, EPUB, FB2, or simply PDF. There are a few reasons. It’s time to summarize them all and explain why dead trees are the only way to go if you want to read my content.

Command, Control, and Innovate

  • 745 words
  • 4 minutes to read
  • comments

Command and control has worked effectively in military units across the world for thousands of years. But apparently we’ve just discovered that the best companies are built on different verbs, which are inspire, delegate, trust, lead, innovate, etc. The question is whether we really uncovered something new that our predecessors failed to understand for ages or something else is going on.

OOP Without Classes?

  • 214 words
  • 1 minutes to read
  • comments

I interviewed David West, the author of the Object Thinking book, a few weeks ago, and he said that classes were not meant to be in object-oriented programming at all. He actually said that earlier; I just didn’t understand him then. The more I’ve thought about this, the more it appears obvious that we indeed do not need classes.

Inheritance Is a Procedural Technique for Code Reuse

  • 791 words
  • 4 minutes to read
  • comments

We all know that inheritance is bad and that composition over inheritance is a good idea, but do we really understand why? In most all articles I’ve found addressing this subject, authors have said that inheritance may be harmful to your code, so it’s better not to use it. This “better” part is what bothers me; does it mean that sometimes inheritance makes sense? I interviewed David West (the author of Object Thinking, my favorite book about OOP) a few weeks ago, and he said that inheritance should not exist in object-oriented programming at all (full video). Maybe Dr. West is right and we should totally forget extends keyword in Java, for example?

Gradients of Immutability

  • 910 words
  • 5 minutes to read
  • comments

Good objects are immutable, but not necessarily constants. I tried to explain it here, here, and here, but now it’s time to make another attempt. Actually, the more I think about it, the more I realize that immutability is not black or white—there are a few more gradients; let’s take a look.

Vertical vs. Horizontal Decomposition of Responsibility

  • 712 words
  • 3 minutes to read
  • comments

Objects responsible for too many things are a problem. Because their complexity is high, they are difficult to maintain and extend. Decomposition of responsibility is what we do in order to break these overly complex objects into smaller ones. I see two types of this refactoring operation: vertical and horizontal. And I believe the former is better than the latter.

Eight Levels of Communication Maturity

  • 588 words
  • 3 minutes to read
  • comments

Each software team organizes its communications in its own specific way. Some use Slack, Trello, or GitHub; others just sit together in the same room. There are many methods and tools. I believe it’s possible to rank them by the amount of damage they cause to your project. This is the list of all of them I’m aware of at the moment.

What's Wrong With Object-Oriented Programming?

  • 1007 words
  • 5 minutes to read
  • comments

Recently, I was trying to convince a few of my readers that a better understanding of an object in OOP would help us solve many problems in existing pseudo-object-oriented languages. Then, suddenly, the question came up: “What problems?” I was puzzled. I thought it was obvious that the vast majority of modern software written in modern OO languages is unmaintainable and simply a mess. So I Googled a bit, and this is what I found (in chronological order).

If-Then-Else Is a Code Smell

  • 468 words
  • 2 minutes to read
  • comments

In most cases (maybe even in all of them), if-then-else can and must be replaced by a decorator or simply another object. I’ve been planning to write about this for almost a year but only today found a real case in my own code that perfectly illustrates the problem. So it’s time to demonstrate it and explain.

A Distributed Team Delivers Code of Higher Quality

  • 948 words
  • 5 minutes to read
  • comments

OK, the title is not exactly accurate. I’ve missed the “can” word. A distributed team can deliver code of much higher quality than a co-located one, and now I’ll explain why. Of course, not every distributed team can do that. Most of them can’t even deliver code that works, let alone quality code. But if a team—a distributed one—is managed according to the principles I’ll explain now, the quality will be much higher than the same team can achieve if co-located. What I’m going to show you is that working in a remote mode, if done right, guarantees higher quality of code. Surprised?

8+2 Maturity Levels of Continuous Integration

  • 508 words
  • 2 minutes to read
  • comments

There are a number of levels you have to go through before your continuous integration pipeline becomes perfect. I found eight of them and presented my findings at DevOpsDays in Salt Lake City a few weeks ago (watch the video). Now it’s time to write them down and ask you—Which level are you at? Post your answer below.

ActiveRecord Is Even Worse Than ORM

  • 493 words
  • 2 minutes to read
  • comments

You probably remember what I think about ORM, a very popular design pattern. In a nutshell, it encourages us to turn objects into DTOs, which are anemic, passive, and not objects at all. The consequences are usually dramatic—the entire programming paradigm shifts from object-oriented to procedural. I’ve tried to explain this at a JPoint and JEEConf this year. After each talk, a few people told me that what I’m suggesting is called ActiveRecord or Repository patterns.

Convince Me!

  • 908 words
  • 5 minutes to read
  • comments

I’ve already explained how I understand the role and responsibilities of a software architect. But one question still remains unanswered, and it often turns into a problem in our projects: What does a software architect do when the project sponsor doesn’t like his technical decisions? The architect implements something in a certain way, and the sponsor (or its representative) says that it’s not exactly how things should work. What’s next?

The Law of Demeter Doesn't Mean One Dot

  • 628 words
  • 3 minutes to read
  • comments

You’ve probably heard about that 30-year-old Law of Demeter (LoD). Someone asked me recently what I think about it. And not just what I think, but how it is possible to keep objects small and obey the LoD. According to the law, we’re not allowed to do something like book.pages().last().text(). Instead, we’re supposed to go with book.textOfLastPage(). It puzzled me, because I strongly disagree. I believe the first construct is perfectly valid in OOP. So I’ve done some research to find out whether this law is really a law. What I found out is that the law is perfect, but its common understanding in the OOP world is simply wrong (not surprisingly).

Who Is an Object?

  • 1132 words
  • 6 minutes to read
  • comments

There are thousands of books about object-oriented programming and hundreds of object-oriented languages, and I believe most (read “all”) of them give us an incorrect definition of an “object.” That’s why the entire OOP world is so full of misconceptions and mistakes. Their definition of an object is limited by the hardware architecture they are working with and that’s why is very primitive and mechanical. I’d like to introduce a better one.

Twelve Mistakes in Agile Manifesto

  • 1709 words
  • 9 minutes to read
  • comments

Nowadays, Agile Manifesto is a Bible of numerous software teams. It contains 12 principles which show us how software development should be organized. These principles were invented in 2001. Generally, I like and agree with all of them. However, in practice, most software teams misunderstand them. Consequently, here is a summary of what’s going on and my interpretation of each principle.

Key Roles in a Software Project

  • 379 words
  • 2 minutes to read
  • comments

I believe that several roles should be present in a majority of software projects. Managed by Zerocracy according to the principles of XDSD, we’ve got all of them in our projects. However, beware that in other management methodologies, these roles may have different meanings. This blog post is mostly for people who work with us, either as clients or freelancers.

Singletons Must Die

  • 662 words
  • 3 minutes to read
  • comments

I think it’s too obvious to say that a singleton is an anti-pattern as there are tons of articles about that (singleton being an anti-pattern). However, more often than not, the question is how to define global things without a singleton; and the answer to that is not obvious for many of us. There are several examples: a database connection pool, a repository, a configuration map, etc. They all naturally seem to be “global”; but what do we do with them?

How to Hire a Programmer

  • 1172 words
  • 6 minutes to read
  • comments

I get asked this question very often: Where and how do you find and hire a good programmer? Since I’m a programmer and I manage software projects, I’m supposed to know the tricks. I do, of course; there are many of them, but the list below succinctly summarizes the most important ones.

Don't Use Java Assertions

  • 396 words
  • 2 minutes to read
  • comments

There are basically two ways to validate a situation in Java and complain when something unexpected happens. It’s either an exception or an assertion. Technically, they are almost the same, but there are some small differences. I believe that exceptions are the right way to go in all situations and assertions should never be used. Here’s why.

11 Mistakes Conferences Keep Making

  • 1366 words
  • 7 minutes to read
  • comments

I was talking yesterday with a few friends who were software conference organizers. They were asking about my opinion of the conferences I’ve recently attended. Basically, they were interested to know what I would suggest for improvement. So, I decided to summarize it in a list of the most typical mistakes all conferences keep making and give them some ideas. Remember, I’m judging from a speaker’s position. The most serious mistakes and pieces of advice are at the bottom.

Who Is a Project Manager?

  • 2012 words
  • 11 minutes to read
  • comments

A project manager is very often confused with a leader. However, they are two very different things. A project manager is the one who predicts the future, while a leader is the one who builds it. And, in my opinion, a perfect project manager is much more valuable for a project than a leader. If a leader is valuable at all…

What to Worry About in Convertible Notes

  • 2030 words
  • 11 minutes to read
  • comments

“Convertible Notes” is what you most likely will hear the first time you get money for your first startup. They will give you cash asking to give them the convertible notes (or SAFE, which is very similar). Convertible notes are just a few pages of paper with two signatures at the bottom. Not too much to worry about. It’s basically a contract between your startup and an investor. Let’s see what exactly it says and what you, as a founder, should pay attention to.

Keynote Clowns

  • 669 words
  • 3 minutes to read
  • comments

Over the last six months, I’ve attended 18 conferences and heard over 30 keynote sessions, mostly about software development and management. I think I now know all the secrets of a successful keynote speaker. It doesn’t look so difficult to become one. Here are my thoughts.

Test Methods Must Share Nothing

  • 1050 words
  • 5 minutes to read
  • comments

Constants… I wrote about them some time ago, mostly saying that they are a bad thing, if being public. They reduce duplication, but introduce coupling. A much better way to get rid of duplication is by creating new classes or methods—a traditional OOP method. This seems to make sense and in our projects I see less and less public constants. In some projects we don’t have them at all. But one thing still bothers me: unit tests. Most programmers seem to think that when static analysis says that there are too many similar literals in the same file, the best way to get rid of them is via a private static literal. This is just wrong.

Why InputStream Design Is Wrong

  • 841 words
  • 4 minutes to read
  • comments

It’s not just about InputSteam, this class is a good example of a bad design. I’m talking about three overloaded methods read(). I’ve mentioned this problem in Section 2.9 of Elegant Objects. In a few words, I strongly believe that interfaces must be “functionality poor.” InputStream should have been an interface in the first place and it should have had a single method read(byte[]). Then if its authors wanted to give us extra functionality, they should have created supplementary “smart” classes.

Object Behavior Must Not Be Configurable

  • 2319 words
  • 12 minutes to read
  • comments

Using object properties as configuration parameters is a very common mistake we keep making mostly because our objects are mutable—we configure them. We change their behavior by injecting parameters or even entire settings/configuration objects into them. Do I have to say that it’s abusive and disrespectful from a philosophical point of view? I can, but let’s take a look at it from a practical perspective.

Java Annotations Are a Big Mistake

  • 1976 words
  • 10 minutes to read
  • comments

Annotations were introduced in Java 5, and we all got excited. Such a great instrument to make code shorter! No more Hibernate/Spring XML configuration files! Just annotations, right there in the code where we need them. No more marker interfaces, just a runtime-retained reflection-discoverable annotation! I was excited too. Moreover, I’ve made a few open source libraries which use annotations heavily. Take jcabi-aspects, for example. However, I’m not excited any more. Moreover, I believe that annotations are a big mistake in Java design.

Growing Revenue May Kill Your Startup

  • 768 words
  • 4 minutes to read
  • comments

Revenue means cash that is coming into your bank account every month from your customers. Not investors. Customers, those who are buying your products or services. You are doing everything you can to make sure this number grows, mostly because you use this money to pay your rent, buy food, and settle that graphic designer’s invoices. Without revenue, your startup will die, right? Yes, maybe. But in my experience, growing revenue may kill it even faster.

sixnines availability badge  GitHub stars