Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

LABS
A channel-based ring buffer in Go

After Jared’s excellent introduction to Go concurrency and his look at patterns of Go channel usage I would like to share a channel-based ring buffer in Go based on channels that we developed for the Loggregator Server in CloudFoundry (CF).

CloudFoundry’s Loggregator Server

The goal of Loggregator is to allow application developers to tail the logs of their applications when these are running on CF.

Read more »

LABS
Learning your first programming language

You have probably heard that you can never fully master a programming language. While this is true it doesn’t mean you can’t learn the basic rules of a language fairly quickly (you can). Languages generally tend to be expressive, and as such, they are constantly evolving as the community pushes the limits of what the language was designed to do.

Read more »

LABS
So you want to be a programmer?

I have been asked by at least a few people if I could tell them the best way to get started with programming and I have been slightly ashamed that I was unable to confidently answer that question.

I got started in a way that was certainly not the most efficient one, and it really bugs me when I read answers to this question that assert that the only way to become a good programmer is to do what I did and walk uphill both ways in the snow while fighting compilers until you reflexively cringe at a mismatched bracket.

Read more »

LABS
Write Private Functions Not Private Methods

During refactoring, private methods are created in order to:

Eliminate duplication within the class Clarify confusing and/or complex fragments of related code (Extract Method)

These are both great refactorings, but be cautious of classes with an excessive amount of private class or instance methods.

Read more »

LABS
method_missing hazardous to your module?

We built an(other) object factory module for our current project and it looks a lot like all the others:



Read more »

LABS
All evidence points to OOP being bullshit

Object Oriented Programming (OOP) as an idea has been oversold. The most commonly used languages in use today are designed around the idea of OOP. Extremist languages like Java force you to think of everything in terms of objects. But is Object Orientation (OO) a good idea? Does it have problems? Is it the right tool for everything? Let's explore some of these questions in a slightly tongue in cheek and cathartic rant.

LABS
Why you should care about functional programming.

I’ve been experimenting with functional programming (FP) languages for a little while now and their acceptance is generally increasing amongst the wider developer community. This is the first post in a series of articles I hope to do that explore FP, what it is and what we could learn from this trend.

Read more »

LABS
Technique for extending a method from a module

Update: Read the follow-up post Second thoughts on initializing modules

I was recently presented the problem of appending to the initialize method from a module that was being included. To do this it would need to override the class's initialize method with my own but keep the functionality of the original initialize method.

Whenever I need to do something in Ruby that I know will require some experimentation I like to move outside of my application and reproduce the problem in a simple way. For this problem I created a Person class that mixes in a Teacher module.

module Teacher
  def initialize
    puts "initializing teacher"
  end
end

class Person
  include Teacher

  def initialize
    puts "initializing person"
  end
end

The goal is to get the following output when a Person object is created:

> Person.new
initializing teacher
initializing person

The basic program fails as expected; Teacher.new prints "initializing person" because Person's initialize is trumping Teacher's. Our immediate goal is to replace Person's initialize with Teacher's but in a way that preserves the original initialize method. By using alias_method we can create a copy of the original initialize method that we can call later.