I'm preparing to write a question for Code Review.
I've written a generic GNU makefile, with the idea that it can be applied to all kinds of C++ projects with different directory structures, etc.
My, hopefully different ;-) , question:
The makefile works. However due to...
(a) The makefile's inherent "genericness"
(b) My possible style errors.
For example, (different context but to illuminate the point) there's a right way to do OOP, some of my early code is a mixture of OOP and imperative, which would be considered 'wrong', but it still compiles and works.
(c) Actual errors (it still works, but this is a fluke)
...there are multiple types of questions I could ask about the same piece of code. For example,
- Style questions
- Functionality questions
- Development questions
- Best practice questions
Should I ask a separate "code review question" for each 'set of my questions' and post the same code, or just post the code and organise the questions into various 'departments'?
The code itself is small (< 100 lines), but because of its flexible nature (and my possible style/implementation mistakes), the possible questions and solutions it generates is may be larger than one question.
Or should I break the code up into small parts and ask about each section? (I'm guessing the answer is 'No' to that, because context is very useful, plus then the code wouldn't work, it has to be working code.)
The makefile does work, and compiles and links my project fine.
To summarise: If there's a lot of questions about one piece of code, should I ask all the questions in one post, or create many posts with different questions, but all containing the same code?