Tag: javascript
-
A peep behind the curtain: here's an animation illustrating how I had to learn to dissect/think about origami in order to make origami.danq.dev for my Weird Web October contribution today:
-
Origami (Weird Web October)
A (well-folded) love letter to the Weird World Wide Web: my entry for day 14 of Weird Web October is "Origami". Go play with virtual paper!
-
Webpage Copy-Protection is Impossible (and that's great!)
A friend of mine was inconvenienced by an over-eager bit of Web copy-protection JavaScript this week, and it reminded me that more-than-ever, these scripts are both harmful (to legitimate users) and pointless (ineffective at preventing downloading).
-
ElenaJS (Progressive Web Components)
Ariel Salminen shared a release candidate for her new microframework Elena last week, and I love it! It's entirely geared towards Progressive Web Components and seems to provide all the scaffolding you'd need with none of the cruft. Delightful!
-
Reply to: let's write a blog post about CSS
Dave's struggling to finish his blog post out CSS. I get the feeling... let me tell you about my blog post about pedestrian crossings.
-
Today, an AI review tool used by my workplace reviewed some code that I wrote, and incorrectly claimed that it would introduce a bug because a global variable I created could "be available to multiple browser tabs" (that's not how browser JavaScript works).
Just in case I was mistaken, I explained to the AI why I thought it was wrong, and asked it to explain itself.
To do so, the LLM wrote a PR to propose adding some code to use our application's save mechanism to pass the data back, via the server, and to any other browser tab, thereby creating the problem that it claimed existed.
This isn't even the most-efficient way to create this problem. localStorage would have been better.
So in other words, today I watched an AI:
(a) claim to have discovered a problem (that doesn't exist),
(b) when challenged, attempt to create the problem (that wasn't needed), and
(c) do so in a way that was suboptimal.Humans aren't perfect. A human could easily make one of these mistakes. Under some circumstances, a human might even have made two of these mistakes. But to make all three? That took an AI.
What's the old saying? "To err is human, but to really foul things up you need a computer."
-
Death to the shadow DOM!
I usually agree with Chris Ferdinandi, but he and I aren't entirely in accord about the Shadow DOM. He thinks it's useless. But I think it's MOSTLY useless.
-
DOCTYPE
I received my copy of DOCTYPE magazine, a genuine 'type this program in and run it'-style programming magazine but for a modern world, and enjoyed writing, debugging, playing, and then considering refining Stuart Langridge's puzzle The Nine Pyramids.
-
Beige Buttons
When was the last time you saw a computer with a reset AND a turbo button? Bet it's been a while. But now, thanks to a stupid web component I made, you can see one on my website... or your own. What does it do? Nobody knows!
-
Developers just love to take what the Web gives them for free, throw it away, and replace it with something worse.
Today's example, from Open Collective, is a dropdown box: standard functionality provided by the
<select>element. Except they've replaced it with a JS component that, at some screen resolutions, "goes off the top" of the page... while simultaneously disabling the scrollbars so that you can't reach it. ๐คฆโโ๏ธ
Alt
Animation showing a dropdown menu for editing a personal profile on Open Collective. The dropdown menu is implemented using JavaScript, and has a bug that means that at some screen resolutions it goes off-screen and parts of it cannot be seen; because its appearance also disables the scrollbar, there's no way to get to the "missing" parts of the menu.
-
Please Fix This Site? Okay!
PleaseFixThisSite.com is a funny web-based take on that XKCD comic about extorting graphic designers who hate your design choices. But you don't actually need to pay the extortionist to "fix" their site. Just have your userscript manager run a few lines of my code, and the effect is much the same.
-
I Wrote the Same Code Six Times!
Could I rock an interview tech-test in a programming language I haven't touched in a decade? I wanted to know, so I found a tech-test... then solved it in six different programming languages in a single sitting.
-
Variable-aspect adaptive-bitrate video... in vanilla HTML?
Thanks to recent browser enhancements, it's possible to show videos of different aspect ratios based on CSS media queries with no JavaScript dependencies. You can even combine it with adaptive bitrate streaming, even on static hosting. Let me show you how.
-
Deprecate React
Just to reassure myself that I really can do all the things I say on my CV, I've been looking at tech tests that touch on each of them. I can definitely write React, for example... but... I might question the wisdom of a company that's exclusively recruiting for React skills in their front-end developers...
-
AI vs The Expert
Inspired by an 11-year old comedy sketch, I asked a GenAI to solve an unsolvable programming problem... and (for at least some models) it failed in exactly the way I anticipated: claiming to be able to solve it and delivering code that just... didn't. What does this teach us about AI trustworthiness for problems that might be solvable, but for which the human operator doesn't have sufficient comprehension to verify?








