Tuesday, 25 December 2012

Christmas Spirit, StackOverflow style (#2 in a list of why StackOverflow is populated by @rseholes)

G'day:
Is it the season for "Peace on Earth and goodwill to all men"? No, on StackOverflow it's more like "Screw you, newbie @rsehole: I have power over you, die die die" for some people. And, again, people like this demonstrate how the Stackoverflow approach to site self-management needs some thought.

NB:
If you read this article, also please make sure you read the follow-up to it as well.


A newbie ColdFusion user has posted a newbie-ish question over on Stackoverflow. Given the treatment they've received from non-ColdFusion users over there, I would not be surprised if it's their last.  Here's a summary of their question (by someone called "volume one"):


[...] I am using ColdFusion as my application server and SQL Server for the database.

I have a select form element which lists a number of vehicles e.g. Volvo S60, BMW M6, VW Jetta

Based on what vehicle the user selects, I need my webpage to perform a database query to find out what 'type' of vehicle they selected e.g. SUV, Coupe, Convertible. Depending on what 'type' is returned from the database, the database will return a list of options suitable for that vehicle type. My database tables can do this based on the vehicle drop-down's value so that's all good.

Now then, I want to now list the available options for that vehicle 'type' as a group of checkboxes. Doing this should be a simple case of looping through the database resultset and generating a checkbox for each row.

How would do I all this without refreshing the page? That is, how do I dynamically get the value from the drop-down, pass this value to the database, get the result back and then show the appropriate checkboxes?

Because I am using ColdFusion I am thinking the answer lies somewhere in using AJAX tags like CFDIV and displaying the checkboxes as AJAX content that changes whenever a different vehicle is selected. I just can't get my head around how to even start this!

Note the question was tagged as "javascript", "jquery", "ajax", "coldfusion".


Now, to me that's a completely reasonable question to ask, it shows the user have given some thought to how to do it, but has come acropper with how to do this with CF. It perhaps doesn't demonstrate much "I've tried [this]... and [this other thing], but it didn't work because of [this reason]", however for the nature of the question, which is basically "where do I start?", perhaps it's OK to not have done too much of that. Perhaps I'd've included which areas of the documentation I'd looked at to try to work it out? Dunno.

What I do know is that there are at least three people (based on the comments against the question) who would actually pitch-in to help this person if they were able to. But we aren't able to, because a quintet of fvckwits - machineghost, HoLyVieR, int3, Anand & Waleed Khan - have decided the question is not worthy, so they've closed it. I have two things to say to that:
  1. If it's not worthy of your vast expertise, simply bloody ignore it, you twats;
  2. machineghost & HoLyVieR? You have really l33t names there, chaps. You Are Cool.
One thing I note here is not one of these cretins have a single CF rep point between them, as far as I can tell. So how is it, StackOverflow, you've decided it's appropriate for them to be closing questions that specifically ask for ColdFusion help? Yes, sure, some of them (but, interestingly not all of them!) have reputation in JS/JQuery, which is why this question got onto their radar, but two of them - int3 & Anand don't have any of the tags the question is tagged with in their top ten tags as listed in their profiles.

Rant over. Let's now deal proactively with the two problems at hand here:

The Question

I've been using ColdFusion since late 1999 so you'd think I'd just automatically know how to do this. Well I automatically knew it could be done, but it took me about half an hour to find references to what I thought I was looking for, before finding the answer to the question (or near enough), in the ColdFusion docs. I also starting writing some example code which was gonna demonstrate how to do it, but found my approach wrong a coupla times, so fell back to hunting through the docs. So despite being a notional "expert" in the field that the question was being asked in, I did not automatically know the answer. So - to me - that makes it a valid question for a newbie to ask!

(NB: yeah yeah, doing it without using CF is easy enough, I know that; the person was asking about doing it with CF. Any answer to this question should perhaps be dissuading the person from trying to do this with CFML and just stick to mark-up & JS).

For the record, "volume one", the answer to your question is pretty much covered in the example code of <cfajaxproxy>. The example there does this (text lifted from the docs):

Example
The following example uses a remote CFC method to populate a drop-down list of employees. When you select a name from the list, it uses a call to the CFC method to get information about the employee, and displays the results.

Other than the fact this outputs the sub-category data as text, it's doing pretty much what you want. And - bonus because it's not always the case with the CF doc example code -  the code provided actually works without adjustment! So there's your answer.

I don't think this is a case of "RTFM", because it's not immediately obvious where in the docs to look for this.

Anyway - if you read this - I hope that answer helps. And... um... maybe post your ColdFusion questions on the Adobe ColdFusion forums in future. I'm by far the grumpiest person there (OK: maybe Jason Dean is... ;-), but you'll still get your questions answered whether they're good bad or indifferent. You know: like how a help forum is supposed to work.

StackOverflow

I actually like StackOverflow, and think it's a good resource for Q&A, and if I have a non-trivial CF question, it's more likely to get an answer there than anywhere else I've encountered. I've asked a few questions there, and - on the whole - am pleased with the answers I've got. And these were questions I was not getting any answers from in other forums I had asked. I have even voted to close an issue there in the past, because the question just wasn't one (ie: "a question"), and actually did "violate" the FAQ. I cannot find the question I'm talking about, sorry.

But - on the whole - I don't give a sh!t if the question comes up to my standard of prose in its wording. I don't give a shit if the quality of its interrogative would make Socrates proud. I don't give a shit if the person could simply RTFM (I'll tell them "you could just have RTFMed... but here's the link anyhow"). I don't even care if the question has been asked before... that actually makes the job easy: cross reference it to the previously asked question with the best answer! And I'll probably point out that they could have googled that (StackOverflow will not allow links from LMGTFY, which is interesting ;-). It's really really easy just to answer someone's question in a way that both helps them, and doesn't make you or StackOverflow seem like an @rsehole.

Now, I get the whole "closing" thing. Some questions are really poor. But I think what's worse is people's judgement of what constitutes "really poor". It's clear to me that the people who close these questions give no latitude when it comes to their reading of the FAQ regarding what constitutes grounds for closure, and in the case of this incident and the one I previously drew people's attention to: the people closing the question don't actually understand the FAQ because the question's they're closing don't fall within the purview of said FAQ.

I think one thing that needs to be added to that FAQ is "are you - the person voting to close this issue - actually capable of answering it?". If the answer is "no", then they don't get to play Big Important Person, and they cannot vote to close.

Obviously that relies on people's honesty and integrity, and I think we've had it demonstrated that these people lack integrity at the very least. So I s'pose then it comes down to the stock-in-trade of StackOverflow: reputation. A person should only be able to vote to close an issue if they have a certain amount of reputation in all the categories tagged against the question. That they have demonstrated some sort of capability in those areas should be a pre-req for having a say in the legitimacy of the question. Equally, only someone who is capable of answering a question (as asked) should be busying themselves with the pros/cons of the wording of the question anyhow.

Secondly, if I down-vote an answer - which I do from time to time (I always explain why) - I have to sacrifice some reputation to do so: I "put my reputation on the line" as it were. Now to be frank I don't give a rat's arse about "reputation" on StackOverflow: it's pretty meaningless and it's not a useful gauge of measuring someone's worth (well: their worth at playing "StackOverflow", perhaps ;-), so I am fine with giving some of it up to address bad answers.  But it doesn't cost anything to close an question as far as I can tell? And closing a question is a much more significant action to take, I think it should require far more reputation to be put on the line. My thoughts are that to make a closing vote one should have to table 500 reputation points. And if the question is ultimately closed, then one gets 400 of those back. This will stop busybodies like machineghost etc from poking their noses in where they don't really belong.

One can vote to have a question reopened, but it takes five votes to do so. I think this should be modified so that it takes a net five votes for a question to be closed, and any "re-open" votes modify that net score. So if a question has five close votes (so it gets closed), and a single re-open vote, then the net "close" vote is 4, so the question reopens. In a way, though, I think  even a single "re-open" vote should simply countermand all those close votes. If someone's prepared to go "well the question seems OK to me", and they're prepared to answer it, then surely that negates anyone's notion that the question isn't fit to answer. Equally if anyone upvotes the question, then that demonstrates it's actually a good question, and warrants answering. At time of writing, this question I'm discussing has a net of "3" upvotes (one down, four up), which is pretty reasonable for a CF question.

What this boils down to - really - is the whole "question closing" practice is just bullshit. If you don't like a question or think it's lazy or whatever, just don't answer it! Move on. Why has StackOverflow been created to cater for the sort of people who when they don't like the way the game is going they grab the ball and run home, rather than just either manning-up and dealing with it, or just leaving well-enough alone? I find StackOverflow's approach to self-policing to be rather oppressive. Which seems very out of place in an environment which is supposed to be helping people.

Another thing I think might be an idea is if people can down-vote other users' actions on the site. I would like to down-vote at least two of the people who closed this question because looking at their profile, they simply have no business making a comment about this question one way or the other. So I think their action in voting to close it is dubious, and this should be flagged.

Another reason a question can be voted to be closed is if it's a duplicate. I see the point in this, but I think StackOverflow's approach here is still unnecessarily oppressive. I think its position that it doesn't want duplicated questions is a bit specious, to be honest. Very few questions are exactly the same as another pre-existing question, and I think it's helpful to have multiples of the same sort of question around, because it gives more weight to the topic on Google, which means one is more likely to find one of the questions (and accordingly: the answer!) when searching. Also not everyone's brains are wired to search the same way, so having a range of versions of much the same thing will again make it easier to find the answer when searching.  That said, I do think there is merit in interlinking similar questions, and StackOverflow already does this. Still: this is an automated filter, and humans are better at spotting this sort of matching than a computer is (for the time being ;-), so I see merit in a human being able to flag a question as a possible duplicate or "near enough". What this could do is go back to the original questioner to either go "oh yeah, cheers!", and then their question can be flagged as a near-enough-duplicate, and cross-referenced (and perhaps no more answers allowed on it), or they can go "yeah, I saw that, it's not quite the same because of [this clarification]". It's really got to be up to the person asking the question to determine whether a question is a duplicate. Not solely up to the people answering. But I'm all for a person being able to easily and clearly create a cross-reference though. That's helpful. Closing a question having decided it's a duplicate without the original person having recourse to qualify that is not helpful.

Another option, perhaps, would be for a person to be able to relate one of their (or even maybe someone else's ~) existing answers to more than one question. This means the multiple questions are still there, but it saves duplication of answers, if the exact same answer will fit. It also means the person performing this action has to be really sure that the answer they think fits actually does. I think this would dissuade people from knee-jerk "closed as duplicate" activity.



Ah, that's enough blathering. Sorry: am trapped in a closed hotel (I'm the only guest: the owners know me well enough to just leave me a key whilst they go do Xmas), in a closed town, with left-over pizza for my Xmas meal. And I can't have a beer. Which perhaps explains why I have enough time to write 2500 words on why some StackOverflow users are dicks, and why their system could do with some work to seem less oppressive and more in tune with its raison d'etre.

Could I ask you a Xmas favour? If you agree with my position on why this question should not have been closed, and you have enough rep on StackOverflow, perhaps pop over there and cast a re-open vote. I want to try to put a stop to this sort of carry-on, by fighting back. If you're ambivalent about what I have said, please don't go vote for a reopen. I do not want to be seen to be encouraging ballot-stuffing, I am more just wanting to get this onto people's radar, and then for them to make up their minds as to the best course of action.


Thanks and enjoy the rest of your Xmas or whatever you're doing. I have more cold pizza calling... ;-)


--
Adam