The TDD That Works for Me

  • 1181 words
  • five minutes to read
  • comments

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 me if, one day, TDD had the force of law behind it." Two years later, now just a few months ago, he wrote more about it, and more, and more. This subject seems to be hot. Of course, I have my own take on it; let me share.

Traits and Mixins Are Not OOP

  • 565 words
  • three minutes to read
  • comments

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.

How to Handle the Problem of Too Many Classes

  • 721 words
  • three minutes to read
  • comments

During nearly every presentation in which I explain my view of object-oriented programming, there is someone who shares a comment like this: "If we follow your advice, we will have so many small classes." And my answer is always the same: "Of course we will, and that's great!" I honestly believe that even if you can't consider having "a lot of classes" a virtue, you can't call it a drawback of any truly object-oriented code either. However, there may come a point when classes become a problem; let's see when, how, and what to do about that.

Why I Don't Talk to Google Recruiters

  • 828 words
  • four minutes to read
  • comments

This is a real story, and it's not only about Google. I'm getting emails from recruiters at Amazon, Facebook, and smaller Silicon Valley startups. They find me somehow, most likely through this blog, my books, or my GitHub account. They always start with "We're so impressed by your profile" and finish with "Let's schedule an interview." I always reply with the same text, and they always disappear, only to come back in a few months under a different name. Let me explain my reasons; maybe you will do the same and we can change this situation in the industry.

StackOverflow Is Your Mandatory Tool

  • 842 words
  • four minutes to read
  • comments

I've said before that your StackOverflow reputation is very important to us when we make a decision on how much we should pay a software developer. However, there were many complaints about this metric. Take, for example, the ones here and here. In a nutshell, so many of you disagreed and said that the number of StackOverflow up-votes was nothing more than a measurement of the amount of time someone spent answering stupid questions asked by clueless programmers. Let me disagree and explain why your activity on this platform is so important to your career.

Each Private Static Method Is a Candidate for a New Class

  • 260 words
  • a minute to read
  • comments

Do you have private static methods that help you break your algorithms down into smaller parts? I do. Every time I write a new method, I realize that it can be a new class instead. Of course, I don't make classes out of all of them, but that has to be the goal. Private static methods are not reusable, while classes are—that is the main difference between them, and it is crucial.

Decorating Envelopes

  • 295 words
  • two minutes to read
  • comments

Sometimes Very often I need a class that implements an interface by making an instance of another class. Sound weird? Let me show you an example. There are many classes of that kind in the Takes Framework, and they all are named like *Wrap. It's a convenient design concept that, unfortunately, looks rather verbose in Java. It would be great to have something shorter, like in EO for example.

16 Don'ts of Career Growth

  • 1965 words
  • 8 minutes to read
  • comments

I get questions like this all the time: How does one become a senior software developer or an architect? How does one grow from a junior just starting to write Java code to the leader of a software team that is driving a BMW and making $150K+ per year? What are the exact steps that won't waste time and will get you there faster? Let me share what I think might be helpful.

Synchronized Decorators to Replace Thread-Safe Classes

  • 456 words
  • two minutes to read
  • comments

You know what thread safety is, right? If not, there is a simple example below. All classes must be thread-safe, right? Not really. Some of them have to be thread-safe? Wrong again. I think none of them have to be thread-safe, while all of them have to provide synchronized decorators.

How to Teach a Customer

  • 455 words
  • two minutes to read
  • comments

In outsourcing, very often a customer is an idiot doesn't really know what he needs—not only in terms of functionality, but also on a technical level. What makes the situation even worse is that the customer very often always thinks he knows and understands enough. The question is how do you teach a customer? How do you train, educate, and help him? You don't!