Skip to content

Instantly share code, notes, and snippets.

practicingruby /
Created December 19, 2012 22:29
Models, Roles, Decorators, and Interactions -- A modest proposal for a toned done version of DCI that isn't as janky as Concerns.

Models, Roles, Decorators, and Interactions

A modest alternative to DCI that might be worth further thought

One of the problems with advancing the discussion on DCI is that we lack a comparable alternative pattern that has the same goals, but favors a low ceremony approach. The closest thing we have to that is Rails concerns, but they are more like distant relatives of the DCI concepts rather than first cousins, and that makes comparisions between the two approaches not especially fruitful.

I am considering the idea of experimenting with my own paradigm that captures the intent and purity of DCI, but with the convenience of concerns. Please note that this is just the starting point of a conversation, it is NOT a promise of comercially available cold fusion or a cure for cancer. It's just a gist with an idea on it I'd like to hear your thoughts on.

What if we had a top-level topology that was split into Models, **Rol

function loadScript(path, fn) {
var el = document.createElement('script')
, loaded = 0
, onreadystatechange = 'onreadystatechange'
, readyState = 'readyState';
el.onload = el.onerror = el[onreadystatechange] = function () {
if (loaded || (el[readyState] && !(/^c|loade/.test(el[readyState])))) return;
el.onload = el.onerror = el[onreadystatechange] = null;
loaded = 1;

This allows you to use the following video streaming services outside of the US from your Mac without having to use a proxy or VPN, so no big bandwidth issues:

  • Hulu / HuluPlus
  • CBS
  • ABC
  • MTV
  • theWB
  • CW TV
  • Crackle
  • NBC
0xabad1dea / ABI
Created April 5, 2012 19:50
0x10c Programming Notes
On April 5 2012, #0x10c-dev agreed to the following standard ABI:
- Registers A, B, C are clobberable across calls
- Registers I, J, X, Y, Z are preserved across calls
- Return in A
- J is used for base stack pointer (preserving the value of SP before allocating
data for locals)
dkubb / .rvmrc
Created August 10, 2011 22:44
Web framework Spike
rvm use @$(basename `pwd`) --create
(/◔ ◡ ◔)/
(๏̯͡๏ )