Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(): Review process formalization recommendation #3032

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

mariadb-SergeyZefirov
Copy link
Contributor

No description provided.

@drrtuy drrtuy changed the title A start Review process formalization recommendation Aug 1, 2024
@drrtuy drrtuy changed the title Review process formalization recommendation chore(): Review process formalization recommendation Aug 1, 2024
@@ -0,0 +1,146 @@
# Formal review checklist and considerations

> "The cost of fixing a defect is proportional to the time between defect introduction and discovery" - main axiom of softwaer engineering.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type in software


The purpose of this document is to list common defects and their sources to prevent their introduction into a code base.

It is advisory for Columnstore developers to consult this document while doing personal erview of the code to be published. We also should extend this document as new sources of defects come to light.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type in review.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be the procedure to introduce changes in the recommendation doc?

## Assignment: x = y;

If x is a std::string and y is a pointer, y is treated as an ASCIIZ string. There is implicit strlen call in there.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing as a value



# Side effects

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a function introduces unexpected side-effects they must be explicitly described in the comments so that programmers in future are notified about side-effects.


## Inheritance should be shallow

Liskov substitution principle usually can be realized several ways. Classical example is the Square and Rectangle inheritance - which one should inherit the other? One can argue both ways, that Rectangle adds dimension and should inherit Square and that Square is a constrained Rectangle and thus should be inherited from.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean architecture, huh?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Class hierarchy according with Martin enables dependency reversal so it is for the better. You define an iface that tends to change less often and here you go the dependency inversion. And this is C++ in the end. I would say this is too generic to get into this doc.


## (De)serialization

Serialization and deserialization should go through intermediate types.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put here serdes must use ProtoBuf.

@drrtuy
Copy link
Collaborator

drrtuy commented Aug 1, 2024

@mariadb-LeonidFedorov you should take a look at the doc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants