Skip to content

Microblog

Bookmarked https://gomakethings.com/the-early-return-pattern-in-javascript/. My favorite programming trick. > With …

Bookmarked https://gomakethings.com/the-early-return-pattern-in-javascript/.

My favorite programming trick.

With the early return pattern, you check for the opposite of the thing you want, and return early to end the function when that’s the case.

This reduces nested if statements, and makes your code a bit easier to read.

The early return pattern in JavaScript
gomakethings.com

Bookmarked https://wptavern.com/wordpress-community-attributes-declining-market-share-to-performance-issues-increased-complexity-and-the-lagging-full-site-editing-project. Good. Huge fan, still, (of WordPress …

Bookmarked https://wptavern.com/wordpress-community-attributes-declining-market-share-to-performance-issues-increased-complexity-and-the-lagging-full-site-editing-project.

Good. Huge fan, still, (of WordPress as a content management system, not necessarily its “Full Site Editor”) but the last thing we need is a near-monopoly, or growth for the sake of it.

For the first time in WordPress’ nearly 19-year history, the software’s usage stats are showing signs of declining market share.

WordPress Community Attributes Declining Market Share to Performance Issues, Increased Complexity, and the Lagging Full-…
wptavern.com

In reply to https://www.jeremycherfas.net/blog/invalid-feeds-again. I’ve seen this before …

In reply to https://www.jeremycherfas.net/blog/invalid-feeds-again.

I’ve seen this before (developing your own feed reader really takes you places); in this case, there seems to be a hidden (Unicode) control character in between the opening paragraph tag and the word “April.” One that, when I select and copy the surrounding text (and with it, this character) into my browser’s address bar, shows up as a “card” that reads “0010,” which might mean “data link escape.”

Actually, I’m seeing this post just fine precisely because I’ve instructed my feed aggregator to ignore this type of Unicode characters.

Invalid feeds, again | Jeremy Cherfas
www.jeremycherfas.net

Bookmarked https://news.indieweb.org/how-to-submit-a-post. Now wondering how to best implement …

Bookmarked https://news.indieweb.org/how-to-submit-a-post.

Now wondering how to best implement this. My list of syndication links is generated automatically (after [automatic] syndication to, e.g., Mastodon was successful), yet in this case, the link should be there before the webmention is sent (and, preferably, updated afterward).

You can then update your post with that URL so that your post always links to the IndieNews permalink instead of the IndieNews home page.

(Speaking of, I guess this note, too, should now end up there.)

IndieNews - How to submit a post
news.indieweb.org

Reposted https://nitter.geekcompass.com/loresjoberg/status/1516915906965753857 by Lore Sjöberg. Bitcoin and NFTs …

Reposted https://nitter.geekcompass.com/loresjoberg/status/1516915906965753857.

Bitcoin and NFTs were invented because of a scarcity of scarcity. Someone decided that there isn’t enough scarcity around and decided to make a bunch more scarcity so now we have an abundance of scarcity. A bona fide cornucopia of dearth.

Lore Sjöberg (@loresjoberg)
nitter.geekcompass.com

Bookmarked https://blog.omgmog.net/post/a-bit-of-a-bodge-to-make-massive-emoji/. Some of the things here sound …

Bookmarked https://blog.omgmog.net/post/a-bit-of-a-bodge-to-make-massive-emoji/.

Some of the things here sound all too familiar! For my feed reader, I’ve been looking into ways to convert emoji-in-SVG favicons to PNG or a similar bitmap format (and, for now, settled on a Twemoji-based solution).

I used to also struggle a bit with entries that start off with an image. Wanted them to have a little bit of extra top margin. Tried something-something img:first-child but ran into issues with textNode siblings and so on. A bit of JavaScript eventually did the trick, although I’ve since moved to a server-side solution.

[…] came across the “Render Emoji Unicode” plugin but it was using an old library, and referencing an old version of Twemoji […]

A Bit of a Bodge To Make MASSIVE Emoji | The blog of Max Glenister
blog.omgmog.net

In reply to https://jan.boddez.net/notes/6da9619992. The “plan” was to …

In reply to https://jan.boddez.net/notes/6da9619992.

The “plan” was to set an emoji font before having Imagick read the SVG, but that doesn’t seem to do much at all (on my instance).

I’ve since encountered two blogs that use SVGs with a single plain-text emoji in it as their favicons. Might (eventually) just try and swap out these for an actual image, then work off that (or stick with raw SVG).

In reply to https://jan.boddez.net/notes/8757c0b082. As such, I’m having …
jan.boddez.net

In reply to https://jan.boddez.net/notes/8757c0b082. As such, I’m having …

In reply to https://jan.boddez.net/notes/8757c0b082.

As such, I’m having Imagick read the image data (works for all but ICO), and if that fails, use Imagick::setFormat('ico'). And it works! (Except for, well, emoji inside SVGs. A total edge case, I hope, but I’ve got a plan regardless.)

So, favicons can be either PNG, GIF, ICO, …
jan.boddez.net

So, favicons can be either PNG, GIF, ICO, …

So, favicons can be either PNG, GIF, ICO, or SVG. (I’m adding favicon support to my feed reader, and Imagick was acting all weird. I’m cheating, too, by using DuckDuckGo’s favicon service, which unfortunately does not return proper MIME types.)