instll homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
I think we need to just go download it
REST? Hypermedia? Do I know what I'm talking about? | |
I like to think I'm a smart man. I work hard to understand the technologies I use. Embarisingly I haven't ever really looked into REST. | |
The embarasment isn't that there's a technology I don't know about, there are a lot of technologies I don't know about! There are so many technologies I'll never be able to deep dive into them all. It's embarasing because I don't know a foundational premise for the work I do. I end up working with a lot of APIs, so I'm makeing calls to and fro, making POST requests with JSON and parsing GET responses. I feel like I know what I'm doing when I have all the right verbs in my controller. I can be helpful when I see this: | |
``` | |
class UsersController < ApplicationController | |
def create |
// used thusly `ENV.AppName.varName` | |
module.exports = function(environment) { | |
var ENV = { | |
modulePrefix: 'test-ember', | |
environment: environment, | |
baseURL: '/', | |
locationType: 'auto', | |
EmberENV: { | |
FEATURES: { |
Things We need to do
Code smells, get really good at code smell (brown bag)
All you have to know is the codes smells
make a million new things > mutate objects
Forwardable (delegation)
Don't go on a virtical tangent, instead tiptoe away and finish the horizontal refactor
╔═════════════════╗ ┌─────┐ ╔═══════════════════╗ | |
║ ║ │ YES │ ║ Make the intended ║ | |
───────▶║ Is it open? ╠──┴─────┴──────▶║ change. ║ | |
▲ ║ ║ ▲ ║ ║ | |
│ ╚═════════╦═══════╝ │ ╚═══════════════════╝ | |
│ │ │ | |
│ ┌────┤ │ | |
│ │ NO │ │ | |
│ └────┤ │ | |
│ │ │ |
class Hash | |
def deep_clone | |
Marshal.load(Marshal.dump(self)) | |
end | |
def compact | |
self.select { |_, value| !value.nil? } | |
end |
require 'delegate' | |
module Queries | |
class SomeQuery < SimpleDelegator | |
def initialize | |
super query_hash | |
end | |
private |