Discovering My Roommate’s Death on Facebook
A Journey of loss and reflection
Hasnain says:
“A few days after the funeral, I walked to the marina to watch that pink-sky sunset. As the sun bled fuchsia through the sky and the Golden Gate Bridge reflected in the tide, I thought about Paul’s body buried in the ground in Northern Ireland while his belongings were just as he had left them in our apartment a few blocks away. I imagined a parallel existence where he had never stepped off the curb that night, where I would come home and find him studying his Russian notes in a kitchen that smelled like chipotle.
Weeks later, I finally summoned the will to clear out Paul’s room. As I carefully packed away the roommate who was gone almost as soon as he arrived, I came across a dresser drawer stuffed with crumpled, recently worn clothes. I pulled out a T-shirt. It read: “All we have is now.””
Posted on 2024-04-15T04:26:12+0000
These identical twins both grew up with autism, but took very different paths
Sam and John Fetters are identical twins with autism. But Sam is in college, while John still struggles to form sentences. Their experience may shed light on the disorder's mix of nature and nurture.
Hasnain says:
“"We are identical twins in almost every other way — laugh in the same way, cry in the same way, see the day in the same way, love the same way," Sam says. "He should absolutely have that ability to speak. He should have that. And him not having that is so unfair."
So for now, Sam plans to keep using his own words to help say what his brother can't.”
Posted on 2024-04-15T01:09:14+0000
Don't be afraid to be wrong
Being afraid of being wrong can hold you back - know how to deal with it.
Hasnain says:
"Think back and write down times when you were wrong and real consequences of those. Usually you will realise there has never been a terrible consequence except some embarrassment that lingered for a day or two. (As an experiment I have asked people a few times if they remember that one time when I said something that was wrong - almost always they have no idea what I am talking about - they simply immediately forgot about it)."
Posted on 2024-04-14T20:57:10+0000
Handles are the better pointers
28-Nov-2018: I’ve added a small update at the end on how to prevent‘handle collisions’ with a per-slot generation counter
Hasnain says:
“In conclusion, I find it quite surprising how naturally and elegantly handles solve many problems I encountered in the past with the traditional ‘pointers to objects on the heap’ model, and how little I miss this model now (and the parts of C++ that are built around it).”
Posted on 2024-04-14T03:49:24+0000
Hashing
A visual, interactive introduction to hash functions.
Hasnain says:
"We've covered what a hash function is, some ways to measure how good it is, what happens when it's not good, and some of the ways they can be broken by bad actors.
The universe of hash functions is a large one, and we've really only scratched the surface in this post. We haven't spoken about cryptographic vs non-cryptographic hashing, we've touched on only 1 of the thousands of use-cases for hash functions, and we haven't talked about how exactly modern hash functions actually work."
Posted on 2024-04-14T03:34:53+0000
Lifers, Dayjobbers, and the Independently Wealthy: A Letter to a Former Student
Written by Max Alper Last year, a private student of mine had gotten in touch with me via email at around 3 AM. I had known this student for years prior, as they were in one of the earliest college courses I ever taught when they were an undergraduate at
Hasnain says:
"You’re not a failure by being a dayjobber, Billy, you’re an artist, just like the rest of us. So what if you aren’t some rich kid from the Upper East Side who had the privilege of being stuck in a practice room since Kindergarten? Sure that kid can shred, but do you really want to be that person? You’re playing shows, making records, and selling merch online, all without daddy’s money to hold you down. You’re making it happen without the head start that Richy Rich got the second he was born. Be proud of that! Knowing that the game is rigged is liberating! Just because the music industry lacks meritocracy doesn’t mean you can’t blow these assholes out of the water through your craft. Your experiences outside their bubble will only foster more creativity as a result.
So what if it takes a bit longer because you can only dedicate an occasional evening or weekend to work on your new record? So long as you dedicate yourself to that time, as little as it may be, so long as you allow the public to hear what you’ve been up to, whenever or wherever that may be, Billy, then you’ll never be a failure. You’re still alive, aren’t you? Then you can make the time, but no rush."
Posted on 2024-04-14T03:19:32+0000
Middle East Crisis: Pentagon Official Arrives in Israel Amid Fears of Iranian Attack
U.S. officials have said they are bracing for a response to an Israeli strike in Syria this month that killed several senior Iranian commanders.
Hasnain says:
Hoping this doesn’t escalate into ww3 and fulfill Netanyahu’s goals (headline is out of date, pentagon is confirming the attack happened)
Posted on 2024-04-13T20:23:55+0000
There's always an events table
The larger 2 TB table, an append-only table of audit events in the app, was easy to transfer: we waited until after the cutover to migrate the contents, as the Retool product functions just fine even if that table is empty.
Hasnain says:
“Deleting in batch and without sending anything over the wire might sound obvious, but in my industry experience, it’s not.”
Posted on 2024-04-09T05:40:06+0000
Optimizing SQLite for servers
SQLite is often misconceived as a "toy database", only good for mobile applications and embedded systems because it's default configuration is optimized for embedded use cases, so most people trying it will encounter poor performances and the dreaded SQLITE_BUSY error. But what if I told...
Hasnain says:
Love SQLite. I’ll have to take some of these things into account when tuning my apps.
Also love that the author documented these - I think I stumbled upon a few of these best practices by accident, it’s hard to find good material out there.
“But what if I told you that by tuning a few knobs, you can configure SQLite to reach ~8,300 writes / s and ~168,000 read / s concurrently, with 0 errors, on a ~40€ / m commodity virtual server with 4 vCPUs (details and code in the appendix).
Let's say that your server application is making in average 8 database read queries per request, you could, in theory, handle ~21,000 requests per seconds, or ~1,814,300,000 requests per day, for ~40€ per month, bandwidth included, not bad! (In practice you may not be able to do that: the server's bandwidth will be the limiting factor)
And this is before talking about tuning the garbage collector, caching and CDNs.”
Posted on 2024-04-09T05:31:46+0000
Israeli doctor says detained Palestinians are undergoing ‘routine’ amputations for handcuff injuries, Haaretz reports | CNN
A doctor at a field hospital for detained Gazans at Israel’s Sde Teiman army base has described “deplorable conditions” and “routine” amputations due to handcuff injuries, according to an exclusive report from the newspaper Haaretz.
Hasnain says:
This quote is the least horrifying part of the article I could find (yes, even with all the implications this quote alone has). My opinion here would probably get me banned from this site for a while if I shared it sadly.
““We were asked not to use our names,” the medical source told CNN, adding that the Gazan prisoners were identified by serial numbers, rather than their names.”
Posted on 2024-04-07T04:23:54+0000