Open fanckush opened 5 years ago
In college I learned the type_nameInCamelCase
convention in ANSI C class.
@heckflosse @Floessie etc are probably the C/C++ experts if it comes to drafting a CONVENTIONS.md
.
Cool. from my point of view, any convention is fine really as long as it's verbose :)
Imho @Floessie is the expert for coding conventions.
I think we all agree that having strong conventions might hamper creativity and are hard to enforce on an existing project with many contributors. Still there should be some guidelines...
For RawTherapee, we have a cautiously moderated CONTRIBUTING.md
with some rough guidelines not meant to be too interfering.
If what I'm saying makes sense and you agree with me, maybe we can do it bit by bit a function/method at a time by renaming variables and adding some more comments, specially for the mathematical components.
This sounds reasonable. IMHO comments should give an overview of the algorithm. If the identifiers are clearly describing the intent, single lines don't need to be commented.
When refactoring don't only rename identifiers but also think about improvements:
= {}
or default returning with return {};
). When using auto
think a bit about the reviewers reading diffs and guessing types. It's a double-edged sword...const
as default for almost anything (modern languages require mutable
for variables because that makes more sense).this
to an anonymous namespace inside the implementation.Although I'm not an official contributor to HDRMerge I'm very interested in it from a user's perspective and am really looking forward to your enhancements. :+1:
HTH, Flössie
I made this PR #181
I'm really interested in this project and would love to contribute and start closing some of the issues. To be honest, the code isn't very understandable, many variables don't have proper naming and I think that makes it difficult for new people who didn't initially write the code. Take this function for example: https://github.com/jcelaya/hdrmerge/blob/3ad6d36c517ddb7f164799c98800bdccb2e5b9f2/src/Image.cpp#L100
Maybe that's how C++ devs write their code, I'm not sure as I've never worked on a C++ project. If what I'm saying makes sense and you agree with me, maybe we can do it bit by bit a function/method at a time by renaming variables and adding some more comments, specially for the mathematical components.