Avatar

Kyle Logs

@malectro / malectro.tumblr.com

I am an engineer of sorts with a thing for the aesthetic side of software. I mostly talk about code, sound, and design.
Avatar

I Fixed HTML5 Video

snippet

const videos = document.getElementsByTagName('video'); Array.prototype.forEach.call(videos, video => { video.addEventListener('error', () => video.load()); });

Avatar

The Promise Point

The biggest misuse of promises in JS is when you write this:

action1().then(() => { return action2().then(() => { return action3(); }); });

when you would be writing this:

action1().then(action2).then(action3);

Avatar
Knowing the solutions lets you sequence-break. Replaying the game, I can skip those instructional rows of puzzles and go right to the door. The game has changed me, put something in my brain I didn’t have when I first played it. I didn’t get some virtual ice beam, nor did I unlock a grappling hook or wingsuit. I learned something.
  • Stephen Totilo, on the confoundingly gorgeous game, The Witness
Avatar
Past research by Dweck and others shows that people tend to hold one of two views about their own personal qualities: that they are fixed over the lifespan, or that they are malleable and can be developed at any point. These beliefs impact how people respond to setbacks. For example, when people consider intelligence to be something fixed, they’re less likely to persist in the face of failure than people who believe that intelligence can be developed.

http://www.theatlantic.com/health/archive/2016/01/romantic-rejection-and-the-self-deprecation-trap/424842/

I'm not going to vouch for this article, but I agree with the main point. It's why I'm strongly bothered by horoscopes and Myers-Briggs types. Convincing people that they have a static nature prevents them from participating in the uniquely human ability to learn, grow, adapt, and transform.

Avatar
Whiteness is not a kinship or a culture. White people are no more closely related to one another, genetically, than we are to black people. American definitions of race allow for a white woman to give birth to black children, which should serve as a reminder that white people are not a family. What binds us is that we share a system of social advantages that can be traced back to the advent of slavery in the colonies that became the United States. ‘‘There is, in fact, no white community,’’ as Baldwin writes. Whiteness is not who you are. Which is why it is entirely possible to despise whiteness without disliking yourself.

http://mobile.nytimes.com/2015/12/06/magazine/white-debt.html

Avatar
“I used to spend ninety per cent of my constituent response time on people who call, e-mail, or send a letter, such as, ‘I really like this bill, H.R. 123,’ and they really believe in it because they heard about it through one of the groups that they belong to, but their view was based on actual legislation,” Nunes said. “Ten per cent were about ‘Chemtrails from airplanes are poisoning me’ to every other conspiracy theory that’s out there. And that has essentially flipped on its head.” The overwhelming majority of his constituent mail is now about the far-out ideas, and only a small portion is “based on something that is mostly true.” He added, “It’s dramatically changed politics and politicians, and what they’re doing.”

http://www.newyorker.com/magazine/2015/12/14/a-house-divided

The consequences of lies are dire.

Avatar
NEUROTIC SENSITIVE GUY IS ALSO SUPER-UNHAPPY A half-hour cable comedy show about a wealthy L.A. or N.Y.C. man who makes his living doing something creative, and is miserable despite having suffered no traumas and having no immediate health problems. If he has kids, they are invoked only as impediments to his sex life. The pilot always involves a child’s birthday party with a bouncy castle, or a clown who breaks character when he’s not around the kids. Deemed brilliant and hilarious, this show usually has no jokes.

yup

Avatar

Emoji I Desperately Need

  1. eyes darting back and forth, suspiciously "yeah... that thing i was supposed to remember..."
  2. eyes twirling in confused spirals "but why? i don't understand!"
  3. look of shivering terror "ewwww, the horror."
Avatar
Aren't there parts of ourselves that are just better left unfed?

DFW gets closer than anyone to communing with our hungry ghosts.

It's a sorrowful Q&A, and one wonders, "with the rise of secular comfort, how will we choose to spend our free time? Will we just gorge ourselves until eternity?"

Avatar

Some stats:

  • 3/4s of white Americans have 0 non-white friends.
  • 70% of millenials (polled by MTV) consider themselves color blind.

Some thoughts:

  • A lot of white children grow up in towns that are almost entirely white, and this is out of their control (mostly). But I still ask, how can people consider themselves "color blind", when they choose to solely hang out with people of their race?
  • And honestly, being "color blind" is just a way of ignoring inherent bias. Shouldn't we be color conscious?
Avatar

Guardians of the Transformers

Last year, I sat down at my desk, scrolled through The Times and found a review of the latest giant robot smash'em'up, Transformers: Age of Extinction. Was this the 3rd film in the franchise? Was it the 4th? I couldn't remember – mostly because I'd only ever caught glimpses of past films on Best Buy demo TVs and had never taken the time to mentally catalogue the plot or characters. I clicked to read, partly to answer my main question, "why was this franchise a thing?", but also to revel in what I hoped to see as a skewering of a sold-out Hollywood. I got what I wanted.

Many hours later toward the end of the day, one of my coworkers turned to me to ask about my coming weekend.

"Are you seeing the movie?" he asked. Still a coworker, he's an extremely polite, smart, and eager team member that is constantly forced to translate new English words and idioms into his native Chinese. What I'm saying is that his day-to-day job is harder than mine.

"Seeing what? The Matrix?" I responded genuinely confused. There was a  company movie night coming up, and all of them came with a sense of retro irony. Maybe it was that?

"Oh," he seemed confused that I didn't get it, "Transformers! Isn't The Matrix old?"

Time freezes. Words fly slowly toward me like eels swimming in jello.

I wrote the above anecdote around when it happened, and since then I’ve read a lot about the Transformers franchise and its pandering to Chinese audiences. Other thinky writers have pointed to bizarre moments of appeasement in many recent blockbusters, and as a reader of such thinky writing, it’s difficult not to see this pandering as lazy on the side of hollywood (which is impossible to refute – we can always do more work), or tasteless on the side of Chinese audiences (which is totally racist and self-elevating).

But what I instead saw in my coworker was pure earnestness. What he wanted was to escape to a world of pristine CGI, where a thin illusion of risk spurred heroes to a climactic goal, not unlike Magic Mountain’s Goliath or a few hours of narrative gaming.

And when, a couple months later, I thought I’d connect with him by bringing up Guardians of the Galaxy, we found more dissonance.

He’d found the plot confusing and the language strange. He admitted that most of the jokes didn’t make any sense to him.

In retrospect it’s not surprising that a movie involving heavy references to western 80s and sci-fi culture, helmed by a hero winking-ly calling himself “Starlord”, further lifted by the very American political, workplace comedy that wrought him, and strewn with verbal puns; wouldn’t really appeal to someone raised on dramatic Taiwanese spectacle that finds The Matrix “old”.

(Imagine trying to explain why "Starlord" is both a funny and apt name for the hero. "Well, he's obviously not the lord of any star in the movie, but it's the sort of name you'd give a comic book villain. So it makes him seem sinister. But he's obviously aware he's not sinister. He's a sensistive hero. Plus it reminds you of the sincere last name of a jedi, which is a sort of warrior monk in space.")

The simplistic fact is that Guardians of the Galaxy is a clever film targeted at a specific affluent, white generation nostalgic for a time of childish opulence and Transformers is a franchise looking for straight, broad appeal. The first is done with wit, the second with visuals.

At it’s best, wit elevates our thinking with insight into human behavior. Much as my adolescent self was introduced to the normalcy and dignity of gay through a goofy (and possibly insensitive) episode of the Simpsons, comedic content can reveal logical and moral inconsistencies without assaulting the audience. Instead of putting up a defensive, argumentative shield, the listener is in on the joke.

But so often it is complexity for the sake of elevation and differentiation, a way of separating the smart, cultured, and cool from the tasteless. It is one of the derogatory definitions of “hipsterdom”, the culture that conveniently sifts the most privileged to the top.

The problem is that it isn’t enough to sort the two. They are inexorably linked in the way the same call of “come this way!” might lead one maze runner closer to the exit and another staring at a wall. It all depends on where in the maze they are. And though it gets more difficult as more people enter the maze, there can be the opportunity to direct them all toward the goal.

(I don’t want to get too deep into the metaphor here, but needless to say “the goal” is whatever we want. For me it’d be “truth”, but all sorts of nefarious isms can foot the bill.)

So what insight does Guardians provide? Not a whole lot it turns out. One could argue that Transformers, despite its broad appeal, actually does harm (a movie about toys treating women like toys) while Guardians sits there looking elitist and benign, but following all the beats really well doesn’t make a film harmless. “The privileged, gifted white guy charming everyone and realizing he’s special” isn’t exactly new or insightful, however clever and fun the jokes are along the way.

Then compare both these films to Fury Road, a film that during a blistering and expensive 2-hour chase scene manages upend the idea of the male savior while simultaneously warming his heart. The patriarchy is the villain, but all men are cordially invited to its downfall.

Or listen to Good Vibrations, a song that sold extremely well all over the world but still manages to fill a whole wikipedia section on its Musical Structure and Style as well as its “legacy”.

In a recent interview on the show, Bullseye, Rob Corddry is asked (facetiously) what it was like to act in a Transformers movie, and he tactfully answers with a description of the work ethic of everyone involved – Michael Bay especially. I doubt there’s much more you can say about a production company that serves films with the efficiency and satiation of fast food, a production company that managed to gross over a billion dollars with its last effort. In any other industry this would be the highest praise.

But there’s a reason the comment feels a little dry. Even from our toy-to-screen adaptations, we hope for more.

I suppose my point here is that broad appeal and witty insight can be difficult to mesh – almost inversely correlated. Broad appeal in and of itself is too often seen as a red flag to the “tasteful” viewer. But in a world where economic comfort and leisure are more and more attainable to people of strikingly different cultures and moral codes; the slapstick comedies and explosive blockbusters, giddy pop songs and soulful ballads, all have the room to connect and elevate us. If only they’d try.

Avatar

Rotate-able Linkbait for All The Emags Out There

  1. Your Astrological Sign Just Changed
  • Everyone loves to forget about Precession and be surprised that it's a thing.
  1. Why Are We Still Following DST?
  • Ideally you'd run this just after Spring Forward and pretend it's a new idea to complain about shifting hours.
  1. Game of Thrones Recap
  • No need for insightful criticism here. Just do a bullet point of the episode and mention that the showrunners have gotten lazy.
  1. When is The Super Bowl?
  • Just make sure you accurately post the time.
  1. Our Oscar Ballot
  • Could possibly include something about how all the nominees are white here.
  1. The Archaic Electoral College
  • How dumb is it, right? It'd only make sense to run this story once every 4 years if not for the extreme length of the contemporary campaign trail.
Avatar

The Kingdoms of Rock

Animals and rocks once lived together, though unharmoniously.

Rocks, being of greater mass and stature, played the bully as the powerful are often want to do. They'd smash herds of organics like a broom sweeping up dust and would roll over frightened organisms while they traveled, unaware of the damage in their wake. You could call them heartless, and you'd be right. We were their insects.

The biggest of them bumped around the oceans in a massive waltz, forcing us to brace for impact whenever they entered a tackle, one lifting the other off the earth, all of us sliding down their backsides.

Thus, we were always on the run. To linger was to become the sole of a shoe, the pawn in a game of chess, or the ball in a sport. We were prey, and they were gods, unconcerned with our plight. It did us no good to breed – we seemed at times an unlimited resource –, but breed we did.

So it was that Ayil begged Soon a single wish, "Let my whole life be lived in an hour. For beyond that, I lack the strength for this world." Soon, laughing at her self pity and thinking the request Animalistic in its stupidity, took the time to weave in such a strain.

And when Ayil's children came, they acted as dust, dispersed and transprent within an hour. It was only when, Soon realized, Ayil finally passed away herself, that her children had multiplied. Each day, whole generations staked claim on its shoulders, easily weathering its clumsy attempts to rattle them off, and we older animals faded behind, unable to cope with such swift competition.

I've tried to conjur the world of the children for myself. Boulders suspended and stacked at the queerest angles must seem to hang like cumulus – stuck in the sky, ignoring gravity, but secretly moving. Pebbles, once eratic and frightening in their numbers, probably sit as piles of tools and toys.

But Soon's attempts at disruption, even in their rarity, surely are felt. A god is a god after all.

Avatar
I was one of the first people to get there, and I walk into his house. And I hear "808s and Heartbreak", which is his album. And I walk in and he's just sitting in his living room bobbing his head. And I was like, "hey, uh, Kanye, are you sitting in your own house, bobbing your own head, to your own music?" And he goes, "yeah, these beats are dope."

Aziz Ansari

This used to be proof of Kanye's egomania, but I totally get it now. Making your own music is so utterly gratifying, why wouldn't you listen to it? No one gets laughed at for eating their own cooking or hanging their own art.

Avatar

The Sad, CSS Absurdity of fadeIn/fadeOut

In the UX world, I’m kindof an old timer. I remember when we did it all with jQuery and called it AJAX, even though AJAX has nothing to do with DOM manipulation or animations. Our dropdown menus would slideUp and slideDown like the tongues of helpful iguanas, and we’d spend hours slicing pngs to to make rounded corners in all the colors of the blueish rainbow.

Now I’m happy to write a few lines of CSS and leave JavaScript with the logic. I still use jQuery (mostly out of habit) but only invoke 10% of its methods. Things like slideUp and hide are easily accomplished with CSS analogues and with far less code.

But what about fadeIn and fadeOut, two of the most useful animations on a designer’s tool belt? I wrote it the other day, and it seemed easy enough.

.item { transition: opacity 0.2s; } .item.hide { display: none; opacity: 0; }

It's so simple. Add the hide class, and the item fades out – except it doesn't. Changing the display style of an element makes it skip any relevant transitions causing the opacity change to be immediate (and pointless). Turns out we have to do hack together a bunch of extra styles to get the desired effect, and the result isn't a good read.

.item { transition: opacity 0.2s, height 0; } .item.hide { opacity: 0; height: 0; overflow: hidden; transition: opacity 0.2s, height 0 0.2s; }

The explanation for why the rendering engine requires this is a fine one, and I won't go into it here. Others have. But I will point out how obtuse it is to make an extremely common effect, one that is easily accomplished with a single jQuery function call $('.item').fadeOut(), so difficult in a version of CSS that can otherwise recalculate measurements and even animate sprites with ease.

Why is this the only avenue in which we've crossed the median and made a U-turn? Am I missing something here?

You are using an unsupported browser and things might not work as intended. Please make sure you're using the latest version of Chrome, Firefox, Safari, or Edge.