log.nikhil.io

Car Silhouettes

Henry Lin has a degree in Architectural Design is a “a lover of all things transportative”. He draws really lovely Car Silhouettes 😍 Here are a few.

Silhouette of Chevrolet-Corvette-C3-08 by Henry Lin
Chevy Corvette C3 (1968-1972)

Silhouette of Jaguar-E-Type-02 by Henry Lin
Jaguar E-Type (1961-1968)

Silhouette of Lagonda-Rapide-01 by Henry Lin
Lagonda Rapide (1961 - 1964)

Silhouette of Mercedes-w221 by Henry Lin
Mercedes-Benz S-Class (W221)

Silhouette of Mercedes-C218 by Henry Lin
Mercedes-Benz CLS400 (C218)

Silhouette of Bugatti-Centodieci-01 by Henry Lin
Bugatti Centodieci

The Eye: Calanthek

This is a short film done entirely with the Early Access version of Unreal Engine 5. It’s only around eight minutes long and took six weeks to make but its plot is more exciting and coherent than whatever the heck was happening in Prometheus1.

  1. Some examples: Let’s take our helmets off on an alien planet teeming with life forms we are yet to study. Let’s then just go ahead and touch and electrocute said life forms. And what exactly are David’s motivations? From Wikipedia: “Writer Damon Lindelof stated that the character provides a non-human perspective on the film’s events, and said, ‘What does the movie look like from the robot’s point of view? If you were to ask him, ‘What do you think about all of this? What’s going on? What do you think about these humans who are around you?’ Wouldn’t it be cool if we found a way for that robot to answer those questions?’” Let’s ask these questions, never answer them, and waste Michael Fassbender on this embarrassing shit instead. Oh and if you didn’t know that the ‘Engineers’ in the movie are mad at us and want to destroy us because we killed Jesus, you do now.↩︎

On Living Together

You’ve said that, despite being married three times, you’ve been in love only once. Do you think you might have a particularly higher bar than other people?
No, I think I’m not that interested. I’m much happier on my own. I can spend as much time with somebody as I want to spend, but I’m not looking to be with somebody forever or live with someone. I don’t want somebody in my house.

Have you always felt like this?
Yes. I’m the round peg, and marriage is the square hole. You can’t have a square hole, can you?

Whoopi Goldberg, in an old interview with Ana Marie Cox, The New York Times

I am 20

In 1967, the Films Division of India1 asked all kinds of 20-year olds about their dreams and how they felt about the future of a nation that was, itself, 20 years old. Here’s the original video. A lot of the kids who speak English in the video (starting at 5:00) attend the august Indian Institute of Technology, Bombay.

A colorized and edited version of that video went viral. Here’s a most fascinating “Where are They Now?” follow-up by the author where he tracks down seven people in the video. It’s a mix of Hindi and English. Lessons learned: Life is way too short, way too fickle, and almost never pans out the way you think it will. Privilege helps a lot.

  1. Which I just realized is a thing.↩︎

DNA has a Half-Life of 521 Years

A study of DNA extracted from the leg bones of extinct moa birds in New Zealand found that the half-life of DNA is 521 years. So every 1,000 years, 75 per cent of the genetic information is lost. After 6.8 million years, every single base pair is gone. Bacterial RNA is much tougher and sequences have been recovered from ice crystals that are 419 million years old. These are only short fragments of 55 base pairs though.

Worlds Beyond the Stars

Dil Se, written and directed by Mani Ratnam, is one of my all-time favorite movies. I still consider its soundtrack to be A R Rahman’s greatest work. It’s just magnificent stuff.

When I was 15, I remember seeing the movie’s trailer1 and being awestruck by this haunting background song2 that didn’t make it into the official tracklist. The song is a rendition of a well-known poem, Sitaron Se Aage Jahan Aur Bhi Hai, by another genius Allama Iqbal.

I’ve been looking for this song for a long while, settling for shitty movie extractions (which are exactly that.) I went to the extent of trying to contact Madras Talkies, the director’s production company, several times to no response or avail.

Twenty four years later, and thanks to the internet, I’ve finally found good versions of this elusive song 🥰

All of these appear to be from a 20-year anniversary release I couldn’t find anywhere but here. The whole thing is just absolutely lovely. Oh and here’s another version at appears to be mostly the same as the one linked to, and a solo version by a guy named Sujay.

  1. Which was badass and which I also cannot find. We went to see Bade Miyan Chote Miyan↩︎

  2. Sung by Sukhwinder Singh and, I’m guessing, a fucking banshee.↩︎

On Stupid Questions

Journalist David Walsh recounting a story about his late son John in the context of his work uncovering Lance Armstrong and the USPS Pro Cycling Team’s “most sophisticated, professionalised and successful”1 doping program.

One story stood out. One of John’s teachers at [inaudible] National School in the Midlands of Ireland said to me that she remembered John for something that happened when John was six or seven, and she was reading this story of the Nativity.

You know, Mary and Joseph had come to Bethlehem and sought a place in the inn but all the inns were full and they ended up in a stable. And it was there that Baby Jesus was born. And the shepherds came and then the Three Wise Men came and they brought gifts of gold, frankincense, and myrrh. And then Mary and Joseph came back to where they came from and they lived a very modest life because Joseph was just a humble carpenter and they didn’t have very much.

And John’s hand went up. And Mrs. Toomey, his teacher, said “Yes John.” And he said “Miss, you said Mary and Joseph didn’t have very much. What did they do with the gold that the Three Wise Men brought?”

And she said “John, I’ve been reading this story for thirty-three years and nobody has ever asked me that question. And the honest answer is: I don’t know.”

And I said Mrs. Toomey that’s the most beautiful story. Because it is the most pertinent question, in that, journalism, which is my profession, that’s it! In a nutshell! “What did Mary and Joseph do with the gold?” You ask the obvious question. People may laugh at you. People may think you’re an idiot. But that doesn’t deter you. If you’re unsure, you ask.

David Walsh, “Extraordinary Proof”, The Moth (cached)
  1. Lance Armstrong: Usada report labels him ‘a serial cheat’, BBC Sport↩︎

When Does It End?

COVID Theater has become a sad thing to behold these days. Do we still wear masks? If transmission is mostly airborne, why do we get to take them off at restaurants to eat our food when droplets from a sneeze can travel in excess of 25 feet? What’s all this talk about a second booster? Is Omicron something to worry about? How bad is it really?

“We should all be concerned about omicron, but not panicked,” Biden said, emphasizing that vaccinated individuals, especially those with a booster shot, are “highly protected” against the virus.

Biden preaches concern, not panic on omicron”, The Hill

I see. Well this is very practical and actionable advice, for I was planning on being distressed myself before I read that.

Mike Dawson expresses the mood I’ve picked up from most of my friends and family (all of whom, I’m happy to say, are vaccinated because they are responsible adults and not selfish, stupid, and insolent bloody children who are determined to make this nightmare last as long as possible because of their expertise in infectious diseases.)

COVID comic by Mike Dawson

Adventures of the Magic Monkey Along the Silk Roads by Evelyn Nagai-Berthrong and Anker Odum

Adventures of the Magic Monkey Along the Silk Roads

by Evelyn Nagai-Berthrong and Anker Odum (1983)

ISBN 9780888543004

Rating: A+

A friend used to loan me this lovely book when I was 12 or 13. I loved reading and re-reading it to the point where I remember asking him if he could just gift it to me for my birthday (he declined). And then Life happened and I grew up and I forgot all about it until around 3 years ago, when I suddenly went “wait a second” as I was casually reading some translation of Journey to the West. This book is a childrens’ adaptation of that classic Chinese tale! I then started looking for it, off-and-on, with very little luck.

Last year, LD told me about this absolutely lovely website called “Stump the Bookseller” run by LoganBerry Books in Cleveland. For a nominal fee, I submitted everything I could remember about the book hoping that someone would know it… only to find it myself that evening. My Google-fu had somehow improved after submitting that request. I bought it from AbeBooks posthaste.

It’s just a fantastic adventure to get lost in. To understand the Myth of the Monkey a little deeper, I turned to this paper by Professor Whalen Lai1. There’s just too much to quote but here’s a highly condensed TL;DR of both the book and the story:

Our search for the original face of Monkey should not distract us from his final destiny. Genealogy is only half the story. In his second westward trip Monkey rises above his animal past, above even humanity, to become a Buddha. In his first trip he acquired only Taoist immortality, and discovered only his premoral, childlike, monkey nature. Still capable of grudges against Heaven, Monkey loses his good temper and is damned for his Titanic pride. Only on his second trip West does Monkey, guided by the compassionate Guanyin, find his true self, his Buddha-nature. Guanyin teaches Monkey an invaluable lesson: that it is more important to tame the demon – the “monkey mind” – within than subdue the demons without.

In that second journey to the West, Monkey learns the art of Buddhist self-discipline. Guanyin initially puts a headband, a “crown of thorns” as it were, on Monkey’s forehead. The headband gives Monkey insufferable headaches every time he harbors evil thoughts. Mindfulness of good and evil eventually allows Monkey to “Do good, avoid evil, and cleanse the mind.” By journey’s end, Monkey is his own master, a victor over the demons within. When he finally asks Guanyin to kindly remove the headband, Monkey is told that it is not necessary. The crown of thorns had long since magically disappeared. At last this protean Ape had grown, in his progress as a pilgrim, into a Buddhist saint.

Whalen Lai, "From Protean Ape to Handsome Saint: The Monkey King, Asian Folklore Studies, Vol. 53, No. 1 (1994), pp. 29-65
  1. An Emeritus Professor of Religious Studies at UC Davis.↩︎

On Old Gods

In the succession of religions, there are only so many ways the old gods can end up. They can fade away, in which case they are lost to us for good; they can be held up to scorn as pagan demons who persisted in their old, evil ways; or they can be recruited into the new faith as its servants and defenders.

[…] This pattern of subjugation and conversion had already occurred during the rise of Buddhism in India with the Vedic gods and demons (the deva and the asura). Indra, the storm god of the warriors, became Sakra, who piously requested teachings from the Buddha. Brahman, the creator god, turned into a defender of the Law. Lesser deities too resurfaced in new roles. The nymph-like yaksi came to decorate the gates of the stupas at Sanchi, and heavenly nymphs became angelic musicians, scattering flowers in the air (they remained scantily dressed, as fertility deities should). Satyr-like yaksas ran errands for Yama, the old moon god who now supervised the Buddhist hells, and so on. Their fate is not unlike that of the gods of Old Europe. Those who did not fade away ended up either as denizens of hell or as saints in the Christian calendar.

[…] This is not an uncommon fate for the old chthonic gods. In India an equally insatiable “Face of Glory” is stationed outside temples, supposedly to scare away the evil spirits. In Rome, the griffin was the guardian of the sarcophagus (which means “meat-eater”). In medieval Europe, gargoyles likewise crouched watchful on eaves. In Egypt, Anubis the Jackal – Dog-Man by another name – witnessed the weighing of souls. In Buddhism, Mara the Devil holds samsara in his jaws. In Tang China, a pair of life-size hounds with human heads (and sometimes single horns) stood guard near the dead.

Whalen Lai, "From Protean Ape to Handsome Saint: The Monkey King, Asian Folklore Studies, Vol. 53, No. 1 (1994), pp. 29-65

Our Crazy Calendar

by @foone

Someday aliens are going to land their saucers in a field somewhere in New Jersey and everything is going to go just fine right up until we try to explain our calendar to them

“yeah we divide our year into a number of sub units called ‘months’ made up a number of days, and they’re not all the same length”
“I guess that’s unavoidable, if your rotations-count per orbit is a prime number”
“yeah, our’s isn’t prime”
“but surely you have most of these ‘months’ the same length and just make the last one shorter or longer?”
“No… They’re different lengths following no logical pattern”
“what”
“and we further subdivide the months into ‘weeks’, which is 7 days.”
“ahh, so each month is an integer multiple of weeks?”
“that would make sense, but no. Only one is, sometimes”
“SOMETIMES?!”
“yeah our orbit around the sun isn’t an integer number of days, so we have to change the number of days to in a year from time to time”
“oh yes, a similar thing happens on Epsilon Indi 7, where they have to add an extra day every 39 years to keep holidays on track”
“yeah that’s how ours work! Although the ratio doesn’t work out cleanly, so we just do every 4 years, except every 100 years, except except every 400 years”
“oh, you number your years? What’s the epoch?”
“uh, it’s supposed to be the birth of a religious leader, but they got the math wrong so it’s off by 4 years, if he existed at all.”
“if? You based your calendar off the birth date of someone you’re not sure exists?”
“yeah. He’s written about in a famous book but historical records are spotty.”
“interesting. I didn’t realize your planet was one of the ones with a single universal religion, that usually only happens in partial or complete hive minds.”
“uhh, we’re not.”
“You’re not?!”
“yeah we have multiple religions.”
“oh but they all have a common ancestor, which agrees on the existence of that leader, right?”
“uh, no. Two of the big ones do, but most of the others don’t believe in him”
“YOUR CALENDAR IS BASED ON A RELIGIOUS LEADER THAT NOT EVERYONE BELIEVES IN?”
“well, on his birth. And yeah, we got it wrong by a couple years.”
“OK, fine. So, you have somewhat complicated rules about when you change the length of your years, and I’m scared to ask this, but… You definitely just add or subtract that extra day at the end, right?”
“… Nope.”
"At the start of the year? "
“nah. The end of the second month”
“WHY WOULD IT BE THE SECOND MONTH?”
“I’m not sure, really.”
“huh. So at this point I’m dreading asking this, but how do you measure time within each day?”
“oh that’s much simpler. Each day is divided into hours, each hour has minutes, and each minute has seconds.”
“ok. And 10 of each?”
“10 hours? No. There’s 24 hours, 60 minutes, 60 seconds”
“… I thought you said you used a base-10 counting system”
“we do! Mostly. But our time system came from some long gone civilization that liked base-60 like 5000 years ago”
“and you haven’t changed it since?”
“No.”
“huh. Okay, so why 24? That’s not a divisor of 60”
“oh because it’s actually 12!”
“what”
“yeah each day is 24 hours but they are divided into two sets of 12.”
“and that’s 5 12s, right, I see the logic here, almost. So like, after hour 12, it becomes the second half, which is 1?”
“No, after 11.”
“oh, you zero-index them! So it’s hours 0-11 in the first half, then 12-23 in the second half?”
“No. 12 to 11 in the first half, and again in the second half”
“please explain that before my brain melts out my mouth”
“the first hour is 12. Then the next one is 1, then it goes back up to 11, then 12 again”
“that is not how numbers work. And how do you tell first 12 apart from second 12?”
“oh we don’t use numbers for that!”
“you don’t number the two halves of your day?”
“nah, we call them AM and PM”
“WHAT DOES THAT MEAN”
“I think it’s ante-meridian and post-meridian? But I’m not sure, I dont know much Latin”
“Latin?”
“yeah it’s an ancient language from an old empire which controlled a lot of the world and we still use some of their terms”
“oh, and that was the civilization that liked base-60 and set up your time system?”
“that would make sense, but… No, completely different one.”
“okay, and what do you do to if you want to measure very short times, shorter than a second?”
“oh we use milliseconds and microseconds”
“ahh, those are a 60th of a second and then 60th of the other?”
“No. Thousandths.”
“so you switch to base-10 at last, but only for subdivisions of the second?”
“yeah.”
“but at thousands, ie, ten tens tens”
“yeah. Technically we have deciseconds and centiseconds, which are 1/10 of a second, and 1/100 of a second, but no one really uses them. We just use milli.”
“that seems more like a base-1000 system than a base-10 system.”
“it kinda is? We do a similar thing with measures of volume and distance and mass.”
“but you still call it base-10?”
“yeah”
“so let me see if I get this right: Your years are divided in 10 months, each of which is some variable number of days, the SECOND of which varies based on a complex formula… and each day is divided into two halves of 12 hours, of 60 minutes, 60 seconds, 1000 milliseconds?”
“12 months, actually.”
“right, because of the ancient civilization that liked base-60, and 12 is a divisor of 60.”
“No, actually, that came from the civilization that used latin. Previously there were 10.”
“what”
“yeah the Latin guys added two months part of the way through their rule, adding two more months. That’s why some are named after the wrong numbers”
“you just said two things I am having trouble understanding. 1. Your months are named, not numbered? 2. THE NAMES ARE WRONG?”
“yep! Our 9th month is named after the number 7, and so on for 10, 11, and 12.”
“your 12th month is named… 10?”
“yeah.”
“what are the other ones named after?!”
“various things. Mainly Gods or rulers”
“oh, from that same religion that your epoch is from?”
“uh… No. Different one.”
“so you have an epoch based on one religion, but name your months based on a different one?”
“yeah! Just wait until you hear about days of the week.”
“WHAT”
“so yeah we group days into 7-day periods-”
“which aren’t an even divisor of your months lengths or year lengths?”
“right. Don’t interrupt”
“sorry”
“but we name the days of the week, rather than numbering them. Funny story with that, actually: there’s disagreement about which day starts the week.”
“you have a period that repeats every 7 days and you don’t agree when it starts?”
“yeah, it’s Monday or Sunday.”
“and those names come from…”
“celestial bodies and gods! The sun and moon are Sunday and Monday, for example”
“but… I looked at your planet’s orbit parameters. Doesn’t the sun come up every day?”
“yeah.”
“oh, do you have one of those odd orbits where your natural satellite is closer or eclipsed every 7 days, like Quagnar 4?”
“no, the sun and moon are the same then as every other day, we just had to name them something.”
“and the other days, those are named after gods?”
“yep!”
“from your largest religion, I imagine?”
“nah. That one (and the second largest, actually) only has one god, and he doesn’t really have a name.”
“huh. So what religion are they from? The Latin one again?”
“nah, they only named one of the God-days”
“only on… SO THE OTHER DAYS ARE FROM A DIFFERENT RELIGON ENTIRELY?”
“Yep!”
“the third or forth biggest, I assume?”
“nah, it’s one that… Kinda doesn’t exist anymore? It mostly died out like 800 years ago, though there are some modern small revivals, of course”
“so, let me get confirm I am understanding this correctly. Your days and hours and seconds and smaller are numbered, in a repeating pattern. But your years are numbered based on a religious epoch, despite it being only one religion amongst several.”
“correct so far”
“and your months and days of the week are instead named, although some are named after numbers, and it’s the wrong numbers”
“exactly”
“and the ones that aren’t numbers or rulers or celestial objects are named after gods, right?”
“yup!”
“but the months and the days of the week are named after gods from different religons from the epoch religion, and indeed, each other?”
“yeah! Except Saturday. That’s the same religion as the month religion”
“and the month/Saturday religion is also from the same culture who gave you the 12 months system, and the names for the two halves of the day, which are also named?”
“right! Well, kinda.”
“please explain, slowly and carefully”
“yeah so cultures before then had a 12 month system, because of the moon. But they had been using a 10 month system, before switching to 12 and giving them the modern names”
“the… Moon? Your celestial body?”
“yeah, it completes an orbit about every 27 days, so which is about 12 times a year, so it is only natural to divide the year into 12 periods, which eventually got called months”
“ok, that makes sense. Wait, no. Your orbital period is approximately 365.25 days, right?”
“yeah. That’s why we do 365 or 366 based on the formula”
“but that doesn’t work. 365 divided by 27 is ~13.5, not 12”
“yeah I’m not sure why 12 was so common then. Maybe it goes back to the base 60 people?”
“okay so one final check before I file this report: Years are numbered based on a religious leader. Years always have 12 months, but the lengths of those months is not consistent between each other or between years.”
“don’t forget the epoch we number our years from is wrong!”
“right, yes. And your months are named, some after a different religion, and some after numbers, but not the number the month is in the year.”
“right. And when we change the month lengths, it’s the second one we change”
“how could I forget? After months you have a repeating ‘week’ of 7 days, which is named after gods from two religons, one of which is the month-naming one, and a nearly extinct one. And you don’t agree when the week starts.”
“nope! My money is on Monday.”
“that’s the Monday that’s named after your moon, which supposedly influenced the commonality of the 12 months in a year cycle, despite it orbiting 13 times in a year?”
“correct!”
“and as for your days, they split into two halves, named after a phrase you don’t really understand in the long dead language of the same culture that named the months and Saturday.”
“Yep. I took some in college but all I remember is like, ‘boy’, ‘girl’, ‘stinky’, ‘cocksucker’”
“charming. And then each half is divided into 12 hours, but you start at 12, then go to 1, and up to 11”
“all I can say is that it makes more sense on analog clocks.”
“i don’t know what that is and at this point I would prefer you not elaborate. So each of those hours is divided into 60 minutes and then 60 seconds, and this comes from an ancient civilization, but not the one that gave you the month names”
“yep. Different guys. Different part of the world.”
“ok. And then after seconds, you switch to a ‘base-10’ system, but you only really use multiples of a thousand? Milliseconds and microseconds?”
“right. And there’s smaller ones beyond that, but they all use thousands”
“right. Got it. All written down here. Now if you’ll excuse me, I just gotta go make sure I didn’t leave my interociter on, I’ll be right back.”

The tall alien walks back into their saucer without a wave. The landing ramp closes.

The ship gently lifts off as gangly landing legs retract. There’s a beat, then a sudden whooshing sound as air rushes back into the space that previously held the craft, now suddenly vacuum.

NORAD alarms go off briefly as an object is detected leaving the earth’s atmosphere at a significant fraction of the speed of light.

In the years to come, many technological advances are made from what was left behind, a small tablet shaped object made of some kind of artifical stone/neutrino composite material.

The alien message left on screen is eventually translated to read “Untitled Document 1 has not been saved, are you sure you wish to quit? (yes) (no) (cancel)”

Many years have passed, and we await the day the aliens return. They have not.

With our new advancements, we build space-radar systems and can see the many species flying around the galaxy. It’s not long before we realize they’re intentionally giving earth a wide berth.

Drone ships criss-cross the galaxy, but when they get within a lightyear of earth they detour around it.

We finally get a subspace radio working, and start working to decode the noisy traffic of a thousand civilizations talking to each other. We broadcast a message of greetings and peace

Less than a week later, the subspace net goes quiet. Our space radar reports the solar system is now surrounded by small vessels, suspected to be some kind of automated probe, and they’re blocking all radio traffic in or out. Even the pulsars go quiet, all radio waves are gone.

We focus on cracking the secret of FTL travel. The first prototype never makes it off the ground, as before the rocket can even ignite, it’s crushed by a small meteor

Forensic reconstruction suggests it was a sundial, carved from rock dug out of the far side of the moon.

Anyway if anyone wants to, like, draw or animate this or film this (or something inspired by it)? That’d be sweet, you don’t need permission from me, go ahead. I’d do it but I don’t have the time or skills. Just put like “based on a story by Foone” somewhere in the credits.

It’s always weird saying that because it kinda sounds like I’m implying I think this is like A MOVIE SCRIPT THAT’S GOING TO HOLLYWOOD! or something. I don’t, I just want to make sure everyone knows it’s free to adapt and remix and all that.

It amused me to type, I hope it amused you to read, and if it amuses you to make something based on it, go right ahead. I’d love to see it.

On Unorthodox Marx

He leads the existence of a real bohemian intellectual. Washing, grooming and changing his linen are things he does rarely, and he likes to get drunk. Though he is often idle for days on end, he will work day and night with tireless endurance when he has a great deal of work to do. He has no fixed times for going to sleep or waking up. He often stays up all night, and then lies down fully clothed on the sofa at midday and sleeps till evening, untroubled by the comings and goings of the whole world.

Purported account Karl Marx’s work habits from a Prussian spy

Sounds lovely, really.

Iowa’s Blackout License Plates

I just ordered a set of “blackout” plates from the DMV here. They’re rather cool and look like this:

Iowa blackout plates

I didn’t know that they were actually a solution to a problem. People would take existing, specialized plates for Dordt University and cover them up to look like the blackout plates.

Iowa Dordt University plates

Clever! But led to some unnecessary altercations with law enforcement since doing this was a legal gray area. State Senator Charles Schneider was able to get the mandate for blackout plates included in 2019. Just in that year, the state raised $850,000 through the sale of these plates for the Road Use Tax Fund (simple arithmetic suggests that ~14,000 people ordered them.)

I got all that from Aaron Calvin’s article in The Des Moines Register. Summarized it here since the Register’s website, like most websites these days, is an unreadable and unusable crock of shit.

The State of American Healthcare

by ThatsWhatXiSaid

With some minor formatting. They add:

The average annual premiums for employer-sponsored health insurance in 2020 are $7,470 for single coverage and $21,342 for family coverage. Most covered workers make a contribution toward the cost of the premium for their coverage. On average, covered workers contribute 17% of the premium for single coverage ($1,270) and 27% of the premium for family coverage ($5,762).

It’s worth noting every penny of premiums is part of your total compensation, just as much as your salary. If you’re curious you can find out your specific amount on your W2 in box 12 with code DD.

Americans are paying a quarter million dollars more for healthcare over a lifetime compared to the most expensive socialized system on earth. Half a million dollars more than countries like Canada and the UK.

One in three American families had to forgo needed healthcare due to the cost last year. Almost three in ten had to skip prescribed medication due to cost. One in four had trouble paying a medical bill. Of those with insurance one in five had trouble paying a medical bill, and even for those with income above $100,000 14% had trouble. One in six Americans has unpaid medical debt on their credit report. 50% of all Americans fear bankruptcy due to a major health event.

So there’s a good chance you wouldn’t be able to pay for it, especially if you get sick enough to lose the job you depend on for insurance.

mediocre healthcare for free.

Except it’s US healthcare that’s mediocre vs. it’s peers.

The US has the worst rate of death by medically preventable causes among peer countries. A 31% higher disease adjusted life years average. Higher rates of medical and lab errors. A lower rate of being able to make a same or next day appointment with their doctor than average.

Comparing Health Outcomes of Privileged US Citizens With Those of Average Residents of Other Developed Countries

These findings imply that even if all US citizens experienced the same health outcomes enjoyed by privileged White US citizens, US health indicators would still lag behind those in many other countries.

When asked about their healthcare system as a whole the US system ranked dead last of 11 countries, with only 19.5% of people saying the system works relatively well and only needs minor changes. The average in the other countries is 46.9% saying the same. Canada ranked 9th with 34.5% saying the system works relatively well. The UK ranks fifth, with 44.5%. Australia ranked 6th at 44.4%. The best was Germany at 59.8%.

On rating the overall quality of care in the US, Americans again ranked dead last, with only 25.6% ranking it excellent or very good. The average was 50.8%. Canada ranked 9th with 45.1%. The UK ranked 2nd, at 63.4%. Australia was 3rd at 59.4%. The best was Switzerland at 65.5%.

OECD Countries Health Care Spending and Rankings (Source)

Country Govt. / Mandatory (PPP) Voluntary (PPP) Total (PPP) GDP Lancet HAQ Ranking WHO Ranking Prosperity Ranking CEO World Ranking Commonwealth Fund Ranking
United States $7,274 $3,798 $11,072 16.90% 29 37 59 30 11
Switzerland $4,988 $2,744 $7,732 12.20% 7 20 3 18 2
Norway $5,673 $974 $6,647 10.20% 2 11 5 15 7
Germany $5,648 $998 $6,646 11.20% 18 25 12 17 5
Austria $4,402 $1,449 $5,851 10.30% 13 9 10 4
Sweden $4,928 $854 $5,782 11.00% 8 23 15 28 3
Netherlands $4,767 $998 $5,765 9.90% 3 17 8 11 5
Denmark $4,663 $905 $5,568 10.50% 17 34 8 5
Luxembourg $4,697 $861 $5,558 5.40% 4 16 19
Belgium $4,125 $1,303 $5,428 10.40% 15 21 24 9
Canada $3,815 $1,603 $5,418 10.70% 14 30 25 23 10
France $4,501 $875 $5,376 11.20% 20 1 16 8 9
Ireland $3,919 $1,357 $5,276 7.10% 11 19 20 80
Australia $3,919 $1,268 $5,187 9.30% 5 32 18 10 4
Japan $4,064 $759 $4,823 10.90% 12 10 2 3
Iceland $3,988 $823 $4,811 8.30% 1 15 7 41
United Kingdom $3,620 $1,033 $4,653 9.80% 23 18 23 13 1
Finland $3,536 $1,042 $4,578 9.10% 6 31 26 12
Malta $2,789 $1,540 $4,329 9.30% 27 5 14
OECD Average $4,224 8.80%
New Zealand $3,343 $861 $4,204 9.30% 16 41 22 16 7
Italy $2,706 $943 $3,649 8.80% 9 2 17 37
Spain $2,560 $1,056 $3,616 8.90% 19 7 13 7
Czech Republic $2,854 $572 $3,426 7.50% 28 48 28 14
South Korea $2,057 $1,327 $3,384 8.10% 25 58 4 2
Portugal $2,069 $1,310 $3,379 9.10% 32 29 30 22
Slovenia $2,314 $910 $3,224 7.90% 21 38 24 47
Israel $1,898 $1,034 $2,932 7.50% 35 28 11 21
Together by Luke Adam Hawker

Together

by Luke Adam Hawker (2021)

ISBN 9780857839442

Rating: A

“Fear can be a funny thing; it doesn’t always shine a flattering light. It can make us forget that others are scared too.”

The author tells a short and lovely story about the pandemic, isolation, hope, the value of community, nature, and so many other things for such a short book. It is told through the experience of his grandpa (and his grandpa’s doggy). It made me think of my own grandmother and how (a) we are not meant to be alone and (b) how loneliness is especially devastating for older people.

Really loved his drawing/art style as well. Lovely stuff 💗

Bombass Temple Drums

At the Brihadisvara Temple in Thanjavur. About as mesmerizing as percussion can get.

Speaking of mesmerizing, see this performance by the great Zakir Hussain at the Berklee College of Music.

“A plus-sized Jewish lady redneck died in El Paso on Saturday.”

Renay Mandel Corren passed away at 84 a week ago (RIP 🙏). Her son wrote what is one of the best obituaries I’ve read in a while. A small excerpt:

Here’s what Renay was great at: dyeing her red roots, weekly manicures, dirty jokes, pier fishing, rolling joints and buying dirty magazines. She said she read them for the articles, but filthy free speech was really Renay’s thing. Hers was a bawdy, rowdy life lived large, broke and loud. We thought Renay could not be killed. God knows, people tried.

Please enjoy the whole thing. I cached it here because it is too important to lose. Via PLG.

Fundamentals of Lambda Calculus for People Who Love Birds

This (beautifully formatted and well-paced-and-delivered and surprisingly sparsely attended) talk by Gabriel Lebec on the fundamentals of Lambda Calculus is one of my favorite talks ever.

As Lebec explains, the lovely bird names come from this book called “To Mock a Mockingbird” by mathematician and logician Raymond Smullyan. The naming is simply delightful. As Matthew Gilliard explains:

The premise is that there are enchanted forests which contain many (or sometimes very few) talking birds. Smullyan dedicated the book to Haskell Curry - an early pioneer in combinatory logic and an avid bird-watcher. The birds, which I suppose represent the combinators, have an interesting characteristic:
Given any two birds A and B, if you call out the name of B to A it will respond by calling out the name of some bird to you.

This bird whose name A calls when you call B is denoted as AB. Once you have several birds in place, a single call can cascade around the forest with each call following rules depending on who produces it.

The very first bird we are introduced to is the Mockingbird whose characteristic behaviour is that whatever name you call to the Mockingbird, it will reply as if it is the bird whose name you called. This is denoted:

Mx = xx

For any bird x we can say that Mx (the result of calling x to a Mockingbird) is the same as xx (the result of calling x to a bird of type x). It really does mock other birds! And what’s more, the existence of the Mockingbird, in combination with various others, unlocks some really fascinating group behaviour from these birds.

And!

Soon we discover that birds have certain properties: The can be fond of other birds, they can be egocentric if they are fond of themselves. The can be hopelessly egocentric if they only ever talk about themselves. There are happy birds, normal birds, agreeable birds and many others. We also meet other types of birds with specific properties - the Lark, the Kestrel, Sage birds, Bluebirds, aristocratic birds, Eagles, the list goes on and on. Luckily there is a Who’s Who list of birds in the back to keep track.

If “American Psycho” Were About Programmers

Excellent stuff, particularly the mechanical keyboard envy1. There’s a Nikhil in it too! 💁‍♂️

  1. I don’t think I’ll get into them. Got myself one of these (brown switches) about three years ago after outsourcing the research to a highly enthusiastic and helpful co-worker. The “L” key sticks sometimes but zero complaints so far, even after spilling beer on it once 😬↩︎

Some “Dune” Posters

For “the greatest movie never made”, although there appear to be a few contenders1 for that title, like Stanley Kubrick’s Napoleon.

My absolute favorite is the last one by Hugo Emmanuel Figueroa 🙌

Dune poster for Jodorowsky's Dune 1

Pe-release flyer (Source)

Dune poster for Jodorowsky's Dune 2

by Matt Chinn.

Dune poster for Jodorowsky's Dune 3

Variation 1 by Stan and Vince.

Dune poster for Jodorowsky's Dune 4

Variation 2 by Stan and Vince.

Dune poster for Jodorowsky's Dune 5

by Hugo Emmanuel Figueroa

  1. In case that link goes down here’s a cached version. Others include The Man Who Killed Don Quixote by Terry Gilliam, Revenge of the Jedi by David Cronenberg/David Lynch, Heart of Darkness by Orson Welles, and Gladiator 2 by Ridley Scott/Nick Cave.↩︎

On Law and Character

Good government never depends upon laws, but upon the personal qualities of those who govern. The machinery of government is always subordinate to the will of those who administer that machinery. The most important element of government, therefore, is the method of choosing leaders.

— Law And Governance, The Spacing Guild Manual, Dune

I think we’re doing pretty well here. Things will be fine in 2024. Peaceful, lawful, and full of dignity and decorum 🙏

On Nicholas Cage

Yeah, Nic Cage brings the same intensity to almost every role he does. If it’s not a very good role, it’s gonna stand out as being bad.

To put it another way, imagine a boxer that is very good at knocking people out. That’s impressive. Now imagine he accepts fights against children as well, and he is still good at knocking those people out. Now it’s less impressive and more horrifying. He could be an amazing boxer, but he keeps accepting fights against children and knocking them out.

That’s Nic Cage’s acting.

Aarekk on /r/NoStupidQuestions

You either get Nic Cage or you don’t. Via CM.

On Gun Law Reform

The National Rifle Association says that, “Guns don’t kill people, uh, people do.” But I think, I think the gun helps. You know? I think it helps. I just think just standing there going, “Bang!” That’s not going to kill too many people, is it? You’d have to be really dodgy on the heart to have that.

Eddie Izzard, “Dress to Kill

“I have delivered Value. But at what cost?”

Because we don’t simply write non-annoying and non-creepy software that respects you and does the thing you want it to do anymore. Gotta deliver Value™ to all key stakeholders. By which we mean ourselves and the Market. Not you. You are nothing more than Data that taps “Purchase” to us.

The Matrix - Scene of Pods of Humans

The Best Things of 2021

I’ll cache and smush these soon.

A Cultural Map of the United States

Reddit user u/Inzitarie made this lovely Cultural Map of the United States. It’s not perfect but it’s something. He based his version on this one by u/Aijol10 right below it

Cultural Map of the United States

Cultural Map of the United States - Simplified version

The Pithy Wisdom of Stephen Crowley

Stephen Crowley is a product designer who maintains @ShitUserStory, my favorite new Twitter account1 (via Deepu). He also maintains a Medium blog with gems like these:

Lovely stuff.

  1. Given the amount of rage I’ve had with awful product design and really, really shitty websites of late. The madness doesn’t stop with the web. On $250 Sony WH-1000XM4 headphones, which are comfortable and have lovely sound and the best active noise-canceling I’ve ever experienced, opting to “Disable Voice Guidance” still means that the nice lady inside your headphones will tell you when you dis/connect your Bluetooth device. You gotta toggle a feature in the app to prevent iTunes from launching every time it pairs with your Mac (the Sony folk think this “feature” is “unfortunate” so there’s that at least.) Your headphones can just choose to turn off the moment you turn them on unless you update the firmware. Would you like to share your location? Do you want the Sony app to send you notifications? We’ll need the last four digits of your SSN so we can create a tailor-made listening profile for you. Is that OK?↩︎

Pushing Buttons

If you took Buttons” by The Pussycat Dolls and deep-fried it in stale peanut oil, you would get the result below. It’s by Youtuber Dii and it’s all I’ve been humming for the past 48 hours.

Dil Se

A most beautiful, graceful, and sublime rendition of one of my all-time favorite songs.

Lovely, lovely stuff 🙏❤️ (via Deepu)

See also: Worlds Beyond the Stars

On ‘Deliberate’ Genocide in the Americas

by CommodoreCoCo

Responding to this chilling comment:

You are failing to understand genocide itself. INTENT, is the word, DELIBERATION. Deliberation to destroy an ethnic group. There was NEVER a deliberate attempt to destroy native culture in the Americas. In fact, you have laws since the 1512 protecting their rights and equalising them to Iberian Crown subjects, “Las Leyes de Burgos”.

Because, you see, unintentional genocide is A-OK.

I see I’ve been summoned. Your comments in this thread make it clear that nothing will change your position. It’s a difficult position to combat, because it’s in such a defiance of literally anything written on the topic in at least the last 50 years. You are not operating off the same foundations of evidence that others are, and for that reason I suspect they, like me, are not terribly interested in arguing. Because it’s unlikely your drivel will be removed, I’m posting some quotes and links for those who see this thread later and think you might have even begun to approach a point supported by any specialist on the topic. I do not intend these to be comprehensive; there are myriad examples of “deliberate attempts to destroy native culture in the Americas” in, well, literally any single book or article you can pick up about the era. Rather, because you’ve instead there never was any such thing, I’ve provided some obvious examples.


A primary goal of the Spanish colonial regime was to completely extirpate indigenous ways of life. While this was nominally about conversion to Catholicism, those in charge made it quite explicit that “conversion” not only should be but needed to be a violent process. Everything potentially conceivable as an indigenous practice, be it burial rituals, ways to build houses, or farming technologies, was targeted, To quote historian Peter Gose:

only by rebuilding Indian life from the ground up, educating, and preventing (with force if necessary) the return to idolatry could the missionary arrest these hereditary inclinations and modify them over time.

Francisco de Toledo, Viceroy of Peru, made clear in a 1570 decree that failure to comply with Catholicism was an offense punishable by death and within secular jurisdiction:

And should it occur that an infidel dogmatizer be found who disrupts the preaching of the gospel and manages to pervert the newly converted, in this case secular judges can proceed against such infidel dogmatizers, punishing them with death or other punishments that seem appropriate to them, since it is declared by congresses of theologians and jurists that His Majesty has convened in the Kingdoms of Spain that not only is this just cause for condemning such people to death, but even for waging war against a whole kingdom or province with all the death and damage to property that results

The same Toledo decreed in 1580 that Catholic priests and secular judges and magistrates should work together to destroy indigenous burial sites:

I order and command that each magistrate ensure that in his district all the tower tombs be knocked down, and that a large pit be dug into which all of the bones of those who died as pagans be mixed together, and that special care be taken henceforth to gather the intelligence necessary to discover whether any of the baptized are buried outside of the church, with the priest and the judge helping each other in such an important matter

Not only was the destruction of native culture a top-down decree, resistance was explicitly a death sentence.


The contemporary diversity of Latin America is not the result of natural “intermixing,” but the failure of the Spanish to assert themselves and the continuous resistance of the indigenous population. As early as 1588, we see letters from local priests airing grievances about the failure of the reduccion towns they were supposed to relocate native families to:

‘the corregidores are obliged, and the governors, to reduce the towns and order them reduced, and to build churches, take care to find out if the people come diligently for religious instruction and mass, to make them come and help the priest, and punish the careless, lazy, and bad Indians in the works of Christianity, as the ordinances of don Francisco de Toledo require, [but] they do not comply. Rather, many of the towns have yet to be reduced, and many churches are yet to be built, and a large part of the Indians are fled to many places where they neither see a priest nor receive religious instruction.

Reduccion was not a voluntary process, nor was it a question of simply “moving away.” Not only did it involve the destruction of native religious sites, it frequently involved the destruction of entire towns to repurpose building material and ensure people could not return. In fact, where we do see more voluntary participation in Spanish colonial structures, usually because of the political legibility and opportunities it provided, the resulting syncretism becomes an ever greater source of anxiety for the Spanish. Indigenous elites could selectively participate in Catholicism and game the system to their benefit- not something the state wanted to admit could happen.

These quotes come from Gose’s chapter on reducciones uploaded here.

I will also provide this section from the conclusion of Nicholas Robins’ book Mercury, Mining, and Empire; the entirety is uploaded here. The quoted chunk below is a summary of the various historical events presented in that chapter.

The white legend held much historiographical sway throughout the nineteenth and much of the twentieth centuries, and in no small part reflected a selective focus on legal structures rather than their application, subsumed in a denigratory view of native peoples, their cultures, and their heritage. As later twentieth-century historians began to examine the actual operation of the colony, the black legend again gained ascendance. As Benjamin Keen wrote, the black legend is “no legend at all.

Twentieth-century concepts of genocide have superseded this debate, and the genocidal nature of the conquest is, ironically, evident in the very Spanish laws that the advocates of the white legend used in their efforts to justify their position. Such policies in Latin America had a defining influence on Rafael Lemkin, the scholar who first developed the term genocide in Axis Rule in Occupied Europe. As developed by Lemkin, “Genocide has two phases: one, destruction of the national pattern of the oppressed group; the other, the imposition of the national pattern of the oppressor,” which often included the establishment of settler colonies. Because of the intimate links between culture and national identity, Lemkin equated intentional cultural destruction with genocide. It was in no small part a result of his tireless efforts that in 1948 the United Nations adopted the defintion of genocide which, despite its shortcomings, serves today as international law. The fact that genocide is a modern concept and that colonists operated within the “spirit of the times” in no way lessens the genocidal nature of their actions. It was, in fact, historical genocides, including those in Latin America, that informed Lemkin’s thinking and gave rise to the term.

Dehumanization of the victim is the handmaiden of genocide, and that which occurred in Spanish America is no exception. Although there were those who recognized the humanity of the natives and sought to defend them, they were in the end a small minority. The image of the Indian as a lazy, thieving, ignorant, prevaricating drunkard who only responded to force was, perversely, a step up from the ranks of nonhumans in which they were initially cast. The official recognition that the Indians were in fact human had little effect in their daily lives, as they were still treated like animals and viewed as natural servants by non-Indians. It is remarkable that the white legend could ever emerge from this genocidogenic milieu. With the path to genocide thus opened by the machete of dehumanization, Spanish policies to culturally destroy and otherwise subject the Amerindians as a people were multifaceted, consistent, and enduring. Those developed and implemented by Viceroy Francisco de Toledo in Peru in the 1570s have elevated him to the status of genocidier extraordinaire.

Once an Indian group had refused to submit to the Spanish crown, they could be legally enslaved, and calls for submission were usually made in a language the Indians did not understand and were often out of earshot. In some cases, the goal was the outright physical extermination or enslavement of specific ethnic groups whom the authorities could not control, such as the Chiriguano and Araucanian Indians. Another benefit from the crown’s perspective was that restive Spaniards and Creoles could be dispatched in such campaigns, thus relieving cities and towns of troublemakers while bringing new lands and labor into the kingdom. Ironically, de Toledo’s campaign to wipe out the Chiriguano contributed to his own ill health. Overall, however, genocidal policies in the Andes and the Americas centered on systematic cultural, religious, and linguistic destruction, forced labor, and forced relocation, much of which affected reproduction and the ability of individuals and communities to sustain themselves.

The forced relocation of Indians from usually spread-out settlements into reducciones, or Spanish-style communities, had among its primary objectives the abolition of indigenous religious and cultural practices and their replacement with those associated with Catholicism. As native lands and the surrounding geographical environment had tremendous spiritual significance, their physical removal also undermined indigenous spiritual relationships. Complementing the natives’ spiritual and cultural control was the physical control, and thus access to labor, offered by the new communities. The concentration of people also inadvertently fostered the spread of disease, giving added impetus to the demographic implosion. Finally, forced relocation was a direct attack on traditional means of sustenance, as many kin groups settled in and utilized the diverse microclimates of the region to provide a variety of foodstuffs and products for the group.

Integrated into this cultural onslaught were extirpation campaigns designed to seek out and destroy all indigenous religious shrines and icons and to either convert or kill native religious leaders. The damage matched the zeal and went to the heart of indigenous spiritual identity. For example, in 1559, an extirpation drive led by Augustinian friars resulted in the destruction of about 5,000 religious icons in the region of Huaylas, Peru, alone. Cultural destruction, or ethnocide, also occurred on a daily basis in Indian villages, where the natives were subject to forced baptism as well as physical and financial participation in a host of Catholic rites. As linchpins in the colonial apparatus, the clergy not only focused on spiritual conformity but also wielded formidable political and economic power in the community. Challenges to their authority were quickly met with the lash, imprisonment, exile, or the confiscation of property.

Miscegenation, often though not always through rape, also had profound personal, cultural, and genetic impacts on indigenous people. Part of the reason was the relative paucity of Spanish women in the colony, while power, opportunity, and impunity also played important roles. Genetic effacement was, in the 1770s, complemented by efforts to illegalize and eliminate native languages. A component in the wider effort to deculturate the indigenes, such policies were implemented with renewed vigor following the Great Rebellion of 1780–1782. Such laws contained provisions making it illegal to communicate with servants in anything but Spanish, and any servant who did not promptly learn the language was to be fired. The fact that there are still Indians in the Andes does not diminish the fact that they were victims of genocide, for few genocides are total.

Lastly, I would direct readers to the following article: Levene, Mark. 1999. “The Chittagong Hill Tracts: A Case Study in the Political Economy of ‘Creeping’ Genocide.” Third World Quarterly 20 (2): 339–69.

Though it talks about events a world away, it’s discussion of genocide is pertinent here. From the abstract:

The destruction of indigenous, tribal peoples in remote and/or frontier regions of the developing world is often assumed to be the outcome of inexorable, even inevitable forces of progress. People are not so much killed, they become extinct. Terms such as ethnocide, cultural genocide or developmental genocide suggest a distinct form of ‘off the map’ elimination which implicitly discourages comparison with other acknowledged examples of genocide. By concentrating on a little-known case study, that of the Chittagong Hill Tracts (CHT) in Bangladesh, this article argues that this sort of categorisation is misplaced. Not only is the destruction or attempted destruction of fourth world peoples central to the pattern of contemporary genocide but, by examining such specific examples, we can more clearly delineate the phenomenon’s more general wellsprings and processes. The example of the CHT does have its own peculiar features; not least what has been termed here its ‘creeping’ nature. In other respects, however, the efforts of a new nation-state to overcome its structural weaknesses by attempting a forced-pace consolidation and settlement of its one, allegedly, unoccupied resource-rich frontier region closely mirrors other state-building, developmental agendas which have been confronted with communal resistance. The ensuing crisis of state–communal relations, however, cannot be viewed in national isolation. Bangladesh’s drive to develop the CHT has not only been funded by Western finance and aid but is closely linked to its efforts to integrate itself rapidly into a Western dominated and regulated international system. It is in these efforts ‘to realise what is actually unrealisable’ that the relationship between a flawed state power and genocide can be located.

Genocide need not be a state program uniquely articulated to eliminate a people or their culture. Rather, it is often disguised in the name “progress” or “development.” This connects to the Spanish colonial economic system, based on what Robins (above) calls the “ultra-violence” of forced labor in mines.

Aaron Rodgers

The sentiment inside The Orange Sphere of Shit, by this genius (who is treating himself with Ivermectin.)

Aaron Rodgers by Ben Garrison

QL made some observations:

  1. This is an incomplete pass.
  2. It’s probably unsportsmanlike conduct penalty
  3. It’s at least intentional grounding.
  4. It does no good, only hurts the rest of the team.
  5. The vaxxed player would be wearing a cup (you know, because they’re actually protected).
  6. What makes it “accurate” is that the whole point is to hurt another person.

That’ll show 'em.

The Ring of Tucci

I love this ring as much as I love Mr. Stanley Tucci.

The Ring of Tucci

It’s from The Devil Wears Prada and is an aqeeq ring (which “means quartz in Arabic, and agate in Turkish”) which was a pretty common sight on older hands when I was growing up.

I looked far and wide for a replica and found this on Etsy1. That price aside, not bad at all!

  1. Here’s a picture in case that listing gets removed.↩︎

Eliminating Distractions with MS-DOS

The Dune screenplay was written on MS-DOS on a program app called “Movie Master”. It has a 40 page limit which helps the writer, Eric Roth.

Writing is fundamentally about putting your ass in the chair and typing the words. Eliminating distractions (I’ve checked Twitter at least five times while writing this short blog) is a key to success. Nothing eliminates distractions like a stripped down simple program with no internet access. Roth also said the 40 page limit helps him structure his screenplays.“I like it because it makes acts,” he said. “I realize if I hadn’t said it in 40 pages I’m starting to get in trouble.”

Matthew Gault, “The ‘Dune’ Screenplay Was Written in MS-DOS”, Vice

Here’s a “Household Income Percentile Calculator for the United States”

In case that site is unavailable, and for the year 2020, it’s an exponential curve with the

  • 50th at $67,463
  • 75th at $122,500
  • 80th at $141,100
  • 90th at $201,052
  • 95th at $273,850
  • 98th at $386,915
  • 99th at $594,420

Until not-too-long ago, I used to think that “the top 1%” referred to “few hundreds of millions”-millionaries or billionaires 🤷‍♂️

Former Member of “Elite-Strike Force” Legal Team now on Illustrious Client’s No-Go List to Save him the Embarrassment and Discomfiture of his Association with Her

Forgot to add this to my Collection of Shitkraken.

Two lawyers who currently work for Trump or in the former president’s inner orbit say they want absolutely nothing to do with her and have cautioned others in MAGAland to do the same. One said they’d recently deleted her phone number.

Two other people familiar with the matter said that ever since he left office in January, certain advisers and longtime associates to Trump have kept an informal shortlist of people who they should look out for, including at Trump’s private clubs or offices in Florida, New Jersey, and New York. The point of this roster is to intercept and possibly rebuff attempted outreach, visits, or phone calls from a handful of conservative figures who could bring the ex-president more undesired headaches.

“Sidney is very much on the no-go list,” one of the knowledgeable sources said. “Her problems right now do not need to be the [former] president’s problems.”

Powell’s legal exposure right now is, of course, massive. And ever since she tried to work with Trump to orchestrate a coup last year against Joe Biden, feelings of frustration and bitterness have lingered between Trump and Powell. According to a source with direct knowledge of the matter, since December Powell has privately talked about how disappointed she was in Trump because he didn’t end up appointing her to a “special” role in his White House where she would have probed “election fraud” conspiracy theories during the final days of his term.

“She sounded pretty broken up about it,” this person noted. “I felt sorry for her.”

Meanwhile, the Brave Leader of the Elite Strike-Force Team feels bad about his own ban from State Television.

The Art of Node

by maxogden

A fantastic introduction to Node (for maybe someone coming in from Python or Ruby land.)

The Art of Node

An introduction to Node.js

This document is intended for readers who know at least a little bit of a couple of things:

  • a scripting language like JavaScript, Ruby, Python, Perl, etc. If you aren’t a programmer yet then it is probably easier to start by reading JavaScript for Cats. :cat2:
  • git and github. These are the open source collaboration tools that people in the node community use to share modules. You just need to know the basics. Here are three great intro tutorials: 1, 2, 3

Table of contents

Learn node interactively

In addition to reading this guide it’s super important to also bust out your favorite text editor and actually write some node code. I always find that when I just read some code in a book it never really clicks, but learning by writing code is a good way to grasp new programming concepts.

NodeSchool.io

NodeSchool.io is a series of free + open source interactive workshops that teach you the principles of Node.js and beyond.

Learn You The Node.js is the introductory NodeSchool.io workshop. It’s a set of programming problems that introduce you to common node patterns. It comes packaged as a command line program.

learnyounode

You can install it with npm:

# install
npm install learnyounode -g

# start the menu
learnyounode

Understanding node

Node.js is an open source project designed to help you write JavaScript programs that talk to networks, file systems or other I/O (input/output, reading/writing) sources. That’s it! It is just a simple and stable I/O platform that you are encouraged to build modules on top of.

What are some examples of I/O? Here is a diagram of an application that I made with node that shows many I/O sources:

server diagram

If you don’t understand all of the different things in the diagram it is completely okay. The point is to show that a single node process (the hexagon in the middle) can act as the broker between all of the different I/O endpoints (orange and purple represent I/O).

Usually building these kinds of systems is either:

  • difficult to code but yields super fast results (like writing your web servers from scratch in C)
  • easy to code but not very speedy/robust (like when someone tries to upload a 5GB file and your server crashes)

Node’s goal is to strike a balance between these two: relatively easy to understand and use and fast enough for most use cases.

Node isn’t either of the following:

  • A web framework (like Rails or Django, though it can be used to make such things)
  • A programming language (it uses JavaScript but node isn’t its own language)

Instead, node is somewhere in the middle. It is:

  • Designed to be simple and therefore relatively easy to understand and use
  • Useful for I/O based programs that need to be fast and/or handle lots of connections

At a lower level, node can be described as a tool for writing two major types of programs:

  • Network programs using the protocols of the web: HTTP, TCP, UDP, DNS and SSL
  • Programs that read and write data to the filesystem or local processes/memory

What is an “I/O based program”? Here are some common I/O sources:

  • Databases (e.g. MySQL, PostgreSQL, MongoDB, Redis, CouchDB)
  • APIs (e.g. Twitter, Facebook, Apple Push Notifications)
  • HTTP/WebSocket connections (from users of a web app)
  • Files (image resizer, video editor, internet radio)

Node does I/O in a way that is asynchronous which lets it handle lots of different things simultaneously. For example, if you go down to a fast food joint and order a cheeseburger they will immediately take your order and then make you wait around until the cheeseburger is ready. In the meantime they can take other orders and start cooking cheeseburgers for other people. Imagine if you had to wait at the register for your cheeseburger, blocking all other people in line from ordering while they cooked your burger! This is called blocking I/O because all I/O (cooking cheeseburgers) happens one at a time. Node, on the other hand, is non-blocking, which means it can cook many cheeseburgers at once.

Here are some fun things made easy with node thanks to its non-blocking nature:

Core modules

Firstly I would recommend that you get node installed on your computer. The easiest way is to visit nodejs.org and click Install.

Node has a small core group of modules (commonly referred to as ‘node core’) that are presented as the public API that you are intended to write programs with. For working with file systems there is the fs module and for networks there are modules like net (TCP), http, dgram (UDP).

In addition to fs and network modules there are a number of other base modules in node core. There is a module for asynchronously resolving DNS queries called dns, a module for getting OS specific information like the tmpdir location called os, a module for allocating binary chunks of memory called buffer, some modules for parsing urls and paths (url, querystring, path), etc. Most if not all of the modules in node core are there to support node’s main use case: writing fast programs that talk to file systems or networks.

Node handles I/O with: callbacks, events, streams and modules. If you learn how these four things work then you will be able to go into any module in node core and have a basic understanding about how to interface with it.

Callbacks

This is the most important topic to understand if you want to understand how to use node. Nearly everything in node uses callbacks. They weren’t invented by node, they are just part of the JavaScript language.

Callbacks are functions that are executed asynchronously, or at a later time. Instead of the code reading top to bottom procedurally, async programs may execute different functions at different times based on the order and speed that earlier functions like http requests or file system reads happen.

The difference can be confusing since determining if a function is asynchronous or not depends a lot on context. Here is a simple synchronous example, meaning you can read the code top to bottom just like a book:

var myNumber = 1
function addOne() { myNumber++ } // define the function
addOne() // run the function
console.log(myNumber) // logs out 2

The code here defines a function and then on the next line calls that function, without waiting for anything. When the function is called it immediately adds 1 to the number, so we can expect that after we call the function the number should be 2. This is the expectation of synchronous code - it sequentially runs top to bottom.

Node, however, uses mostly asynchronous code. Let’s use node to read our number from a file called number.txt:

var fs = require('fs') // require is a special function provided by node
var myNumber = undefined // we don't know what the number is yet since it is stored in a file

function addOne() {
  fs.readFile('number.txt', function doneReading(err, fileContents) {
    myNumber = parseInt(fileContents)
    myNumber++
  })
}

addOne()

console.log(myNumber) // logs out undefined -- this line gets run before readFile is done

Why do we get undefined when we log out the number this time? In this code we use the fs.readFile method, which happens to be an asynchronous method. Usually things that have to talk to hard drives or networks will be asynchronous. If they just have to access things in memory or do some work on the CPU they will be synchronous. The reason for this is that I/O is reallyyy reallyyy sloowwww. A ballpark figure would be that talking to a hard drive is about 100,000 times slower than talking to memory (e.g. RAM).

When we run this program all of the functions are immediately defined, but they don’t all execute immediately. This is a fundamental thing to understand about async programming. When addOne is called it kicks off a readFile and then moves on to the next thing that is ready to execute. If there is nothing to execute node will either wait for pending fs/network operations to finish or it will stop running and exit to the command line.

When readFile is done reading the file (this may take anywhere from milliseconds to seconds to minutes depending on how fast the hard drive is) it will run the doneReading function and give it an error (if there was an error) and the file contents.

The reason we got undefined above is that nowhere in our code exists logic that tells the console.log statement to wait until the readFile statement finishes before it prints out the number.

If you have some code that you want to be able to execute over and over again, or at a later time, the first step is to put that code inside a function. Then you can call the function whenever you want to run your code. It helps to give your functions descriptive names.

Callbacks are just functions that get executed at some later time. The key to understanding callbacks is to realize that they are used when you don’t know when some async operation will complete, but you do know where the operation will complete — the last line of the async function! The top-to-bottom order that you declare callbacks does not necessarily matter, only the logical/hierarchical nesting of them. First you split your code up into functions, and then use callbacks to declare if one function depends on another function finishing.

The fs.readFile method is provided by node, is asynchronous, and happens to take a long time to finish. Consider what it does: it has to go to the operating system, which in turn has to go to the file system, which lives on a hard drive that may or may not be spinning at thousands of revolutions per minute. Then it has to use a magnetic head to read data and send it back up through the layers back into your javascript program. You give readFile a function (known as a callback) that it will call after it has retrieved the data from the file system. It puts the data it retrieved into a javascript variable and calls your function (callback) with that variable. In this case the variable is called fileContents because it contains the contents of the file that was read.

Think of the restaurant example at the beginning of this tutorial. At many restaurants you get a number to put on your table while you wait for your food. These are a lot like callbacks. They tell the server what to do after your cheeseburger is done.

Let’s put our console.log statement into a function and pass it in as a callback:

var fs = require('fs')
var myNumber = undefined

function addOne(callback) {
  fs.readFile('number.txt', function doneReading(err, fileContents) {
    myNumber = parseInt(fileContents)
    myNumber++
    callback()
  })
}

function logMyNumber() {
  console.log(myNumber)
}

addOne(logMyNumber)

Now the logMyNumber function can get passed in as an argument that will become the callback variable inside the addOne function. After readFile is done the callback variable will be invoked (callback()). Only functions can be invoked, so if you pass in anything other than a function it will cause an error.

When a function gets invoked in javascript the code inside that function will immediately get executed. In this case our log statement will execute since callback is actually logMyNumber. Remember, just because you define a function it doesn’t mean it will execute. You have to invoke a function for that to happen.

To break down this example even more, here is a timeline of events that happen when we run this program:

  • 1: The code is parsed, which means if there are any syntax errors they would make the program break. During this initial phase, fs and myNumber are declared as variables while addOne and logMyNumber are declared as functions. Note that these are just declarations. Neither function has been called nor invoked yet.
  • 2: When the last line of our program gets executed addOne is invoked with the logMyNumber function passed as its callback argument. Invoking addOne will first run the asynchronous fs.readFile function. This part of the program takes a while to finish.
  • 3: With nothing to do, node idles for a bit as it waits for readFile to finish. If there was anything else to do during this time, node would be available for work.
  • 4: As soon as readFile finishes it executes its callback, doneReading, which parses fileContents for an integer called myNumber, increments myNumber and then immediately invokes the function that addOne passed in (its callback), logMyNumber.

Perhaps the most confusing part of programming with callbacks is how functions are just objects that can be stored in variables and passed around with different names. Giving simple and descriptive names to your variables is important in making your code readable by others. Generally speaking in node programs when you see a variable like callback or cb you can assume it is a function.

You may have heard the terms ‘evented programming’ or ‘event loop’. They refer to the way that readFile is implemented. Node first dispatches the readFile operation and then waits for readFile to send it an event that it has completed. While it is waiting node can go check on other things. Inside node there is a list of things that are dispatched but haven’t reported back yet, so node loops over the list again and again checking to see if they are finished. After they finished they get ‘processed’, e.g. any callbacks that depended on them finishing will get invoked.

Here is a pseudocode version of the above example:

function addOne(thenRunThisFunction) {
  waitAMinuteAsync(function waitedAMinute() {
    thenRunThisFunction()
  })
}

addOne(function thisGetsRunAfterAddOneFinishes() {})

Imagine you had 3 async functions a, b and c. Each one takes 1 minute to run and after it finishes it calls a callback (that gets passed in the first argument). If you wanted to tell node ‘start running a, then run b after a finishes, and then run c after b finishes’ it would look like this:

a(function() {
  b(function() {
    c()
  })
})

When this code gets executed, a will immediately start running, then a minute later it will finish and call b, then a minute later it will finish and call c and finally 3 minutes later node will stop running since there would be nothing more to do. There are definitely more elegant ways to write the above example, but the point is that if you have code that has to wait for some other async code to finish then you express that dependency by putting your code in functions that get passed around as callbacks.

The design of node requires you to think non-linearly. Consider this list of operations:

read a file
process that file

If you were to turn this into pseudocode you would end up with this:

var file = readFile()
processFile(file)

This kind of linear (step-by-step, in order) code isn’t the way that node works. If this code were to get executed then readFile and processFile would both get executed at the same exact time. This doesn’t make sense since readFile will take a while to complete. Instead you need to express that processFile depends on readFile finishing. This is exactly what callbacks are for! And because of the way that JavaScript works you can write this dependency many different ways:

var fs = require('fs')
fs.readFile('movie.mp4', finishedReading)

function finishedReading(error, movieData) {
  if (error) return console.error(error)
  // do something with the movieData
}

But you could also structure your code like this and it would still work:

var fs = require('fs')

function finishedReading(error, movieData) {
  if (error) return console.error(error)
  // do something with the movieData
}

fs.readFile('movie.mp4', finishedReading)

Or even like this:

var fs = require('fs')

fs.readFile('movie.mp4', function finishedReading(error, movieData) {
  if (error) return console.error(error)
  // do something with the movieData
})

Events

In node if you require the events module you can use the so-called ‘event emitter’ that node itself uses for all of its APIs that emit things.

Events are a common pattern in programming, known more widely as the ‘observer pattern’ or ‘pub/sub’ (publish/subscribe). Whereas callbacks are a one-to-one relationship between the thing waiting for the callback and the thing calling the callback, events are the same exact pattern except with a many-to-many API.

The easiest way to think about events is that they let you subscribe to things. You can say ‘when X do Y’, whereas with plain callbacks it is ‘do X then Y’.

Here are few common use cases for using events instead of plain callbacks:

  • Chat room where you want to broadcast messages to many listeners
  • Game server that needs to know when new players connect, disconnect, move, shoot and jump
  • Game engine where you want to let game developers subscribe to events like .on('jump', function() {})
  • A low level web server that wants to expose an API to easily hook into events that happen like .on('incomingRequest') or .on('serverError')

If we were trying to write a module that connects to a chat server using only callbacks it would look like this:

var chatClient = require('my-chat-client')

function onConnect() {
  // have the UI show we are connected
}

function onConnectionError(error) {
  // show error to the user
}

function onDisconnect() {
 // tell user that they have been disconnected
}

function onMessage(message) {
 // show the chat room message in the UI
}

chatClient.connect(
  'http://mychatserver.com',
  onConnect,
  onConnectionError,
  onDisconnect,
  onMessage
)

As you can see this is really cumbersome because of all of the functions that you have to pass in a specific order to the .connect function. Writing this with events would look like this:

var chatClient = require('my-chat-client').connect()

chatClient.on('connect', function() {
  // have the UI show we are connected
})

chatClient.on('connectionError', function() {
  // show error to the user
})

chatClient.on('disconnect', function() {
  // tell user that they have been disconnected
})

chatClient.on('message', function() {
  // show the chat room message in the UI
})

This approach is similar to the pure-callback approach but introduces the .on method, which subscribes a callback to an event. This means you can choose which events you want to subscribe to from the chatClient. You can also subscribe to the same event multiple times with different callbacks:

var chatClient = require('my-chat-client').connect()
chatClient.on('message', logMessage)
chatClient.on('message', storeMessage)

function logMessage(message) {
  console.log(message)
}

function storeMessage(message) {
  myDatabase.save(message)
}

Streams

Early on in the node project the file system and network APIs had their own separate patterns for dealing with streaming I/O. For example, files in a file system have things called ‘file descriptors’ so the fs module had to have extra logic to keep track of these things whereas the network modules didn’t have such a concept. Despite minor differences in semantics like these, at a fundamental level both groups of code were duplicating a lot of functionality when it came to reading data in and out. The team working on node realized that it would be confusing to have to learn two sets of semantics to essentially do the same thing so they made a new API called the Stream and made all the network and file system code use it.

The whole point of node is to make it easy to deal with file systems and networks so it made sense to have one pattern that was used everywhere. The good news is that most of the patterns like these (there are only a few anyway) have been figured out at this point and it is very unlikely that node will change that much in the future.

There are already two great resources that you can use to learn about node streams. One is the stream-adventure (see the Learn Node Interactively section) and the other is a reference called the Stream Handbook.

Stream Handbook

stream-handbook is a guide, similar to this one, that contains a reference for everything you could possibly need to know about streams.

stream-handbook

Modules

Node core is made up of about two dozen modules, some lower level ones like events and stream some higher level ones like http and crypto.

This design is intentional. Node core is supposed to be small, and the modules in core should be focused on providing tools for working with common I/O protocols and formats in a way that is cross-platform.

For everything else there is npm. Anyone can create a new node module that adds some functionality and publish it to npm. As of the time of this writing there are 34,000 modules on npm.

How to find a module

Imagine you are trying to convert PDF files into TXT files. The best place to start is by doing npm search pdf:

pdfsearch

There are a ton of results! npm is quite popular and you will usually be able to find multiple potential solutions. If you go through each module and whittle down the results into a more narrow set (filtering out things like PDF generation modules) you’ll end up with these:

A lot of the modules have overlapping functionality but present alternate APIs and most of them require external dependencies (like apt-get install poppler).

Here are some different ways to interpret the modules:

  • pdf2json is the only one that is written in pure JavaScript, which means it is the easiest to install, especially on low power devices like the raspberry pi or on Windows where native code might not be cross platform.
  • modules like mimeograph, hummus and pdf-extract each combine multiple lower level modules to expose a high level API
  • a lot of modules seem to sit on top of the pdftotext/poppler unix command line tools

Lets compare the differences between pdftotextjs and pdf-text-extract, both of which are are wrappers around the pdftotext utility.

pdf-modules

Both of these:

  • were updated relatively recently
  • have github repositories linked (this is very important!)
  • have READMEs
  • have at least some number of people installing them every week
  • are liberally licensed (anyone can use them)

Just looking at the package.json + module statistics it’s hard to get a feeling about which one might be the right choice. Let’s compare the READMEs:

pdf-readmes

Both have simple descriptions, CI badges, installation instructions, clear examples and instructions for running the tests. Great! But which one do we use? Let’s compare the code:

pdf-code

pdftotextjs is around 110 lines of code, and pdf-text-extract is around 40, but both essentially boil down to this line:

var child = shell.exec('pdftotext ' + self.options.additional.join(' '));

Does this make one any better than the other? Hard to say! It’s important to actually read the code and make your own conclusions. If you find a module you like, use npm star modulename to give npm feedback about modules that you had a positive experience with.

Modular development workflow

npm is different from most package managers in that it installs modules into a folder inside of other existing modules. The previous sentence might not make sense right now but it is the key to npm’s success.

Many package managers install things globally. For instance, if you apt-get install couchdb on Debian Linux it will try to install the latest stable version of CouchDB. If you are trying to install CouchDB as a dependency of some other piece of software and that software needs an older version of CouchDB, you have to uninstall the newer version of CouchDB and then install the older version. You can’t have two versions of CouchDB installed because Debian only knows how to install things into one place.

It’s not just Debian that does this. Most programming language package managers work this way too. To address the global dependencies problem described above there have been virtual environment developed like virtualenv for Python or bundler for Ruby. These just split your environment up in to many virtual environments, one for each project, but inside each environment dependencies are still globally installed. Virtual environments don’t always solve the problem, sometimes they just multiply it by adding additional layers of complexity.

With npm installing global modules is an anti-pattern. Just like how you shouldn’t use global variables in your JavaScript programs you also shouldn’t install global modules (unless you need a module with an executable binary to show up in your global PATH, but you don’t always need to do this – more on this later).

How require works

When you call require('some_module') in node here is what happens:

  1. if a file called some_module.js exists in the current folder node will load that, otherwise:
  2. node looks in the current folder for a node_modules folder with a some_module folder in it
  3. if it doesn’t find it, it will go up one folder and repeat step 2

This cycle repeats until node reaches the root folder of the filesystem, at which point it will then check any global module folders (e.g. /usr/local/node_modules on Mac OS) and if it still doesn’t find some_module it will throw an exception.

Here’s a visual example:

mod-diagram-01

When the current working directory is subsubfolder and require('foo') is called, node will look for the folder called subsubfolder/node_modules. In this case it won’t find it – the folder there is mistakenly called my_modules. Then node will go up one folder and try again, meaning it then looks for subfolder_B/node_modules, which also doesn’t exist. Third try is a charm, though, as folder/node_modules does exist and has a folder called foo inside of it. If foo wasn’t in there node would continue its search up the directory tree.

Note that if called from subfolder_B node will never find subfolder_A/node_modules, it can only see folder/node_modules on its way up the tree.

One of the benefits of npm’s approach is that modules can install their dependent modules at specific known working versions. In this case the module foo is quite popular - there are three copies of it, each one inside its parent module folder. The reasoning for this could be that each parent module needed a different version of foo, e.g. ‘folder’ needs foo@0.0.1, subfolder_A needs foo@0.2.1 etc.

Here’s what happens when we fix the folder naming error by changing my_modules to the correct name node_modules:

mod-diagram-02

To test out which module actually gets loaded by node, you can use the require.resolve('some_module') command, which will show you the path to the module that node finds as a result of the tree climbing process. require.resolve can be useful when double-checking that the module that you think is getting loaded is actually getting loaded – sometimes there is another version of the same module closer to your current working directory than the one you intend to load.

How to write a module

Now that you know how to find modules and require them you can start writing your own modules.

The simplest possible module

Node modules are radically lightweight. Here is one of the simplest possible node modules:

package.json:

{
  "name": "number-one",
  "version": "1.0.0"
}

index.js:

module.exports = 1

By default node tries to load module/index.js when you require('module'), any other file name won’t work unless you set the main field of package.json to point to it.

Put both of those files in a folder called number-one (the name in package.json must match the folder name) and you’ll have a working node module.

Calling the function require('number-one') returns the value of whatever module.exports is set to inside the module:

simple-module

An even quicker way to create a module is to run these commands:

mkdir my_module
cd my_module
git init
git remote add git@github.com:yourusername/my_module.git
npm init

Running npm init will create a valid package.json for you and if you run it in an existing git repo it will set the repositories field inside package.json automatically as well!

Adding dependencies

A module can list any other modules from npm or GitHub in the dependencies field of package.json. To install the request module as a new dependency and automatically add it to package.json run this from your module root directory:

npm install --save request

This installs a copy of request into the closest node_modules folder and makes our package.json look something like this:

{
  "id": "number-one",
  "version": "1.0.0",
  "dependencies": {
    "request": "~2.22.0"
  }
}

By default npm install will grab the latest published version of a module.

Client side development with npm

A common misconception about npm is that since it has ‘Node’ in the name that it must only be used for server side JS modules. This is completely untrue! npm actually stands for Node Packaged Modules, e.g. modules that Node packages together for you. The modules themselves can be whatever you want – they are just a folder of files wrapped up in a .tar.gz, and a file called package.json that declares the module version and a list of all modules that are dependencies of the module (as well as their version numbers so the working versions get installed automatically). It’s turtles all the way down - module dependencies are just modules, and those modules can have dependencies etc. etc. etc.

browserify is a utility written in Node that tries to convert any node module into code that can be run in browsers. Not all modules work (browsers can’t do things like host an HTTP server), but a lot of modules on NPM will work.

To try out npm in the browser you can use RequireBin, an app I made that takes advantage of Browserify-CDN, which internally uses browserify but returns the output through HTTP (instead of the command line – which is how browserify is usually used).

Try putting this code into RequireBin and then hit the preview button:

var reverse = require('ascii-art-reverse')

// makes a visible HTML console
require('console-log').show(true)

var coolbear =
  "    ('-^-/')  \n" +
  "    `o__o' ]  \n" +
  "    (_Y_) _/  \n" +
  "  _..`--'-.`, \n" +
  " (__)_,--(__) \n" +
  "     7:   ; 1 \n" +
  "   _/,`-.-' : \n" +
  "  (_,)-~~(_,) \n"

setInterval(function() { console.log(coolbear) }, 1000)

setTimeout(function() {
  setInterval(function() { console.log(reverse(coolbear)) }, 1000)
}, 500)

Or check out a more complicated example (feel free to change the code and see what happens):

requirebin

Going with the grain

Like any good tool, node is best suited for a certain set of use cases. For example: Rails, the popular web framework, is great for modeling complex business logic, e.g. using code to represent real life business objects like accounts, loan, itineraries, and inventories. While it is technically possible to do the same type of thing using node, there would be definite drawbacks since node is designed for solving I/O problems and it doesn’t know much about ‘business logic’. Each tool focuses on different problems. Hopefully this guide will help you gain an intuitive understanding of the strengths of node so that you know when it can be useful to you.

What is outside of node’s scope?

Fundamentally node is just a tool used for managing I/O across file systems and networks, and it leaves other more fancy functionality up to third party modules. Here are some things that are outside the scope of node:

Web frameworks

There are a number of web frameworks built on top of node (framework meaning a bundle of solutions that attempts to address some high level problem like modeling business logic), but node is not a web framework. Web frameworks that are written using node don’t always make the same kind of decisions about adding complexity, abstractions and tradeoffs that node does and may have other priorities.

Language syntax

Node uses JavaScript and doesn’t change anything about it. Felix Geisendörfer has a pretty good write-up of the ‘node style’ here.

Language abstraction

When possible node will use the simplest possible way of accomplishing something. The ‘fancier’ you make your JavaScript the more complexity and tradeoffs you introduce. Programming is hard, especially in JS where there are 1000 solutions to every problem! It is for this reason that node tries to always pick the simplest, most universal option. If you are solving a problem that calls for a complex solution and you are unsatisfied with the ‘vanilla JS solutions’ that node implements, you are free to solve it inside your app or module using whichever abstractions you prefer.

A great example of this is node’s use of callbacks. Early on node experimented with a feature called ‘promises’ that added a number of features to make async code appear more linear. It was taken out of node core for a few reasons:

  • they are more complex than callbacks
  • they can be implemented in userland (distributed on npm as third party modules)

Consider one of the most universal and basic things that node does: reading a file. When you read a file you want to know when errors happen, like when your hard drive dies in the middle of your read. If node had promises everyone would have to branch their code like this:

fs.readFile('movie.mp4')
  .then(function(data) {
    // do stuff with data
  })
  .error(function(error) {
    // handle error
  })

This adds complexity, and not everyone wants that. Instead of two separate functions node just uses a single callback function. Here are the rules:

  • When there is no error pass null as the first argument
  • When there is an error, pass it as the first argument
  • The rest of the arguments can be used for anything (usually data or responses since most stuff in node is reading or writing things)

Hence, the node callback style:

fs.readFile('movie.mp4', function(err, data) {
  // handle error, do stuff with data
})

Threads/fibers/non-event-based concurrency solutions

Note: If you don’t know what these things mean then you will likely have an easier time learning node, since unlearning things is just as much work as learning things.

Node uses threads internally to make things fast but doesn’t expose them to the user. If you are a technical user wondering why node is designed this way then you should 100% read about the design of libuv, the C++ I/O layer that node is built on top of.

License

CCBY

Creative Commons Attribution License (do whatever, just attribute me)
http://creativecommons.org/licenses/by/2.0/

Donate icon is from the Noun Project

“It wasn’t brains that got me here I can assure you of that.”

I cannot help rewatch this powerful scene from “Margin Call”. A masterclass in acting by the great Jeremy Irons.

Every sentence, glance, and gesture projects complete and menacing presence, power, and finality, and is done to absolute perfection 👌

Telugu Script Components

Telugu is a phonetic language, written from left to right, with each character representing generally a syllable. There are 52 letters in the Telugu alphabet: 16 Achchulu which denote basic vowel sounds, 36 Hallulu which represent consonants. In addition to these 52 letters, there are several semi-vowel symbols, called Maatralu, which are used in conjunction with Hallulu and, half consonants, called Voththulu, to form clusters of consonants.

Improved Symbol Segmentation for TELUGU Optical Character Recognition