If you install a #javascript addon to your browser you'll never accidentally look at Twitter again. Bonus: this also bypasses virtually every #paywall.
#JavaScript continues to be a frustrating language. ES6 classes actually inherit static functions from their ancestors!
This totally wrecks common code patterns like having static factory functions. JS constructors are pretty darn inadequate, so factory functions paper over a lot of shortcomings there. Constructors can't be async, you can only have one per class, etc. But static functions can still access private class members, so they work well as factories.
Yes, you can override a static function but they're not allowed to have different signatures. Or at least that's a warning in WebStorm. JS actually lets the code run though and you still get the expected behavior, so maybe it's a dumb warning? :blobcatwhat:
Thankfully nice IDE's let you ignore warnings at individual call sites, but having factory functions from the baseclass appear in the subclass (where they should never ever be called) makes for a Super confusing API.
"But!", I hear you say. "OO is all garbage and you shouldn't even use inheritance. Composition FTW!"
You're right! I'm not really even using inheritance here. My "baseclass" is a fracking interface! But JS doesn't really support interfaces, so we have to shoehorn interfaces into the inheritance system. :blobCatGooglyTableFlip:
Supply chain attacks are a plague in the #JavaScript ecosystem. #PHP is less affected, but we can do even better! I just proposed a patch to #Composer to detect when your dependencies introduce new dependencies from sources you don't trust.
We will use this feature to improve the security of @symfony and @ApiPlatform. It should also be possible to port this idea to @npmjs and other package managers 🤝
:javascript:
Vanilla Reactive Store Implementation:
This is a popular implementation of reactive store based on JS Proxy objects.
However proxies are created even on individual array elements being accessed.
I understand that is required, but would this not generate a huge amount of proxy objects?
It seems like Vue internally implements a more comprehensive pattern based on this approach.
Alas! I am working on blending my love for data science and my desire to make an amazing user experience exploring data.
Here is my most recent project on my path to learning great app development. It utilizes React, typescript, and Vite. It is a relatively simple but design-savvy game hub application that can sort, search, and explore all the games available from the Rawg API.
Of course, the JavaScript kiddies want to call them “hashbangs” because “hash is commonly associated with modern terms involving # such as #hashtag.” No respect for tradition 🧓🏻
"Browser makers want one thing: not being blamed for being slow or showing things "wrong". So we work with lots of partners to see why their products are misbehaving. In these "performance clubs" in Mozilla and Microsoft we kept running into the same issue: web products with tons of senseless #HTML, unused #CSS and an avalanche of #JavaScript sent to the end users with no benefit to them. All the benefits were for the convenience of the #developers"
Any tips. Looking for Learning #JavaScript game. In the past there was kind of Sherlock holmes escape room. Can not find it anymore. Students age 14 to 16 years
I see a lot of people believe there is no way to have #privacy online. Corporations have pushed so hard that many are persuaded and disillusioned.
Privacy-compliant alternative software exists and it's up to you to choose and promote it.
Tracking tools are not required but wanted technologies: it is not something inevitable inside a software.
When you see it that way, your approach to software change and you will also learn to love #ethical software as you know how to appreciate organic food.
Today I learned that that using element.innerHTML in #Javascript to dynamically insert content will detach all internal data, like event listeners, and that it's bad for performance too. Use element.appendChild() or similar methods instead. Now you know.