Durwasa Chakraborty

Welcome to my world, where code, chords, and couplets dance together in harmony.

Data Races

“Data races are bad.” — Every systems programming course, ever. But why are they bad? And what exactly are they? Let’s be a little Aristotelian about this—question everything. So here we go: So… What Is a Data Race? A data race occurs when two or more concurrent threads access the same memory location , at least one of them performs a write, and there’s no synchronization mechanism (like a lock or atomic operation) protecting that access. ...

April 6, 2025 · durwasa

Is Quantity Trumping Quality in University Rankings? A Closer Look at NIRF and Beyond

Recently, The Hindu published an article that raised a pertinent question regarding the National Institutional Ranking Framework (NIRF): “Is quantity trumping quality?” As I write from the hallowed halls of one of India’s premier institutions—the Indian Institute of Technology, Madras—I find myself compelled to delve deeper into this issue. Are private institutions genuinely improving, or have they [sic] discovered ways to manipulate research metrics? It is often said that data is the new oil, but just like oil, it needs refinement to be of any use. ...

September 10, 2024 · durwasa

How B+ Trees Optimize SQL Queries: A Primer

Introduction For someone who has taken a course in Computer Science, they have probably come across a B+ tree, often used in the context of databases for storing data. A B+ tree schematically looks like this: [ 1003 ] / | \ [1001] [1002] [1004 1005] [1007] / | | | [Naruto] [Sasuke] [Sakura Hinata Kakashi] [Itachi] In a B+ tree, the data always lies in the leaf nodes. ...

June 11, 2024 · durwasa

Echoes of a Timeless Curse

Preface: Rishi Durvasa, known for his irascible nature, was infamous for his ability to curse. As mythology suggests, Durvasa visited Kanav Rishi’s ashram, and Shakuntala was lost in her daydreams of Dushyant. Furious, Durvasa cursed Shakuntala, saying that the one she dreamed of would forget her when the time came. This is a modern retelling of that ancient story. The ceiling fans at Kanav Café whirred lazily above, barely stirring the humid afternoon air. Durvasa sat at his usual corner table, nursing a black coffee, his eyes flicking between the window and his notebook. His mind, however, was far from the café, lost in the endless research spiral. He was close—tantalizingly close—to finding a cure for a rare form of Alzheimer’s that had haunted him for years. The disease crept like a thief, stealing memories and identities, stripping people of their past. But Durvasa, with his relentless mind, was determined to stop it. Or, perhaps, rewrite it. ...

April 12, 2024 · durwasa

Major Mode El

Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp. Before you think I’m crowning Lisp as God’s own language after just one blog stint at a coding exercise, hold your horses. I’m not here to bash Object-Oriented Programming or its design patterns. In fact, I believe it’s crucial to know these patterns inside out. Only then can you play the game of ‘Design Pattern or Anti-Pattern?’ with any confidence. Remember, these musings are all from my little corner of the world and don’t reflect the hard work of other developers who’ve been sweating over StarPlat. ...

January 6, 2024 · durwasa

The Circle of Incompleteness

Am I too comfortable or am I dying from within I wish at the word go I could drop my skin The quotes of the dead do not interest me Nor does the aphorism of the sickened living I am still searching for lost letters and their meaning To go back to the gardens of my uninterrupted musing And every night I hope to find the old you; And every day I hope for a new story to begin. ...

May 30, 2023 · durwasa

Language Semantics

Happy Birthday to Me: Musings on Language and Code Today, I find myself celebrating my birthday in the tranquil confines of a cozy Airbnb in Vancouver. It’s a momentary escape from the pressures of work, a rare breather amidst the ever-present demands of the office. Through the frost-touched window, I watch the Canadian flag battle the icy winds. Below, I can hear the faint murmurs of a French-speaking couple, my neighbors. A little later, the cadence of Mandarin reaches my ears, no doubt my landlord going about his day. And then, the phone rings. It’s my mother, calling from home, so naturally, the conversation begins in Bengali. When my father takes the phone, we switch seamlessly to Hindi. After the call, I set the phone down, open my laptop, and begin composing an email in English. ...

March 24, 2023 · durwasa

STR: A Disciplined Programmer

A trainee undergoing military training can disassemble and assemble a machine gun within a minute. At first, this might seem very complex, but everyone in the academy manages to do it. The more pertinent question is not ‘how’ but ‘why’. It’s because their lives depend on it. Similarly, a disciplined programmer learns the vocabulary and syntax of a programming language with utmost sincerity. Every word in the programming language is sacred, and any non-conformance is akin to blasphemy. ...

durwasa

The 00 Estate: What Happens When the Government Dictates How to Write Code?

In the House of Commons of Great Britain, Edmund Burke once stated, “There were Three Estates in Parliament; but, in the Reporters’ Gallery yonder, there sat a Fourth Estate more important than them all.” As the 21st century dawned, we observed media houses displaying biases towards their respective lobbies. The ’truth,’ which should be absolute, now has shades of well-crafted absolution. “Whose truth is the truth?” is a question I often ask myself while reading news articles on the internet. With the government in power controlling the first three estates, it’s not an exaggeration to say that Orwell’s “1984” no longer seems like fiction. This blog explores the hypothetical “00 Estate” that encompasses all estates and dictates the terms for writing code. ...

durwasa

The Glass Wall

An extraordinary year comes to an end, just like many others, yet I distinctly remember that one year when a remarkable entourage of human beings gathered around me. I had hoped our story would have a happy ending, but sometimes wishes don’t come true. Now, staring at the glass wall, I see only myself, alone, burdened with a heavy bag of despair and endless remorse. The seeds I had sown were now bearing their bitter fruit. But my story wasn’t always like this. ...

durwasa