Dan Manges

Dan Manges - Blog

ActiveModel::Validations and Command/Query Separation


9 months ago by Dan Manges on Dan Manges.
Command/Query Separation is a principle that states that “every method should either be a command that performs an action, or a query that returns...

m2node - a mongrel2 handler for node.js


11 months ago by Dan Manges on Dan Manges.
This weekend I implemented a Mongrel2 handler for Node.js. At Braintree we built a custom HTTP server to solve some high availability and load balancing...

Handling Timeouts with Mongrel2 and ZeroMQ


12 months ago by Dan Manges on Dan Manges.
I mentioned in my blog post on m2node that we wrote an HTTP server at Braintree that has some similarities to Mongrel2. One responsibility of our HTTP server...

Action Dependent Validations and Why :on => :update is Bad


over 3 years ago by Dan Manges on Dan Manges.
ActiveRecord validations typically apply all the time. For example, a User object may be required to always have an email_address. class User ...

Action Dependent Validations and Why :on => :update is Bad


over 3 years ago by Dan Manges on Dan Manges.
ActiveRecord validations typically apply all the time. For example, a User object may be required to always have an email_address. class User ...

Rails Application Visualization


over 3 years ago by Dan Manges on Dan Manges.
Before we went live with the new Rails site at CarePages, we decided to use Munin for monitoring. We needed to write a few custom plugins to visualize...

Rails Application Visualization


over 3 years ago by Dan Manges on Dan Manges.
Before we went live with the new Rails site at CarePages, we decided to use Munin for monitoring. We needed to write a few custom plugins to visualize...

Increasing Code Coverage May Be Harmful


over 3 years ago by Dan Manges on Dan Manges.
I should start by clarifying: I'm referring to increasing code coverage by running a code coverage tool, looking for untested code, and writing tests...

Increasing Code Coverage May Be Harmful


over 3 years ago by Dan Manges on Dan Manges.
I should start by clarifying: I'm referring to increasing code coverage by running a code coverage tool, looking for untested code, and writing tests...

Ruby DSLs: instance_eval with delegation


over 3 years ago by Dan Manges on Dan Manges.
I saw the warning issued on Ola's blog: don't overuse instance_eval. JEG II blogged about a compromise, and why had an idea. But I like variation of...