RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  

thatrubylove — 15 posts

I am collecting feedback on the intro to a Ruby book I am working on...

My own history

I have been coding since I was thirteen, when my Father came home with old IBM clone that he traded for during the 80’s barter craze. Being nearly forty years old now, I have stubbed my toe and left it bleeding in more than a dozen languages now. If I were a construction worker instead of a knowledge worker, I would probably be missing fingers, toes, and possibly a hand or leg.

Continue reading
TDDing a static website generator - part 1

@thatrubylove holds session sundays every sunday 12pm-2pm CST! Join us next time.
I have prepared some Ruby code to show how conditionals can breed like rabbits, and how to spay and neuter those bunnies before it get’s out of control.

Along with the code, there is a screencast or as I will call it, a RubyLovecast. In the video, I will walk you through several revisions of the code, first showing how conditionals grow, then how to take a weedwacker to them.

continue reading @ rubylove
I have to apologize for being away so long. I ended a relationship that had drug on for far too long and going nowhere, and at the same time I decided that I will no longer accept clients that refuse to place the proper amount of importance on quality and training.

read more here
LISP is essentially boiled down into this for the Rubyist: you have lists, which can contain not just data, but code (functions), and to do that, sometimes a function can become a piece of data, be added to a list, queried as code again when the time calls for it. All in a lazy manner. Let me try to illustrate this for you in Ruby.

continue reading
I get asked this question a lot from developers I coach. Or I get the question in it’s other form, “So how do you learn to write clean, uncoupled ruby?” Or the other question, the one I get from people who disagree with me… “Why do you have such strong opinions? How did you choose your opinions?”

This entire article will focus on the first version, and the second version, and some of the third by enumerating a list of things to do and not do.......

Want to know RubyLove's TOP tips to become an awesome Rubyist who writes clean code? Read the tips and see the link list on!
At first, I HATED TESTING. I fought it’s adoption arguing the position DHH has returned to, browser testing by humans. I hated it because I sucked at it. But I always have a mentor, and I ended up with one who was a XP’er and an old small talker. That changed my life.

But I was still testing too much, testing the wrong things, mocking too much and in the wrong place. I didn’t apparently REALLY know what a unit test was. I was using RSpec and everything I wrote was highly coupled to Rails and the database.

continue reading @
So I joined the RR Parley chat LAST WEEK. I have been a member on various Ruby forums since 2007. Today someone posts something to the effect of “TDD IS DEAD - What do you think”, to which I replied that DHH likes highly coupled, badly designed code.

My post was flagged almost immediately and I get an email from Charles Max Wood telling me to be nice. Ok, so I am supposed to do what, not discuss this? That is my opinion and it is the opinion of a great many Rubyists who are better programmers than DHH.

Continue reading
So I am in the middle of a lot of planning for “Ruby Workshops in the Tropics” this summer, where myself and a few other advanced programmers will be holding sessions to help you write tests, more concise, idiomatic ruby, and more….

Keep reading to sign up!
I have been on a journey for some time now. It started when I was a 8 year old kid who decided to take his Dad’s Betamax apart to see how the movies got in there. It continued when I was 10 and I got a Commodore and played tape-drive games like Red Baron. My future was forever set in stone when I arrived at a new Jr. High School @ 13 and they had AppleIIes in my home room, math lab, and computer lab.

Continue reading @ rubylove.
Prefer The Declarative Over The Imperative

This article was spawned in response to a comment on Pat Shaughnessy's awesome article Use An Ask, Dont Tell Policy With Ruby asking about TDDing the example

read more
A new article is up @!

A Functional OO Deck of Cards..
Let's build a deck of cards today using a hybrid approach, that is to say, lets use good Object Oriented design but keep our objects stateless and our functions idempotent.

We are going to need to describe a deck of cards using objects, so let's look for some logical boundaries and give them names. One way we can do this by describing what we want in a paragraph and a title. Let's do that now!

Continue reading A Faux-O Deck of Cards at
Using Extract Method Object to refactor large methods

I have previously been over the extraction pattern, Extract Method. Today we will explore it's big brother, Extract Method Object.

The Extract Method Object pattern is used to take a method or groups of methods from coupled, untestable code into code that adheres to the Single Responsibility Principle, or an object/ method/construct should have 1 and only 1 reason to change.

Read now!
Matz has done a lot of magic in MRI to make arays fast. Rubinius and JRuby do even more, but fast is of course relative in Ruby. Another thing to consider with arrays is memory.

Say you have an Array with 10,000 space ships. These are player ships, and they are structs. I will give you an example definition, but all that you need to consider, is that this a complex object. It's size can radically change from one element to the next.

Continue reading
Have you ever needed to load a VERY large file in ruby? No I don't mean your 500 line rails model. I mean a several gig binary or text file.

Try it. Watch your machine become unresponsive. Cry a little inside. Then reach for enumerable.

Ruby's Enumerable module gives you a way of iterating over collections in a lazy manner, loading only what you need, when you need it. But it gives us so much more than that.

Today I am going to walk you through a couple of highly useful methods from Enumerable that has come up in a few coding challenges I have done over the years.