How to Code Kata Ruby Style

BTI360 Blog / July 17, 2014 in 

Today we begin to switch things up a bit. Since our last two code submissions were written in Java, we figured it was about time to see something new and check out how the Look-and-Say sequence could be handled Ruby style.

Caitlin was possibly the only coder who used Ruby at the event, and her submission shows the interesting differences in regular expressions between Ruby and Java (compared with Chris’ submission). The author of this post is not a Ruby developer, but Caitlin’s code appears to use something called subexpressions in Ruby.

We can only speculate as to whether or not fellow Rubyist Jason would have produced code as good as Caitlin’s. Perhaps we will be able to find out at the next code kata event?

Take a peek at Caitlin’s code…

Previous

How would you solve the Look-and-Say sequence with no strings attached?

Next

The Look-and-Say Sequence Through the Eyes of a Scala Enthusiast

Close Form

Enjoy our Blog?

Then stay up-to-date with our latest posts delivered right to your inbox.

  • This field is for validation purposes and should be left unchanged.

Or catch us on social media

Stay in Touch

Whether we’re honing our craft, hanging out with our team, or volunteering in the community, we invite you to keep tabs on us.

  • This field is for validation purposes and should be left unchanged.