I was thinking about doing an experiment of trying to learn a new language through Stack Overflow.

[Either Python, Ruby, or C# whichever one has more tags]

I have two questions:

  1. is the unofficial policy of closing "easy" questions going to make this either stupid or hard?
  2. Would it be better to just troll through the questions on the website or download the database and do some filtering locally?

Any feedback is welcomed. [including "you're an idiot, this will never work"]

  • I haven't seen anything like "a policy of closing easy questions", not even an unofficial one. Jan 26 '10 at 11:25
  • 4
    To answer your question's title - yes, you can easily learn ENGLISH language through StackOverflow. Using SO regularly improves your English skills.
    – naivists
    Jan 26 '10 at 13:01
  • @naivists: rotfl. When I clicked the link to this questions, for some reason I thought he was actually going to ask about natural languages!
    – forget it
    May 16 '10 at 18:26
  • 2
    Meta is a real success story in this field. Hundred of people have become fluent in snark due to their participation here.
    – Pollyanna
    Mar 27 '11 at 17:36
  • 1
    @AdamDavis Only a hundred? Nov 8 '11 at 3:41
  • @forgetit You mean Python is not natural? It's Zen n' all, so I'd expect it to be as natural as a Buddhist. Nov 8 '11 at 3:52

Rather late to the party (come on, Necromancer!), but I want to say that I've been learning languages partially through Stack Overflow.

I want to note that "the way" (my preferred way) to learn languages through SO is not to post lots of newbie questions about them. The process:

  1. Start following that language tag.
  2. Read the simpler questions in that tag, particularly questions about things you have lots of experience with in other languages. I know regular expressions pretty well, so I can learn a lot about a language's syntax and workings by reading that language's regex questions. Pay attention to the code examples to learn syntax.
  3. If you have major problems, the purity is not worth the frustration. Resort to using the Googles to find more general language references, but don't forget to Google "site:stackoverflow.com" to search SO for your question first. SO probably already has your newbie question, and Google's search engine is better than Jeff and Joel's. Sorry, guys.
  4. Eventually, you will start being able to predict the answers to (some) questions people post about that language. At this point, start posting answers. Maybe they'll be wrong or not very good or not "the best way" to do it, but you can't learn if you don't stick your neck out somewhere, and someone will come along and post the right answer anyway if you don't.

After doing this for a couple months, I find I know quite a bit about a language. Languages I have done this with:

  • I started Python from a book, but I didn't care much for it, so I turned to reading Python questions on SO and, with the help of example code, learned much. Though saying I learned it on SO is a misnomer, as I had great help from the wonderful online documentation.
  • I won't pretend I know it even remotely completely, but the little Haskell I know mostly comes from SO. I have yet to find a good introduction to monads, but despite this I am able to answer some more basic Haskell questions and get quite a few upvotes.
  • I already knew C, but I've learned a lot of C++ from SO. Most of what I had to Google were basic syntax problems, but SO taught me about using std::vectors and the different forms of using and other things. It wasn't that much of a leap, but now I can answer some basic C++ questions.
  • Currently working on Ruby. Lots of help from the Ruby online documentation so far, but whenever I upgrade to Ruby 1.9 I'll be in much better shape.

Conclusion: It's doable, and you don't even have to make an ass out of yourself. It certainly puts the pressure on you to learn, but I'm used to that with programming, as I've been entirely self-taught from the start.

  • 1
    Well, well, well. Looks like here we got ourselves another Necromancer.
    – random
    Jan 26 '10 at 15:09

If the question is about limiting yourself only to SO to learn and do research (in conjunction with hands-on programming), then it might be possible to learn a new programming language through SO, but you'll probably pull your hair out in the process. The wealth of information in other online resources, books, or other materials would be just too much to pass up - unless you're extremely patient or just want to prove a point about only using SO.

  • 5
    I like how you said "extremely patient" instead of "hard headed"
    – Stephen
    Jul 7 '09 at 13:27
  • I mean, something you could look at is only using resources on or linked by SO. Would still 'technically' count. Jan 26 '10 at 13:49

If you ask "what does if do" etc, your questions are going to get slammed (of course, if you ask a specific detail about it, then great and fine).

I think it would be pretty impossible to learn a language from reading SO - but you can certainly

  • ask sensible questions when you get stuck (after searching, of course)
  • hone your knowledge of an area by watching that tag - sometimes some truly great nuggets of wisdom drift past
  • Wow first question and an answer in 3 minutes! Thanks. I think the reason I ask is because I hate forums, a lot of them go unanswered but still rank high. Do you mean after searching SO before asking question? Also since it's another language you can assume that I can do an if statement :)
    – Stephen
    Jul 7 '09 at 12:23
  • Searching both SO and the wider web, though with SO's page rankings the two are pretty synonymous!
    – ChrisF Mod
    Jul 7 '09 at 12:25

SO is not a tutorial. The format does not lend itself well to teaching a new language starting from basics. Yes, taken together the questions illuminate a lot of a given language, but there will be dark spots which not only aren't described here, there aren't any clues that tell you your missing something.

That last point is important - without a 'language roadmap' of some sort, you won't learn some basic aspects of the language, you won't know that you're missing parts of it, and that will hobble you in the future.

So no, you cannot expect to fully learn a language on SO with no outside resources.

SO is a great place to enhance a good tutorial, though. If you are already an accomplished programmer, you may be able to dig into the meat of the language, and while going through basic instruction look up related questions on SO to drill down into why or when one might choose one construct over another. You might use SO to teach you advanced topics that are glossed over in the basic tutorial, since it's geared towards someone who may not understand advanced CS topics.

But I'd be interested in seeing someone try. I suspect that SO could become a good resource if someone took the time to put together a series of questions that became the tutorial:

"This is part of a series on learning Python for beginners. Please read the question carefully, and submit answers that are simple, clear and easy to understand. Your answer should answer the question with as much detail as necessary for a beginner - but no more. Please do not post an answer consisting only of links - the intent is to build a fully self-supporting tutorial for Python on SO."

The above would appear at the top of every tutorial question, and you might have the following basic questions (each in its own question post):

  • What is the history of Python - who created, why, and what are its roots (in terms of other languages that preceded it)? What languages have claimed this language as one of their influences?
  • What are the basic constructs of Python?
  • What are the control structures of Python?
  • What are variables in Python, and how are they used?

You'll probably need to CW the post to avoid the wiki police, but other than that there's no reason not to post a tutorial series of questions, and thereby learn a language while providing a resource for others who might want to learn a given language.

Expect, though, that once someone starts doing this, these will pop up all over the place as others will follow suit. It may result in a backlash from the community (all I see are these stupid tutorials!) but I believe this could be a very good resource for programmers, and a way to bring beginners into the community on a regular basis.


You'll learn best writing code in the language you choose to learn. Project Euler has a lot of (maths oriented) problems you can solve. There are also a lot of online tutorials and books (e.g. Dive Into Python).

If you come here and say something like "I'm teaching myself Python, and I'm having trouble with X; what am I doing wrong?" (after searching, of course), then no one should have any problem with "easy" questions.


Can you learn a language just using SO? No. At least, not before you seriously wear out your welcome. SO shouldn't be your primary resource for learning a language. It is great for clarifying points of confusion and for improving your ability to take advantage of a language.

When you get to a decent competency, SO is a great way to see a lot of challenging questions that people have run across in the language of your choice. You can learn a lot from trying to answer these questions, and then seeing how the really adept answer them.


You can definitely learn new solutions, which will be useful in any language. Today I learned about quicksort when I asked a more detailed question regarding the inner-workings of PHP's USORT function.

This cleared up my confusion in thinking usort callbacks cycled through arrays in a linear process. Granted, I didn't learn a new language, but I did learn a new solution.

  • But what if someone asked how do I declare arrays in php? Would you downvote that? Or should there be a kiddies corner for newbie questions?
    – Stephen
    Jul 7 '09 at 12:34
  • 2
    If I didn't know how to declare arrays, I wouldn't want somebody to shun me. I would want help.
    – Sampson
    Jul 7 '09 at 12:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .