NOTE:This blog had a good run, but is now in retirement.
If you enjoy the content here, please support Gregory's ongoing work on the Practicing Ruby journal.

Robert Klemme's Posts ( feed)

Complexity

For a while I have been pondering how to write about complexity. I believe this term is a crucial one for our profession and we should understand it in order to be able to make a good job. Today I will explore the first dimension of complexity: complexity to avoid redundancy.

2010-06-06 16:37 (View Comments)

Code Massage

Playing around with code can be fun and even provide new insights into the language or coding techniques.

2010-02-28 08:32 (View Comments)

The Complete Numeric Class

If you want to create a class to do math with (more precisely, a class with that employs operator overloading) additional aspects come into play compared to the class I presented in "The Complete Class".

2010-02-20 09:25 (View Comments)

The Complete Class

There are a few concepts you have to implement for many classes such as equivalence, hash code calculation etc. Today I will discuss these and provide a sample class implementation with all of them.

2009-10-24 14:05 (View Comments)

Structs inside out

I will try to expose the utility of class Struct which is part of the standard library. And it does not even need a require! Read on for full story.

2009-09-21 17:48 (View Comments)

Muppet Labs closing for now

Now that the code has reached a final version and interest in the blog series has died away Muppet Laboratories will close the door for now.

2009-09-07 15:03 (View Comments)

Completing the Animal

We are coming close to the end to the Laboratory series: finally the animal is complete and munches away on your logfiles.

2009-08-24 17:09 (View Comments)

A bit of Optimization

The dramatic decrease of performance bugged me. Today I show, how I managed to remedy that - and even get a faster version than before.

2009-08-09 16:47 (View Comments)

LRU Integration explained

Today I'll add a bit more explanation to the last article and provide the reasoning behind the implementation.

2009-07-31 12:33 (View Comments)

LRU Integration

I could not find a LRU class which fits nicely with our requirements so I wrote it myself. This is just a short article showing the integration of it.

2009-07-10 17:07 (View Comments)

Animal Interaction Processing

The InteractionProcessor is one of the core components of our Animal. We will look at how it is built - and why it's done that way.

2009-06-30 12:30 (View Comments)

The Animal raises its head

I hacked together a first draft illustrating the intended architecture.

2009-06-22 18:36 (View Comments)

Shadow of the Animal

Today I will go into more detail with regard to the application structure and the thought process that led to it.

2009-06-21 15:36 (View Comments)

First Design Considerations

Today we will go into medias res. I will start by outlining application design and collect some useful facts derived from requirements. You'll even see small snippets of Ruby code!

2009-06-12 16:36 (View Comments)

Requirements Summary of the Laboratory Project

Now it's time to collect all the requirements from the discussion threads and put them into some groups.

2009-06-08 17:59 (View Comments)

The Laboratory Project

Today we will start the announced project. You will find a description of the problem I will attempt to solve in the course of the project. Please read on.

2009-06-03 17:56 (View Comments)

Enter the Muppet Laboratories

Often we present finished code which includes all the decisions that have been made during its construction. I will try show the process that led to the final code like we are looking at a test tube.

2009-05-29 13:54 (View Comments)

Control flow features and readability

When we program we routinely pick different control flow freatures. Often we do not think much about our choice and in fact in many situations it is obvious what we should do. I got curious about the nature of control flow features with respect to their effects on readability when I realized that catch ... throw is an extreme rare thing to see. Let's look a bit closer at this.

2009-05-19 20:46 (View Comments)

The Universe between begin and end

The article was inspired by last article's comments. Much has been said in the comments already and today I'll mostly try to combine and organize it to give an overview from begin to end.

2009-05-01 10:05 (View Comments)

Writing Block Methods with automatic Resource Cleanup

Last time I demonstrated how using library methods with blocks can improve robustness of a program. This time I will show how such methods are implemented.

2009-04-20 19:47 (View Comments)

Using Blocks for Robustness

One way to look at Ruby's blocks is as anonymous functions and one of the uses of them is to make your code more robust.

2009-04-09 14:25 (View Comments)