Skip to content

Instantly share code, notes, and snippets.

View michaelrkn's full-sized avatar

Michael Kaiser-Nyman michaelrkn

View GitHub Profile

This blog post builds off the ideas started by Preston Sego, Dan Gebhardt, and many others.

Moving Past Controllers

It's been really exciting to see Ember turn a new page with its move towards modern JavaScript and slimming of its API surface. Routes rendering a template that is backed by a controller remains the most obviously clunky part of the Ember API. Getting consensus on moving query parameters and having routes load components will give us an API that we don't have to make excuses for (especially in conjunction with Component Templates Co-location).

This might go without saying, but as part of this change, the loading and error substates should render components, rather than templates.

Continuing Through the Hierarchy of Skepticism

Address the Hierarchy of Skepticism

Like most Ember developers, I want to see Ember's marketshare and mindshare grow in 2018. At EmberConf 2017, Tom presented the Ember Hierarchy of Skepticism:

  1. Metamorph Tags/ {{bindAttr}} (addressed!)
  2. No Documentation (addressed!)
  3. Custom Object Model
  4. Big File Size
  5. Monolothic
michaelrkn /
Created November 18, 2015 23:41
package com.example.michael.forecaster;
import com.squareup.okhttp.Call;
import com.squareup.okhttp.Callback;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
public class Forecaster {
public void fetchForecast(int zip, Callback callback) {
michaelrkn / if.rb
Last active August 29, 2015 14:04
implement if, then, and else as methods
class Object
def _if(object)
object.class != FalseClass && !object.nil?
class TrueClass
def then
killall Terminal Google\ Chrome Sublime\ Text\ 2 Remote\ Desktop\ Message Finder
cd ~
find . ! -name .rubies ! -name .gem ! -name .Trash ! -name Code ! -name Desktop ! -name Documents ! -name Downloads ! -name Library ! -name Movies ! -name Music ! -name Pictures ! -name Public -maxdepth 1 -type d -print | xargs rm -rf
rm -rf ~/Code/* ~/Desktop/* ~/Documents/* ~/Downloads/* ~/Movies/* ~/Pictures/* ~/Public/*
rm ~/*
require "action_controller/railtie"
class TheSimplestRailsApp < Rails::Application
config.secret_token = "ef224177dc6ddcaabffafdbaa50cdb173eb744932073d"
config.eager_load = false
routes.draw do
root to: "hello#world"
michaelrkn / say_smaller.rb
Created September 3, 2013 18:18
a simple example of recursion
def say_smaller(word)
if word.length > 0
word + " " + say_smaller(word[0..-2])
puts say_smaller("piglet")
def factorial(number)
(1..number).inject(&:*) || 1
michaelrkn / spacing.js
Created August 10, 2013 20:31
epicodus javascript spacing guide
// include a space after most keywords (eg var, if, else, for, return)
var foo = "bar";
// include a space around operators
foo === "bar";
foo += "qux";
// put a space after most closing parentheses
// indent within if statements
michaelrkn / js-cheat-sheet.js
Created August 10, 2013 20:13
js cheat sheet
// assign a variable to something - use the `var` keyword
var myVariable = "i love variables";
// change the value of an existing variable - don't use `var`
myVariable = "i REALLY love variables";
// change the value of a variable in place
myVariable = myVariable + " - don't you?";