nikhil.io

Data, Data, Data

Linus Torvalds on git

I’d also like to point out that unlike every single horror I’ve ever witnessed when looking closer at SCM products, git actually has a simple design, with stable and reasonably well-documented data structures. In fact, I’m a huge proponent of designing your code around the data, rather than the other way around, and I think it’s one of the reasons git has been fairly successful

[. . .]

I will, in fact, claim that the difference between a bad programmer and a good one is whether he considers his code or his data structures more important. Bad programmers worry about the code. Good programmers worry about data structures and their relationships.

Because God Can See

When I was little — and by the way, I was little once — my father told me a story about an 18th century watchmaker. And what this guy had done: he used to produce these fabulously beautiful watches.

And one day, one of his customers came into his workshop and asked him to clean the watch that he’d bought. And the guy took it apart, and one of the things he pulled out was one of the balance wheels. And as he did so, his customer noticed that on the back side of the balance wheel was an engraving, were words.

And he said to the guy, “Why have you put stuff on the back that no one will ever see?” And the watchmaker turned around and said, “God can see it.”

Now I’m not in the least bit religious, neither was my father, but at that point, I noticed something happening here. I felt something in this plexus of blood vessels and nerves, and there must be some muscles in there as well somewhere, I guess. But I felt something. And it was a physiological response. And from that point on, from my age at the time, I began to think of things in a different way. And as I took on my career as a designer, I began to ask myself the simple question: Do we actually think beauty, or do we feel it?

Richard Seymour, How Beauty Feels

I want it to be as beautiful as possible, even if it’s inside the box. A great carpenter isn’t going to use lousy wood for the back of a cabinet, even though nobody’s going to see it. When you’re a carpenter making a beautiful chest of drawers, you’re not going to use a piece of plywood on the back, even though it faces the wall and nobody will ever see it. You’ll know it’s there, so you’re going to use a beautiful piece of wood on the back. For you to sleep well at night, the aesthetic, the quality, has to be carried all the way through.

Steve Jobs

Do quite a bit more, good and invisible things, than required for the MVP or for the bloody “sprint.” You will then smile a lot and sleep quite well indeed. Excellence is a habit. It is yours. Nobody steals this from you.

Saved here via Stephanie Harcrow’s post.

Anurag Kashyap on The Struggle

Kashyap on his journey to become one of India’s most important filmmakers.

The cover picture is clickbait. No “shocking” revelations. Just a good story about pursuing one’s chosen vocation with grit and perseverance (with a bit of luck along the way.)

On “Josh Talks”, who look like a TED clone and are “on a mission to raise the aspirations of Young India.”

Netflix’s “Secret” Genre List

A list of sub-genres you cannot view easily on Netflix. From a Reddit thread on the subject:

This is ridiculous. What kind of hubris does Netflix have to think that their recommendation engine is better than browsing by category? Browsing by category has been the standard for browsing things since categories of things has existed. Some VP of product made his bonus by convincing someone that his ML team could do better. “Yeah, just remove it and let us populate 15 movies randomly in a whimsical fictitious category like ‘movies with dogs and music’. People will love it.”

and

Because the studios pay Netflix (via discounted licensing) for favorable placement on those “recommended viewing” lists.

Always follow the money.

Computers Are Fast

A nice little quiz meant to illustrate how much your typical Python and Bash code can accomplish in one second.

If the answer is 38,000, both 10,000 and 100,000 are considered correct answers. The goal is to not be wrong by more than 10x :)

and

A newer computer won’t make your code run 1000x faster :)

Florence

Florence

by Mountains

Rating: B+

A most beautiful, astoundingly well-crafted, and painfully short work of interactive art. Finished it on my way to see my sister in California 💗 Lovely, lovely, lovely.

A screenshot from the game

Manmarziyaan

Manmarziyaan (2018)

IMDb

Rating: B+

Watched with Paaji. Third Anurag Kashyap and Amit Trivedi film. Superb. Maybe a little too drawn out at times (gotta fit in all 14 tracks of that sweet Trivedi score) and was dismayingly Hum Dil De Chuke Sanam-predictable towards the end.

Gray Waala Shade” (with the accompanying opening scenes) is a magnificent song12.

  1. Yes, yes, “Daryaa” too.↩︎

  2. Kashyap saw Poonam and Priyanka Shah on this viral Bharatnatyam video before asking them to be part of the movie.↩︎

Why Hulls are Painted Red

TL;DW: This is “anti-fouling” that repels barnacles, algae, and mollusks by emitting “biocides”. This is desirable because they cause drag (think fuel) and structural damage. Red because traditionally some oxide of Copper.

Also this:

In nature bright colours serve as a warning and to stay away. Ships are very territorial and have even been known to attack people.

Love, Knowledge, and Compassion

Three passions, simple but overwhelmingly strong, have governed my life: the longing for love, the search for knowledge, and unbearable pity for the suffering of mankind. These passions, like great winds, have blown me hither and thither, in a wayward course, over a great ocean of anguish, reaching to the very verge of despair.

I have sought love, first, because it brings ecstasy – ecstasy so great that I would often have sacrificed all the rest of life for a few hours of this joy. I have sought it, next, because it relieves loneliness – that terrible loneliness in which one shivering consciousness looks over the rim of the world into the cold unfathomable lifeless abyss. I have sought it finally, because in the union of love I have seen, in a mystic miniature, the prefiguring vision of the heaven that saints and poets have imagined. This is what I sought, and though it might seem too good for human life, this is what – at last – I have found.

With equal passion I have sought knowledge. I have wished to understand the hearts of men. I have wished to know why the stars shine. And I have tried to apprehend the Pythagorean power by which number holds sway above the flux. A little of this, but not much, I have achieved.

Love and knowledge, so far as they were possible, led upward toward the heavens. But always pity brought me back to earth. Echoes of cries of pain reverberate in my heart. Children in famine, victims tortured by oppressors, helpless old people a hated burden to their sons, and the whole world of loneliness, poverty, and pain make a mockery of what human life should be. I long to alleviate this evil, but I cannot, and I too suffer.

This has been my life. I have found it worth living, and would gladly live it again if the chance were offered me.

– Bertrand Russell, What I Have Lived For

Two Levels of Not Giving a Fuck

No Code is the best way to write secure and reliable applications. Write nothing; deploy nowhere.

Start by not writing any code.

Brilliant. I love both the presence and contents of the Dockerfile in that repo. As is always the case with such projects, the issues and pull requests are 💯

And if one is tempted to go against the tenets of No Code, there’s always my beloved fuckitpy, a (strangely well-thought-out) “Python error steamroller”1:

@fuckit
def buggy_function():
    problem_solved

@fuckit
class BuggyClass(object):
    def __init__(self):
        everything_works_now

And:

This module is like violence: if it doesn’t work, you just need more of it.

See also: The Fuck, another Python-based utility that addresses CLI frustrations.

  1. Inspired by FuckitJS.↩︎

Comedians and Comics

From an episode of My Next Guest with David Letterman:

Letterman: First of all, let’s define terms. Comedian and comic: used interchangeably but mean two different things.

Seinfeld: Kind of different, yeah. A comedian is a, to me, a full-fledged, not only a monologist, but someone who can really work a room, work a crowd and has a real act. A comic… that, I think, is a notch down. Wouldn’t you agree?

Letterman: Well, you’re assigning value to them.

Seinfeld: Yes.

Letterman: I thought they were two different pursuits. That a comedian was somebody who would be funny on stage, in a theatrical production, or in film, something like that, whereas a comic would be more like what you’ve made a career of.

Seinfeld: Oh, no, no, no. You’re talking about a comedic actor. Jackie Gleason was not a comic. He started out as a comic but he was a great comedic actor. Ten Danson is a great comedic actor, but he’s not a comedian. He has no act to do in Vegas. Which is the objective.

Letterman: So you’re saying that a comedian… but I don’t understand why there is a judgment assigned to being a comic.

Seinfeld: Just because we like judging others, that’s the reason.

Pisces People

by Aleister Crowley

THE influence of Pisces upon the Sun does not make specially for strength, except in the last decanate, which is ruled by Mars. Otherwise, there is a certain softness and placidity which diminish the vitality. The Pisces type is extraordinarily psychic, more so than is the case with that of any other sign, but this manifests itself in an entirely passive way. The native depends upon intuition and impressions generally, and the active qualities of the soul which make the great mystic are rarely present. Rudolph Steiner is fortunate enough to have aspects of Uranus, Saturn and Mars, which increase his practical power. Picus de Mirandola is a more typical example of this sign. Unless the dignities of the planets concerned in this matter are extremely good, the native may suffer from illusions and be led constantly astray. There is in him a notable lack of correlation in practical details, and he is apt to leave things at loose ends. His constructions power being psychic does not exactly translate itself into the objective. In spite of this, however, there is a great deal of practical good sense in the composition, but sometimes the native will be accused of hypocrisy, owing to the extreme contrast between the idealism expressed and the course of action undertaken, and people not similarly constituted may take it into their heads to “read them a lesson.” The native is inclined to self-indulgence in emotional experience, and this in the undeveloped type very often takes the form of the abuse of alcoholic liquors or even occasionally of noxious drugs. This is partly due to the watery nature of the sign, and its ruler, Neptune, and partly to the soft {31} and seductive influence of Venus, who is exalted in the sign, and to its connection with the Moon.

There is a good deal of discontent in this sign, naturally caused by such conflict between the aspirations and the expression of the life. This often manifests itself in restlessness and in inattentiveness, and in attaching far too much importance to trifles, the least of which often appears to them highly significant. Even in external manner, the native, thought seemingly calm upon the surface, is full of tremor within, like the sea. The native is very fond of others and may be so solicitous as to their well-being that the result will often be trying to the recipient of his extreme devotion.

The constitution is, generally speaking, not particularly robust; the general health is good, but there is a lack of power to resist disease. The native is more susceptible than in almost any other sign. Michael Angelo and Sir Richard Burton had magnificent constitutions, but the Sun being in the last decanate of Pisces, the influence of Mars is able to correct the general weakness.

In the human body, Pisces rules primarily the feet, but his action extends throughout the whole body, over the lymph and all watery secretions of an excretory character, such as mucus. The principal diseases characteristic of this sign are oedema, ascitis, and dropsies in general. Another very common disease associated with Pisces is gout. In the consideration of Pisces as a rising sign, there is also danger of tuberculosis if the system is allowed to become depleted.

The following well known persons were also born with the Sun in the sing Pisces:

  • George Washington
  • Grover Cleveland
  • Victor Hugo
  • Ludwig II of Bavaria
  • Brander Mathews
  • William Jennings Bryan
  • William Dean Howells
  • Henry W. Savage
  • Enrico Caruso
  • Amelia Bingham
  • Rose Coghlan
  • Edward Stotesbury
  • Adolph S. Ochs
  • Margaret Deland
  • Percy A. Rockefeller
  • Isabel Irving
  • George H. Swift
  • Joseph E. Otis
  • Thomas Hastings
  • Oswald G. Villard
  • Van Hoogstraaten
  • Robert W. Goelet
  • Geraldine Farrar
  • Penrhyn Stanlaws
  • Mary Garden

Baby Chromatophores

I cannot get over how maddeningly cute this is. Reddit user pendragwen’s comment makes it even better:

Awww! But look at how they test out their chromatophores first thing after hatching! It’s speculated that color-changing is how they communicate and show emotion. Almost like a little joyful stretch and squeal. “Yay! I’m alive!”

Simpler Gmail

Michael Leggett, lead designer of Gmail from 2008-2012

“It’s like Lucky Charms got spewed all over the screen,” he says to me, as he scrolls through his inbox. It’s true. Folders, contacts, Google apps like Docs and Drive–and at least half a dozen notifications–all clutter Gmail at any given moment. And of course, there’s that massive Gmail logo that sits in the upper left-hand corner of the screen. Just in case you forgot that you just typed “gmail.com” into your browser bar three seconds ago. “Go look at any desktop app and tell me how many have a huge fucking logo in the top left,” rants Leggett. “C’mon. It’s pure ego, pure bullshit. Drop the logo. Give me a break.”

Fast Company, “The former lead designer of Gmail just fixed Gmail on his own”

So he made this plugin for Chrome and Firefox that cuts out all the terrible visual noise of Gmail. I’m never uninstalling this one.

And while I’m on the subject, who signed off on this disaster?

Because we all know that the only way to attact attention to a UI element is to adorn it with a big blue goddamn fucking tumor.

Chernobyl

Chernobyl (2019)

IMDb

Rating: A+

On Post-Truth

What is the cost of lies? It’s not that we’ll mistake them for the truth. The real danger is that if we hear enough lies, then we no longer recognize the truth at all. What can we do then? What else is left but to abandon even the hope of truth and content ourselves instead with stories? In these stories, it doesn’t matter who the heroes are.

But it is still there. Every lie we tell incurs a debt to the truth. Sooner or later, that debt is paid. That is how an RBMK reactor core explodes. Lies.

To be a scientist is to be naive. We are so focused on our search for truth, we fail to consider how few actually want us to find it. But it is always there, whether we see it or not, whether we choose to or not. The truth doesn’t care about our needs or wants. It doesn’t care about our governments, our ideologies, our religions. It will lie in wait for all time. And this, at last, is the gift of Chernobyl.

Where I once would fear the cost of truth, now I only ask: What is the cost of lies?

And: What would happen were you to ingest a grain-sized piece of the Reactor No. 4’s core today:

If you ate this fuel chip, not much of it would likely dissolve in your gut; the matrix is UO2, and U(IV) Oxide is poorly soluble even in the acid environment of the gut. But let’s say it did dissolve completely and got metabolized. You’d be committing yourself to about 20 mSv (2 rem) from Cs-137, and probably a similar dose from Sr-90. Basically, if you were a radiation worker in the USA, your annual dose limit of 5 rem would be met. In many countries and facilities, you would exceed annual allowances.

Minute Repeaters

Developed in England during the 17th and 18th centuries, minute repeaters sound the time in hours, quarters and minutes—hence their name. Repeaters served a practical purpose: telling time in the dark. When streetlights were rare and matches and candles precious, chiming watches were a logical solution but not a simple one.

[. . .]

A minute repeater chimes different sounds for the hours, the quarter hours and minutes. The lowest tone—dong—is for hours, the highest tone—ding—is for minutes and a combination of both—ding-dong—counts quarter hours. If the slide is pushed at 12:59, the sounds heard are: 12 dongs for the hour then three ding-dongs for the quarter hours followed by 14 dings for the minutes.

A Minute Repeater Is as Close to Time Travel as We Can Get Today

How delightful! Watches with these complications are very difficult to make and are hence very expensive. Here’s a video of Patek Philippe’s entire line of minute repeaters. Cursory Googling tells me that the nine watches on the table are worth a total of ~$5.4M.

The Korn Shell

Good talk by Siteshwar Vashisht at FOSDEM 2019 on maintaining the Korn shell and old codebases in general. I came by his work while reading up on the fish shell. Featured this nugget

He talks about how they removed dead/inapplicable code and micro-optimizations, refactored a lot of legacy code, improved tests, switched to a new build and CI system, and so on.

Began with this baffling one-liner that won the International Obfuscated C Contest in 1987

main() { printf(&unix["\021%six\012\0"],(unix)["have"]+"fun"-0x60);}

And reminded me of this Aaron Sorkin-esque story about David Korn which I heard via BLN

Greg Sullivan, a MicroSoft product manager (henceforth MPM), was holding forth on a forthcoming product that will provide Unix style scripting and shell services on NT for compatibility and to leverage UNIX expertise that moves to the NT platform. The product suite includes the MKS (Mortise Kern Systems) windowing Korn shell, a windowing Perl, and lots of goodies like awk, sed and grep. It actually fills a nice niche for which other products (like the MKS suite) have either been too highly priced or not well enough integrated.
An older man, probably mid-50s, stands up in the back of the room and asserts that Microsoft could have done better with their choice of Korn shell. He asks if they had considered others that are more compatible with existing UNIX versions of KSH.

The MPM said that the MKS shell was pretty compatible and should be able to run all UNIX scripts.

The questioner again asserted that the MKS shell was not very compatible and didn’t do a lot of things right that are defined in the KSH language spec. The MPM asserted again that the shell was pretty compatible and should work quite well.

This assertion and counter assertion went back and forth for a bit, when another fellow member of the audience announced to the MPM that the questioner was, in fact David Korn of AT&T (now Lucent) Bell Labs. (DavidKorn is the author of the KornShell).

Uproarious laughter burst forth from the audience, and it was one of the only times that I have seen a (by then pink cheeked) MPM lost for words or momentarily lacking the usual unflappable confidence. So, what’s a body to do when Microsoft reality collides with everyone else’s?

The Titanic and Climate Change

Stumbled upon this nearly three-hour, real-time, annotated simulation of the Titanic sinking. Late night1.

Which led me to James Cameron’s 2012 documentary Titanic: The Final Word, in which he assembles a group of engineers and historians to fix the simulation in the 1997 movie, which leads to this ‘final’ version.

Cameron, in the documentary:

Part of the Titanic parable is of arrogance, of hubris, of the sense that we’re too big to fail. Well where have we heard that one before? There was this big machine, this human system that was pushing forward with so much momentum, that it couldn’t turn, it couldn’t stop in time to avert a disaster. And that’s what we have right now. Within that human system onboard that ship, if you want to make it a microcosm for the world, you have different classes, you know, you’ve got first class, second class, and third class. Well in our world right now you’ve got developed nations and undeveloped nations. You’ve got the starving millions who are going to be the ones most affected by the next iceberg that we hit, which is going to be Climate Change.

We can see that iceberg ahead of us right now, but we can’t turn we can’t turn because of the momentum of the system. Political momentum, business momentum. There are too many people making money out of the system the way the system works right now, and those people, you know, frankly have their hands on the levers of power and aren’t ready to let them go. Until they do, we’re not going to be able to turn to miss that iceberg and we’re gonna hit it. When we hit it, the rich are still gonna be able to get their access to food, to arable land, to water, and so on. It’s going to be the poor, it’s going to be the steerage, that are gonna be impacted. It was the same with Titanic and I think that’s why this story will always fascinate people. Because it’s a perfect little encapsulation of the world and all social spectra. But until our lives are really put at risk, the moment of truth, we don’t know what we would do.

  1. Speaking of… found this amazing model of the ship.↩︎

“Foreshadowing Is Not Character Development”

Via Deepu.

My anger has never been with the writers for having a character I love to come to a tragic end like that. No matter how gut-wrenching it was, they, or George RR Martin, always laid out a convincing argument for why it happened. And that’s what great writing does, it makes you think of the downfalls as being a result of the characters actions or a clear set of events.

For Ned, he went from Point A - being hand of the king, to point B - getting beheaded and his family being torn apart. No matter how devastating though, it was set up and executed perfectly. From the moment he figured our Cersei’s children were by Jaime and not Bobby B, the things he did, the decisions he made, led to his death. We as viewers know that he made a critical mistake in telling Cersei that he knew. In trusting and underestimating Littlefinger. And lastly with Sansa and himself trusting that Joffrey would keep his word in being merciful if Ned admitted treason. It is why when the end of Episode 9 happened, no one was talking about how bad the writers were. Our frustrations were with Ned, our anger was with Joffrey and Cersei. It is not that he deserved to get killed, it is that we have a full understanding of how he got there. There is no arguing against that progression.

And most importantly this moment hits us with what was the hard truth of the show the characters, no matter how much we love them, will suffer the consequences of their actions.

TropeAnatomy

And finally, and I’ve watched this a few times with unhealthy glee, Screen Rant on how the HBO Season 8 pitch meeting might have gone (via CM.)

Season 8 was a stark reminder1 of George RR Martin’s writing prowess2.

  1. Unoriginal and lame but couldn’t resist.↩︎

  2. Even if he has to imprison himself in a small cabin to finish things.↩︎

Fungi Are Horrifying

Every person I’ve sent this to has seen it. Not sure why my own internet excursions didn’t yield this manifestly horrifying video.

The last few seconds reminded me of scenes from Annihilation. Like this one:

Edit: It’s been used in Eastern Medicine for a while. Like the top YouTube comment notes, “Cordyceps is evolving to trick us into believing it is medicine.”

Game of Thrones Ratings

Via Rotten Tomatoes and with the awesome ChartJS. Dots are episodes, contiguous lines are seasons (static version.)

A search for episode titles on GitHub yielded this indescribably amazing, mostly hand-curated GoT Dataset by Jeffrey Lancaster (who published a Medium article describing his process. Has a Stranger Things dataset as well.)

Update: MFW watching the final episode.

Penny Flip Tip

Whenever you’re called on to make up your mind,

   and you’re hampered by not having any,

the best way to solve the dilemma, you’ll find,

   is simply by spinning a penny.

No—not so that chance shall decide the affair

   while you’re passively standing there moping;

but the moment the penny is up in the air,

   you suddenly know what you’re hoping.

Persi Diaconis, The Problem of Thinking Too
Much

Mama

For My Mother by May Sarton

Once more
I summon you
Out of the past
With poignant love,
You who nourished the poet
And the lover.
I see your gray eyes
Looking out to sea
In those Rockport summers,
Keeping a distance
Within the closeness
Which was never intrusive
Opening out
Into the world.
And what I remember
Is how we laughed
Till we cried
Swept into merriment
Especially when times were hard.
And what I remember
Is how you never stopped creating
And how people sent me
Dresses you had designed
With rich embroidery
In brilliant colors
Because they could not bear
To give them away
Or cast them aside.
I summon you now
Not to think of
The ceaseless battle
With pain and ill health,
The frailty and the anguish.
No, today I remember
The creator,
The lion-hearted.

💗

via Catherine

JavaScript Delenda Est

Back in the second century BC, Cato the Elder ended his speeches with the phrase ‘Carthago delenda est,’ which is to say, ‘Carthage must be destroyed.’ It didn’t matter what the ostensible topic of the speech was: above all, Carthage must be destroyed.

My opinion towards JavaScript is much like Cato’s towards Carthage: it must be rooted out, eliminated and destroyed entirely. I don’t know if I’d go quite so far as to say that the fundamental challenge of mass computing is the final destruction of JavaScript — but I want to say it, even though it’s false.

JavaScript is a pox, a disaster, a shame. It is the most embarrassingly bad thing to become popular in computing since Windows 3.1. Its one virtue (that it’s on every client device) is outshone by its plethora of flaws in much the same way that a matchstick is outshone by the sun, the stars and the primordial energy of the Big Bang added together.

JavaScript is the XML, the Yugo, the Therac-25 of programming languages. The sheer amount of human effort which has been expended working around its fundamental flaws instead of advancing the development of mankind is astounding. The fact that people would take this paragon of wasted opportunity and use it on the server side, where there are so many better alternatives (to a first approximation, every other programming language ever used), is utterly appalling.

JavaScript delenda est.

I don’t know what my newfound affection for it says about me. Via HackerNews.