Skip to content

Instantly share code, notes, and snippets.

View npras's full-sized avatar
😃
Coding all the time

Prasanna Natarajan npras

😃
Coding all the time
View GitHub Profile
@zetter
zetter / deconstruct.markdown
Created January 31, 2012 21:10
therubygame deconstruct by @czetter

therubygame deconstruct by @czetter

This is a deconstuction of matematikaadit's submission to therubygame challenge 5; 'Roman numerals. What are they good IV?'. The goal of the challenge is to take a string representing a roman numeral as input and return the integer that the numeral represents.

matematikaadit currently has the honour of the shortest (by character count) submission for this challenge. At first glance I didn't understand how it worked so I re-wrote and analyzed it until I did.

Making it readable

matematikaadit's original submission: