Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Abstracting some code that is copy pasted a few times. #885

Open
NickyDaB opened this issue Apr 13, 2020 · 2 comments
Open

Abstracting some code that is copy pasted a few times. #885

NickyDaB opened this issue Apr 13, 2020 · 2 comments
Labels
Comp: CSM good first issue Good for newcomers to this open source project. help wanted Extra attention is needed PhaseFound: Development Sev: 4 lowest priority Status: Open open for someone to grab and start working on Type: New Feature

Comments

@NickyDaB
Copy link
Contributor

NickyDaB commented Apr 13, 2020

Summary:

  const int32_t TS_BUFF_SIZE(80);
  const int32_t TS_USEC_SIZE(120);

is referenced a few times in the code.

At least once in these files:

Instead of defining the const vars in each file. I suggest we make a daemon def include file. Then include that and use those consts.

Advantage:

  • If we have to change the value in the future, then we change it in one spot and all values are updated. VS leaving it this way. If we need to update it, then we might accidentally miss one value.

Is your feature request related to a problem? Please describe.

Not really a problem. But the issue is described above in the advantage section.

Describe alternatives you've considered

We could also even make a "construct timestamp function" which could even be more robust.

Issue Source:

Other Notes:

  • This is a good first issue and simple issue that might be included in a 24 or 48 hours sprint.
@NickyDaB NickyDaB added Comp: CSM PhaseFound: Development Sev: 4 lowest priority Status: Open open for someone to grab and start working on good first issue Good for newcomers to this open source project. help wanted Extra attention is needed Type: New Feature labels Apr 13, 2020
@NickyDaB
Copy link
Contributor Author

and related:

67fe0e3

@bogdanscode
Copy link

Hi NickyDaB,

I noticed that the issue mentions abstracting the variable 'TS_BUFF_SIZE,' and 'TS_USEC_SIZE.' However, it appears that this variable no longer exists in the current codebase. Could you please clarify if this issue is still relevant, or if there might have been some changes that have rendered this issue obsolete?

Thank you for your guidance!

Best regards,
Bogdan

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Comp: CSM good first issue Good for newcomers to this open source project. help wanted Extra attention is needed PhaseFound: Development Sev: 4 lowest priority Status: Open open for someone to grab and start working on Type: New Feature
Projects
None yet
Development

No branches or pull requests

2 participants