Click here to Skip to main content
15,891,431 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
JokeRe: Examples, Guidance or Condolances Pin
Richard Deeming26-Feb-17 5:54
mveRichard Deeming26-Feb-17 5:54 
GeneralRe: Examples, Guidance or Condolances Pin
Nagy Vilmos26-Feb-17 6:58
professionalNagy Vilmos26-Feb-17 6:58 
GeneralRe: Examples, Guidance or Condolances Pin
Sander Rossel26-Feb-17 10:10
professionalSander Rossel26-Feb-17 10:10 
GeneralRe: Examples, Guidance or Condolances Pin
Daniel Pfeffer26-Feb-17 7:28
professionalDaniel Pfeffer26-Feb-17 7:28 
GeneralRe: Examples, Guidance or Condolances Pin
Marc Clifton26-Feb-17 12:45
mvaMarc Clifton26-Feb-17 12:45 
GeneralRe: Examples, Guidance or Condolances Pin
Nagy Vilmos26-Feb-17 22:18
professionalNagy Vilmos26-Feb-17 22:18 
GeneralRe: Examples, Guidance or Condolances Pin
Mark_Wallace26-Feb-17 22:29
Mark_Wallace26-Feb-17 22:29 
GeneralA code example in your question .. is distracting? Pin
harold aptroot26-Feb-17 1:09
harold aptroot26-Feb-17 1:09 
It has always been advised to put a code example in your programming questions. I used to think it was a good idea, because how else can you make sure that potential answerers really know what you're asking a question about.

But I'm not convinced anymore. At least not for every type of question, some questions are inherently about some piece of code so it had better be there. But what I'm seeing a lot is that someone asks a general question, includes example code because that's what you have to do to ask a "good question", and then everyone jumps on irrelevant details of the example. Bonus if OP changes the example (to remove the unintended problems with it) and then gets blasted for making the answers irrelevant (they already were, but no one could look any further than the code on their screen).

Especially for C/C++ (inb4 "not the same language" - no, but similarly broken and the communities act the same) questions, where the example has some unintended UB in it (because all C/C++ code has UB in it) that is unrelated to the question they were trying to ask, and everyone jumps on the UB instead of the actual question. But it applies in general.

So including a code example is not always a good idea.

modified 26-Feb-17 7:28am.

GeneralRe: A code example in your question .. is distracting? Pin
OriginalGriff26-Feb-17 1:20
mveOriginalGriff26-Feb-17 1:20 
GeneralRe: A code example in your question .. is distracting? Pin
Eddy Vluggen26-Feb-17 1:25
professionalEddy Vluggen26-Feb-17 1:25 
GeneralRe: A code example in your question .. is distracting? Pin
harold aptroot26-Feb-17 1:33
harold aptroot26-Feb-17 1:33 
GeneralRe: A code example in your question .. is distracting? Pin
Eddy Vluggen26-Feb-17 1:43
professionalEddy Vluggen26-Feb-17 1:43 
GeneralRe: A code example in your question .. is distracting? Pin
harold aptroot26-Feb-17 1:56
harold aptroot26-Feb-17 1:56 
GeneralRe: A code example in your question .. is distracting? Pin
Kornfeld Eliyahu Peter26-Feb-17 1:36
professionalKornfeld Eliyahu Peter26-Feb-17 1:36 
GeneralRe: A code example in your question .. is distracting? Pin
User 5924126-Feb-17 1:51
User 5924126-Feb-17 1:51 
GeneralRe: A code example in your question .. is distracting? Pin
OriginalGriff26-Feb-17 2:34
mveOriginalGriff26-Feb-17 2:34 
GeneralRe: A code example in your question .. is distracting? Pin
Kornfeld Eliyahu Peter26-Feb-17 2:36
professionalKornfeld Eliyahu Peter26-Feb-17 2:36 
GeneralRe: A code example in your question .. is distracting? Pin
OriginalGriff26-Feb-17 2:45
mveOriginalGriff26-Feb-17 2:45 
GeneralRe: A code example in your question .. is distracting? Pin
User 5924126-Feb-17 2:45
User 5924126-Feb-17 2:45 
GeneralRe: A code example in your question .. is distracting? Pin
Sander Rossel26-Feb-17 5:33
professionalSander Rossel26-Feb-17 5:33 
GeneralRe: A code example in your question .. is distracting? Pin
OriginalGriff26-Feb-17 5:42
mveOriginalGriff26-Feb-17 5:42 
GeneralRe: A code example in your question .. is distracting? Pin
F-ES Sitecore26-Feb-17 3:00
professionalF-ES Sitecore26-Feb-17 3:00 
GeneralRe: A code example in your question .. is distracting? Pin
Richard Deeming26-Feb-17 6:00
mveRichard Deeming26-Feb-17 6:00 
GeneralRe: A code example in your question .. is distracting? Pin
PIEBALDconsult26-Feb-17 3:20
mvePIEBALDconsult26-Feb-17 3:20 
GeneralRe: A code example in your question .. is distracting? Pin
TheGreatAndPowerfulOz26-Feb-17 7:21
TheGreatAndPowerfulOz26-Feb-17 7:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.