Why Stack Overflow is useful

3 minute read

In one of my previous thoughts, I had mentioned about a website called "Stack Overflow" in passing.

I'm surprised that many people do not know or use this resource and community. Just a brief search over there would answer so many questions that programmers have.

For example, there is a suggestion on my skribit page:

"how to give back to the open source community"?

And this question has 20 votes!

I wonder why this question to me, then I remembered this suggestion popped up soon after I wrote "Why use Creative Commons license?" where I had written "The book was intended to be a contribution back to the open source community. We constantly keep taking and taking - whether it is using Linux, Vim, Firefox, or countless other software, so it felt great to be useful to the community in return."

I guess I had it coming.

First of all, I would say that the best place to actually learn such a topic would be another book (I bet you saw that one coming!) called Producing Open Source Software by Karl Fogel (which is itself an open source book) to understand how an open source project works right from the technical infrastructure to the social and political infrastructure, how to communicate, and so on. And finally, the chapter on Volunteers explains the different kinds of volunteers that are helpful to an open source project which indirectly means that those who are interested can participate in the projects in one of those roles => You're giving back to the open source community!

But perhaps there are better suggestions in this discussion on Stack Overflow when somebody asked, duh, How to get involved in an open source project?

Someone also posted another skribit suggestion asking:

hi, can u give me a link on examples with python or projects in python book i am a beginner

Guess what? I already answered that in a discussion at Stack Overflow.

The answer is that there are two projects - the "Programming Language Examples Alike Cookbook" project and the Rosetta Code project which lists vast numbers of example programs in multiple programming languages.

Again, the person could have found this answer already by a simple search on the Stack Overflow website.

For some of the programming queries I had, I didn't know whom to ask. There used to be an internal algorithms-discuss mailing list when I was at Yahoo!, but whom do I turn to now? The answer again was "Stack Overflow" (which at that time was yet to be launched, so I was waiting in anticipation):

How to convert floats to human-readable fractions?

Let's say we have 0.33, we need to output "1/3". If we have "0.4", we need to output "2/5".

The idea is to make it human-readable to make the user understand "x parts out of y" as a better way of understanding data.

I know that percentages is a good substitute but I was wondering if there was a simple way to do this?

And someone nicknamed "Epsilon" pointed to me to a brilliantly simple algorithm by David Eppstein which exactly answers this question.

# Usage: ./frap <fraction> <maximum denominator>

$ ./frap 0.33 10 1/3, error = -3.333333e-03 3/10, error = 3.000000e-02

$ ./frap 0.2342 100 11/47, error = 1.574468e-04 15/64, error = -1.750000e-04

Isn't that amazing? Both the algorithm and the community at Stack Overflow.

If you want to know why Stack Overflow works so well, there is a discussion on that, at Stack Overflow you might want to read :-)


Sundeep says:

Whoo hoo, I didnt knwo abt this website, its awesome.

Pramod Biligiri says:

Producing OSS is an awesome book! I first came across it 2 years ago I think.

Girish says:

Upauktha Mahithi...