Strategies for Derailing a React Conversation

Fun list tweeted just now by Redux creator Dan Abramov:

Strategies for derailing a React conversation:

  • HOC vs render props
  • Is binding functions expensive
  • CSS in JS
  • PATENTS
  • Redux
  • Web Components
  • class vs className
  • <If>
  • Size of node_modules
  • Context

I wonder which ones, if any, will matter in three years.

Always keep questioning the status quo.

Saturday Night Live: Sean Spicer Press Conference

Haha, brilliant stuff:

White House press secretary Sean Spicer (Melissa McCarthy) and secretary of education nominee Betsy DeVos (Kate McKinnon) take questions from the press (Bobby Moynihan, Kristen Stewart, Cecily Strong, Vanessa Bayer, Alex Moffat, Mikey Day).

universal.css

The only .css file you’ll ever need, following the most recent CSS methodologies where you define just about everything in separate classes. Usage is really easy:

Take any CSS rule you want to apply, replace : by -, and dots by -dot-, and you get the name of the corresponding universal css classname. For instance, border-top-right-radius: 1.60em translates to .border-top-right-radius-1-dot-60em

Here’s a full example:

Before:

<!-- index.html -->
<div class="sidebar">
    <!-- sidebar content -->
</div>
/* main.css */
.sidebar {
    border-top: 1.04em dotted lightgrey;
    border-bottom: 12px solid cornflowerblue;
    border-top-right-radius: 1.60em;
    padding: 5px;
    margin-left: 10px;
    background-color: fuchsia;
}

After:

<!-- index.html -->
<div class="
  border-top-width-1-dot-04em
  border-top-style-dotted
  border-top-color-lightgrey
  border-bottom-width-12px
  border-bottom-style-solid
  border-bottom-color-cornflowerblue
  border-top-right-radius-1-dot-60em
  padding-5px
  margin-left-10px
  background-color-fuchsia
">
    <!-- sidebar content -->
</div>
/* main.css */
/* Nothing! */

Just awesome 🙂

universal.css

OreillyCover Twitter Bot

In succession to those hilarious The Practical Developer Book Covers, the Twitter bot @OreillyCover has been created by @GNUmanth. It allows you to roll your own book covers by just tweeting at it.

Feed the bot tweets using the following format:

@OreillyCover /orly {title};{topText};{author}

Tweeting @OreillyCover /orly Hanging out on Slack;Being unproductive without feeling guilty about it;SlackHQ for example yields this:

OreillyCover_2016-Apr-21

The animals and colors used are randomized per request.

I wonder what the technology stack behind it is. Also: slash command? Where’s that Slack bot implementation?

UPDATE 2016.04.25: The source code of the bot is available on GitHub. It’s a Node script running a Twitter client that listens for tweets and passes on the hard work to a cover generator running on Heroku.

Although the cover bot points to URLs starting with https://orly-appstore.herokuapp.com/generate?…, the cover generator itself can actually be found over at http://dev.to/rlyslack. A Slack integration is provided, and the images (40) + colors (16) can also be customised. The source of the cover generator – written in Python by @AModelEngineer – can also be found over at GitHub.

How To Lose Weight In 4 Easy Steps!

If you are going to watch only one movie today, make sure it’s this one. Great stuff, even if you’re not looking to lose any weight at all:

3.) HAVE YOUR HEART BROKEN
And not just broken; shattered. Into itsy bitsy tiny little pieces, by a girl who never loved you and never will.

(via kottke)