@aarondfrancis On Android it's very hard to beat the native date and time picker in terms of usability, it works beautifully with both drag and tap, and can be adjusted with either accurate or long movements. This kind of versatility is essential for good a11y and webdevs don't even realize it.
Y'all I didn't realize the native HTML date picker had gotten so good!
Is there a reason to use one of the complicated JS libraries instead of this? The only things I can think of are ranges and custom styling. Anything else?
@ebey_jacob@vite_js That is all Vite is, and that is all it needs to be. A tool doesn't need to be new or complicated to be far more useful than any of its constituents or the existing solutions.
For my own sanity, can someone explain to be what's so special about @vite_js? I have a tendency to "simplify beyond what's justified", but is it not just rollup + esbuild mashed together for convenience with a weird server runtime API required to access the server bundle?
@ksylor They're unfit for components that produce graphics because a change in HTML doesn't even suggest a change in appearance. Instead they can be used for components that produce HTML to be styled by external CSS and sometimes for HOCs.
@wesbos Can we get a variant of the GPL which explicitly declares that the constraint extends to derivative works that use the code as statistical data, such as machine learning models?
Problem: The React docs encourage declaring anonymous functions in useEffect. This means the developer's intent isn't documented. 👎
Solution: Call a well-named function inside useEffect.
#react
@p_ample_mousse@DThompsonDev Yes, just a code segment assigned to a label in a bag of data, which in turn provides fallback values for a separate bag of data. I like to put classes late in the curriculum, and explain them in terms of prototypes.
Some of these "roadmaps" people post on twitter kill me. 5 Days to Learn Javascript like it is nothing and then saying move on to React.
It took me a MONTH just to understand the difference between arrays, objects and how to use them!
5 days?! AS A BEGINNER?!
Ain't no way!
@DThompsonDev It takes a couple weeks to get the hang of the language, but I would say people can get building (initially really inefficiently) in two months. Then it takes years to get really good of course.
@DThompsonDev A pivotal element of how I teach JS is that I don't make distinctions that only exist in other languages. A function is just a code segment. It doesn't really have a name, instead, you assign it to a variable to use it. There's shorthand syntax to define and name a function.
@izs@_rafaelgss@matteocollina But obviously, it's only relevant if CPU is a bottleneck, so if you do anything else to such extent that it's more of a bottleneck then yeah, that should probably be the focus of optimization efforts.L
@izs@_rafaelgss@matteocollina Before the regression it would've been perfectly viable to run hundreds of thousands of these per request, so I don't think it's fair to treat it like an extremity.
Did you know that Array.prototype.includes is VERY slow in Node.js v18?
See: #includes-vs-raw-comparissonjs" target="_blank" rel="nofollow noopener">github.com/RafaelGSS/node…
@izs@_rafaelgss@matteocollina I see our difference, I was talking about the regression on general while you were talking about its effect on Fastify in isolation. Fastify is usually not the majority of the code in a route and so not the main risk factor. Lots of other code uses "any equal" checks like this.
@lbfalvy@_rafaelgss@matteocollina It's not that simple. Both factors matter in multiplication. "Ten fold" slowdown of something that takes one ms and happens once per request is equivalent to a 10M x increase of something that takes 1ns. Optimizing the 1% can only ever net you a 1% improvement at best.
@izs@_rafaelgss@matteocollina That's a tenfold slowdown, unless I miscounted the zeros. The only metric that ultimately matters is requests per second, and if the CPU is already a bottleneck a tenfold slowdown in something this trivial might easily force someone into a very expensive server upgrade.
@_rafaelgss@matteocollina This kind of testing across versions can be useful to find regressions, but have you considered that an operation going from 0.000000001006175s to 0.000000011521608s doesn't really matter much? Calling it "VERY slow" in this particular case seems like a stretch.
In 2022
- HTML is 29 years old
- CSS is 26 years old
- JavaScript is 27 years old
- ReactJS is 9 years old
- VueJs is 8 years old
- Angular is 6 years old
- Svelte is 6 years old
- VSCode is 7 years old
- Git is 17 years old
- Github is 14 years old
Add more 💬👇