Last night I was having a problem working out a nice way to return a boolean when searching for a particular value in an array of objects. With some fiddling .find() and .findIndex() both worked, both were messy and both require polyfills. Then @hankchizljaw suggests .some(). Absolutely perfect, returns bool by design and good back to IE9 (ECMAScript 5.1).
I really need to read through all of MDN sometime 🤓
I've just spent some time 'learning' a very large commercial website with an ASP (classic) + MySQL backend. Dev started in 2004 and it's still being added to now. I'm doing this so I can support the site, continue to develop it and eventually (hopefully) migrate it to something a little more modern.
It's reminded me to not be quite so hung-up on latest latest latest everything. HUGE chunks of the web are using ancient tech, and are doing more-or-less fine on it 🐌
What was my point again?
I have a question / confusion about the 'Federated timeline'. The docs say (https://github.com/tootsuite/documentation/blob/master/Using-Mastodon/User-guide.md#the-federated-timeline) it shows "all public posts from all users 'known' to your instance. This means the user is either on the same instance as you, or somebody on your instance follows that user". This isn't true. I see posts from @juanfernandes in my Fed Timeline and I don't follow him (yet). I'm on my own instance. Any ideas?
This afternoon I migrated a #WordPress site from a VPS to a 34SP Managed Wordpress slot. I also spent some time tidying up the 4 year old theme. It's now loading about 4 times as fast, and that's before I've added a TLS cert and enjoy the benefit of HTTP2. Which is nice.
@Kenburg There's a pretty big web/tech scene on Mastodon at the moment. No idea if there's mush of an MTB / Photog / Automotive one 🤷♂️
#WordPress Theme dev note: Hardcoded local URLs in themes is a 101 “nope”. As a dynamic workaround people often use get_site_url(). Careful though, more and more WP specific hosts serve WP from a location other than the web root. wp_site_url() returns the URL-relative location of the WordPress installation, i.e it could be example.com/lib/wp. If it’s the web root you’re after, wp_home_url() is safer.
A thought related to this Death of the URL thing:
At the weekend my wife wanted to share a page on a website with a friend. She was using Safari iOS. She said “I want to share this, but only the website address is shown”. This is because Safari only shows the FQDN in the address bar unless you tap on it. So I say that people DO know what URLs are, and they are used and necessary. For now.
@magicroundabout *bunnyhops from T to M* I don't think M solves T's problems, but it makes life a little nicer for now. It might be that things I dislike and am trying to escape on T don't worry or effect you. Initially there's a tech barrier to entry on M. Not just anyone (Nazis and all) will bother to pay for an instance, or hop on a free one. If they do, small (thousands of users) instances are easier to moderate and block, than 300mil+ users on Twitter.