Skip to content

Instantly share code, notes, and snippets.

View yegor256's full-sized avatar
😀
reinventing OOP...

Yegor Bugayenko yegor256

😀
reinventing OOP...
View GitHub Profile
@yegor256
yegor256 / pmba-questions.md
Last active March 26, 2024 06:32
PMBA: Research Questions

These research questions are for suggested to students of the PMBA course:

  1. One of the methods to increase the quality of a software product is by reporting bugs found in it, so that the team can fix them. However, we believe that most software professionals consider bug reporting as a quality-decreasing activity. We conducted a survey, asking 100+ people about their perception of bug reporting, and analyzed the results. Published.

  2. In proper project management, every person assigned to a task feels 100% responsible for its completion. This means that if the task fails, it is solely his/her fault. However, this is not what happens with most software developers. We conducted a survey, asking 100+ programmers about their attitude towards responsibility, and then analyzed the results. Published.

  3. It’s a generally accepted truth that money doesn't motivate software professionals. Instead, other fa

@yegor256
yegor256 / osbp-questions.md
Last active March 5, 2024 08:44
OSBP: Research Questions
  1. Is there a correlation between open source experience of a programmer and the quality of code they write? In order to answer this question we analyzed the amount of followers in 100K Github profiles and the quality of 10M pull requests made by these people. The quality of a pull request is a composite metric that we introduced, which includes time, comments, corrections, complexity, and other factors.

  2. It is recommended to start every message in a Github conversation (issue or pull request) with a nickname of the person that is supposed to answer it. However, not everybody does this. We assume that message that start with nicknames receive responses sooner than messages without such a prefix. In order to confirm or disconfirm this theory, we analyzed 10M messages in 1000 Github repositories.

  3. Sometimes, in order to prove some technical point in a Github discussion (issue or pull request), programmers may refer to an external links, such as StackOverflow or Wikipedia. Would be interesting

@yegor256
yegor256 / sqm-questions.md
Last active March 24, 2024 12:45
SQM: Research Questions

The following research questions are for the SQM course students:

  1. In Java, there are object methods and class methods (also known as "static" methods). We suspect that the presence of static methods in Java classes negatively affects the quality of code. To validate this intuition, we analysed 100K+ Java files from 100+ open-source GitHub projects. We measured the number of static methods in them and their size in Lines of Code, keeping in mind that larger source code files have higher Cyclomatic Complexity (CC). Higher CC means lower maintainability. Then, we summarised the results obtained.

  2. In Java, some object attributes are mutable, while others are immutable (with the "final" modifier attached to them). Objects that have at least one mutable attribute may be referred to as "mutable" objects. We suspect that mutable objects have higher Cyclomatic Complexity (CC) than immutable ones. To validate this intuition, we analysed 100K+ Java files from 100+ open-s

@yegor256
yegor256 / open-source-ideas.md
Last active March 21, 2024 07:48
Open Source Ideas: Feel Free to Implement Any of Them

Feel free to pick any of the following ideas and implement them:

24 Feb 2024
Comments Density
The impact of source code commenting on the maintainability of software projects has been a subject of debate for a long time. Some comments, such as class or method doc-blocks, are considered to be useful and effective. However, inline comments are mostly indicators of high code complexity, which must be reduced instead of being commented. It would be helpful to have a command-line tool that could go through a codebase in any programming language, find comments of different kinds, evaluate them by their positive or negative effects, and then present a total Comments Density Score (CDS). Moreover, the tool should fail the build if the CDS is lower than a certain threshold.

24 Feb 2024
Highlighter of Risky Zones in Pull Requests
One of the most difficult tasks for code reviewers, as they examine new pull requests, is spotting the most importa

@yegor256
yegor256 / interview-questions.md
Last active February 15, 2024 13:45
some interview questions

These are typical interview questions I ask most of job candidates. The most complex questions are on the top. They are more relevant to architects and designers, while questions at the bottom of the list should be addressed to programmers.

Architecture:

  • What is the difference between aggregation and composition?
  • Name three most popular layers in layered web architecture
@yegor256
yegor256 / cost-of-malloc.md
Last active July 29, 2023 21:30
How many CPU ticks a malloc() costs?

Cost of malloc

How many CPU ticks it costs to allocate a piece of memory in heap via malloc()?

TL;DR Around 200 ticks.

Here is the code:

#include <iostream>
@yegor256
yegor256 / keybase.md
Created May 2, 2016 16:44
keybase.md

Keybase proof

I hereby claim:

  • I am yegor256 on github.
  • I am yegor256 (https://keybase.io/yegor256) on keybase.
  • I have a public key ASDIUlRwZERl47w7DgZXmyiI5INXc0pQyfYDd3aFsLWupAo

To claim this, I am signing this object:

@yegor256
yegor256 / Agents.java
Last active February 18, 2022 19:02
Object-oriented dependency injection
final Agent agent = new Agent.Iterative(
new Array<Agent>(
new Understands(
this.github,
new QnSince(
49092213,
new QnReferredTo(
this.github.users().self().login(),
new QnParametrized(
new Question.FirstOf(
@yegor256
yegor256 / quiz.java
Last active November 9, 2023 12:52
quiz.java
/**
* Please review the class below and suggest improvements. How would
* you refactor this class if it would be in a real-life project?
* There are many problems here, both high-level design mistakes,
* and low-level implementation bugs. We're interested to see high-level
* problems first, since they are most critical. The more mistakes
* you can spot, the better programmer you are.
*/
/**