Yegor Bugayenko's Blog, page 15

May 7, 2018

An Open Code Base Is Not Yet an Open Source Project

A few weeks ago someone suggested I should try to integrate IntelliJ IDEA's static analysis rules into Qulice, our aggregator of Checkstyle, PMD, FindBugs, and some other analyzers. I do love IDEA's rules—some of them are unique and very useful. I asked whether I could find them somewhere in Maven Central (they are written in Java) and the answer was "You'll have to figure out yourself how to use them, but they are open source." Here comes my opinion about this sit...

 •  0 comments  •  flag
Share on Twitter
Published on May 07, 2018 17:00

April 23, 2018

The Right Way to Report a Bug

You know, at Zerocracy, either you are a programmer or a tester, and we pay for each bug you find and report. Well, not quite. We pay for each bug report a project architect considers good enough to pay for. The architect's decision is totally subjective and non-disputable, according to ��29 of the Policy. Some of our developers find this unfair and ask me to explain how they can report bugs such that they are definitely paid. Here is a non-exhaustive list of my recommendations.

[image error]Burn Aft...
 •  0 comments  •  flag
Share on Twitter
Published on April 23, 2018 17:00

April 16, 2018

How to Be Lazy and Stay Calm

What frustrates me most in my profession of software development is the regular necessity to understand large problem scopes before fixing small bugs, especially if the code is legacy and not mine. Actually, it's even more frustrating when the code is mine. The "deep thinking," as they call it, which is always required before even a small issue can be resolved, seriously turns me away from programming. Or did turn me away. Until I started to think differently and encourage mysel...

2 likes ·   •  0 comments  •  flag
Share on Twitter
Published on April 16, 2018 17:00

April 9, 2018

Nine Steps of Learning by Refactoring

I was asked on Twitter recently how is it possible to refactor if one doesn't understand how the code works. I replied that it is "learning by refactoring." Then I tried to Google it and found nothing. I was surprised. To me refactoring seems to be the most effective and obvious way to study the source code. Here is how I usually do it, in nine object-oriented steps.

[image error]Dom Hemingway (2013) by Richard Shepard

According to Wikipedia, code refactoring is "the process of restruc...

 •  0 comments  •  flag
Share on Twitter
Published on April 09, 2018 17:00

April 2, 2018

Fully Transparent Donations via Zerocracy

Open source is free, as in beer: you write code, nobody pays you. Of course, there are many ways to monetize your efforts, but there will be no direct cash payments from your users, usually. There are ways to collect money, which include an obvious "tip jar" button on your GitHub project page. The chances anyone will pay are low though. In my opinion, this is mostly because nobody trusts you enough—they are not sure you will use the money to make the product better. Most likel...

 •  0 comments  •  flag
Share on Twitter
Published on April 02, 2018 17:00

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...
 •  0 comments  •  flag
Share on Twitter
Published on March 26, 2018 17:00

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...
 •  0 comments  •  flag
Share on Twitter
Published on March 20, 2018 17:00

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 Newell

Let's take my own library jcabi-http, which I created a few years ago, when...

1 like ·   •  0 comments  •  flag
Share on Twitter
Published on March 12, 2018 17:00

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...

 •  0 comments  •  flag
Share on Twitter
Published on March 05, 2018 16:00

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 Gondry

Say there is a back-end entry...

 •  0 comments  •  flag
Share on Twitter
Published on February 26, 2018 16:00