Skip to main content
replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Source Link

For example, Single instance of reusable HttpClientSingle instance of reusable HttpClient reads almost like a Stack Overflow question. The question title (originally "Is a single instance of reusable HttpClient a bad idea?") asks a pointed question. "Poof" is a made-up name (which is often problematic, but would probably be allowable here, if it weren't for the mismatched parentheses). I don't know why you've told us to imagine a try-catch — the error handling code should be included in the question, and we may critique that too. (Alternatively, just don't mention the try-catch at all, and if an answer complains about your lack of error-handling, you can just silently ignore that advice.) In short, it looks like you've gone to some lengths to sanitize your code for the question, when in fact you would get a more honest review of your code if you just presented it as-is. (Would you sanitize your code before asking a co-worker to review it, then check in some other version of that code?)

Another question from yesterday (Function to validate a GUID, an EntityState, and some dataFunction to validate a GUID, an EntityState, and some data) has problem with lack of context. I would have a hard time giving you good advice, because I don't know what else is in your class. Is your Validate() function called from one method or many? (If it's one, then it may be better not to have this code in its own function. If it's many, then perhaps there is a way to refactor.) Perhaps validating everything all at once isn't even the best way to do it. But since there isn't any context given, we don't really have much freedom to offer you better advice. Rather, we are restricted to tweaking whatever little code you've presented in the question.

For example, Single instance of reusable HttpClient reads almost like a Stack Overflow question. The question title (originally "Is a single instance of reusable HttpClient a bad idea?") asks a pointed question. "Poof" is a made-up name (which is often problematic, but would probably be allowable here, if it weren't for the mismatched parentheses). I don't know why you've told us to imagine a try-catch — the error handling code should be included in the question, and we may critique that too. (Alternatively, just don't mention the try-catch at all, and if an answer complains about your lack of error-handling, you can just silently ignore that advice.) In short, it looks like you've gone to some lengths to sanitize your code for the question, when in fact you would get a more honest review of your code if you just presented it as-is. (Would you sanitize your code before asking a co-worker to review it, then check in some other version of that code?)

Another question from yesterday (Function to validate a GUID, an EntityState, and some data) has problem with lack of context. I would have a hard time giving you good advice, because I don't know what else is in your class. Is your Validate() function called from one method or many? (If it's one, then it may be better not to have this code in its own function. If it's many, then perhaps there is a way to refactor.) Perhaps validating everything all at once isn't even the best way to do it. But since there isn't any context given, we don't really have much freedom to offer you better advice. Rather, we are restricted to tweaking whatever little code you've presented in the question.

For example, Single instance of reusable HttpClient reads almost like a Stack Overflow question. The question title (originally "Is a single instance of reusable HttpClient a bad idea?") asks a pointed question. "Poof" is a made-up name (which is often problematic, but would probably be allowable here, if it weren't for the mismatched parentheses). I don't know why you've told us to imagine a try-catch — the error handling code should be included in the question, and we may critique that too. (Alternatively, just don't mention the try-catch at all, and if an answer complains about your lack of error-handling, you can just silently ignore that advice.) In short, it looks like you've gone to some lengths to sanitize your code for the question, when in fact you would get a more honest review of your code if you just presented it as-is. (Would you sanitize your code before asking a co-worker to review it, then check in some other version of that code?)

Another question from yesterday (Function to validate a GUID, an EntityState, and some data) has problem with lack of context. I would have a hard time giving you good advice, because I don't know what else is in your class. Is your Validate() function called from one method or many? (If it's one, then it may be better not to have this code in its own function. If it's many, then perhaps there is a way to refactor.) Perhaps validating everything all at once isn't even the best way to do it. But since there isn't any context given, we don't really have much freedom to offer you better advice. Rather, we are restricted to tweaking whatever little code you've presented in the question.

replaced http://meta.codereview.stackexchange.com/ with https://codereview.meta.stackexchange.com/
Source Link
replaced http://meta.codereview.stackexchange.com/ with https://codereview.meta.stackexchange.com/
Source Link

We once tried to http://meta.codereview.stackexchange.com/q/896/9357Prompt for more meaningful question titles. It turned out to be complicated and unworkable in general. Given the choice between titling questions based on the purpose of the code or titling questions based on the concern that the author has about the code, it became clear that the purpose of the code was more important. After all, each question is about your code. Code Review may reveal problems with the code that you didn't even know existed. Also, if question titles stated the concern, we would end up with hundreds of questions with the title like "Please help me clean up this mess of if statements!" With the longer questions, there would be too many concerns to fit in the title.

So, in the end, we changed our site policy to http://meta.codereview.stackexchange.com/q/2454/9357Stop mentioning major concerns in title.

We once tried to http://meta.codereview.stackexchange.com/q/896/9357. It turned out to be complicated and unworkable in general. Given the choice between titling questions based on the purpose of the code or titling questions based on the concern that the author has about the code, it became clear that the purpose of the code was more important. After all, each question is about your code. Code Review may reveal problems with the code that you didn't even know existed. Also, if question titles stated the concern, we would end up with hundreds of questions with the title like "Please help me clean up this mess of if statements!" With the longer questions, there would be too many concerns to fit in the title.

So, in the end, we changed our site policy to http://meta.codereview.stackexchange.com/q/2454/9357.

We once tried to Prompt for more meaningful question titles. It turned out to be complicated and unworkable in general. Given the choice between titling questions based on the purpose of the code or titling questions based on the concern that the author has about the code, it became clear that the purpose of the code was more important. After all, each question is about your code. Code Review may reveal problems with the code that you didn't even know existed. Also, if question titles stated the concern, we would end up with hundreds of questions with the title like "Please help me clean up this mess of if statements!" With the longer questions, there would be too many concerns to fit in the title.

So, in the end, we changed our site policy to Stop mentioning major concerns in title.

added 17 characters in body; added 19 characters in body
Source Link
200_success Mod
  • 145.7k
  • 4
  • 114
  • 284
Loading
Source Link
200_success Mod
  • 145.7k
  • 4
  • 114
  • 284
Loading