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

How open are you to code-refactoring Pull Requests? #56

Open
tcoyvwac opened this issue Feb 11, 2024 · 2 comments
Open

How open are you to code-refactoring Pull Requests? #56

tcoyvwac opened this issue Feb 11, 2024 · 2 comments

Comments

@tcoyvwac
Copy link

Hi there @vitoplantamura , love your project a lot! 😄

As titled, I wanted to contribute and send some Pull Requests, however I am slightly unsure due to the unique design of your codebase.

Most of my Pull Requests are about standardising C++ projects. To list some examples, creating some more defined translation units, so header files and source files. This means extracting code-fragments and elements into a more modular translation-unit design instead of maybe currently "onnxstream.{cpp,h}" hoarding all-the-things 🥲 . This more modular aim would help a lot in compile times of the project, as well as making the line-border between "library code" / "application-client" code much more clearer + cleaner. This will also mean Pull Requests will be adding more "functions" to break up and clearer define some longer pieces of your code, as well as adding some extra namespacing, data types and use of already-in-the-standard C++ library code to reduce the size of the OnnxStream codebase quite a bit.

You have done a lot @vitoplantamura to create and maintain OnnxStream and it seems that you have a really awesome development flow right now! I can kinda see how this codebase grew and was built into its unique form currently, and as I am a fan of the project, I don't want to slow your flow down, yet want to make OnnxStream more standardised for other C++ / software developer fans (like me!) of your project!

Do you have any restrictions or issues with any codebase refactoring to OnnxStream? Or any suggestions before filing any Pull Requests to refactor some of your project's code?

Thanks for reading @vitoplantamura and to all your upcoming updates, cheers! 🥳

@vitoplantamura
Copy link
Owner

vitoplantamura commented Feb 12, 2024 via email

@tcoyvwac
Copy link
Author

tcoyvwac commented Feb 18, 2024

Hi there @vitoplantamura,

So, I totally get + and really agree about the need to make this project's implementation as compact as possible. 😄
Like you mentioned in your first point, there are many benefits a unity-build styled project 1 has to offer and I understand if this is the preferred approach for OnnxStream. 👍

These benefits however are not seemed to be used so far to its best intentions + potentials... For example 🔍 , there is currently a very large monolithic class declaration / definition used in the project. Maybe I am misunderstanding this monolithic-class's intention, but all private functions of this large monolithic class must be visible to other translation units for overload resolution + linking reasons. A unity-build style would probably use the unnamed-namespace more (or similar alternatives) as the standard way of hiding detail to other translation-units. This would certainly require extracting various code-fragments from this monolithic class into more streamlined free-form / independent functions.

I totally understand and agree with you that testing is very important. So for your second point, as help for all contributors and based on your past experience testing OnnxStream, could you share your testing suite which you use to catch your difficult-to-spot bugs? 🔍 🪲
This would be very helpful + useful for anyone who would like to contribute code to be merged to Onnxstream.

In the end, we do align a lot with goals & objectives - in addition to testing benefits + reasons - fostering an implementation as compact and concise as possible for OnnxStream. 🤝 ⭐ I hope you can understand why I do recommend using standard C++ practice and especially the C++ standard library and functions - to save a lot of duplicated + "reinventing-the-wheel" produced code, making the project's code-size small and all the additional bonus benefits standardisation has to offer.

Would you accept more standardising unity-build friendly refactoring Pull Requests for OnnxStream? This would keep to your main focus of the project you wanted to highlight in point 1 - in addition would also improve the standard code readability + the compile times of this project. 😉 👍

Thanks and hope this helps,

Footnotes

  1. https://en.wikipedia.org/wiki/Unity_build

@tcoyvwac tcoyvwac changed the title How open are you to code-refatoring Pull Requests? How open are you to code-refactoring Pull Requests? Feb 18, 2024
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

No branches or pull requests

2 participants