Yegor Bugayenko's Blog, page 16
March 26, 2018
How I Test My Java Classes for Thread-Safety
I touched on this problem in one of my recent webinars, now it's time to explain it in writing. Thread-safety is an important quality of classes in languages/platforms like Java, where we frequently share objects between threads. The issues caused by lack of thread-safety are very difficult to debug, since they are sporadic and almost impossible to reproduce on purpose. How do you test your objects to make sure they are thread-safe? Here is how I'm doing it.
[image error]Scent of a Woman (1992) b...March 20, 2018
Zerocracy: A Project Manager That Never Sleeps
I've been in the software business for almost 30 years. I wrote my first piece of code when I was 12. Since then I have been programming and managing other programmers, hiring and firing them, planning projects and their budgets, finding and losing customers, investing into software teams and losing my investments, even teaching others how to manage software projects. What is my overall impression? It's a pain. I think I've found a solution though.
[image error]Casino (1995) by Martin Scorses...March 12, 2018
Fluent Interfaces Are Bad for Maintainability
Fluent interface, first coined as a term by Martin Fowler, is a very convenient way of communicating with objects in OOP. It makes their facades easier to use and understand. However, it ruins their internal design, making them more difficult to maintain. A few words were said about that by Marco Pivetta in his blog post Fluent Interfaces are Evil; now I will add my few cents.
[image error]Donnie Brasco (1997) by Mike NewellLet's take my own library jcabi-http, which I created a few years ago, when...
March 5, 2018
Don���t Aim for Quality, Aim for Speed
I decided to write this blog post after reviewing this pull request. What happened there? The author of the PR wasn't able to figure out the "right" way to implement it, and the code reviewer was waiting and waiting. Eventually, the reviewer came to me, since I was an architect, and complained that it was taking too long and he wasn't able to earn his money for the review he had done. Then the author of the changes explained that he couldn't finish since there were impe...
February 26, 2018
Don���t Parse, Use Parsing Objects
The traditional way of integrating object-oriented back-end with an external system is through data transfer objects, which are serialized into JSON before going out and deserialized when coming back. This way is as much popular as it is wrong. The serialization part should be replaced by printers, which I explained earlier. Here is my take on deserialization, which should be done by—guess what—objects.
[image error]La science des r��ves (2006) by Michel GondrySay there is a back-end entry...
February 12, 2018
Microvesting
Most startups don't have enough cash to pay programmers as much as they deserve, unfortunately (or maybe not). Instead of cash, startups give their early employees shares of stock, which they will be able to either 1) sell in a few years and become millionaires billionaires, or 2) throw away and remain nobodies. It's a common practice. The question, however, is what is the right procedure, and the optimal algorithm, to transfer those shares to programmers. When exactly do they become...
February 5, 2018
More Bugs, Please
A bug is something we find in a software product that "doesn't look right" (this is my personal definition). A bug can be hidden or visible; it can be "already fixed" or "still present"; it can be critical or cosmetic; it can be urgent or of a low priority. What is important is that the more bugs we are able to find and fix before our customers see them, the higher the perceived quality of the software. Simply put, bugs are a very good thing, if they are foun...
January 22, 2018
Are You a Coder or a Developer?
Software development and coding are two different things. Usually, the former includes the latter, but not always. Coding produces lines of code, while software development creates products. Unfortunately, the majority of programmers joining Zerocracy now are coders. Even though they claim to be developers, in reality they are lacking the very important sociotechnical skills that differentiate product creators from lines-of-code writers.
[image error]Hard Men (1996) by J.K. AmalouLet me show you the sym...
January 15, 2018
The Educational Aspect of Static Analysis
Very often new programmers who join our projects ask us whether we have auto-formatting instruments to make Java code look exactly the way Qulice expects. (Qulice is the static analyzer we use.) I always reply that having such an automated code polisher would only be harmful and wouldn't help the project and its members improve and grow. Here is why I think so.
[image error]Blind Fury (1989) by Phillip NoyceStatic analysis, the way we do it in combination with read-only master branch, is a fully aut...
January 8, 2018
Five Stages of Microbudgeting
Microtasking, which I explained in an earlier post, works only when each task has a very specific reward for success and a punishment for failure. I believe that the best reward and punishment instrument is money. The budget is fixed, the programmer gets it only when the task is completed (reward), no matter how much time it cost; if it is not completed, there is no money at all (punishment). Pure and simple. However, a logical question arises: how can we know upfront what is the right budget...


