Q&A-style Stack Overflow

One of the best feature of Stack Overflow is the ability to use it to spread homemade knowledge. We can answer our own question if we resolve it after posting or we can invent a problem to share our nice solution to the world directly, Q&A-style:

Q&A-style

Ask a Question - Stack Overflow

Wait. What? Is it ok? Yes!

its ok

It’s OK to Ask and Answer Your Own Questions (<- read this one really)

It is an easy way to share knowledge and to farm some sweet karma. As Jeff Atwood, one of the co-founder, put it:

To be crystal clear, it is not merely OK to ask and answer our own question, it is explicitly encouraged.

Be sure to search for a duplicate first. Maybe someone will be kind enough to share one if we can't find one ourselves:

duplicate

python - How to sort a list of tuple by second then by first? [duplicate]

Sometimes it is even better. An answerer may share a better answer than ours to our own question:

gg torbonde!

f# - How can I do an action on a given condition?

It is a great way to learn stuff that we thought we already knew. I love being the someone who is wrong:

duty calls

xkcd 386: Duty Calls

Another example to showcase it: typescript - How to use (K | V)[][] as ReadonlyArray<[K, V]> in a Map?.

Don't go as far as posting intentionally wrong content to trigger answers. As far as I am concerned, the Cunningham's Law (or SIWOTI Syndrome) works:

The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer.

but on Stack Overflow this can be seen as spam. We should do our best and be honest with people looking to help us.

Let's see one more Q&A-Style post. Here, more than one people volunteered to help:

cs screenshot

c# - Linq replace values until first X value

Note that this one is quite special. I did not just answer my own question once but twice! Yes we can compete against ourselves and let voters elect their favorite! This is a great way to ask the community which implementation they prefer and a perfect Stack Overflow way to ask which of two solutions is the best. Let's go further. Let's host an open competition. We want to know what is the community choice between three angular solutions. Here comes the subject:

ngfor screenshot

angular - How to skip the first and the last item in a *ngFor

Right now, the vote is 5, 5 and 2. I already made my choice and shipped the code, but feel free to vote for your candidate. It may help someone else and at worst I still get some sweet karma.

For fun here is another question from rpg.stackexchange.com where 4 of my own answers compete and we even have another challenger: How can I get a medium-size goat for my gnome?

If you speak french, I did a D-EDGE Tech Meetup to share a personal guide to Stack Overflow.



Tags: stackoverflow

← Back home