-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Hello there,
I have some recommendation that can enhance maintainability, and performance and generally improve overall project quality.
Maintainability
- In general, comments make maintainability more difficult, because if you want to change a part of the code, you have to change its comment too, thus violating the duplication principle (DRY principle). Therefore, it is good to use comments only where needed and avoid commenting where the function of the code is obvious.
- Making the logging approach more controllable! In the current codebase, there is a general syntax for logging messages, but no function to generate them (messages are generated directly within the code). If you decide to change the logging message syntax, you would need to update all logging-related code manually, or developers would have to write the message syntax every time.
- Adding at least one level of abstraction for the Boost library to make the code more maintainable.
Performance
- Using
std::make_shared
instead ofnew
for keep shared pointer control block and object block in contiguous memory blocks (better performance).
General
- Using
#ifndef/#define
and#pragma once
as include guards is redundant.#ifndef/#define
can be removed, and only#pragma once
can be used because almost all modern C++ compilers support it.
MortezaBashsiz
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request