This question came up in regards to my comment on this post.
If somebody has two different approaches for reviewing a piece of code, should they combine them into one answer, or have separate answers?
This question came up in regards to my comment on this post.
If somebody has two different approaches for reviewing a piece of code, should they combine them into one answer, or have separate answers?
I would say that you should make n
posts for n
solutions.
One solution might be better than another, then everyone has a chance to upvote that specific answer.
Here is a more recent way to look at things (Not saying that the ones from 2 years ago are wrong)
To avoid "Facebook scroller long" answers, it is OK to post multiple answers.
If you want to mention a lot of stuff in your answer (such as coding conventions, variable names, method length, code duplication, use of exceptions, use of public APIs...), it is often more useful to split the answer into multiple answers.