Skip to content

Instantly share code, notes, and snippets.

Modularizing Services in Rails

As projects scale, early trade-offs can begin to haunt you, but a "great rewrite" becomes ever more complicated and unlikely. Many larger Rails applications are written to contain every necessary feature, turning even the most distinct concepts and behaviors into one tightly-coupled behemoth.

In this talk, we'll outline a chat application composed of distinct services including:

  • Authorization and session handling
  • Search using ElasticSearch and JSON
  • Persistence API using ActiveRecord
  • Front-end with Ember.js
@tyre
tyre / HateBot.rb
Created May 16, 2012 15:17
Haters Gonna Hate
require 'json'
require 'faraday'
require 'awesome_print'
require 'hashie'
class Gister
attr_accessor :connection
attr_reader :gists
GIT_API_URL= "https://api.github.com/"

Chapter 3

Summary

  • Taboos: Smart people are more willing to consider shocking ideas. This doesn't necessarily mean that they should share them directly with everyone.

    In any period, it should be easy to figure out what such labels are, simply by looking at what people call ideas they disagree with other than untrue.

  • Everyone carries a set of prescribed actions based upon cultural/social norms.

  • You should have opinions that some people would find contentious, as it's doubtful that our era has gotten everything right. Question things, ideas, and fashions; discover their origin and to ask if they make sense.

> It would be like... everyone claiming they had independently decided in 1972 that bell-bottom jeans were a good idea.

@tyre
tyre / gist:2017107
Created March 11, 2012 16:50
Chapter One Notes, by Chris

Chapter 1

  • Graham summarizes why junior high sucks. Before maturation, social constructs dominate and lead to viscous social climbing.
  • Nerds aren't good at this, or don't care enough to participate.
  • A common victim leads to social unity.

I loved Graham's thoughts on why this happened.

The inhabitants of all those worlds are trapped in little bubbles where nothing they do can have more than a local effect. Naturally these societies degenerate into savagery. They have no function for their form to follow.

The last line is crucial - without an express goal, people end up focusing too heavily on relative status. Wives of Wall Street's best and brightest are a fascinating example of this. Even with all the money and power in the world, they are reduced to paranoid savages. Another interesting point, that schools are essentially prisons, resonated heavily with me.