Soylent: What Happened When I Went 30 Days Without Food

http://thehustle.co/soylent-what-happened-when-i-went-30-days-without-food

Soylent exists for efficiency. I can appreciate that. Like I said, it’s been useful. But for me, maybe for most, the implementation of Soylent most likely hints at a lifestyle of overwhelming work… whether we realize it or not. The process of eating solid food creates space, breathing, and slowness. It creates perspective.

https://github.com/rstacruz/rscss

RSCSS BEM SMACSS
Component Block Module
Element Element ?
Layout ? Layout
Variant Modifier Theme & State

Codestyle additions

Favor map() over forEach() when you can. Avoid side-effects.

Favor Array.from(...) instead of [].slice.call() to create array from array-like object

Defaults in ES6 destructuring assignment

const { msg = 'Hi' } = this.props`

Node v4.0.0 (Stable) | Node.js

https://nodejs.org/en/blog/release/v4.0.0/

V8 v4.5
44 collaborators, 15 from Technical Steering Committee (TSC)

  • block scoping (let, const)
  • classes
  • typed arrays
  • generators
  • promises
  • symbols
  • template strings
  • collections (Map, Set, etc.)
  • arrow functions

regular release cycle

Javascript variables as keys for objects

Called Object Literal Computed Property Keys
http://wiki.ecmascript.org/doku.php?id=harmony:object_literals#object_literal_computed_property_keys

let foo = "b"
let obj = {
  a: "A",
  [foo]: "B"
} // => { a: "A" b: "B" }

http://eslint.org/blog/2015/09/eslint-v1.4.0-released/

CLI globs eslint lib/**/*.js

!!! Autofixing --fix

New rules:

  • jsx-quotes
  • require-jsdoc
  • global-require
  • no-restricted-syntax
  • space-before-keywords
npm i eslint@1.4.x
./node_modules/.bin/eslint app/scripts/**/*.jsx --fix

I experienced errors like TypeError: Cannot read property 'text' of null. To find a culprit:

for f in app/scripts/**
do
  if [ ${f: -4} == ".jsx" ]
  then
    print "=== $f ==="
    ./node_modules/.bin/eslint $f --fix
  fi
done

Found out that there is ES6 Called Object Literal Computed Property Keys in one file. Needed to install and use babel-eslint

npm i -S babel-eslint

Add to .eslintrc

{
    "parser": "babel-eslint",

GetExpert/redux-blog-example

https://github.com/GetExpert/redux-blog-example

Why filename webpack.config.babel.js?
Enable Babel compilation when running webpack from CLI

.babelrc

{
  "stage": 0,
  "optional": ["runtime"]
}

.eslintrc can be in YAML

There is dev-server.js

Interesting dependencies:

  • axios - HTTP client with promises, like Angular $http
  • json-server - API mock
  • key-mirror - simplify creating constants
  • react-mixin - mixins in react with es6 style classes
  • react-redux
  • husky - Prevents bad commit or push

index.html

<script>var __INITIAL_STATE__ = <%= initialState %>;</script>

https://beyondpricing.com/

Dynamic Pricing Tool for Airbnb

http://daringfireball.net

something you don’t offer is a terrible idea, until you offer it yourself, at which point you explain why your solution is the first to get it right.

http://hovercards.com

Inline preview of links to social media