12

A question asking how an obfuscated javascript program worked was migrated (and rejected) to codegolf. It is now being held as "off-topic" on stackoverflow. However, similar questions such as Obfuscated C Code Contest 2006. Please explain sykes2.c and Concept behind these four lines of tricky C code are both seen as on-topic. What is the difference between the javascript question and these C/C++ questions and why would the javascript question be considered off-topic?

As far as I can tell, the javascript question would most likely fall under "a software algorithm", a permitted topic in the help center list.

  • 3
    Old questions are never an indicator of what is on-topic today. It could well be that those old questions are off-topic now. Stack Overflow has evolved as the community learned what does and doesn't work for the format. – Martijn Pieters Feb 22 '14 at 17:43
  • 1
    Both those questions have seen some dispute over whether they are on-topic and both have been closed and reopened before. – Martijn Pieters Feb 22 '14 at 17:44
  • @MartijnPieters, that makes sense. If that is case, where would an appropriate place be to post such a question? – JPDurham Feb 22 '14 at 17:45
  • 5
    One thing for sure: these questions don't belong to PCG :-) – John Dvorak Feb 22 '14 at 17:46
  • 4
    I don't know; and posting here to ask about this was the right thing to do. I am merely pointing out that using older posts as an argument may not fly. – Martijn Pieters Feb 22 '14 at 17:46
  • Somehow I think this question status purely the result of a failed migration. – John Dvorak Feb 22 '14 at 17:47
  • A question to ask yourself is; could the answer to this question of any use to anyone but the asker. Often the answer is "probably not", but I it strays into "definitely not" then people wil find a way to close it – Richard Tingle Feb 22 '14 at 17:47
  • @RichardTingle but, we normally answer (even if only in comments) typo questions before closing them? :-) – John Dvorak Feb 22 '14 at 17:48
  • @Jan usually those are easy to answer and it feels churlish not to answer them. This does not look easy – Richard Tingle Feb 22 '14 at 17:49
  • 2
    Ultimately, I'd like to have an idea where such things can be posted, because understanding obfuscated code can be useful (and fun). Is it possible a new stackexchange site would remedy this issue or would that be overkill? – JPDurham Feb 22 '14 at 17:58
  • @JPDurham may I suggest the chat room? – John Dvorak Feb 22 '14 at 18:14
  • should I try to reopen that question? – John Dvorak Feb 22 '14 at 18:15
  • @JanDvorak, good idea. I think it's worthwhile. I reviewed the Area-51 FAQs regarding creating a new site and I don't think a new site would be appropriate. – JPDurham Feb 22 '14 at 18:17
  • @JanDvorak, would it be more appropriate to create a chat on meta, or SO? Unfortunately, I do not have enough rep to chat on meta. – JPDurham Feb 22 '14 at 18:24
  • Not "create", "join". I'm wondering if we might like it. – John Dvorak Feb 22 '14 at 18:26
13

There is a very large gray area between

I don't understand [concept] and here's the relevant code, please help me understand this

and

I didn't read this relevant code, please explain it to me because I'm too lazy

The latter being of course the icanhazexplainz type question.

I think a lot of the issue comes down to how trivially easy it is for an answerer to understand the posted code. Context is super important. A question asking:

What does this code do?

var a = 10;
var b = 20;
a = b;

is likely going to be downvoted into oblivion because most answerers understand that it's trivially easy to find answers by doing a bit of google searching.

A question asking:

What does this code do?

(function () {
    ...
}());

is going to be upvoted and answered, because most answerers understand that it's not trivially easy to find answers by searching google, and that an asker who doesn't know what it's called won't be able to easily find more information on the construct.

It's the same reason that there are so many "what does [operator] do?" questions on StackOverflow.

To that effect, it's going to be difficult to set a rule as to which "explain this" questions are on-topic, and which ones aren't. It takes a judgement call on the part of the community (downvotes & upvotes) to be able to say whether the question is worth keeping.

Generally, I'd say that questions should show that the OP has at least tried to answer their own question. There will of course be exceptions to this when there's no obvious starting point.

  • 3
    How exactly would you find out how your first example works by searching Google? – Robert Harvey Feb 22 '14 at 20:23
  • @RobertHarvey, that's a good question because it's hard for me as someone who knows the jargon to come up with a search that someone new to programming would ask. "javascript variable equals variable" seems like an appropriate search, but I would need to ask my mother or someone else who doesn't program what they would search for to find the answer. The results I've seen so far are actually pretty poor when it comes to the basics, but there are still examples of variable assignment which even provide the relevant terminology. – zzzzBov Feb 22 '14 at 20:39
6

If I were to guess, I'd say that the question was closed because "how does this code work" is essentially a work order. Instead of "code dump, how fix" it's "code dump, how work."

You guys did decide that icanhazcodez and icanhazalgoz questions should be closed, right? Why would icanhazexplainz questions be any different?

  • The second paragraph is a genuine question. If you can provide some logical insight as to how moderators should properly parse this, we would be better equipped to deal with such questions. – Robert Harvey Feb 22 '14 at 19:00
  • "Why would icanhazexplainz questions be any different?" uhhhm they aren't. – PeeHaa Feb 22 '14 at 19:05
  • @PeeHaa: I did a Google Search for "How does this code work" on Stack Overflow. The community response to such questions seems to vary somewhat (compare this with this), but, for the most part, the community seems to like these kinds of questions. The question cited in the OP here currently has a score of 9. – Robert Harvey Feb 22 '14 at 19:10
  • What I am unsure at this point is where obfuscated code belongs in the SE world. It seems some questions are allowed on SO whereas others are not. There is not a general agreement on what makes a question on or off-topic when it comes to obfuscated code. – JPDurham Feb 22 '14 at 19:10
  • @JPDurham: I don't think the obfuscation matters. – Robert Harvey Feb 22 '14 at 19:10
  • If icanhazexplainz is not welcome, then where do we draw the line between those and all those performance questions of the type "Why is A faster/slower than B?" that I've answered in the past? – Mysticial Feb 22 '14 at 19:11
  • @Mysticial: I suspect those questions demonstrated effort. – Robert Harvey Feb 22 '14 at 19:12
  • I mentioned the Area-51 FAQs for creating a new site and don't believe obfuscated code needs a new site. I also looked at reverse engineering help and think it would be an edge case there as well. – JPDurham Feb 22 '14 at 19:12
  • @RobertHarvey questions like those equal to a: code dump + "halp it doesn't work" questions like you said. Without any effort by OP to find out what is going on. – PeeHaa Feb 22 '14 at 19:12
  • 1
    What it the difference between this questions and the 100000th "halp my word press install is hacked and I see an obfuscated file. Tell me what it does." – PeeHaa Feb 22 '14 at 19:13
  • @RobertHarvey, The difference between those two linked questions is that one provided a starting point where the asker was confused, and the other didn't. – zzzzBov Feb 22 '14 at 19:13
  • 1
    @PeeHaa: The difference is that "halp my word press install is hacked and I see an obfuscated file" is a tar baby. – Robert Harvey Feb 22 '14 at 19:14
  • @JPDurham: Not every question needs a home. Stack Exchange has never represented itself as a "one-stop shop." – Robert Harvey Feb 22 '14 at 19:16
  • @RobertHarvey Other topics are often also "tar babies". – PeeHaa Feb 22 '14 at 19:17
  • @PeeHaa: No argument there. – Robert Harvey Feb 22 '14 at 19:18
2

I closed the question because it is off-topic for Stack Overflow.

It had shades of the boat programming question, or more generically, it felt like a Joke Question. Here's why:

Starting with the first sentence,

I came across a cryptic jQuery and am interested to understand how it works.

O Rly? Where? Where on the internet did the asker come across that? Perhaps they could link us to it?

Secondly, what sort of programming problem are we solving here? The comments even say:

These sorts of posts are not new. It's not a programming problem so much as it is a puzzle that OP is curious about. I'm sure if he searched a bit and noodled around with it, the solution to the puzzle would be found. That's the point of a puzzle, isn't it? (Source)

And other commenters talk about the post in even less charitable (but no less accurate) terms:

@htatche, sharing what? It's a stunt post that isn't a specific problem. (Source)

Even those that wanted the question around agree that there's no problem to be solved:

@Andy I still think that this deserves to be here so it is shared with people, it is all about sharing and learning. (Source)

So that's problem number 2: This isn't an actual problem the user has. They "found" a piece of "code" on the "internet" and they want to post a question about it.

Other parallels to boat programming include:

The user created their account three days ago and their first and only question is about this code they 'found'.

Finally:

What stops anyone from simply choosing a different character and posting an entire question around it? Where does it end?

To be charitable, I attempted to migrate it to programming puzzles (at best, it seemed like a puzzle). They rejected it because it doesn't belong on their site. If we encourage these sorts of questions, we'll soon have to worry about it too.

1

It's controvert.

On the one side everyone can obfuscate any code and ask how it works. If the obfuscation works, by the definition it would be hard to guess by looking on the code.

On the other side, your example is no trivial obfuscation. It's the obfuscation made using some special techniques making it, well, more obfuscating, and surely it's not the output of any non-human obfuscator.

While it could be other formed (like "What does this obfuscation technique do"), generally, judging by upvotes, people has gotten the idea. The most important on SO is to ask such questions, that people would learn something useful from the answers. Your question is surely an example of it.

The benefit of such questions is to make folks here acquainted with some gotchas of JavaScript. It's not about understanding some obfuscated code found somewhere, as the title would suggest. In the future, you could concentrate on title a bit more as well :)

-5

People who says icanhazexplainz are probably experts that when they read this:

(![]+[])[+[]]

They know it means f, so it is so simple to them that they ignore the fact that not everyone is an expert, they ignore the fact that Stack Overflow is also a place for

enthusiast programmers

and they think everyone that is not an expert is lazy, and then they go ahead and close even legit questions.

You must log in to answer this question.

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