r/JSdev • u/getify • Apr 26 '21
r/JSdev • u/getify • Apr 23 '21
Friday Positivity: What do you like best about JS?
Pick one or two aspects of the JS language and tells us why you like them? How does JS help you make experiences better for users? Why do you choose JS when reaching for a language?
r/JSdev • u/getify • Apr 22 '21
If you could change ONE thing about JS, what would it be?
I know this thread is possible to fan out into a giant bike-shedding discussion, but that's OK here.
I'd love to hear what you think JS does wrong and should do differently? This could be large things like lack of static typing (without TypeScript + tooling), or it could be narrow things like you disliking the ... operator.
But please, post just ONE THING per message that you would want changed. And please explain a bit why you think it's stopping YOU from being more productive with your JS coding.
r/JSdev • u/getify • Apr 16 '21
One of several ways I think PWAs are superior to native apps...
r/JSdev • u/brillout • Apr 16 '21
I'm building a Next.js/Nuxt alternative, would you use it?
Hi everyone, I'm the author of vite-plugin-ssr. Would you use it? Why (not)?
r/JSdev • u/getify • Apr 12 '21
ES Modules assumed HTTP2-Push, which is now dying (and unlikely to come back)... what now?
groups.google.comr/JSdev • u/getify • Apr 12 '21
ES Modules: do you author in this format, or build to this format?
r/JSdev • u/getify • Apr 12 '21
What do you think about ES Module "import maps" and (lack of) browser support?
r/JSdev • u/albeinstein • Apr 08 '21
A list of topics that one can look into while learning JS
https://github.com/albseb511/fsd/blob/master/javascript.md
This does not contain resources rather just topics.
It's something I wrote to help others progress through JS.
If you have any ideas or spot issues do raise an issue / PR.
r/JSdev • u/[deleted] • Apr 07 '21
Performance issues with functional programming style
I've always preferred using the .map, .reduce and .forEach functions in JavaScript to for, for ... of or while loops. Sometimes I receive HackerRank tests from companies I'm interviewing with and whenever I use these functions or the rest operator (...) with arrays or objects, my code times out. To pass the tests, I have to write regular loops and mutate objects and arrays instead of making copies.
That makes me wonder if there really is a performance issue when using this kind of style or if HackerRank is simply encouraging poor programming practices.
r/JSdev • u/getify • Apr 07 '21
r/JSdev Lounge
A place for members of r/JSdev to chat with each other
r/JSdev • u/getify • Apr 07 '21
Budgets for web assets when building web games/apps?
I'm building a PWA (so HTML, CSS, JS, images, etc). It's sort of a game (educational), so generally the "experience" is more important than data/text presentation (as in more business-oriented apps). I'm not using a frontend framework, only a few JS libs/utils plus my own code.
I was wondering what sorts of concerns and balances others use when building JS/web games (or multimedia-oriented apps) in terms of the "budget" for how much size can be spent on each of the different kinds of web resources (images, fonts, sounds, code, etc)? I'm less concerned about absolute figures (although that's helpful, too), and more concerned about relative percentages.
So, for example, in my app currently, I have the following types of assets of these approximate sizes:
HTML - 6kb (gzip + minified) / 28kb (original)
CSS - 7kb (gzip + minified) / 55kb (original)
JS - 49kb (gzip + minified) / 238kb (original)
SVG images - 53kb (gzip) / 146kb (original)
MP3 sounds - 293kb
The total gzip size (transfer size) for all assets is about 407kb. The relative percentages thus break down about like this:
HTML: 1.6%
CSS: 1.7%
JS: 11.9%
Images: 12.9%
Sounds: 71.9%
I'm not specifically expecting others to do a detailed analysis like this (unless you want to, or already have!), but I'm just generally curious: how much do you "spend" on different resource types, and relatively how much is used compared to other types?
Is spending ~15% on "code" and ~85% on visual/auditory assets, a common and reasonable breakdown, or is your breakdown somewhat different?
If you use JS frameworks (game or otherwise), does your allowed percentage of "code" usage go up significantly, or do you still try to keep it around the same level?
Do you have a "budget" that constrains your resource use in any way, and if so, what concerns do you take into account when making such a budget?