
StackOverflow closed my question, that's why we exist - diegoloop
http://codingstyleguide.com/blog
======
manishsharan
Stackoverflow is mostly kind to newbie questions; Serverfault however however
seems to be moderated by a bunch of stuck up assholes. I had a newbie question
when I was setting up some dedicated servers for the first time: my newbie
question, about networking/nas etc, got shutdown with bunch of snarky comment
on the line of "hire a trained experienced networking guru". I have never gone
back since then.

~~~
danbruc
I obviously have no clue what your question was but I can understand this
attitude to some degree. Let me explain.

I contributed a lot to StackOverflow in the early years. Most of the questions
were interesting and not answered before. I almost stopped contributing in
recent years because now there are so many trivial questions and questions
that have been answered before. I see no value in explaining how to sort a
list of peaches when there is already a question answering how to sort apples
and one how to sort oranges. And I never understood StackOverflow as having
the goal to teach programming but to help solving non-trivial problems. Now
there seems to be a ton of question like how do I open a file in Python. More
and more people seem to just ask everything on StackOverflow instead of
reading a manual, a book, a tutorial or at least look if there is already an
answer that can be adapted to their problem.

I can not quantify this, it is only my personal understanding of what
questions should be on StackOverflow and what should better be looked up
elsewhere, but I can to some extend understand that people get annoyed be some
questions.

~~~
rpedela
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.

~~~
danbruc
That 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.

~~~
sanderjd
This 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
Find 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)

~~~
genwin
Asking stuff that is already on StackOverflow I agree, otherwise I don't. On
SO people vote, and the answers can be edited, so a very good answer among any
documentation anywhere is often near the top of the SO question.

~~~
danbruc
At least in my opinion it is not and it should not be the goal of
StackOverflow to duplicate the documentation of programming languages,
libraries or what ever - there is just no value in that. It is of course
something different if there is no or only bad documentation but this is just
not the case for a lot of questions asked. I have absolutely no sympathy for
people that are to lazy to look at the documentation and instead make other
people do it for them copying or restating the relevant parts on
StackOverflow.

~~~
genwin
I understand your position.

Presumably SO wants to maximize its readership. What I've seen is that they
allow any programming question, even of trivial nature, as long as it's
objective not subjective. I like that and think it's a good way to maximize
readership for objective stuff, because I often google for trivial things. For
example, Powershell if/else/elseif syntax, if I haven't used Powershell in a
while. I just found the syntax on SO within 10 seconds, with an example I can
copy/paste/modify. I bet a lot of other developers use SO like that too, and I
bet it's largely the reason people put trivial questions on there. My
motivation is efficiency. Being efficient can be construed as lazy I guess!

~~~
danbruc
I do the same - if the first search result is on StackOverflow I will of
course just look at that. But if the first result is not on StackOverflow I
will read whatever is there and not ask a question on StackOverflow unless the
answer to my problem is not or hard to find. So in essence I am uncomfortable
if people don't try hard enough to find the answer in existing sources. How
long hard enough takes obviously depends on the context. For something I am an
expert in I can conclude after a few hours that I have to ask. If you for
example start learning your first programming language I would expect you to
try at least a day, probably even a couple of days to find the solution by
reading manuals, tutorials and books before you ask a question.

~~~
genwin
Agreed, I don't ask trivial questions myself.

------
VikingCoder
StackOverflow totally missed the boat, and I think your idea isn't much better
(because coding standards is only ONE of the many opinion-based areas that
we're all interested in).

StackOverflow could totally have had "poll your peers" questions, in addition
to the fact-based Q&A that the moderators there prefer.

They could have politely shuffled opinion-based questions to another area,
maybe even another StackExchange site.

In improv, you're always supposed to find creative ways to say "YES!"

Instead, the Stack Overflow response to enormously popular opinion surveys
was, "You're not welcome here!"

~~~
dragonwriter
> In improv, you're always supposed to find creative ways to say "YES!"

StackOverflow isn't improv theater.

~~~
VikingCoder
Why do you always find a way to say "YES!" in improv?

Because it's engaging. It allows everyone to create new realities, and for
other people to explore use-cases that the original creator never thought of.

I believe that kind of thinking belongs on sites like StackOverflow.

~~~
dragonwriter
I believe, on the other hand, that that kind of thinking _defines_ a very
different kind of site than StackOverflow.

It might be a different kind of site that you would prefer _to_ StackOverflow,
but that's a different question.

~~~
VikingCoder
Right, I'm not saying the guys who run StackOverflow need to allow me and my
opinion surveys on StackOverlfow...

But the StackExchange platform allowed them to create
Programmers.StackExchange.com, where opinion polls are welcome. EDIT: slightly
more welcome, sometimes, maybe.

If they had figured that out sooner, and had migrated questions from
StackOverflow, they could have done a much better job at engaging users.

Saying "your question is closed as off-topic" is totally different from "your
question has been migrated". I commend them for the second, and I condemn them
for the first.

------
aaimnr
Can't believe no one mentioned
[http://programmers.stackexchange.com/](http://programmers.stackexchange.com/)

This official stackexchange site complements stackoverflow for the exact
reasons mentioned by OP - it's concerned with more open-ended questions
related to high level programming concepts.

Here's the rationale behind it in Jeff Atwood words (stackoverflow co-
creator): [http://blog.stackoverflow.com/2010/12/introducing-
programmer...](http://blog.stackoverflow.com/2010/12/introducing-programmers-
stackexchange-com/)

~~~
MaxGabriel
My experience is that, in practice, open-ended questions on
programmers.stackexchange are closed too, e.g. this post of mine
[http://programmers.stackexchange.com/questions/133506/when-s...](http://programmers.stackexchange.com/questions/133506/when-
stuck-how-quickly-should-one-resort-to-stack-overflow)

------
VoiceOfWisdom
Could you wrap the 'logo-pro' img tag in an anchor instead of using js to
redirect? Using js to redirect breaks ctrl clicking to open in a new tab, and
keeps me from staying on your cool blog post.

~~~
stronglikedan
You could submit that as a guideline.

~~~
diegoloop
Great idea!

------
EpicEng
> "However, I noticed that there is not such a website, with a reasonable
> freedom (very different than google-styleguide), where everyone can add own
> guidelines, and it's also available for all programming languages out
> there... And believe me there are tons of developers asking for guidelines
> all the time. XKCD with Donald Knuth explain the task better:"

I guess the author never ran across
[http://codereview.stackexchange.com/](http://codereview.stackexchange.com/)

------
NAFV_P
You know that really annoying problem where you can't think of a certain term,
but doing a web search is fairly useless because you don't know what to look
for (chicken and egg ?)...

Googled "binary search find nth node" ... first three results are from SO,
third one down [0], go down the page to find the term that I was looking for:
"order statistics tree" [1].

[0] [http://stackoverflow.com/questions/2329171/find-kth-
smallest...](http://stackoverflow.com/questions/2329171/find-kth-smallest-
element-in-a-binary-search-tree-in-optimum-way)

[1]
[http://en.wikipedia.org/wiki/Order_statistic_tree](http://en.wikipedia.org/wiki/Order_statistic_tree)

------
JeremyMorgan
Great idea, but in order to succeed you need to make the guidelines editable
like a wiki, and make the accounts something someone already has.

For example,

\- [https://github.com/bbatsov/ruby-style-
guide](https://github.com/bbatsov/ruby-style-guide)

\- [https://github.com/php-fig/fig-standards](https://github.com/php-fig/fig-
standards)

These are editable by anyone and people already on GitHub so it makes it easy.

I don't want to rain on your parade, I think the site is a great idea, just
expressing what I think it would need to succeed. I was trying to go to about
or sign up and it timed out, I'll be back later to check it out.

~~~
diegoloop
Oh yes, please! It looks like Amazon is having troubles to handle too many
requests.

Thank you very much for your feedback. Just for you to notice, the guidelines
are totally editable, but you have to be a member.

~~~
JeremyMorgan
Yeah, you definitely don't want it wide open. Now that I got to the signup
page I see you have github + twitter + facebook for signup options so it
appears I was preaching to the choir :)

I'll check it out!

------
eykanal
I'm not seeing this as an improvement. I'm familiar with PHP coding, and over
the past few years the community has come up with a set of standards in the
form of the PSR documents ([http://www.php-fig.org/psr/](http://www.php-
fig.org/psr/)). This site doesn't many any allowance for pre-existing
standards.

It seems that the idea behind this site is "let's make some software to enable
the crowd-sourcing of the standardization process". That may be a good idea,
but (1) I'm not sure that this is needed, and (2) I'm not sure who the target
audience is.

~~~
diegoloop
Hi eykanal! The target audience of this site are people just like you. On
Coding Style Guide (CSG) you can help other developers (maybe new in PHP) with
your expertise. So maybe the next time you have to work on a new project with
a new team with members from different backgrounds, you can just go to CSG and
take what is useful for your project. That's my vision of CSG. It's just a
collection of good quality content. One knows it is good quality, because the
best ones have the best rating.

------
scarecrowbob
Hey, I totally failed your user registration captcha about 5 times in a row.
I've never had that problem in all the time I've been on the web, but it has
prevented me from using your service.

~~~
diegoloop
I had to use CAPTCHA because I hate signups, where you have to write your
email, and then they send you a link and that stuff.

Please try again!

------
Too
If the rules could be exported to some static code checker / linter it would
be great.

Also the other way around would be good, ie referring someone's opinion in a
standardized way to some rule in an existing style guideline. As someone else
pointed out, most of the JavaScript guidelines are just copies from JsLint,
their guidelines might contain more justification so an external reference
would be nice. Now URLs in the comments aren't even clickable.

------
kozhevnikov
Isn't that what codereview.stackexchange.com is for?

~~~
diegoloop
Not at all, Coding Style Guide is not a Q&A site. This is more of opinion. I
just focused in guidelines (best/bad practices, conventions, standards, and so
on...) The idea is to make the code universally readable for anyone!

------
iterationx
That's why we need StackOverflowOverflow

~~~
luch
That what "Not Constructive" is about :
[https://news.ycombinator.com/item?id=6062876](https://news.ycombinator.com/item?id=6062876).

It seems they finally have a website !

------
nraynaud
It just makes me realize how removed I am from the community, I disagree, with
almost everything I see.

------
cstefanovici
This website is brilliant. I am looking forward to contributing to Coding
Style Guide.

~~~
diegoloop
Thank you! I see you there!

------
mparlane
You really should be using ++i out of habit :)

~~~
diegoloop
:)

------
bdfh42
But you could reduce the JavaScript style guide entries to just "Use JSLint
and do what it says".

Perhaps the others are more helpful or perhaps (more likely) other languages
do not have Lint.

I am sure there is more to it but does not require lengthier posts - perhaps
essays?

~~~
diegoloop
This is just an alternative for guidelines! It's like asking the developers
what they really use in their daily code.

... I implemented so, that the title and the language are required, the
description is not, so you can just have. Use PascalCase for methods. and
added the C# tag, for example

~~~
bdfh42
Ok - but do you think that (continuing the example) the JavaScript entries do
add up to something more than just what Lint says to do? Cos I can see it.

I do think there are benefits in more assistance for people with style and
structure - I was just wondering if a longer format would suite the need
better.

~~~
diegoloop
I think there is no right or wrong in writing code, it's a matter of style, so
at CSG you have different alternatives and you can just pick what you think is
most convenient for your code!

I dont understand what you mean by "if a longer format would suite the need
better"

~~~
bdfh42
Surely "style" is more than "use === not ==". That's a tip - and perhaps not
worth a lot as a tip if there is not a full explanation to back it up. "Why
not?" and "What's wrong with that?"

Does not style devolve from structure? Hmn - maybe Structure devolves from
Style. Tricky - thus I think that without a "long form" explanation of what
you are trying to achieve and thus how each "tip" fits into the objectives
then the contribution is lessened.

The original objective was to write "better" programs in a new language - a
very worthy objective but without analyzing what "better" means and how any
component contributes to "better" then I am not clear how you have advanced
things.

I laud your objectives - and was just wondering about (grin) the style.

