Readit News logoReadit News
bfred_it commented on Why did a hedge fund manager worth $700M take a $630k job managing an oil fund?   institutionalinvestor.com... · Posted by u/dybber
peteretep · 5 years ago
Plenty of other artists will come and give you a concert and want a huge chunk of change for it

> can’t spend that kind of money

Right but this really really isn’t true

bfred_it · 5 years ago
I think it’s less about being able to spend the money (of course you can) than needing to spend it.

Do you really need a 100-million yacht and a 20-bedroom villa? No.

bfred_it commented on The creeping scourge of tooling config files in project root directories   github.com/nodejs/tooling... · Posted by u/flaque
bfred_it · 5 years ago
There’s a solution to this problem: https://github.com/sindresorhus/hide-files-on-github

Additionally, your OS probably already natively hides files that start with a dot, so this is just a UI problem.

Please don’t “solve” this issue by moving files to a sub-directory. If anything, only leave non-config files there, it’s the obvious simple solution that most projects follow anyway.

bfred_it commented on Make your 404s into 302s   4042302.org/... · Posted by u/teh_klev
bfred_it · 6 years ago
I recently dropped my last shared hosting in favor of Vercel/Netlify and some content was lost. This solution wouldn’t work for me because the very reason why the content was lost is that I don’t want to pay for hosting I barely use.

A better solution would be an intermediary part that never changes — say, CloudFlare — that caches HTML pages forever, automatically adds a “Archived content” header to the page, and warns the author so that they can either allow the archived version or make it a 404/410 instead.

Nobody wants to maintain servers forever, but serving static/frozen pages is much easier and cheaper.

bfred_it commented on Bootstrap v5: drop Internet Explorer support   github.com/twbs/bootstrap... · Posted by u/zaiste
ativzzz · 6 years ago
Why aren't IE users considered more when thinking about accessibility? The best practice is to incorporate a11y accessibility standards to accommodate the small percentage of users who use screen readers and/or have color blindness/other disabilities. Why are we so quick to drop IE11 support when supporting users with disabilities is just as much work if not more? And possibly are a smaller percentage of users than IE users? You'll never read "Bootstrap stops supporting screen readers and removes aria tags in v6".

By extension, can we classify IE usage as a disability? Only half joking: I imagine a lot of current IE users are either doing it because of work or because they are technologically illiterate.

bfred_it · 6 years ago
Disability isn’t a choice
bfred_it commented on Firefox 75: Ambitions for April   hacks.mozilla.org/2020/04... · Posted by u/skellertor
gshdg · 6 years ago
That's been recommended since about 1993. That doesn't mean more than 10% of sites have ever actually followed the guideline.
bfred_it · 6 years ago
WordPress does this by default and that’s the most common platform to date. I’d dare to say that most websites have those attributes, but most SPAs don’t, because that’s too hard.
bfred_it commented on Firefox 75: Ambitions for April   hacks.mozilla.org/2020/04... · Posted by u/skellertor
zeroimpl · 6 years ago
If you specify both a width and height, it's not going to be very responsive.
bfred_it · 6 years ago
The attributes are overridden by CSS. You should have:

    max-width: 100%;
    height: auto;
What the other user is talking about is a new feature that FINALLY uses the attributes to preserve the ratio before the image starts loading.

Kinda ridiculous that we had to wait 8 years of “responsive design” before they realized that this was always supposed to happen.

bfred_it commented on How to manage HTML DOM with vanilla JavaScript only?   htmldom.dev/... · Posted by u/velmu
xingyzt · 6 years ago
QuerySelectorAll is widely supported and you can make your own shorthand for it.

  function $(query) {
    const result = document.querySelectorAll(query)
    if ( result ) {
      if ( result.length > 1 ) {
        return result
      } else {
        return result[0]
      }
    }
  }

bfred_it · 6 years ago
I hope you don't use that since it randomly returns either an element or a list of elements, so you'd have to also add an if/else every time you use it.

This is my go-to:

    const $ = document.querySelector.bind(document);
    const $$ = document.querySelectorAll.bind(document);
Tip: browser consoles already have these shortcuts, except $$ returns an actual array there instead of a NodeList.

bfred_it commented on How to manage HTML DOM with vanilla JavaScript only?   htmldom.dev/... · Posted by u/velmu
rsuelzer · 6 years ago
There are downsides to use package libraries as well. Like: 200mb hello world applications, or some companies restrict npm packages for security reasons.

Or, you just want to write code in notepad.exe. There is benefit to simplicity in many cases.

bfred_it · 6 years ago
It's up to you to chose reasonable modules by reasonable developers. Notice I didn't call it a library, it's a 1kb module that has the code from the example + fixes you'd want anyway.
bfred_it commented on How to manage HTML DOM with vanilla JavaScript only?   htmldom.dev/... · Posted by u/velmu
bfred_it · 6 years ago
I would never recommend copy-pasting this code into your project:

https://htmldom.dev/copy-text-to-the-clipboard

I get "trying to stay vanilla", but any reasonably-common snippet should either be installed from npm or published there.

For this specific issue there's a module named almost exactly the same and it restores the previous selection and focus as well: https://github.com/sindresorhus/copy-text-to-clipboard/blob/...

This is the point of published modules: your code isn't stuck into the version someone wrote in 10 minutes 5 years ago.

bfred_it commented on GitHub satanically messing with Markdown – changes 666 to DCLXVI   stackoverflow.com/questio... · Posted by u/YeGoblynQueenne
misterdoubt · 6 years ago
Kind of disappointing to see that level of testing failure. A leap to assume there is something specifically strange about `666` without even trying `665`...
bfred_it · 6 years ago
Which link are you more likely to click on?

- GitHub satanically messing with Markdown - changes 666 to DCLXVI

- GitHub changes numbers to Roman numerals in lists

I’d call it functional clickbait.

u/bfred_it

KarmaCake day449May 27, 2014View Original