This toot is a reminder of the existence of progressive enhancement in web development.
Not only is it important for accessibility, it also provides added benefits in terms of backwards compatibility and better performance by some metrics.
This toot is a reminder of the existence of progressive enhancement in web development.
Not only is it important for accessibility, it also provides added benefits in terms of backwards compatibility and better performance by some metrics.
I discovered this week a little footgun if you happen to use this bit of syntactic sugar:
const object = {
foo: 'bar',
}
switch (true) {
case object && object.foo: {
// This will never execute
}
default:
// ...
}
The cases in your switch(true)
must actually return true
, not truthy, for the case to execute.
Using switch(true)
is a bit of a controversial coding practice, since it's only meant to replace long if..else if..else
chains. Literally has no additional utility except aesthetics... but I like it nevertheless :joy_cat:
May I just say so myself that I‘m loving playing with Kitten¹ to build Domain² (shown below) and Place³.
¹ https://kitten.small-web.org
² https://codeberg.org/domain/app
³ https://codeberg.org/place/app
In 2022, I had an idea that could decrease the size of all newly-published npm packages by about 5%, and it was completely backwards compatible. This would have improved performance and reduced storage costs. It seemed like such a good idea at first... https://evanhahn.com/my-failed-attempt-to-shrink-all-npm-packages-by-5-percent/
seeing languages like #javascript and #php have complicated problems with type comparisons makes me think that perhaps #perl got it right by having one set of operators for numeric comparison (<
,==
,>
,<=>
etc.) and another for string comparison (lt
,eq
,gt
,cmp
etc.)
New year, new role @Mastodon!
Our core team is looking for a senior Front-end Developer to elevate the web UI/UX experience for our users.
Ideally:
1. You are highly skilled in accessible and semantic #HTML
2. Proficient in modern #CSS
3. Experienced with #Javascript, #Typescript and complex React/Redux applications
This remote full-time position requires a 4-hour overlap with the CET timezone.
For more info/to apply:
https://jobs.ashbyhq.com/mastodon/6a0953c4-812b-4697-b5b3-ea0a2ae402c0
If Not React, Then What? https://infrequently.org/2024/11/if-not-react-then-what/
All Qtriots in control #QAnon #Conspiracy #photography #dogs #nature #camping #anime #music #BSD #cycling #DOS #fedi22 #fitness #FOSS #GNU #infosec #Lego #linux #MOC #MSDOS #OpenSource #OpSec #OSINT #pinball #privacy #RightToRepair #security #StarTrek #Unix #believeinfilm #fedi22 #photography #filmphotography #35mm #filmisnotdead #Politics #Fediblock #Trump #Caturday #Dutch #English #LGBTQIA #Minecraft #Programming
Sure, that's yet another aspect. #Javascript (#ECMAscript to be precise) evolved a lot. Where we came from was a very limited standard and browsers doing their own incompatible thing, also adding "random" bugs, which btw triggered development of #jQuery, back then an extremely helpful thing, nowadays more or less obsolete. I'm sure writing a well-working #SPA with nothing but vanilla JS is perfectly possible these days, it just requires some planning and design, you'd probably end up with a (minimal and tailored to your needs) "framework" as part of your project. But from my experience, most "frontend devs" are indoctrinated into a strong belief you absolutely need super-fat frameworks for everything.
What I was talking about is that these you mentioned (React, Angular) are designed with nothing but SPA in mind. So, everything will end up being an SPA, which just makes no sense for 95% of "web apps". There's a nice set of architecture guidelines for web apps called #ROCA, which is in line with the initial design of #http and the web in general: https://roca-style.org/ -- and then, you decided in your organization to follow that, you have the need for some enhanced UI components in JS, and these frontend guys basically keep telling you "we need our awesome framework here". Oh boy. 🤦
In the end, I see the resident set of my local browser and have no questions left...
I think the thing I find most frustrating about programming languages is that there is no standard way to refer to the length of an array.
Python, go: len(array)
Java, JavaScript: array.length
Rust: array.len()
C++: array.size()
C#: array.Length
PHP: count($array)
Perl: scalar(@array) (lmao)
Swift: array.count
Kotlin: array.size
Like, seriously? Can't we agree on just this one thing???