Hacker Newsnew | past | comments | ask | show | jobs | submit | bfred_it's commentslogin

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.


Both of those probably retain some value. Property may appreciate.

I really don't think you guys have thought this through. All your suggestions on how to spend underline that it's basically impossible, even when that's your object rather than enjoying it. So now who are you giving money to? It's the only thing you can do with it. Children, good works, politics, immortality via a wing of an art gallery is popular. A building at your University... Gates is trying to rid the world of disease.

When i say you can't in not making euphamisms. You just can't. Lay out a serious plan that you would want to try and spend it and you see it's not practical or even close.

Replace Sting with every artist you like and think on the logistics of it. It doesn't work. Rival Leno's Garage. Only stay in 5 star hotels. Private Jet. 5 mansions on different continents go nuts. Your idea of no expense spared, lap of luxury. Price it up for 70 years worth.


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.


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.


Disability isn’t a choice


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.


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.


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.


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.


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

And that's how you end up with the joke that was left-pad and the broken internet that resulted when the author yanked it.

Dependencies represent a real risk to your product. If it is actually a simple snippet, you shouldn't take that as an NPM dependency - the risk/reward ratio is just way out of whack with that.


Risk of what? You can make dependencies fully sticky with lockfiles.

Instead of adding a file to your “libs” folder you add a line to package.json

Any code that isn’t in my repo is code I don’t have to maintain.

Left pad can’t happen anymore (for 4 years now) and if you don’t know that you’re either lying or outdated (like those files in your libs folder)


NPM disallowed un-publishing modules within a few days of that incident. It's not a thing that happens any more. Also, NPM for years has defaulted to creating lockfiles with all the specific versions of dependencies pinned, so even if a dependency gets updated to have a bug, you will stay on the currently-pinned version unless you specifically change that.


> It's not a thing that happens any more

Except it literally happened again 2 years after the left-pad incident:

https://status.npmjs.org/incidents/41zfb8qpvrdj https://github.com/facebook/create-react-app/issues/3701 https://github.com/angular/angular-cli/issues/9113

But anyway whether or not the module is un-published doesn't really matter. The module could also just become malicious. Ownership changes, quality of code changes, etc... If you're pinning with lockfiles you're basically back to copy/pasting or checking in a clone of an upstream repo - the maintenance burden shifts back to you at that point. You still then have to manually go update, and remember to do that, or you become just as easily obsolete as the copy/pasted snippet.


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.


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.


But what is the real downside of me of me using it?

The overhead of setting up NPM, some repo when I can achieve the same thing with that snippet, seems just to over the top.


> The overhead of setting up NPM

What overhead? You don’t run any optimization step on your code? I haven’t seen a single front end project without package.json in years in all the companies I consulted for, and I don’t even deal with fancy frameworks.


I don't code in node, nor am I a developer. The overhead of using a package manager, when I can copy and paste just feels unnecessarily.

The web projects that I work on are rendered at the server and then that is displayed to the client.


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.


With GitHub templates and npm’s init/create packages you already have options without having to use an editor.

Examples:

    npm init esm
    npm init react-app
https://docs.npmjs.com/cli/init


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: