21 May 2013

The Ruby Reflector

Topic

Object-oriented programming

  Source Favicon
By Todd Hoff of High Scalability 1 month ago.
Email

Pinterest has been riding an exponential growth curve, doubling every month and half. They've gone from 0 to 10s of billions of page views a month in two years, from 2 founders and one engineer to over 40 engineers, from one little MySQL server to 180 Web Engines, 240 API Engines, 88 MySQL DBs (cc2.8xlarge) + 1 slave each, 110 Redis Instances, and 200 Memcache Instances.

Stunning growth. So what's Pinterest's story? To tell their story we have our bards, Pinterest…

highscalability.com Read
  Source Favicon
By Sam Goldstein of New Relic 2 months ago.
Email

We've recently revamped the ‘ Instances' tab, which is a special feature we provide to customers using Heroku's New Relic addon. The instances tab can be found in the navigation under Monitoring > Instances .

Heroku caps the amount of memory application processes can use. Heroku's docs say if the app instances running within each dyno use more than 512Mb of memory they will begin to swap and eventually the virtual server (i.e. the dyno) will be restarted. …

newrelic.com Read
  Source Favicon
By interblah.net of interblah.net 3 months ago.
Email

Instances of this class are used so that any methods defined as part of the spec definition are implicitly available as methods to be called in the "setup" and "test" bodies (see the module_eval section above). Not so different after all, eh?

Next, the instance variables that we stashed after evaluating the before :all blocks are injected (effectively using instance_variable_set as we saw above) into this new instance, which will allow the spec to interact with …

interblah.net Read
  Source Favicon
Email

Episode 21: Data, Context and Interaction :

Ben Orenstein is joined by Jim Gay, author of Clean Ruby, and Joe Ferris, CTO of thoughtbot, in the episode recorded at RubyConf 2012. Ben, Joe, and Jim discuss Data, Context and Interaction (DCI), what it is, whether it is at odds with Object-Oriented Programming, how it can be applied to your applications, and much more.

Episode Notes and Links

Subscribe via iTunes

Subscribe via RSS

robots.thoughtbot.com Read
  Source Favicon
By Peter Cooper of Ruby Inside 8 months ago.
Email

The Ruby Rogues Discuss 'Growing Object Oriented Software Guided by Tests'

The inimitable Ruby Rogues spend an hour discussing the superb 'Growing Object Oriented Software Guided by Tests' by Steve Freeman and Nat Pryce. If you haven't read this book yet, you should check it out.

Why The Lucky Stiff Documentary Trailer

A short 2 minute preview of a documentary about Why The Lucky Stiff that's planned to be screened …

rubyinside.com Read
  Source Favicon
By Todd Hoff of High Scalability 10 months ago.
Email

…care about availability, you need to have spare capacity in your region (using Reserve Instances, like Netflix does) to cover when a single AZ disappears, and your own external to AWS load balancing (not DNS based), with your own per-AZ subsidiary load balancers (nginx or whatever) running within EC2. You need a robust database layer, ideally multi-region or AWS + nonAWS, but that's more site specific. Going multiregion is the next step, and the above is an essential part of …

highscalability.com Read
  Source Favicon
Email

Object-oriented languages are good at adding new data; functional languages are good at adding new behavior. Can we find a happy medium?

The answer: Sorta.

First I'll explain what I'm talking about, with examples. At the bottom of this article I'll talk about the lambda calculus. Oh and before that I'll talk about something relevant to normal Ruby programming, in case that's something you're still into.

The problem

But first let's start even …

robots.thoughtbot.com Read
  Source Favicon
By Matt of Tea-Driven Development 10 months ago.
Email

A few weeks ago I asked on GOOS the mailing list about some other books that teach the same style of design.

I've just put together a big order for the juiciest looking ones. Here they are:

Concurrency: State Models and Java Programs by Jeff Magee

Object Design: Roles, Responsibilities and Collaborations by Rebecca Wirfs-Brock

Object Thinking by David West

Object-oriented Design Heuristics by Arthur J. Riel

Object-Oriented Programming by Peter Coad

blog.mattwynne.net Read
  Source Favicon
Email

As Growing Object Oriented Software states:

Our heuristic is that we should be able to describe what an object does without using any conjunctions ("and," "or").

Instead, I created a new class to wrap (or decorate) my original service. class GaugeAttributeServiceWithCaching def initialize(attribute_service = GaugeAttributeService.new) @attribute_service = attribute_service end

def get(id) cache_service.fetch(cache_key(id)) { @attribute_service.get(id) …

railstips.org Read
  Source Favicon
By Justin Leitgeb of Justin Leitgeb 1 year ago.
Email

A. Snyder, "Encapsulation and Inheritance in Object-Oriented Programming Languages", pp. 38-45

Y. Matz, Rubyconf 2010 Keynote, http://www.slideshare.net/yukihiro_matz/rubyconf-2010-keynote-by-matz

S. Freeman, " Growing Object-Oriented Software, Guided by Tests" location 1258

M. Fowler, " Refactoring: Improving the Design of Existing Code" location 3320

B. Martin, " SRP: The Single Responsibility Principle", …

justinleitgeb.com Read