Channels Are Not Enough
... or Why Pipelining Is Not That Easy
At the 2004 Ruby Conference, Jamis Buck had the unenviable task to explain Dependency Injection to a bunch of Ruby developers. First of all, Dependency Injection (DI) and Inversion of Control (IoC) is hard to explain, the benefits are subtle and the dynamic nature of Ruby make those benefits even more marginal. Furthermore examples using DI/IoC are either too simple (and don’t convey the usefulness) or too complex (and difficult to explain in the space of an article or presentation). I once attempted to explain DI/IoC to a room of Java programmers (see onestepback.org/articles/dependencyinjection/), so I can’t pass up trying to explain it to Ruby developers.
Thanks goes to Jamis Buck (the author of the Copland DI/IoC framework) who took the time to review this article and provide feedback.
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
The purpose of design is to allow you to do design later, and it's primary goal is to reduce the cost of change.
You can break these rules if you can talk your pair into agreeing with you.
|-- show running queries (pre 9.2)|
|SELECT procpid, age(clock_timestamp(), query_start), usename, current_query|
|WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'|
|ORDER BY query_start desc;|
|-- show running queries (9.2)|
|SELECT pid, age(clock_timestamp(), query_start), usename, query|
|WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'|