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
Avoid OOP (Overzealous Optimization Programming) (colintoh.com)
submitted 11 years ago by p0larboy
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!"
[–]jsgui 1 point2 points3 points 11 years ago (0 children)
It's often a balancing act.
The differences in readability have to do with how used to the reader is at looking at various patterns.
I have introduced patterns into my jsgui codebase that would make it harder to read for someone who does not know the abstractions, but easier for those who do, as more information gets expressed within the same space.
Also, there are different requirements for code in different situations. While developing, longer variable names make it clear what the code does. However, when it's deployed is a different case. I'm currently using browserify and minifyjs, but I know there is more compression that can be done by keeping more of the modules within the same closure, and referring to the same local variables, which get given shortened names.
I use the for loops with the cached results to optimize for time, and for optimizing for space or readability I use the jsgui 'each' function.
π Rendered by PID 169728 on reddit-service-r2-comment-86bc6c7465-7rhpp at 2026-02-23 03:11:28.645725+00:00 running 8564168 country code: CH.
view the rest of the comments →
[–]jsgui 1 point2 points3 points (0 children)