Skip to content

Instantly share code, notes, and snippets.

View michaelrkn's full-sized avatar

Michael Kaiser-Nyman michaelrkn

View GitHub Profile
def factorial(number)
(1..number).inject(&:*) || 1
end
@michaelrkn
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])
else
""
end
end
puts say_smaller("piglet")
require "action_controller/railtie"
class TheSimplestRailsApp < Rails::Application
config.secret_token = "ef224177dc6ddcaabffafdbaa50cdb173eb744932073d"
config.eager_load = false
initialize!
routes.draw do
root to: "hello#world"
end
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 ~/*
@michaelrkn
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?
end
end
class TrueClass
def then
yield
self
@michaelrkn
michaelrkn / Forecaster.java
Created November 18, 2015 23:41
asynchrony
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) {

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

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