In our secularized society, romantic love has become, as Jungian analyst Robert Johnson writes, “the single greatest energy system in the Western psyche. In our culture, it has supplanted religion as the arena in which men and women seek meaning, transcendence, wholeness, and ecstasy.” In our quest for the “soul mate,” we have conflated the spiritual and the relational, as if they are one and the same.
The perfection we long to experience in earthly love used to be sought only in the sanctuary of the divine. When we imbue our partner with godly attributes and we expect him or her to uplift us from the mundane to the sublime, we create, as Johnson puts it, an “unholy muddle of two holy loves” that cannot help but disappoint.
Not only do we have endless demands, but on top of it all we want to be happy. That was once reserved for the afterlife. We’ve brought heaven down to earth[...] It’s a tall order for a party of two.
- The State of Affairs, page 44
Perel’s work centers on infidelity. Her book delves into why affairs are universally condemned, yet still such a commonplace phenomenon. When we realize the absurdity of holding a single person responsible for what used to be handled by an entire religion, everything starts to make sense. We not only get an answer to the question of why infidelity seems almost inevitable; we also start to understand why shattering the illusion of love hurts so much.
The decline of religion as a “energy system” in secularized society means that all this energy is channeled elsewhere. Neil Gaiman plays on this theme in American Gods, where we watch gods, both old and new, battle for the allegiance, soul, and ultimately the life of a man. What throws this man into this struggle? He discovers that his wife has died in a car accident…that took place while she was having an affair with his best friend.
The old gods are the ones we know from museums and myths: Odin, Ēostre, Horus, the Queen of Sheba, to name a few. The new gods are the institutions which receive our scattered energy in the modern world: media, technology, the internet, capitalism, globalization, drugs. (There are even minor gods of automobiles and plastic surgery.)
Devoid of religion, we are constantly searching for divine providence in other people and other things. Look at the language that people use to describe how they feel religious union, romantic love, a perfectly executed piece of art, or a job truly well done: it’s all surprisingly similar. Exhilaration. Divine providence. Your heart bursts out of your chest. Everything makes sense all of a sudden. You feel alive again. You want to be your best self. You are at home. You are at peace. You are safe. You can be yourself, and that is enough, and beautiful, and perfect.
But this leads to the question: why is our default state one of not feeling sufficient on our own? In a 4 minute explanation of the Buddhist concept of Dharma, a friend chose to use the language of a being, torn from the universe, feeling afraid and alone, to describe where most of us are:
The non-violent religious traditions - Buddhism and Taoism, for example - tend to emphasize the fluid nature of boundaries and the healing power of being at one with the universe around us. Works that touch us profoundly tend to channel this theme of finding union with something whole, as opposed to desperately clutching after something partial. In Fear, Thich Nhat Hanh suggests an antidote to loneliness, which is reminding yourself that you are never truly alone. Even if you are eating alone at home, you are connected to the farmer who grew your food, the truck driver who helped drive it to the city, the shopkeeper who placed it up for sale, the bees that pollinated the plants, and the sun that allowed the plants to grow. This goes on and on. To believe that you are ever alone is, after even a modicum of interrogation, simply incorrect.
Christopher Alexander is a compelling architect because he is actually a mathematician, and more importantly, a human being searching for the meaning behind order and beauty. As with humans, a good home is never alone - it exists in deep harmony with the people who dwell in it, the neighbours around it, and within the larger context of the city and the country it is in, the laws that govern it, and the surrounding culture and history. A home that plays harmoniously within all of these things is what Christopher Alexander calls poetry.
Most things that we find touching and beautiful are, in some sense, bearing witness to someone - perhaps ourselves, perhaps others - finding elusive union with the whole, if only for a moment. It gives us empathy when we see someone violently and desperately clutching to something partial - a person, a religious or political belief, a set of values for ordering the world, judgements about what kinds of behaviours are and aren’t ok. The pain that they are fighting is that desperate, empty feeling of being torn from the universe once more and tossed asunder into the terrifying chaos, just as they thought that they had found a branch to hold onto.
We all know this irrational rage and the enormous, crushing sense of loneliness that sits behind it. After all, they are only fighting to get back to the same wholeness that we are also seeking. The objective, next time we recognize it, is to look at it through not the eyes of judgement, or blame, or contempt - but eyes of empathy and deep understanding.
]]>The opening shot shows hung-dry socks against a window at ground level. We pan down to reveal Kim Ki-woo and his family, searching for illicit wifi signal within a semi-basement.
Contrast this with our introduction to the Park family. The alley of the Kim home is dark, unbordered, and littered with the detritus of other lives. We follow Ki-woo away from here as he climbs to a clean, walled, and sun-filled place. We learn that the Park family home was designed by a great architect, Namgoong.
The underground bunker of this house, like any social underbelly, is a sad and wretched place - but it exists by design. Namgoong was ashamed of it, even as he built it with intention. It is equipped for light, plumbing, leisure, and even worship. It is a low place in a high hill, so it does not flood. It is a place where people can live indefinitely. And like all disenfranchised pockets in societies of abundance, it only occasionally erupts into violence.
As Moon-gwang’s husband pounds out a message against the light switches, Park’s wife remarks from upstairs, over an absurd combo of jjapaguri and expensive Hanwoo beef, that “the sensor is going batty”. There is no sensor, and it will never occur to her investigate how the lights are wired in her own home. She is emblematic of a clueless elite. It’s not that they don’t care about the murder happening in their own basement: they don’t even realize that there is a basement.
As the Kim family returns home during a downpour, they go down what seems like an impossible number of stairs. Each flight brings them closer to a place where no human was ever meant to live. A home is supposed to shelter, but this one doesn’t protect them from insecticides, electric shock, rainwater, sewage, or even literal piss. Instead, their home literally seeps into them, with a smell that forever betrays their non-belonging. Built environments reflect social order, and the Kim family survives within the cracks of both.
The built environment in Parasite also embodies the tension between totalitarian dysfunction and capitalistic degeneracy. In either system, it is somehow always the people at the bottom who end up fighting each other. The housekeeper laments, in a manner familiar to anybody with a grumpy Communist party cadre for a grandparent, that a golden era has passed, and that Namgoong’s house has gone to people who do not deserve it. Namgoong is an exalted, cult-like figure who we never actually meet. His noble masterwork of centralized planning has now become a playpen for a spoiled child, trashed by a drunk and jaded working class.
Yet these are the excesses of the very same capitalism that paid for Moon-Gwang’s meals, the Kims’ salaries, and allowed this luxurious home to be built in the first place. Who deserves the fruits of each mad rush towards a new modernity? Who should be left behind? Thoughts on class tensions rarely contain any nuance, or even awareness. It is impressive that this film - and its architecture - were crafted with both.
]]>In this passage, Mike talks about how he gets two humans to role-play being a “dog” and handler. He illustrates why painful punishments like e-collars do not work. Emphasis mine:
I then take the handler out of the room and say to him, for example, “I want you to train that dog to take the little green army man and then place a rubber band around its head and then take the four dice and place them in a square around the rubber-banded army man. You can’t communicate at all with that dog verbally."
I give the handler the remote for the e-collar and he returns to the room. They both sit there. As soon as the “dog” touches one of the items, unless it’s the army man or one of the involved objects, he gets a mild shock. Very soon, the “dog” will stop touching anything on the table. Later, we remove the collar and use the clicker/reward. I assign another task to be completed with a few of the items. The “dog” gets a click and then a gummy bear or some other kind of treat when he touches the correct item. In some cases, I don’t use the food reward at all — the absence of the shock is enough of a reward.
Not one person has ever completed this task correctly when shock is involved. Almost every time with the click/reward, the “dog” completes it within five to ten minutes. That’s how effective clicker training is. It has been used with all kinds of animals and even humans and really speeds learning. More than that, it is fun. When I do this demonstration and shock is in play, the subjects both sit there looking downcast with their shoulders slumped and nervous expressions on their faces. In contrast, when it’s clicker time, the handlers are laughing and enjoying themselves, moving to touch as many objects as quickly as possible to solve the puzzle and earn the reward.
- Team Dog by Mike Ritland
Which is why I still find it absolutely baffling when someone thinks that shame will be an effective way to change the behaviour of full-grown adults, and puts an incredible amount of energy into delivering said shame. An example:
Content theft is a problem, but there are 100% legitimate reasons to copy a piece of content - mostly when you want to reference it in another article, like I did above. When done with proper credit this is generally a good thing, as it introduces your work to a new audience who might not have found it otherwise. Twitter understands the positive amplification that can come out of this: they’ve codified this into the retweet button!
A friend of mine was putting together a newsletter on the state of the consumer banking system when he encountered the following after pulling a quote from this FT article. He was going to provide a link back to the original article. He also knows that people don’t read full essays and just want to get to the relevant part:
He was so intrigued by this that he sent me a screenshot and asked me how this was possible.
Not only does it seem like they are altering your clipboard contents via a listener and a callback on the copy-event (that’s front-end engineering lingo for “dirty rotten trick”)…
…they’re also silently sending information about you to a tracking API named after…animal scat? A flattering way to describe your audience:
It also only happens when you select more than 90 words. Think about this! Some poor engineer out there, instead of building valuable software, had to put deliberate thought and effort into building what is effectively the digital equivalent of a stern schoolmarm slapping you on the wrist.
I’ll admit that after being hit one too many times by a paywall on the New York Times or the Wall Street Journal, I will relent, pay $3 to read one article, and forget about my subscription for a few months. Fine. Good journalism is hard work, and writers deserve to get paid.
But values like this do sometimes make me think that maybe big, centralized newspapers deserve to go the way of the telegram, and be replaced by individual content producers on independent blogs or platforms like Substack.
Now imagine if they were to put half as much engineering creativity into, say, developing creative ways of content sharing that reflect how people consume information. Heck, someone might even want to pay for it.
]]>True hardwood flooring is more beautiful to us than laminate. We like a solid oak tabletop more than a cheap piece of particleboard from IKEA.
They look similar from a distance. What is the input resolution that would be required for an image classifier to distinguish between hardwood and laminate? How many people with PhD’s would you need to answer this question?
Yet the average person can easily tell the difference just by walking on it. It’s in the grain, the way our body heat transfers, the way it bends and creaks. The use of true hardwood in a high quality home is more than just status signalling. It’s an objectively richer experience.
We naturally turn up our noses at materially dishonest things. They strike us as cheap and shameful. Yet tech is constantly pretending to be something it’s not, and we tolerate it. In some circles it’s actively lauded as an engineering marvel or an act of sophistication.
This is wrong. I will present two examples to illustrate why.
Everyone has seen an embarassing mail merge failure: “Dear [FIRST_NAME] [LAST_NAME]”.
But I recently encountered a more subtle version of this on a popular marketing blog:
I use Chrome extensions to block scripts and 3rd party cookies, and I never allow a website to have access to my location. So I got their fallback placeholder: “Your City”.
Natural Language Processing enthusiasts out will note that this fallback value has created syntactic ambiguity. It’s no longer clear whether “will it be yours” is referring to my city or my business. It’s also weird that Your City is capitalized, because normal people don’t write like that.
The jarring, hacked-together nature of this sentence has now distracted me so much that I have to open Chrome inspector to confirm my suspicions. Lo and behold, there is a <span>
with an ID tag wrapped around the words “Your City”, confirming that this field is meant to be programatically populated:
We like local businesses for a reason. They are embedded in our local networks, which provide ways to get information about them and keep them accountable.
Would your rather buy a loaf of bread from a local baker or on Amazon? Most people still choose the baker. If the bread is moldy and stale, you can use the full arsenal of human social tools (an angry look, bad word of mouth to your neighbours) to create consequences for their negligence. If the bread is delicious, you can head back to the shop tomorrow, heap lavish praise on them, tip extra, etc etc.
This fake localized CTA was an attempt to gain all the trust and benefits that come from being a local business, without the accountability of actually being one.
This is an attempt to get something for nothing. And humans don’t take kindly to that.
(For fantastic related blog post, check out Signal’s excellent but short-lived Instagram ads.)
Most of us feel sheepish when we bump into a pole and then apologize. We usually follow up with “oops”, because we don’t want others to think that we talk to objects. People who do this are considered crazy.
So why would you put a machine in front of someone and try to trick them into thinking it’s human?
Yet companies do this all the time.
It has become trendy to send mass emails with real first and last names in the name field, to bait someone into clicking it:
But the gains with this approach are short-term. If your content is mediocre, the annoyance at being duped might be enough to earn you an “unsubscribe” or “mark as spam”. If your content is good enough to keep them subscribed, then this trickery wasn’t necessary in the first place.
I recently encountered a particularly noteworthy example of this - noteworthy because of how much work was put into the hiding the true nature of what was going on. Details fuzzed for privacy:
A few weeks later:
And here are the email headers:
So:
I have to admit, this is almost admirable in terms of effort. If most automated mail-merges are laminate flooring, then this is laminate flooring with wood-grain texture stamped in, dipped in a faux-oak scent.
But it is laminate nonetheless. As one might expect, the “connection” in this case never materialized. Given that the value of an introduction is mostly in the relationship of the people doing the introducing, it stands to reason that a “connection” created with zero human involvement will hold exactly zero human value, no matter how hard it tries to put out appearances.
There is nothing wrong with automation per se. Everyone likes ATMs. I get my money faster, and the bank teller is spared the monotony of dishing out $20 bills, leaving them free to deal with more interesting requests.
But humans are expensive, and material dishonesty in tech is usually an attempt to capture human upside without doing human work. This is impossible.
Here are passages from The Seven Lamps of Architecture, by John Ruskin. Chapter 2 is about Truth:
Surface Deceits. These may be generally defined as inducing the supposition of some form or material which does not actually exist; as commonly in the painting of wood to represent marble, or in the painting of ornaments in deceptive relief. But we must be careful to observe, that the evil of them consists always in definitely attempted deception [...]
[...]To cover brick with plaster, and this plaster with fresco, is, there fore, perfectly legitimate [...] But to cover brick with cement, and to divide this cement with joints that it may look like stone, is to tell a falsehood; and is just as contemptible a procedure as the other is noble.
Nobody minds cheap laminate flooring in a child’s playroom: it is installed with the understanding that it is meant to be covered with crayons, dented, destroyed, and replaced in a few years’ time. There is nothing dishonest about it.
But we all know the disappointment of, say, paying top dollar for a charming cabin with beautiful photos on Airbnb, only to show up and discover that the “fireplace” is an LED screen, the plants are plastic, and the beautiful “wooden” breakfast nook is really made of particleboard. In such situations we feel deceived. If the customer service from the host turns out to be poor, we may be further disappointed, but we won’t be surprised.
If the environment around us is fake, it is likely that the person who created that environment will be false too. We will learn not to trust them.
This is as true in woodworking as it is in writing code. I’ll close with this appeal from Ruskin:
"I would have the Spirit or Lamp of Truth clear in the hearts of our artists and handicraftsmen...it is, indeed, marvellous to see what power and universality there are in this single principle, and how in the consulting or forgetting of it lies half the dignity or decline of every art and act of man."]]>
Static doesn’t mean that the website never changes. It just means that all the content on every page - the text, HTML, styling - is static at any given time.
The amount of code that runs in your browser while looking at this blog is either zero, or minimal. (I use MathJax to render formulas on some of the technical posts. That’s it.)
When I make a styling change, or write a new blog post, I regenerate all the pages, along with the menus and links. I use a tool called Jekyll to do this. I then re-upload them to a server using a shell script.
This blog is a static website. I publish a new post maybe once every few weeks, so this works well.
Facebook is not a static website. They don’t regenerate all the HTML every time someone makes a new account or types a new comment, because that would be insane.
Wordpress is not static either. This is why most Wordpress websites feel slow, along with all the trackers, popups, and marketing junk that most people throw into them.
Three reasons:
Because the current tools available for making them require a certain amount of technical handiness, and alot of folks just don’t have the time or willingness. That’s why Wordpress blogs are so common, and this is 100% fair.
Here are my favourite stacks for creating clean, fast, and beautiful blogs.
The table goes from simple/fast to heavy-duty/”slow”.
(When I say “slow”, I’m still talking way better than the average Wordpress site which is laden down with trackers, plugins, and bloat.)
You want... | Consider... | Notes |
---|---|---|
A simple 1-3 page site | Github Pages |
|
A no-nonsense blog focused on text | Jekyll |
|
Full design flexibility of React, manage posts via CMS | Contentful with react-static |
|
Lately I have been wondering: did every web development agency in the world get the same memo, instructing them to make all blogs look like this?
They all seem to be following the same playbook:
There’s nothing horribly wrong with this, and for the most part the content is still good. (That’s a great recipe for ramen eggs).
But it’s not a particularly enjoyable experience. Do we really want the internet to look like this? Is the future of individual content doomed to be cookie-cutter blogs from the same Wordpress factory, chock-full of Amazon affiliate links and click funnels?
A corner of the internet that has mostly avoided this bandwagon is blogs from engineers, creatives, and technically minded folks who build things.
Here are some of my favourite blog posts. They are noteworthy not only because they contain great content, but because the pages that serve them are not particularly awful to read or to look at:
Of course, some of these blogs are still trying to sell you things - their VC fund, their e-book, their consulting firm, etc etc. But it feels like a long game. I can show up on the page and get the value that I was looking for - such as emotional catharsis about the bullshit nature of most LinkedIn posts, or the destructuring syntax that I forgot. No strings attached, no being assaulted by popup modals or irrelevant product recommendations.
I won’t fault anyone for going with Wordpress, especially if they are not technically minded. It is still the fastest and easiest way to spin up a blog if you don’t know how to code.
But that’s about it. Wordpress sites are slow and ugly. When you fill them with ads and marketing funnels up the wazoo, the entire thing takes on a very questionable moral color. The internet already feels pretty fake. Such blogs only add to it.
I dislike such blogs for the same reason that most people dislike multi-level marketing schemes (i.e. “selling Avon”). Friendship is a respite from the transactional nature of the world; thus it is especially disheartening when a “friend” messages you to “catch up”, and you discover that it’s only because they were trying to sell you something.
Likewise, I love seeing the genuine enthusiasm and creativity of someone who has the same hobbies as me. If I want to make the best tuna casserole in the world, I’d love to read about it from someone who has a killer family recipe. When such a page turns out to be a thin shell of content that was generated solely for the purpose of selling me Utz potato chips in the ingredients list, I feel quite duped, and slightly angry.
Don’t get me wrong - I sell things from this blog too. I write about things that I have made and I provide links to buy them on Etsy or Gumroad. But I try to be transparent about it, and I try to provide real information in the post itself, regardless of whether someone chooses to buy an item.
I once had a friend tell me that she was thinking of starting a blog, but wasn’t sure whether or not to do so because the market was already so flooded.
It’s not. The market is flooded with blogs of this fakey, ad-filled, bullshit nature. The market is not flooded with authentic, high quality content on clean pages.
So go ahead and make your blog. The world can always use one more genuine voice in the middle of all this trash.
]]>This post is an extension of an answer that I wrote for a CrossValidated StackExchange question which asked someone to explain Gaussian Discriminant Analysis at a high-school level.
I really like the ELI5-type framing for questions in general, as I find that machine learning textbooks tend to trade off understandability for the layman in favour of precision. While the following may never pass muster in a proof, it was how I personally wrapped my head around the idea of GDA.
I’m going to elaborate on my answer here.
Andrew Ng’s notes on GDA and generative learning algorithms are the best formal explanation that I have seen of the concept, but I want to “try to explain this for someone at a high-school level” as requested (and relate it back to Andrew’s notes for those of you who care for the math).
Imagine that you have two classes of things. A class is just a category. Describe one class as and one class as . I.e. if we are talking about classes of fruit, then could be , and could be .
You have a datapoint that describes an observation of one of these things out in the wild. Say you go to the supermarket and see an apple, and you record some data about it. What might you record? Perhaps:
It can be a collection of any attributes that can be measured, in whatever units you like, and you can measure as many things to describe an as you like. You could also measure the grams of sugar in the apple, the number of bruises on it…whatever your imagination might come up with.
However, if we’re using GDA, the thing that you’re measuring should be normally distributed. Why? We’ll come back to that.
(But this means you shouldn’t define color in a way such as , , , . There is no reason why color values, defined in such a way, should be normally distributed among all apples.)
Say we stick with the example above and measure these 4 different things to describe an . Then we say that our is 4-dimensional. In general we say that is -dimensional.
An observation could be, then:
In shorthand we describe this specific apple observation as:
Every time we see an apple, we can record it by writing down such an . We’ll observe , , …etc etc.
We can also average over all our observations of x to come up with a . This describes the average apple on all these dimensions, within the context of the apples that we have seen.
And we can do this same exercise for oranges. Bear all this in mind for the next part…
Here’s the model of GDA from Andrew’s notes:
Let’s translate these lines into plain English:
is the chance that a fruit is either an apple or orange .
This chance can be described as an unfair coin-flip, and is the chance of us getting heads. We’ll say for the sake of argument that heads represents apples; then .
(You could just as easily have heads represent oranges, but then ).
Why an unfair coin flip? Well, it should represent something about the nature of the underlying process that generates fruit in our world. Perhaps we live in a world where we only grow apples and oranges, and orange farms are a little bit more popular than apple farms. In fact, there is a 40% chance that any given fruit is an apple, and therefore a 60% chance that any given fruit is an orange. We write this as:
and
This reads, “given y is 0, x would then be distributed Normally with mean = and a covariance matrix of .
Let’s break that down.
Given y=0 (we know the thing is an apple), its typical measurements (the stuff we agreed to measure in ) are normally distributed according to and .
We all have a pretty good intuition of the bell curve from high school stats, but here’s the little mental hump that you have to get over: normal distributions can exist in more than 1 dimension!
This is precisely what is describing. Recall from above that it contains 4 numbers, describing average price, diameter, weight and colour.
This is a 4-dimensional normal distribution that describes the average apple.
Likewise, is a 4-dimensional normal distribution that describes the average orange.
I will assume here that you have some intuition of what a covariance matrix is.
If not, here’s a very fuzzy explanation. Think of it as a x grid, where the 4 dimensions are written out across the rows and columns. Where and intersect, there will be a number describing how these two things are related:
In the case of apples, we probably expect the covariance between weight and diameter to be positive. Large apples generally weigh more.
Aside: astute readers may observe that there are actually two places where weight and diameter intersect in this table, and they will have the same value. This is consistent with the fact that a covariance matrix is always symmetric across its main diagonal.
Note that in Andrew’s model, he had separate for apples and for oranges, but he uses the same for both fruit. (Well, Andrew doesn’t refer to any fruit, but we’re using them as a convenient mental device.)
This means that in our model, we have the flexibility to allow for the possibility that apples and oranges have different mean prices, weights, diameters, and colours. This makes sense intuitively: oranges are usually a little bigger, apples tend to be redder, etc.
But by using the same , we assume that the way those dimensions relate to each other is the same regardless of fruit. I.e. if heavier apples tend to be bigger apples, then heavier oranges also tend to be bigger oranges.
Furthermore, we assume this is true to the same proportion for both fruits - i.e. if an apple that weighs 2x the average apple more tends to have 1.5x diameter, then an orange that weights 2x the average orange tends to have 1.5x diameter as well.
Again, for apples and oranges, this seems pretty reasonable. But this is not an inherent property of GDA. You can absolutely set up a model with separate and .
(More on this in the footnote.)
Flip a unfair coin that determines if something is apple or orange, to represent the underlying commoness of apples and oranges in the world.
Then, based on the fruit that we got, go to d-dimensional Normal Distribution 0 characterized by , or Normal Distribution 1 characterized by .
Sample a datapoint from that distribution. This is akin to actually observing an apple or orange out in the real world.
If you repeat this many times you’ll get a ton of datapoints in 𝑑-dimensional space. You’ll have seen a bunch of apples and a bunch of oranges, and you can plot their prices/weights/diameters/colours on a d-dimensional graph.
The distribution of this data, provided we have enough of it, will be “typical” of the underlying process that generates apples and oranges in our world.
(Hence why his note is called “Generative Learning algorithms”!)
I give you a bunch of data instead, and I tell you that it was generated in such a fashion, but you can’t be sure which are oranges and which are apples.
You could then play around with different combinations of values in , , and until you get a model that “fits” the data you’ve observed.
If our model assumptions are reflective of reality, and our model fits the data well, we assume that this model is pretty reflective of the real underlying forces that determine how apples and oranges show up in our world. In machine learning parlance, we are trying to model the data generating process.
If we have the (price, diameter, weight, colour) of an unknown fruit, and are asked to guess whether it is apple or orange, we can run this exercise:
The one with the higher probability will be our guess for the mystery fruit’s identity. In machine learning jargon we call this a prediction!
(The specifics of how to do this are in Andrew’s notes, if you are curious).
Footnote: When we assume that is the same between classes, we have a special case of GDA called Linear Discriminant Analysis, because it results in a linear decision boundary (see pic below from Andrew’s notes):
This assumption does not have to hold. GDA describes this exercise in the most general case, when can be different between classes.
If you repeatedly call a Redux action and are boggled by the fact that the action isn’t actually being dispatched, make sure you aren’t just importing and calling the action creator. You need to either call dispatch(someActionCreator())
explicitly, or bring the action in via using mapDispatchToProps
on a component. This adds a wrapper function to props
on that component which has dispatch()
built in.
The first time I saw this usage of mapDispatchToProps
(aka react-redux’s object shorthand form) in someone else’s code, I was very confused because I never saw an explicit call to dispatch()
anywhere. It seemed to be magically dispatching all on its own.
Here is an example from the code for a project of mine, xpromo.poddinglabs.com.
The action creator that I am using is called setFilterPodcast
:
PodcastCard.js (a component)
...
import { connect } from "react-redux";
import {
getPodcastQueryRequest,
setFilterPodcast } from "../../actions";
...
const PodcastCard = (props) => {
const { setFilterPodcast } = props;
...
}
// https://react-redux.js.org/api/connect#object-shorthand-form
// Bind action creators to dispatchable functions in props.
// i.e. adding getDataRequest here will create
// this.props.getDataRequest() for the component, which dispatches this action
const mapDispatchToProps = {
setFilterPodcast,
};
export default connect(null, mapDispatchToProps)(PodcastCard);
(Note that here I do not need a mapStateToProps
for accessing any part of the store, so I pass in null
into the first argument of connect()
.)
../../actions/index.js
import { DataTypes } from "./data";
import { FilterTypes } from "./filter";
export * from "./data";
export * from "./filter";
export const Types = {
...DataTypes,
...FilterTypes
};
../../actions/filters.js
// DEFINE NEW ACTION TYPES HERE
const Types = {
SET_FILTER_PODCAST: "set_filter_podcast",
};
export const setFilterPodcast = (podcastName, podcastTags) => ({
type: Types.SET_FILTER_PODCAST,
payload: {
podcastName,
podcastTags
}
});
export const FilterTypes = Types;
A very easy mistake to make - and I have done this several times and yelled at the computer for hours - is to simply import the action creator, setFilterPodcast
, and then call that directly.
You won’t get any errors if you do this, because it is a valid function.
But of course, your action won’t dispatch, and you’ll be left scratching your head, wondering why your action didn’t have its intended effect.
Lastly, I suggest using redux-logger as middleware in your dev environment, which will kick out useful info about store updates in your console. This makes it incredibly obvious when an action is not dispatching at all.
Here’s an example of how I use it in my store setup, alongside redux-saga
:
store.js
import { createStore, applyMiddleware } from "redux";
import createSagaMiddleware from "redux-saga";
import logger from "redux-logger";
import reducers from "../reducers";
import rootSaga from "../sagas";
// create the saga middleware
const sagaMiddleware = createSagaMiddleware();
let middlewareList;
if (process.env.REACT_APP_ENVIRONMENT === "production") {
middlewareList = [sagaMiddleware];
} else {
middlewareList = [sagaMiddleware, logger];
}
const store = createStore(reducers, applyMiddleware(...middlewareList));
// then run the saga
sagaMiddleware.run(rootSaga);
export default store;
And you’ll get useful output as follows when an action dispatches to alter the store:
I think most institutions are shit.
Families are shit, companies are shit, governments are shit. Most parents love their children and hope for the best for them more than anyone else in the world ever will. People don’t even wish your children ill; they are simply indifferent to whether they win Wimbledon or roll into a ditch. Most founders love the idea of their company more than any of their employees ever will; most managers love their own comfort and career aspirations more than they love their teams. Most politicans love themselves far more than they love the abstract idea of their country or their values. Even religion and cultures can’t keep hold. Priests grapple with their own emotional turmoil and allow it to override the morals they claim to have dedicated themselves to. Most activists and people with strong moral judgements are hypocrites of one kind or another. We all kind of suck.
The best institutions that we’ve been able to come up with so far - democracy, free markets - are simply ways of organizing this self-centeredness and selective blindness to our own flaws in ways that result in the least amount of death and violence.
Of course, this is all for good reason. History is the ugly story of broken institutions banging into each other, running the gamut from well-intentioned hubris to downright murderous intent, with the resulting outcomes being impossible to tell apart in many cases.
One thing I’ve been told repeatedly in my career is that I don’t start with trust, which then leads to anger, a questioning of everything, and a lack of ability to buy into the idea of the company. This would not be a concern in and of itself, but is problematic for what then fails to manifest: a relentless fervour for work which rises above all other competing priorities. I assume that most managers are incompetent because they care more about the banal and petty circle of their own well-being - and perhaps that of their immediate family - than they do about shaping the organization that dictates so much of my conscious life. I assume that every rung of hierarchy is motivated to extract as much value as possible from the rung underneath it, within the constraints of maintaining the status quo. A company does not provide you with dinner and health insurance because you are family to them. A company provides this because you are a free market agent and if they are not careful, you will leave to go work elsewhere.
I once read a paper on inter-generational trauma in children of first-generation Chinese immigrants living in Western Canada. In simple terms, the Communist party fucked up their parents, and then this kind of fucked up the kids. You can’t help but feel angry when you read something like this. For a real exercise in feeling pointlessly angry at the stupidity of human consciousness, check out Yang Jisheng’s Tombstone - the story of the Chinese famine from 1958 to 1962, when a spectacularly dysfunctional set of humans with terrible ideas starved 36 million people to death. Imagine the respect and admiration that we have for say, Semmelweis or Pasteur for their contributions to the germ theory of disease. Isn’t it so cool that the work of a few motivated people could enable so many more generations to live, find small enjoyable hobbies, flirt with cute baristas, fall in love, marry, have kids, assemble Lego cars, and enjoy peaceful Sunday mornings at the zoo? Now take that ever-expanding circle of love and invert it into itself, turn it all dark and stupid and nasty. Isn’t it amazing that the thoughts of one asshole of a man (whose picture still hangs above Tiananmen) could fuck up so many endless generations into the future?
When you are embroiled in dysfunctional institutions as a child, the optimal strategy - indeed, one that may be necessary for survival - becomes to question and undermine the supporting structures of that dysfunctional institution. The highest survival rates during the famine were found in the families of party officials, and among the families of kitchen staff - a statistical anomaly that should not have arisen if we assume that they all been living loyally by the maxim of “to each according to his needs”. Note that the pinnacle of economic and cultural success in China, even to this day, is not to climb to the top of the Chinese economic and cultural hierarchy, but to escape it - to make enough money within the constraints of this ugly Communist-market hybrid monster to buy a one way plane ticket to (insert Western liberal democracy of choice) and never look back. Even if that means going from being a doctor to cleaning hotel rooms. Better to live on your knees than to die on your feet, right?
If you grew up with emotionally unskilled parents, questioning intent and pushing back on demands for your investment (emotional, financial, or otherwise) is not only a wise thing to do, but necessary. (Though you also can’t hold it against someone for being emotionally unskilled if their primary concern as a child was to not starve to death, just as it is unreasonable to expect someone to be charming at a dinner party if they spent their childhood with no control of their vocal cords). Anyone who blindly accepted CPC ideology in 1950s China would have worked themselves to death, and 36 million did. Likewise, blind acceptance of parental beliefs and “wisdom” - when the parents dispensing said wisdom are dysfunctional themselves - would be emotional seppuku. Check out some of the stories in r/RaisedByNarcissists or r/AsianParentStories. Sure, some of them are the grumpy ramblings of a 12 year old who just wants their curfew to be later. But some of them also describe emotionally incompetent behaviour that, if manifested in friend or partner, would be immediate cause for severing the relationship. And indeed that is what many do. The problem, however, is that once you learn emotional relief can be had by simply distancing yourself from one set of humans, you start trying that trick with pretty much everything else - and that is a quick path to loneliness.
Turning away from a dysfunctional institution in favour of more functional ones is a recipe for recovery and growth; turning away from functional institutions that sometimes manifest flaws is a recipe for nihilism and isolation. The struggle of being a low-trust, low-faith person is that you often cannot see the difference.
Western liberal democracy is a high-trust society, and its actors - whether companies, families, or a hopeful date that you met on Tinder - are constantly looking for investment. If you want to be an emotionally impenetrable asshole who doesn’t form bonds because you’re actually scared shitless inside, nobody is going to stick around and try to melt through your layers of ice. There are too many fully-thawed, perhaps never-frozen, emotionally healthy folks out there who are ready to go all-in and build things. They are psychologically skilled and considerate. They have endless depths of patience and a heart as big as the sky. They understand the value of a relationship. They can appreciate the little beautiful things in life because they aren’t so wrapped up in themselves. They are the real winners of Western liberal democracy, and they represent the best of us.
What would it cost to join them?
]]>Quick links
Since Loki came out a few weeks ago, my partner and I instantly wanted the ‘VARIANT’ jacket that Mobius hands to Loki at the beginning of episode 2:
It’s not surprising that Tom Hiddleston can pull off that most finicky of fashion statements - the popped collar. Whether it’s a waistcoat, a perfectly tailored suit, or a tasteful skinny tie, Loki has a way of looking good in all of them. Who knew dress scarves were a thing? And why don’t more men wear them? The God of Mischief may not be the strongest Avenger (or even an Avenger at all), but he sure seems like the most dapper one:
I was an enormous fan of the X-Files growing up, and have always had a soft spot for what you might call the vaguely ’80s / 90’s FBI bureaucracy’ aesthetic. Those of you in Toronto may have even noticed that the TVA library bears a funny resemblance to the Toronto Reference Library which was built in 1977:
So yes, Loki’s crisp new field jacket was right up our alley. Onto the make!
(BTW, there are no affiliate links in this post - I think they compromise the integrity of how-to blogs. If you find this post helpful and want to say thanks, you can pick up a ready-to-iron vinyl on Etsy, or the digital files on Gumroad!)
I had trouble figuring out what color the jacket was, given the show is bathed in a lovely retro sepia tint. Is it light beige? Dark beige? Brown? Grey? Khaki? You can find myriad examples of all shades from Etsy makers and costume shops.
My partner and I decided it was something like a brown/grey khaki green. This is a loose opinion, loosely held. Anything kind of government-y/bureaucratic-looking will do. Onwards.
For detailing, we can notice that it has:
Update: the folks on this thread at RPF have done a fantastic job figuring out that the one used at the Disneyland Avengers Campus seems to be the discontinued Filson Lightweight Supply Jacket, which you can obtain on eBay for a cool ~$300. It looks like they removed the drawstring, which may be practical but not very attractive:
Kudos to the Marvel costume makers for putting together a great jacket which looks deceptively banal, because it is not! I searched for hours and it’s actually a very hard combination of features to find in a single garment. The lapels and double welt pockets are very blazer-like, but the other features are more commonly found in an outdoor hunting jacket.
After scouring Aliexpress, Shein, H&M, Uniqlo, Old Navy, The Bay, Mark’s Work Wearhouse, and Walmart, I finally landed on these reasonably priced facsimiles for me and my partner:
Do note that these are not 100% screen-accurate - these do an 80-20 job in terms of being close enough and not crazy expensive. In particular, the men’s jacket has elastic cuffs and feels more like a light raincoat. The women’s jacket is…honestly just very cute:
This is the most important thing to get right! I can never understand why someone would go to the trouble of creating a costume version of this and then use something like Arial or Times New Roman. The fun is in the details!
I used fontsquirrel.com/matcherator with a screengrab, which suggested Franklin Gothic FS Compressed or Franklin Original Condensed Extra.
Any version of Franklin in compressed or condensed form will probably do. I went with ITC Franklin Gothic LT Pro Demi Compressed, because it’s included with Photoshop. The top of the A is a touch narrow, but otherwise I think it looks pretty bang on:
If you have a Cricut, you will cut these letters out of HTV. If not, you could print onto a plain sheet of paper, cut the letters out as a stencil, and then trace onto the HTV and cut by hand.
Alternatively you could simply use a normal inkjet t-shirt iron on.
Yes, I was curious myself - any chance this was simply the Marvel logo font? Close but no dice. The Marvel font is Benton Sans Compressed Black. See for yourself:
Next let’s look at a closeup of the TVA logo on the jacket, which is another detail that sometimes gets fudged in buyable costumed versions:
We’ll do a Google search for “time variance authority logo circle” - and our best bet is this image from some (hopefully authorized) Walmart merch:
We’ll load it up into Photoshop. Assuming the crest will be about 3 inches in diameter, and we want to print at 600dpi for quality, we’ll need the image to be about 1800 x 1800px.
Blowing up to this size we get some very blurry edges, so we’ll clean it up as follows:
Looking good!
I’ll be cutting this on orange HTV using a Cricut, so I’ll leave the negative space transparent and export as an .svg. Interestingly, Cricut Design Space seems to have a bug in its .svg handling, and I’ve written a whole other post on that here.
To speed up the Cricut and smooth all the cuts into as few vector curves as possible, I opened this up in Illustrator and re-traced the paths using the pen tool. If you’re not good with Illustrator’s pen tool, you can absolutely skip this step - the cut will come out just fine. It’ll just take a bit longer because the Photoshop-generated path may contain micro-wobbles (which are all but invisible against the texture of your fabric anyway):
Cutting all these details by hand on a t-shirt transfer could be tricky. If you don’t have a vinyl cutter, I suggest filling in the “background space” with a brown-y green colour that looks similar to the jacket.
To find the right brown and orange to match the jacket and the HTV, you could print some swatches ahead of time on plain paper and compare them. If you do this on inkjet transfer paper, remember that it gets darker after ironing!
This was my first time using HTV on a Cricut, so I did a test run on an old pair of sweatpants to find the right settings. You don’t need any fancy weeding tools - a scalpel and a sharp pair of tweezers will do. I think it turned out pretty well!
These are the settings I used:
My women’s jacket from Old Navy arrived first, so that’s the first one I put together.
I recommend printing the words and the little TVA logo out on plain paper, cutting them out, and arranging them on your jacket with tape before you commit to actually cutting them on vinyl. This helps you get a sense of size and placement, and you can mark the appropriate position with chalk or a white pencil:
Doing the letters got a bit tricky because the max length of the orange vinyl that I bought was 30cm, and I wanted the entire “VARIANT” word about 35cm wide on this jacket. It will be even wider on my partner’s.
The solution was to split the cut up into two pieces using the Hide Contour option in Cricut Design Space. I’d just have to take care to line the letters up while ironing:
Here are some close ups of the texture of the vinyl after ironing. Note that in the process it’s easy for one of the small inside pieces of the A’s or R’s to fall out. Here, I had to patch in a small piece:
I think this worked out well as a cute women’s adaptation, even if it isn’t quite “canon” in terms of material or structure:
And I think the seal looks pretty bang-on!
I did want to go for 100% screen accuracy with the men’s jacket, and with the Filson being all but impossible to find, in an upcoming post I will talk about using a pattern to sew one from scratch. Stay tuned!
P.S. if you want to make this and don’t want to do the .ai or .psd work yourself, you can purchase a ready-to-iron vinyl, or get the digital files :)
]]>