Yegor Bugayenko's Blog, page 2

May 24, 2025

Stop Asking and Suggesting���Just Complain

Wikipedia says that Bug Driven Development (BDD) is an anti-pattern.Raja Shankar Kolluru perfectly explains why.However, Florian Rappl argues that it���s not.Ben Winding believes that it���s better than TDD.In simple words, BDD is kind of like trying to build a plane while it���s flying, based on passenger complaints.Nobody builds planes like that (well, maybe Boeing and Airbus).However, a software team that practices BDD might demonstrate higher productivity.

[image error]Ghost Dog (1999) by Jim Ja...
 •  0 comments  •  flag
Share on Twitter
Published on May 24, 2025 17:00

May 17, 2025

No BTW in Bug Reports

Every ticket���a bug report or a feature request���is a short-term contract.You, the reporter, hire them to make a fix or implement a feature.They, the team of developers, do it for you���provided you pay, or their motivation is intrinsic���for example, in open source.The discussion that happens along the way may help clarify the requirements of the contract.It may also help the team convince you that the bug doesn���t deserve a fix.Also, it may help them deliver the fix to you and convince...

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

April 23, 2025

Let the Bug Reporter Have the Last Word

Someone has submitted a bug report to your repository.You fix the bug.You close the bug report.Stop.This is wrong.You shouldn���t close it.Instead, you should ask the reporter to review your fix.Then, maybe, they will close the ticket.If they don���t, you make another fix, until they do.

[image error]Analyze This (1999) by Harold Ramis

According to Joel Spolsky, ``the only person who can close a bug is the person who opened it in the first place.������But, why?Why shouldn���t you close it, when...

 •  0 comments  •  flag
Share on Twitter
Published on April 23, 2025 17:00

April 18, 2025

We Don���t Merge into a Broken Master Branch

What do you think is the most typical reason for delays in pull request reviews?A study at Google confirms that it���s the size���the more changes, the slower the review.Another study shows that it���s the emotional tone���anger and dominance expressed in comments are linked to a lower likelihood of a pull request being merged.A more recent study finds that it���s the author���s reputation: we merge PRs faster if we know the author.All of the above is true.In our projects, though, what ofte...

 •  0 comments  •  flag
Share on Twitter
Published on April 18, 2025 17:00

April 11, 2025

Four Builds: A Balance Between Quality and Joy

How long should it take to know if your code is safe?Martin Fowler once said: 10 minutes.Ten years later, five hundred developers agreed.I disagree���with all of them.First, ten minutes is not enough for a proper build, even for a small software system.Second, ten minutes is too much for a build that we run from the IDE after every one-line edit.We need a finer-grained classification of builds: from bullet-fast to thorough and dead slow.

[image error]Trainspotting (1996) by Danny Boyle

How long sho...

 •  0 comments  •  flag
Share on Twitter
Published on April 11, 2025 17:00

December 14, 2024

Advice for First-Time Open Source Contributors

My first attempt to contribute to an open source repository was amiserable failure. I picked a Java repository I was already using(Glassfish Jersey), created a unit test for an existing class, submitted apatch (there were no pull requests at that time), and��� it was merged. I gotexcited and submitted another unit test in a new patch. No surprise, therepository owners asked me to stop fooling around: apparently, they didn���t needunit tests just for the sake of it. I quickly lost interest ...

 •  0 comments  •  flag
Share on Twitter
Published on December 14, 2024 16:00

September 20, 2024

���������������������� ����������

���������� �������������������� ���������������� ���� ������ ��������: ������ ���������� ����������, ������ ���������� �������� �� ������������������������������ �������������� �������������� �������� ���������� �� �������������� Telegram-��������������. ���������������������������������� ���������������� ������������. ������������ ������, �� �������������� ���� ������������������������ ���������������������������������������� ��������������, �� ���������������������������� ���������� �������...

 •  1 comment  •  flag
Share on Twitter
Published on September 20, 2024 17:00

July 6, 2024

Files.fileExists or file.exists?

How would you design a class that abstracts, say, a file on a disk with certainproperties? Let���s say you need to be able to check whether the file exists onthe disk or has already been deleted. Would you create an object first and thencall the exists() method on it, or would you call Disk.fileExists() firstand only then, if TRUE is returned, make an instance of the File class andcontinue working with it? This may sound like a matter of taste, but it���s notthat simple.

[image error]Capote (2005) b...
 •  0 comments  •  flag
Share on Twitter
Published on July 06, 2024 17:00

File.exists or Files.fileExists?

How would you design a class that abstracts, say, a file on a disk with certainproperties? Let���s say you need to be able to check whether the file exists onthe disk or has already been deleted. Would you create an object first and thencall the exists() method on it, or would you call Disk.fileExists() firstand only then, if TRUE is returned, make an instance of the File class andcontinue working with it? This may sound like a matter of taste, but it���s notthat simple.

[image error]Capote (2005) b...
 •  0 comments  •  flag
Share on Twitter
Published on July 06, 2024 17:00

June 22, 2024

Win the Medals While Young

One of the most frequently asked questions I hear from junior programmers(no matter their age) is: What should I focus on now to build the best career Ican? There are multiple options, including creating a startup, getting a PhD,contributing to open source, working for Google, and many others. In myopinion, the most common mistake is trying to get rich fast. Obviously,money matters and is the ultimate metric of career success, but trying to get it tooearly is nothing more than gambling wit...

 •  0 comments  •  flag
Share on Twitter
Published on June 22, 2024 17:00