Better HN
topnewbestaskshowjobs
Log inSign up

dumbmatter

263 karma · joined Oct 1, 2015 (11y ago) · 79 submissions

Submissions

comment 7y ago · link · parent

Two people declined to re-license their contributions to Racket. We therefore removed their contributions and, where appropriate, replaced them with new code and/or documentation.

Is that actually allowed by the GPL? I thought it was more like the "Ship of Theseus" - that even if you eventually replace all the original GPL code, the entire work remains GPLed. https://softwareengineering.stackexchange.com/questions/2603...

comment 7y ago · link · parent

...which says

> Warning you probably don’t want to use CGI for modern web development, see Why Not to Use CGI.

comment 7y ago · link · parent

Stuff like https://reactjs.org/docs/hooks-faq.html#how-can-i-measure-a-...

If you're not aware of that, it is very tempting to use `useRef`, which is what I have often seen. Before hooks, we did not have the temptingly-named footgun `useRef` for this scenario (although we did have other footguns for other scenarios, and overall I love hooks).

comment 7y ago · link · parent

Tons of shitty "here's how to use hooks for X" articles on Medium make the mistake, so people learning hooks right at the beginning will not be completely immune.

Also that the fix is "instead of using this one kind ref, use another kind of ref and put it in state"... I don't know, like I said I'm not sure if there is a better solution, but it still feels kind of unintuitive and complicated.

Now that I'm thinking about it... what is the reason that DOM refs and other refs need to be handled by the same concept? Every time I make a DOM ref, I'm doing something with it in a hook like useEffect. Why make me jump through hoops to re-run the hook if the DOM ref changes?

(I recognize there are probably good answers to those questions, the React folks are great, I just don't know the answers! Is it just to avoid introducing one more "type of thing", and instead making refs and DOM refs the same "thing"?)

comment 7y ago · link · parent

I've seen a ton of people make that mistake, though. I think it's because what you write is accurate - "refs are meant for values that don't need to trigger a rerender" - but most people think of refs (or at least refs of DOM elements, which for many people are the only refs they ever use) as just a way to access a DOM element. They expect it to just be a DOM element in a normal variable.

I'm not sure if there is a less confusing way of doing it, but it's damn confusing.

comment 7y ago · link · parent

I don't think that can explain it, because IIRC that rule has only been around since Obamacare, but the US/world price disparity for prescription drugs has existed much longer than that.

comment 7y ago · link · parent

At least it'd be no worse than we have now with voting my mail.

comment 7y ago · link · parent

Sometimes there are browser bugs that are impossible to do feature detection for, in which case have no better option than looking at the user agent.

For instance, several versions of Firefox had a serious bug in shared workers, which appeared intermittently when users opened your site in multiple tabs https://stackoverflow.com/questions/51092596/feature-detecti... - I had to use the user agent to work around this.

comment 7y ago · link · parent

Alternative title: Why does software development suck so much in _______?

comment 7y ago · link · parent

And, sadly, if we could detect Alzheimer's a decade early, it would go from a 0% survival rate to a 0% survival rate.

Early detection would still be valuable for other reasons, though.

comment 7y ago · link · parent

In this specific case, they do test for the ApoE gene which can you a 20x higher chance of getting Alzheimer's https://en.wikipedia.org/wiki/Apolipoprotein_E#Alzheimer's_d...

20x more is not a sure thing, but for a disease like Alzheimer's that is already pretty common (e.g. we're not talking about risk increasing from 0.01% to 0.2%) it's more meaningful than just for entertainment purposes.

I agree with your wife that for most people their 23andme results will be nothing more than entertainment, but there are a handful of truly meaningful things it can find.

comment 8y ago · link · parent

What does "rationalized" mean? Highly respected open access publishers like PLoS charge similar fees https://www.plos.org/publication-fees - maybe that's just what it costs to run a journal? If not, PLoS must be some ridiculously profitable scam.

comment 8y ago · link · parent

That's not true, 23andme tests the APOE gene (and possibly some others too) which does indeed have a large affect on the risk of developing Alzheimer's.

Although having the good version of APOE doesn't mean you'll never get it, and having the bad version doesn't mean you're guaranteed to get it. The odds do shift quite a bit, though.

comment 8y ago · link · parent

Firefox 52 may be around for a while - it's the last LTS before extensions were broken by Quantum, and it's also the last release that runs on XP and Vista.

comment 8y ago · link · parent

I'm psyched to see the fix to https://bugzilla.mozilla.org/show_bug.cgi?id=1193394 released, which (amongst other things) mean that you can finally write code using both IndexedDB and promises without inadvertently committing the active transaction on promise resolution. Now I just need to wait until the market share of other Firefox versions decreases before I can actually take advantage in production :)

comment 8y ago · link · parent

Mandatory HTTPS? This discussion from 2 days ago seems relevant: https://news.ycombinator.com/item?id=16951831

comment 8y ago · link · parent

Our first action, which began immediately after the incident concluded, was to implement a 24-hour cooldown on republication of any deleted package name.

Why not infinity hours? I don't get it.

comment 8y ago · link · parent

In my job, I edit the production database live because adding a special feature (or even a bug fix) takes like a year to get deployed to production, even if it's as simple as a one line change.

comment 8y ago · link · parent

It doesn't seem odd if you've worked in enterprise, just sad :)

comment 9y ago · link · parent

Or, shameless self promotion:

https://basketball-gm.com/

https://github.com/dumbmatter/basketball-gm

Currently no terminal UI, sadly. PRs welcome!

comment 9y ago · link · parent

I drink decaf sometimes because coffee does taste good. Caffeinated I only drink rarely, like when traveling and I need to wake up really early.

I remember growing up seeing people brag about how much coffee they drink and how much caffeine they consume and how addicted they are to caffeine - it seemed like a stupid macho dick-measuring contest. Later in life I learned about caffeine tolerance and addiction, and that confirmed my initial biases about regular caffeine consumption.

comment 9y ago · link · parent

You are right about that. They even financially support other projects that are not as rich: https://www.mozilla.org/en-US/moss/

Anyone know someone working on Edge? Maybe MS can apply to that program and get some extra funding?

comment 9y ago · link · parent

It's been 2 (nearly 3) years since the final version of the official spec, but 5 years since any significant changes to the spec draft. IE10 was released in 2012 with a partial IndexedDB implementation, and Edge is still missing features that Chrome and Firefox had 5 years ago.

And I was being facetious, I know I'm not a normal user. Some normal users would like to play a video game I wrote that won't run in Edge due to missing IndexedDB features, though.

comment 9y ago · link · parent

One of the most common requests we hear from people who use Microsoft Edge on Windows 10 PCs is "we want our browser experience to move to our phones".

That's funny, my most common request is "IT'S BEEN LIKE 5 YEARS, CAN YOU GUYS FINALLY SUPPORT ALL OF THE INDEXEDDB API? EVEN SAFARI DOES IT NOW!"

So sad when poor multinational corporations simply don't have the resources to compete with obscenely wealthy organizations like Mozilla. Maybe they should try open sourcing their browser so the community can pitch in?

comment 9y ago · link · parent

https://en.wikipedia.org/wiki/Suprachiasmatic_nucleus

The SCN receives input from specialized photosensitive ganglion cells in the retina via the retinohypothalamic tract. Neurons in the ventrolateral SCN (vlSCN) have the ability for light-induced gene expression. Melanopsin-containing ganglion cells in the retina have a direct connection to the ventrolateral SCN via the retinohypothalamic tract. When the retina receives light, the vlSCN relays this information throughout the SCN allowing entrainment, synchronization, of the person's or animal's daily rhythms to the 24-hour cycle in nature.

comment 9y ago · link · parent

It's fine to post dumb questions on Stack Overflow. It's not fine to post questions that are either incoherent or obviously have been previously asked. And you don't need any reputation/points/whatever.

comment 9y ago · link · parent

Some buses don't have schedules, just an estimated frequency. Or some have schedules but don't stick to them with any reliability.

comment 9y ago · link · parent

Yeah, it's like Watson on Jeopardy. It could buzz in faster than a human, so it got to answer every question that it thought it knew, which was most of them. Problem is, the human competitors surely also knew most of them (maybe even more than Watson) but they couldn't buzz in fast enough.
123