C++17 creates a practical use of the backward array index operator - The Old New Thing
Possibly more than just a curiosity.
Hasnain says:
Gotta love C++! I'd always thought of this as a quirk to trip people up, but hey here's a semi legitimate use case!
"Therefore, if your evaluation of the index may have a side effect on the evaluation of the pointer, you can flip the order to force the index to be calculated first.
auto test()
{
return index()[p];
}
Astound your friends! Confuse your enemies!"
A 9-year-old girl didn't want her goat slaughtered. California fair officials sent deputies after it
Jessica Long's 9-year-old didn't want her goat, Cedar, to be slaughtered at the county fair. Officials sent deputies with a search warrant to get it back.
Hasnain says:
This whole story has been so messed up. I feel for the kid who had to suffer due to all the unreasonable adults here. The parents offered to reimburse everyone for the costs but the fair organizers were unreasonable. Also, I'm impressed the cops went 500 miles to retrieve a goat (likely out of their jurisdiction?) - don't they have anything better to do? Given the quote below, I do hope this does turn out to, uh, be a more negative experience for the fair than they hoped.
"“Making an exception for you will only teach [our] youth that they do not have to abide by the rules,” Silva wrote back to Long in an email reviewed by The Times dated June 28, 2022. “Also, in this era of social media this has been a negative experience for the fairgrounds as this has been all over Facebook and Instagram.”"
Posted on 2023-04-01T20:54:35+0000
Why Americans Care About Work So Much
Workism is rooted in the belief that employment can provide everything we have historically expected from organized religion.
Hasnain says:
“The word chimera has two very different meanings. The first is a mythological creature composed of three different animals, and it is in that spirit that I’m predicting a future of human-machine co-productions. But a chimera is also an illusory dream—something profoundly hoped for that doesn’t come to pass.
The technologies that most empower humanity almost always produce a shadow ledger of pain. The steam engine unleashed the industrial revolution and brutally shortened life spans. Nuclear technology can power energy reactors or atomic bombs. The internet makes us productive and unproductive, delighted and miserable, informed and deluded. Like the future of everything else, the future of work will be, above all, messy.”
Posted on 2023-04-01T05:18:56+0000
Twitter's Recommendation Algorithm
Twitter Apache Thrift is an open-source, standalone, lightweight, data encoding library. In this blog post, we share the library we built so iOS developers outside Twitter can start using Thrift data.
Hasnain says:
I’m actually surprised, but twitter did open source a bunch of “the algorithm”:
https://blog.twitter.com/engineering/en_us/topics/open-source/2023/twitter-recommendation-algorithm
wondering what people will find as they go over the code.
(github: https://github.com/twitter/the-algorithm and https://github.com/twitter/the-algorithm-ml )
Posted on 2023-03-31T19:05:53+0000
Early Remote Work Impacts on Family Formation
by Lyman Stone and Adam Ozimek Key Findings: In absence of time-consuming commutes, remote workers—particularly those living with children—are spending more time on childcare and housework. This increased flexibility and time helped boost birth rates over the pandemic, specifically for wealthier...
Hasnain says:
Interesting read and I’d love to see any follow up studies here. I like how it presents the trade off between remote work and fertility rates. With how much some governments have been harping on about lower birth rates, you’d think they’d be open to more flexibility here, but they keep wanting to force people back into the office. Or not allowing immigrants. Sigh.
“Overall we see the impact of remote work on women’s intentions for family formation and the desire to have children. While remote work appears to have the biggest positive impact on older women who already have children, the clear positive impact on marriage rates suggests the potential for longer-run impacts—including changed fertility rates—on younger women. While the evidence is early and far from conclusive, we believe this research makes the case for the hypothesis that elevated levels of remote work during COVID made a positive contribution to the U.S. and potentially other developed countries’ fertility rates. Moreover, we believe this evidence is suggestive that the “return to the office” may contribute to falling birth rates, and that governments interested in supporting marriage and implementing pro-natal policies may be interested in considering how flexible work arrangements can be supported and encouraged.”
Posted on 2023-03-31T16:12:10+0000
Rust's Golden Rule
I find myself thinking about a particular design principle of Rust today. I’m not sure I’ve ever seen it named specifically before, but it gets referred to from time to time, and I think it’s an under-rated but very important aspect of why Rust works so well. I was going to refer to it as “t...
Hasnain says:
Simple rule with lots of ramifications. Worth thinking about as a design principle in general.
“Rust also has a rule. It’s kinda funny, because in some senses, this rule is almost the opposite of Magic’s, if you can even stretch the comparison this far. Here it is:
Whenever the body of a function contradicts the function’s signature, the signature takes precedence; the signature is right and the body is wrong.
This rule is also so pervasive in Rust that we take it for granted, but it is really, truly important. I think it is also important for Rust users to internalize the implications of this rule, so that they know why certain things work the way that they do.”
Posted on 2023-03-27T19:48:05+0000
'Live free and die?' The sad state of U.S. life expectancy
A decade after a landmark report on Americans' shorter lives, the problem has only gotten worse. Unlike other wealthy nations, U.S. life expectancy has not bounced back from the pandemic.
Hasnain says:
This is sad.
“"This is the first time in my career that I've ever seen [an increase in pediatric mortality] – it's always been declining in the United States for as long as I can remember," says the JAMA paper's lead author Steven Woolf, director emeritus of the Center on Society and Health at Virginia Commonwealth University. "Now, it's increasing at a magnitude that has not occurred at least for half a century."
Across the lifespan, and across every demographic group, Americans die at younger ages than their counterparts in other wealthy nations.”
Posted on 2023-03-27T13:28:10+0000
Cheating is All You Need
There is something legendary and historic happening in software engineering, right now as we speak, and yet most of you don’t realize at all how big it is.
Hasnain says:
Been a while since Yegge has blogged - always an instant read for me. This is warming me up more and more to LLM, given his usual skepticism I’m inclined to trust this more. So hard to pick a single quote to go with, so I’ll leave with this one cause it made me laugh:
“One of the craziest damned things I hear devs say about LLM-based coding help is that they can’t “trust” the code that it writes, because it “might have bugs in it”.
Ah me, these crazy crazy devs.
Can you trust code you yeeted over from Stack Overflow? NO!
Can you trust code you copied from somewhere else in your code base? NO!
Can you trust code you just now wrote carefully by hand, yourself? NOOOO!
All you crazy MFs are completely overlooking the fact that software engineering exists as a discipline because you cannot EVER under any circumstances TRUST CODE. That’s why we have reviewers. And linters. And debuggers. And unit tests. And integration tests. And staging environments. And runbooks. And all of goddamned Operational Excellence. And security checkers, and compliance scanners, and on, and on and on!
So the next one of you to complain that “you can’t trust LLM code” gets a little badge that says “Welcome to engineering motherfucker”. You’ve finally learned the secret of the trade: Don’t. Trust. Anything!”
Posted on 2023-03-24T02:37:00+0000
TikTok’s Secret Sauce
Daniel Hertzberg Deep Dive TikTok’s Secret Sauce TikTok’s algorithm is ordinary. Its real innovation is something else. By Arvind Narayanan December 15, 2022 Algorithmic Amplification and Society A project studying algorithmic amplification and distortion, and exploring ways to minimize harmful ...
Hasnain says:
This was a great read - learnt a bit more about recommendation algorithms!
“Recommender systems are extremely well studied in computer science, and relatively simple to understand, but public comprehension of how they work is poor. That has led to these algorithms being viewed as magic, demonized, or mythologized. (I hope to play a small role in changing this through my ongoing project on algorithmic amplification and society.) TikTok’s recommender system is not its secret: rather, it’s the design, which, of course, isn’t secret at all. More generally, in AI applications, the sophistication of the algorithm is rarely the limiting factor. The quality of the design, the data, and the people that make up the system all tend to matter more.
Despite TikTok’s design innovations being well known, other apps have trouble copying them because they were originally designed for a very different experience, and they are locked into it due to their users’ and creators’ preferences. This is a classic example of the innovator’s dilemma: Clay Christensen’s argument that incumbents tend to be held back by their own success—a lesson that’s been largely forgotten as “disruption” turned into a buzzword. As changes in technology make new user experiences possible, TikTok may one day be the struggling incumbent.”
Posted on 2023-03-23T14:34:33+0000
SARS-CoV-2 Infection Weakens Immune-Cell Response to Vaccination
The magnitude and quality of a key immune cell’s response to vaccination with two doses of the Pfizer-BioNTech COVID-19 vaccine were considerably lower in people with prior SARS-CoV-2 infection compared to people without prior infection, a study has found. In addition, the level of this key immune...
Hasnain says:
This is…. Not great. I don’t have high hopes in our public health systems nowadays but I hope action is finally taken at some point before it’s too late.
“Taken together, the investigators write, these findings suggest that SARS-CoV-2 infection damages the CD8+ T cell response, an effect akin to that observed in earlier studies showing long-term damage to the immune system after infection with viruses such as hepatitis C or HIV. The new findings highlight the need to develop vaccination strategies to specifically boost antiviral CD8+ T cell responses in people previously infected with SARS-CoV-2, the researchers conclude. “
Posted on 2023-03-21T23:32:41+0000