Making any integer with four 2s - Eli Bendersky's website
Making any integer with four 2s February 22, 2025 at 14:53 Tags Math There's a cute math puzzle that can be interesting to folks on very different levels: Given exactly four instances of the digit 2 and some target natural number, use any mathematical operations to generate the target number with th...
Hasnain says:
Coolest math fact I’ve learned in a while.
“One may claim this is cheating, but it seems to be in line with the rules of the puzzle! Note that the entity n doesn't actually appear anywhere - it's just a helper to count the number of repeated square roots.”
Posted on 2025-02-24T06:11:54+0000
github.com
github.com
Hasnain says:
“So why did I say getaddrinfo sucks? It's because it was designed for POSIX. Do one thing, and do it well. And in that sense it succeeded without a doubt. Could it be better, more flexible and more extensible? Sure. But if that were the case it would also probably be more buggy, and have a bunch more differences across platforms. But what of the other APIs we looked at today? Well, these are the results of each platform doing their own thing. Some had a common starting point - see res_query - but slowly diverged to accommodate the specific requirements of their users and platform. What we now have is a buffet of choices, each with their quirks and buggy implementations.”
Posted on 2025-02-24T01:23:30+0000
How big tech's ad systems helped fund child abuse online
Some of the biggest tech companies in the world served ads on a website featuring images of child abuse, helping to fund its operations.
Hasnain says:
“"We are not going to fix this problem without better regulation and actual, real, serious consequences for delivering ads that fund horrific companies and activities," Edelson says. "It's too profitable to just ignore this. It's going to be impossible to solve without changing those incentives."”
Posted on 2025-02-24T01:09:28+0000
20 years working on the same software product
I released version 1 of my table seating planning software, PerfectTablePlan, in February 2005. 20 years ago this month. It was a different world. A world of Windows, shareware and CDs. A lot has c…
Hasnain says:
20 years. Life goals.
“I financed PerfectTablePlan out of my own savings and it has been profitable every year since version 1 was launched. I could have taken on employees and grown the business, but I preferred to keep it as a lifestyle business. My wife does the accounts and proof reading and I do nearly everything else, with a bit of help from my accountant, web designers and a few other contractors. I don’t regret that decision. 20 years without meetings, ties or alarm clocks. My son was born 18 months after PerfectTablePlan was launched and it has been great to have the flexibility to be fully present as a Dad.”
Posted on 2025-02-24T00:58:45+0000
Concurrency bugs in Lucene: How to fix optimistic concurrency failures - Elasticsearch Labs
Thanks to Fray, a deterministic concurrency testing framework from CMU’s PASTA Lab, we tracked down a tricky Lucene bug and squashed it
Hasnain says:
Loved this one because deterministic thread scheduling for testing is vastly underrated
“Not all heroes wear capes
Yes, it's cliche – but it's true.
Concurrent program debugging is incredibly important. These tricky concurrency bugs take an inordinate amount of time to debug and work through. While new languages like Rust have built in mechanisms to help prevent race conditions like this, the majority of software in the world is already written, and written in something other than Rust. Java, even after all these years, is still one of the most used languages. Improving debugging on JVM based languages makes the software engineering world better. And given how some folks think that code will be written by Large Language Models, maybe our jobs as engineers will eventually just be debugging bad LLM code instead of just our own bad code. But, no matter the future of software engineering, concurrent program debugging will remain critical for maintaining and building software.
Thank you Ao Li and his colleagues from the PASTA Lab for making it that much better.”
Posted on 2025-02-23T20:11:45+0000
Chien-Shiung Wu's trailblazing experiments in particle physics
The Chinese American physicist led groundbreaking experiments that demonstrated parity violation and photon entanglement. Many in the physics community say Wu d
Hasnain says:
“On 4 October 2022, just over a week after Brink’s remarks about the significance of Wu’s experiments, the Royal Swedish Academy of Sciences announced that it had selected Alain Aspect, Clauser, and Anton Zeilinger as the recipients of that year’s Nobel Prize in Physics “for experiments with entangled photons, establishing the violation of Bell inequalities and pioneering quantum information science.” Because Wu died in 1997 and Nobel Prizes are not awarded posthumously, she could not have been considered for her early photon entanglement experiment. Despite at least 12 Nobel nominations and two leading-edge experimental contributions in topics that ultimately received the accolade, Wu never received the honor (see “Physics Nobel nominees, 1901–70,” Physics Today online, 29 September 2022). That oversight, though, does not diminish her accomplishments.
Wu’s scientific achievements transcend the development of the atomic bomb. She contributed to a profound and meticulous understanding of the physical universe. “As a woman in a field almost entirely dominated by men, when most doors were closed to women, she was a trailblazer with an indomitable spirit and determination and a focus on scientific inquiry,” said Columbia’s Elena Aprile at the 2022 anniversary celebration of Wu’s life and work.8 Aprile joined the physics department faculty at Columbia in 1986; she was the second woman to join the department, more than four decades after Wu.”
Posted on 2025-02-23T20:03:22+0000
Ancient switch to soft food gave us an overbite—and the ability to pronounce ‘f’s and ‘v’s
How farming reshaped our smiles and our speech
Hasnain says:
“Bickel suggests that as more adults developed overbites, they accidentally began to use "f" and "v" more. In ancient India and Rome, labiodentals may have been a mark of status, signaling a softer diet and wealth, he says. Those consonants also spread through other language groups; today, they appear in 76% of Indo-European languages.”
Posted on 2025-02-23T19:49:47+0000
Pakistan is always in my heart, but here’s how Palo Alto became my home
When I was growing up, my aunt told me all I’d be doing in life was cook. It took a few decades, but it turns out that she was right.
Hasnain says:
“I love the shouts of “gola kabab para aqui,” “tres naans, por favor” and “rapido, rapido” that ring out of our kitchens — Pakistani cooking instructions delivered in another language and prepared by cooks from another food culture. And yet, nothing is lost in translation. Immigrants are the backbone of our restaurant and, by extension, of the community we serve. And as a fellow immigrant, I am very proud of the migrant mosaic at the heart of Zareen’s.”
Posted on 2025-02-23T18:16:08+0000
‘The tyranny of apps’: those without smartphones are unfairly penalised, say campaigners
From loyalty cards, to restaurant meal deals or simply parking your car – it is harder and harder to get by without signing up to a multitude of apps
Hasnain says:
I miss the open web. Also super ironic that this came with a full blown ad for the guardian app.
“Apps have burrowed their way into seemingly every aspect of our lives and there are lots of reasons why companies are pushing us to use them. With an app, it is often “one click and you’re in”, rather than having to faff around online finding the website and remembering passwords. It is also for the “push notifications” that mobile apps send to grab our attention and get us to buy stuff. Many tech experts also argue that apps are generally more secure than websites and allow banks and others to carry out sophisticated ID verification using face, voice and fingerprint biometrics.
But millions of people who cannot afford a smartphone or have an older device that does not support some services are increasingly being locked out of deals, discounts and even some vital services, say digital exclusion and pro-cash campaigners.”
Posted on 2025-02-22T18:00:41+0000
How a New Hampshire libertarian utopia was foiled by bears
Seriously, this happened. You should absolutely read about it.
Hasnain says:
This was fascinating. Especially the part about the bear attacks. TIL.
“By pretty much any measure you can look at to gauge a town’s success, Grafton got worse. Recycling rates went down. Neighbor complaints went up. The town’s legal costs went up because they were constantly defending themselves from lawsuits from Free Towners. The number of sex offenders living in the town went up. The number of recorded crimes went up. The town had never had a murder in living memory, and it had its first two, a double homicide, over a roommate dispute.”
Posted on 2025-02-20T07:51:03+0000