It doesn't help to share state between the front and the backend. What apline.js really excels at is managing state on the frontend itself, especially for UI. For example, if you need to click on one thing that shows another thing, or you need to swap out ui elements it helps to make that easier.
For communicating the backend through using an api, or issuing async get/post or form submissions that is done pretty much the same as you would do it using html or javascript.
Nice to see wezterm on the frontpage! For anyone giving it try beware that link detection doesn't work super well for links containing a `)` character which is something you run into frequently on markdown documents. More info in https://github.com/wez/wezterm/pull/4212 which has a workaround.
> What if you're ssh'd into a machine, you're in your trusty bash shell, but unfortunately you cannot spawn any new processes because literally all other pids are taken. What do you do?
This is cool, but once I beat it, it just brought me back to the first step and wouldn't let me see the others. That's frustrating because I wanted to check out the "View Solutions" lists for the other steps to see what other approaches I could have taken.
> As an application developer, you should set all cookies with SameSite=Lax
This is really good advice and has bitten me in the past, I think as someone who is new to this it is tempting to avoid the term "Lax" but you might end up with some surprising behavior if you go with "Strict" as your default.
Oh yes, of course! I had to remove links several times. Even around 2AM at night.
I received so many phishing reports from Vercel and Cloudflare and even the Italian government directly. It was really tough so I had to add Google's Safe Browsing API check to check for any phishing links. I wish I didn't have to but no phishing reports since then.
I haven't found a nice way to do this on both desktop/mobile. What I want is for every heading to have an anchor link that can be copied, similar to a hyperlink. I see a lot of sites do this with a [unicode chain symbol] which is present on hover, but that's not an option on mobile. Alternate option is to have it next to every heading (ugly), turn every heading into a hyperlink without styling, or make them look like regular hyperlinks which I think is confusing.
/* keep the icon hidden by default */
:is(h1, h2, h3, h4, h5, h6) .icon {
visibility: hidden;
}
/* show the icon on focus and hover */
:is(h1, h2, h3, h4, h5, h6):focus .icon,
:is(h1, h2, h3, h4, h5, h6):hover .icon {
visibility: visible;
}
/* show the icon on devices that don't have any accessory that can hover */
@media (pointer: coarse), (any-hover: none) {
:is(h1, h2, h3, h4, h5, h6) .icon {
visibility: visible;
}
}
The `pointer: coarse` media query checks if you are using a device with an input mechanism of limited accuracy (such as fingers on a touchscreen). The `any-hover: none` media query checks if none of the input mechanisms on your device support hover (such as a Surface tablet not attached with a keyboard).
Have an icon appear on hover, and make every heading a hyperlink (even without styling), and have a table of contents with links to each heading (with styling). No need to dumb down your interface just for smartphone users.
The anchor symbol can have JavaScript that copies the link to clipboard on click. And the heading can be a plain old link to itself. Gives a nice visual and interaction for desktop while providing a way for mobile users to get the link too (long-press the heading and copy link).
I don't think it looks that bad. My blog's anchors are hover-visible on desktop and always visible on mobile (with lower opacity). I used this query to check for hover event availability to decide whether they should be always-visible: `@media screen and (hover: none)`. I think it turned out pretty ok¹.
> I've personally gone back to reading books and blog posts, talking to people via email, working on a book project, and prioritizing in-person, local relationships.
I mean, this sounds great? Or maybe I misinterpret that this change in how we view twitter is positive rather than a negative. I believe that Twitter as a centralized sounding board was a net bad for Internet culture anyway.