placeholder

Hasnain says:

“That was another rathole, and the answer was also a thing to behold: I couldn't see it in the checked-in source code because it had been fixed. Some other engineer on a completely unrelated project had tripped over it, figured it out, and sent a fix to the team which owned that program. They had committed it, so the source code looked fine.

[ Another side note: this person who fixed a bug in some code that wasn't their actual "job" was the kind of excellent behavior that used to be lionized there - "nothing at FB is someone else's problem". That credo died a long time ago. ]”

Posted on 2025-02-24T07:26:10+0000

placeholder

Tokio + prctl = nasty bug

Recently I encountered a bug so cute that I immediately knew that I will want to share it on my blog. It was one of those bugs that even Rust can’t save you from. It occurred in HyperQueue (HQ), a distributed task scheduler written in Rust that I work on.

Click to view the original at kobzol.github.io

Hasnain says:

“In the end, it took me probably less than an hour to find, diagnose and fix this bug, so it wasn’t that bad, as far as bughunting stories go. But I found the bug to be sort of beautiful, so I wanted to share it anyway.

I hope that you found this bughunt case interesting, and that you perhaps also learnt something new along the way.”

Posted on 2025-02-24T06:18:52+0000

placeholder

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...

Click to view the original at eli.thegreenplace.net

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

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

placeholder

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.

Click to view the original at bbc.com

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

placeholder

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…

Click to view the original at successfulsoftware.net

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

placeholder

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

Click to view the original at elastic.co

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

placeholder

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

Click to view the original at pubs.aip.org

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

placeholder

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

placeholder

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.

Click to view the original at sfchronicle.com

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

placeholder

‘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

Click to view the original at theguardian.com

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

placeholder

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

placeholder

Omar El Akkad: 'One Day, Everyone Will Have Always Been Against This'

In this extract from his upcoming non-fiction, the novelist and journalist critiques the normalisation of extreme rhetoric in US political discourse

Click to view the original at middleeasteye.net

Hasnain says:

Powerful words here.

“It is a source of great confusion first, then growing rage, among establishment Democrats that there might exist a sizable group of people in this country who quite simply cannot condone a real, ongoing genocide, no matter how much worse an alternative ruling party may be or do. This stance boggles a particular kind of liberal mind because such a conception of political affairs, applied with any regularity, forces the establishment to stand for something. It suddenly becomes insufficient to say: Elect us or else they will abolish abortion rights; elect us or they will put more migrants in concentration camps; elect us or they will make your lives so much worse. What is the use, once elected, of doing anything of substance when what was necessary, the negation of some other hypothetical outcome, has by definition already been achieved?”

Posted on 2025-02-18T02:38:40+0000

placeholder

calculator-app - Chad Nauseam Home

"A calculator app? Anyone could make that." (this was originally a https://x.com/ChadNauseam/status/1890889465322786878) Not true. A calculator should show you the result of the mathematical expressi…

Click to view the original at chadnauseam.com

Hasnain says:

Apps are deceptively easy to make.

Great apps hide all that complexity behind the scenes.

TIL Boehm (yes, that guy, of Boehm GC fame) wrote the android calculator app and went through some reasonably advanced math to get it right.

“With this representation, they're in the sweet spot:

All the digits shown on the screen are always correct. And they almost never show more digits than necessary.

A "computer algebra system" would have accomplished a similar goal, but been much slower and much more complicated”

Posted on 2025-02-17T02:26:26+0000

placeholder

Cosmologists Try a New Way to Measure the Shape of the Universe | Quanta Magazine

Is the universe flat and infinite, or something more complex? We can’t say for sure, but a new search strategy is mapping out the subtle signals that would reveal if the universe had a shape.

Click to view the original at quantamagazine.org

Hasnain says:

“Cornish views Compact as a “low-probability, high-reward” proposition. “If I had to bet, I don’t think they’re going to find anything,” he said. “But the question is so important,” he added, that it ought to be explored “to the fullest extent.””

Posted on 2025-02-16T05:33:25+0000

placeholder

How Noether’s Theorem Revolutionized Physics | Quanta Magazine

Emmy Noether showed that fundamental physical laws are just a consequence of simple symmetries. A century later, her insights continue to shape physics.

Click to view the original at quantamagazine.org

Hasnain says:

“Noether was an assistant in name only. She was already a formidable mathematician when, in early 1915, Hilbert and Klein invited her to join them at the University of Göttingen. But other faculty members objected to hiring a woman, and Noether was blocked from joining the faculty. Regardless, she would spend the next three years prodding the fault line separating physics and mathematics, eventually setting off an earthquake that would shake the foundations of fundamental physics.”

Posted on 2025-02-16T05:21:11+0000

placeholder

How Hans Bethe Stumbled Upon Perfect Quantum Theories | Quanta Magazine

Quantum calculations amount to sophisticated estimates. But in 1931, Hans Bethe intuited precisely how a chain of particles would behave — an insight that had far-reaching consequences.

Click to view the original at quantamagazine.org

Hasnain says:

“Bethe ansatz methods show up in so many places, said Pedro Vieira (opens a new tab), a professor at the Perimeter Institute for Theoretical Physics in Waterloo, Canada. “It seems like nature appreciates beautiful things.””

Posted on 2025-02-14T07:58:53+0000

placeholder

Hasnain says:

Because of course

“The doge.gov website that was spun up to track Elon Musk’s cuts to the federal government is insecure and pulls from a database that can be edited by anyone, according to two separate people who found the vulnerability and shared it with 404 Media. One coder added at least two database entries that are visible on the live site and say “this is a joke of a .gov site” and “THESE ‘EXPERTS’ LEFT THEIR DATABASE OPEN -roro.””

Posted on 2025-02-14T07:22:04+0000

placeholder

Undergraduate Upends a 40-Year-Old Data Science Conjecture | Quanta Magazine

A young computer scientist and two colleagues show that searches within data structures called hash tables can be much faster than previously deemed possible.

Click to view the original at quantamagazine.org

Hasnain says:

Gotta love new breakthroughs. This was really cool and interesting and I’ll have to read the paper

“Farach-Colton, Krapivin and Kuszmaul wanted to see if that same limit also applied to non-greedy hash tables. They showed that it did not by providing a counterexample, a non-greedy hash table with an average query time that’s much, much better than log x. In fact, it doesn’t depend on x at all. “You get a number,” Farach-Colton said, “something that is just a constant and doesn’t depend on how full the hash table is.” The fact that you can achieve a constant average query time, regardless of the hash table’s fullness, was wholly unexpected — even to the authors themselves.”

Posted on 2025-02-12T02:28:22+0000

placeholder

Jordan begins flying medical aid into Gaza by helicopter

Gaza, devastated after more than a year of war, still has urgent shortages of food and medicine. Jordan has begun flying helicopters into Gaza with medical supplies. NPR joined one of the flights.

Click to view the original at npr.org

Hasnain says:

“ARRAF: It was really surreal because you don't see anything living in that part of Deir al-Balah, which has been heavily hit. I mean, really, it - from what we were seeing, it was just rubble. And it's important to note that Israel prevented us, according to the Jordanian authorities, from taking photographs on the ground of what we were seeing. The only thing we could take photos of once we landed were the buffer zone and the helicopter. But to actually see it real, in real life, was really unreal.”

Posted on 2025-02-11T15:51:45+0000

placeholder

Cashing Out Young

Thousands of Microsoft and other high-tech employees have cashed out their stock options, creating a new subculture of young, millionaire retirees. But it’s a world of Volvos, not Jaguars, where the party host dresses just like the caterer, and the question is what to do with your money, not how t...

Click to view the original at vanityfair.com

Hasnain says:

Lots to ponder from this one. I think I’ll come back to this a few times to internalize it. I have various somewhat conflicting thoughts:

* that was a simpler time. tech was a little less evil and more altruistic back then
* I really really resonate with the point back then about fewer people being in tech just for the money
* giving back seemed to be a very common theme, contrasting with the FIRE movement right now
* the avenues one can go into after a successful tech career are pretty much everywhere
* I would love to see a follow up that 1) profiles these same people and 2) profiles folks from the latest set of IPOs
* I wonder how perceptions of the tech people both themselves and in the communities around them have changed
* even without having struck gold things have changed so much with layoffs (and just general poverty)

“Seattle isn’t the only center of newly minted wealth out West. Silicon Valley, the software lodestone 30 miles south of San Francisco, has also produced its share of cash-outs—men and women, most of them still in their 30s and 40s, who made a ton of money off Internet start-ups early in the game and headed (often literally) for the hills, climbing Mount Rainier, trekking in Nepal, watching the sunset from their redwood decks high up in the Santa Cruz Mountains. Because of who they are and where they come from and the way in which they became rich, they’ve spawned a social revolution of such magnitude that it is transforming entire sectors of the West. Unlike people in the ­financial-­services industry, who end up as bond traders or bankers because they want to make a lot of money, “Microsofties” made their wealth serendipitously; for the most part, they tended to be from academic backgrounds—geeky, creative, interested less in striking it rich (until recently, when the Internet got to be like the Gold Rush) than in devising innovative software programs.”

Posted on 2025-02-11T02:13:29+0000

placeholder

Meta Tells Staff Exactly When They Will Be Laid Off: Memo | Entrepreneur

Meta informed U.S. staff in a leaked memo that they would find out if they were laid off on Monday at 5 a.m. PT. Meta plans to lay off over 3,000 workers.

Click to view the original at entrepreneur.com

Hasnain says:

Gee thanks bruh. Good luck to my friends still there.

“She also added that Meta's offices would be open on Monday, but anyone "whose job allows" was allowed to work from home and have the day count as "in-person time." Meta currently follows a hybrid schedule, requiring full-time employees to work from the office three days per week and two days remotely.”

Posted on 2025-02-09T18:56:37+0000

placeholder

Cloudflare Incident on February 6, 2025

On Thursday February 6th, we experienced an outage with our object storage service (R2) and products that rely on it. Here's what happened and what we're doing to fix this going forward.

Click to view the original at blog.cloudflare.com

Hasnain says:

Great writeup as always from cloudflare. I liked this in particular as it called out one of the layering violations that’s not always obvious when working on low level infra; you have to audit all your dependencies to make sure you don’t depend on yourself being up somehow

“>On-call attempts to re-enable the R2 Gateway service using our internal admin tooling, however this tooling was unavailable because it relies on R2.”

Posted on 2025-02-07T06:28:11+0000

placeholder

USPS Halts All Packages From China, Sending the Ecommerce Industry Into Chaos

As part of new tariffs on Chinese imports, President Donald Trump eliminated an exemption for small packages, vastly increasing the amount of parcels US Customs and Border Protection needs to inspect.

Click to view the original at wired.com

Hasnain says:

This is gonna kill drop shippers right? And I’m assuming also hurt meta/google ads (temu spends $3b/yr on ads) and amazon in general.

“Known as de minimis, the rule waives import duties for small packages valued at less than $800 shipped into the US. Originally intended to exempt personal gifts and other items that Americans send home from trips abroad, it has since allowed foreign businesses to more easily sell goods to US consumers without needing to worry about paying import taxes. The number of de minimis packages has soared in recent years as the ecommerce market has become more global, making it difficult—if not impossible—for Customs and Border Protection to keep track of all the parcels flowing into the US.

According to the CBP, over 1.36 billion de minimis packages entered the US in fiscal year 2024, almost 10 times the number in 2015. That amounts to 3.7 million packages per day on average—many of which are now subject to scrutiny at the border for the first time.”

Posted on 2025-02-05T08:14:37+0000

placeholder

Trump says Palestinians should leave Gaza permanently and US will ‘take over’ strip | CNN Politics

President Donald Trump said Tuesday that the US “will take over” the Gaza Strip, after saying earlier that he doesn’t think there is a permanent future for Palestinians in Gaza.

Click to view the original at cnn.com

Hasnain says:

Welp. At a loss for words.

At least he has been honest about the destruction compared to Biden. That is the only silver lining in what is one of the most depressing moments of our generation.

““I mean they’re there because they have no alternative. What do they have? It is a big pile of rubble right now,” Trump said moments before hosting Netanyahu for Oval Office talks”

Posted on 2025-02-05T02:07:45+0000

placeholder

Primary Every Democrat

It’s exhausting to watch poll-tested, donor-beholden congressional Democrats continue to be too old, too cloistered, and too bumbling to do anything as the government burns.

Click to view the original at newrepublic.com

Hasnain says:

“It feels pathetic to even have to write this, but right now someone, somewhere needs to fight for something. To stand for something. To match the anger, fear, and sadness we all feel. Because this defeatism, nihilism, and just plain fecklessness from Democrats in the remaining time we have, if we even have it, to save everything we care about is utterly exhausting.

There are many reasons why I am launching an exploratory committee for a bid to the U.S. Senate, but something I’ve thought a lot about is that all these people being so thirsty for the title of “senator”—either in holding onto it for decades too long or striving to attain it—has, in practice, been disqualifying. Wanting to be a senator for the sake of being a senator has given us a collection of people who stand for little other than their own egos, who grow increasingly out of touch with any community but the cohort of 100 people who also share their title, and who cannot effectively serve as reflections of or advocates for the values we prize most.”

Posted on 2025-02-03T20:47:32+0000

placeholder

Hasnain says:

The style of writing echoes stuff that I’ve seen written about other countries a lot so this was … jarring.

“I’ve long believed that the American media would be more clear-eyed about the rise and return of Donald Trump if it was happening overseas in a foreign country, where we’re used to foreign correspondents writing with more incisive authority. Having watched with growing alarm the developments of the last 24 and 36 hours in Washington, I thought I’d take a stab at just such a dispatch. Here’s a story that should be written this weekend:

With rapidity that has stunned even longtime political observers, forces loyal to Musk’s junta have established him as the all-but undisputed unelected head of government in just a matter of days, unwinding the longtime democracy’s constitutional system and its proud nearly 250-year-old tradition of the rule of law. Having secured themselves in key ministries and in a building adjacent to the presidential office complex, Musk’s forces have begun issuing directives to civil service workers and forcing the resignation of officials deemed insufficiently loyal, like the head of the country’s aviation authority.”

Posted on 2025-02-01T16:27:02+0000

placeholder

Hasnain says:

““We have the power to turn the tide if we want to,” said Oona Hathaway, a professor of international law at Yale. “But at a certain point, the rules are going to become so eroded that it’s going to lose all legitimacy, and the United States is going to lose all legitimacy. We’re going to find that we’re going to be past the point of no return, and those rules are no longer going to be salvageable. And I think that would be a real tragedy.””

Posted on 2025-02-01T02:43:12+0000