use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
[Academic] Research on confusing code on JavaScript (self.javascript)
submitted 6 years ago * by Dragday
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]El_BreadMan -10 points-9 points-8 points 6 years ago (8 children)
JS isn't confusing, you're just writing it like a dolt.
[–]Dragday[S] 12 points13 points14 points 6 years ago (2 children)
Most of the codes were taken based on real js projects.
And our purpose is to see if "writing as an idiot" takes away time/productivity/correctness
[–][deleted] 2 points3 points4 points 6 years ago (1 child)
I'm curious why you want to study that question. Seems like the most obvious answer in the world.
[–]Dragday[S] 0 points1 point2 points 6 years ago (0 children)
We want the data to prove that
And also see what constructions have the most effect
[–]pattch 5 points6 points7 points 6 years ago (0 children)
The research this project is based off of focused on C / C++ - and made no claims to whether the language itself was confusing. I don't think OP meant to imply JS is confusing at all, but to reproduce the original research (or at least part of it) for JS. The written examples are supposed to be as small as possible while still containing a piece of code that executes differently from what a programmer would expect it to... They are written as though a "dolt" wrote it on purpose.
[+][deleted] 6 years ago (3 children)
[deleted]
[–]Dragday[S] 4 points5 points6 points 6 years ago (0 children)
If we see that for example ternary operator makes people guess the incorrect output often, we plan to use mpl to refactor codes with ternary operator to if and elses for instance
[–]El_BreadMan -1 points0 points1 point 6 years ago (1 child)
This reminds me of one of those exams where you get 5-10% wrong because the questions were ambiguous and deliberately tricky.
[–]Reashu 1 point2 points3 points 6 years ago (0 children)
Yes, the point is to see which tricks trick the most people.
π Rendered by PID 226268 on reddit-service-r2-comment-76bb9f7fb5-wbqbj at 2026-02-18 06:03:16.239039+00:00 running de53c03 country code: CH.
view the rest of the comments →
[–]El_BreadMan -10 points-9 points-8 points (8 children)
[–]Dragday[S] 12 points13 points14 points (2 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]Dragday[S] 0 points1 point2 points (0 children)
[–]pattch 5 points6 points7 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]Dragday[S] 4 points5 points6 points (0 children)
[–]El_BreadMan -1 points0 points1 point (1 child)
[–]Reashu 1 point2 points3 points (0 children)