8 ms·
I personally like the "how to open file" questions. Even though I have been developing software for ~15 years, I often forget basic file I/O syntax when I need
by rpedela 13y ago
I personally like the "how to open file" questions. Even though I have been developing software for ~15 years, I often forget basic file I/O syntax when I need to switch languages which is rather common lately. I remember how file I/O works, how to make it efficient, etc. But the syntax? Yeah I forget that, and I find StackOverflow to be a great reference manual. Often the official manuals are verbose which isn't what I want in this case. I just want a quick example to remind myself of the syntax.
- gum_ina_package 13y agoI think his point is that there should only be one "how do I open a file in Python" type of question/answer. Not 30 like there are today.
- rpedela 13y agoYeah I agree with that. However Google usually does a good job of finding the "best" version of a particular question and making that the first or second result.
- reeses 13y agoYour comment is quite pythonic. There should be only one question about the only one right way to do something in python.
- mhurron 13y agoSo your using SO to have other people read documentation and regurgitate the contents for you. Ya, that's not a way to make the site useless.
- genwin 13y agoUseful, I say. It's documentation regurgitated into an efficient Q & A format.
- danbruc 13y agoThat is where we disagree - I don't think of StackOverflow as a reference manual. Admittedly I am mostly a C# developer and Microsoft does a really good job when it comes to documentation, at least in most cases. If you never saw it before and even if you hate Microsoft, have a look at their documentation. Here is the System.IO namespace http://msdn.microsoft.com/en-us/library/system.io.aspx http://msdn.microsoft.com/en-us/library/system.io.aspx and the reference manual part is just the tip of the iceberg.
- deleted 13y ago[deleted]
- sanderjd 13y agoThis is actually a really great demonstration of your parent's point. I think the link you posted actually leads naturally to the question "ok, so how do I put all that together to actually open and read a file". Sure, you can figure it out by reading API documentation, and the more times you do it, the easier that becomes, but a resource where somebody has demonstrated how to actually use that API to open and read a file is valuable. There are lots of various "cookbook" books for this sort of thing, but the QA format also works really well for it because it publicizes problems that lots of people have had, not just the authors of a given book. Maybe SO isn't or doesn't want to be that kind of resource, but I think it is one valuable use case.
- danbruc 13y agoFind File.ReadAllLines() [1] or whatever fits your needs and scroll down to the example section. Java has similar documentation, too. jQuery documentation has thousands of examples. It's all there, no need to ask. And if you can not figure out how to put together 3, 5 or 10 library or API calls then get a book about the basics of your technology and read and learn it. Asking stuff that is already out there is just wasting the time of other people, time that is better spend answering questions without an existing answer. [1] http://msdn.microsoft.com/en-us/library/s2tte0y1.aspx http://msdn.microsoft.com/en-us/library/s2tte0y1.aspx
- 13y ago