Unit Testing Anti-Patterns, Full List

  • 1011 words
  • four minutes to read
  • comments

I wrote some time ago about anti-patterns in OOP. Now it’s time to write about unit testing anti-patterns—because they also exist, and there are many. I will try to include every example I know in this list. If you know any others, please add them via a pull request or post a comment below. For each anti-pattern I will try to mention where it was found, if it’s not mine. Keep in mind that if I found it somewhere, that doesn’t necessarily mean it was invented there. If you spot an error, please comment.

You Can Do Better

  • 1652 words
  • 7 minutes to read
  • comments

OK, it’s time to publish this piece. I’ve been dancing around it for quite a while, telling you how to make more per hour, how to manage those stupid managers that don’t let you grow, how to boost your career and how to deal with office slavery. Now here is a simple, plain list of recommendations for you: what you should do if you want to be a more successful programmer. Not a better algorithm designer, even though that’s important. Not a funnier clown team player, even though that’s also important. But a more successful software engineer, both financially and socially.

Tech Journalism Sucks

  • 527 words
  • two minutes to read
  • comments

This July, just four months ago, I submitted an article to InfoQ, a popular online tech magazine. In the article I suggested that in order to improve our projects we must not make programmers worry about the quality of code they write, but instead let them focus mostly on the speed of delivery. The quality, I argued in the article, must be the concern of the delivery pipeline. You have most probably already read the blog posts where I mention this idea, especially this one: Don’t Aim for Quality, Aim for Speed.

Beware of Bigotry

  • 874 words
  • four minutes to read
  • comments

Bobby Fischer, the eleventh World Chess Champion, was one of the best chess players of the last century. Did you know that, along with anti-Semitic statements, he also said that women chess players “aren’t creative and are all fish”? Did you also know that he publicly described the 9/11 events as “wonderful news”?

Do You Test Ruby Code for Thread Safety?

  • 609 words
  • three minutes to read
  • comments

Are you a Ruby developer? If you are, I’m pretty sure you have a very vague idea of what concurrency and thread safety are. No offense, but this is what I’ve figured out after dealing with Ruby code and speaking with Ruby programmers over the last half a year. I’ve been writing in Ruby pretty actively recently and I do like the language and the ecosystem around it. Zold, the experimental cryptocurrency we are creating, is written almost entirely in Ruby. What does that tell you? I like Ruby. But when it comes to concurrency, there are blank spots. Big time.

Mailanes.com Helps Manage Newsletters and Mailing Lists

  • 630 words
  • three minutes to read
  • comments

There are other products doing something similar, including MailChimp, AWeber, and many others. They are great. Maybe. I don’t really know. I tried some of them, some time ago. And I was frustrated. They are expensive, clumsy, and heavy. That’s my experience. I wanted something lightweight, where I can upload a list of emails, create a simple HTML/text letter, configure my SMTP outbound server, and call it a day. I spent a few days and created Mailanes. It’s free (for all of you), it’s simple, and it’s open source.

Don't Make Me Guess

  • 780 words
  • three minutes to read
  • comments

It’s Sunday. I’m at home, drinking tea and writing a new document for one of our future investors. One of my contacts in Telegram all of a sudden shoots me a message. I haven’t talked to this guy for at least two months. He is a software developer. I know him because he works at Zerocracy. His name is Paul.

You Think You Can Control Us?

  • 688 words
  • three minutes to read
  • comments

I was explaining how Zerocracy works to one of our prospective clients yesterday. He texted me today: “[At Zerocracy] there is no commitment and anybody is free to leave any time, so the risk of entrusting a highly important project to such a platform and failing to deliver it on time is very high. We will develop it on our own with hired developers who will have salaries, and I’ll be architect and project manager, that way it will be under our entire control.” I think this word “control” he used deserves a comment.

Fear of Decoupling

  • 985 words
  • four minutes to read
  • comments

Objects talk to each other via their methods. In mainstream programming languages, like Java or C#, an object may have a unique set of methods together with some methods it is forced to have because it implements certain types, also known as interfaces. My experience of speaking with many programmers tells me that most of us are pretty scared of objects that implement too many interface methods. We don’t want to deal with them since they are polymorphic and, because of that, unreliable. It’s a fair fear. Let’s try to analyze where it comes from.

Code Must Be Clean. And Clear.

  • 552 words
  • three minutes to read
  • comments

There is a famous book by Robert Martin called Clean Code. The title is an obvious call to all of us: the code must be clean. Clean, like a kitchen, I suppose—there are no dirty dishes, no garbage on the floor, no smelly towels. Dirt to be cleaned in a code base, according to Martin, includes large methods, non-descriptive variable names, tight coupling, lack of SOLID and SRP compliance, and many other things. Read the book, it’s worth it. However, there is yet another aspect of source code. How clear is it?

Monolithic Repos Are Evil

  • 1520 words
  • 6 minutes to read
  • comments

We all keep our code in Git version control repositories. The question is whether we should create a new repository for each new module or try to keep as much as possible in a single so called “monolithic” repo. Market leaders, like Facebook and Google, advocate the second approach. I believe they are wrong.

Soft Skills Demystified

  • 978 words
  • four minutes to read
  • comments

There are tech skills and there are soft skills. Every programmer knows that. Tech skills are about algorithms, operators, classes, objects, and everything else they teach us in tech schools. Soft skills are about something else. What exactly? Difficult to say. Let’s try to clear the air.

Builders and Manipulators

  • 863 words
  • four minutes to read
  • comments

Here is a simple principle for naming methods in OOP, which I’m trying to follow in my code: it’s a verb if it manipulates, it’s a noun if it builds. That’s it. Nothing in between. Methods like saveFile() or getTitle() don’t fit and must be renamed and refactored. Moreover, methods that “manipulate” must always return void, for example print() or save(). Let me explain.

70/70

  • 907 words
  • four minutes to read
  • comments

A few days ago, a friend of mine asked me to join him in a new startup. He said that he needed a partner, to help him partially finance the project, promote it, bring in new ideas, and push the business forward. I liked the business idea and wanted to participate. I started to ask questions about our future partnership and attempted to draw a simple partnership agreement. He quickly got offended. He said that he was looking for a real partner, who would share his goals and would never require any papers or lawyers.

Either Bugs or Pull Requests ... or You Are Out

  • 221 words
  • a minute to read
  • comments

Here is how it goes, over and over again. I find a new developer for one of my projects managed by Zerocracy. He claims to be an expert with 10 years of hands-on coding experience, $60 hourly rate (we don’t hire US guys), and fluent English. Then he joins the project and attempts to close a few tickets. But he hardly can. For many reasons. Then he comes back and explains why our microtasking methodology doesn’t work, trying to convince me that I have to pay him per hour, instead of per result. Here is my answer.

sixnines availability badge