Linked by Eugenia Loli on Sat 19th Mar 2005 03:47 UTC, submitted by Todd Nathan
General Development 'Obfuscation' is to make something difficult or unusually obscure. One of the ironies of Ruby programming is the general desire of Rubyists to believe that a goal to accomplish readability in code overshadows even at times its functionality. At times to the point of obsurdity. Enter the International Obfuscated Ruby Code Contest with prizes up to $750.
Order by: Score:
fun & misleading
by verbat on Sat 19th Mar 2005 04:05 UTC

I mean, people have been trying to show how clean ruby can be for +10 years and now this?? ;)
I look forward to the obfuscated python contest.

What if they are really trying to prove that even the worst a person can do still ends up with somewhat readable code? That's some food for thought....

Yay!
by Dewd on Sat 19th Mar 2005 06:56 UTC

I look forward to not seeing the results from this contest. :-)

I find Ruby so clean, even after years of having written some codes, that I don't even want to see what an obfuscated code is all about, though that 6 lines of P2P server and client in Ruby was close to obfuscated. :-)

Really, Python guys overestimate the ability to write readable Python code, when compared to Ruby.

Ruby/Cocoa
by Anonymous on Sat 19th Mar 2005 12:43 UTC

Strange coincidence that nearly all the sponsers are Cocoa developers?

@verbat
by SpookyET on Sat 19th Mar 2005 13:02 UTC

Take a look at the BitTorrent code. It is pretty much obfuscated. It is the ugliest code I have ever seen. If you port it to Ruby, you will most likely win the contest.

"obsurdity" ?
by madprof on Sat 19th Mar 2005 13:50 UTC

absurdity, surely?

A desire to believe *what?*
by James Britt on Sat 19th Mar 2005 14:37 UTC

" ... general desire of Rubyists to believe that a goal to accomplish readability in code overshadows even at times its functionality."

Find me one Rubyist who believes (or "desires to believe") functionality should be sacrificed to readability. There are none. Ruby lends itself to good, clean code that is easy to read and write. There is no need to give up legibility to accomplish anything in Ruby.

There is no "irony" in Ruby programming, no reqirement to follow formatting rules or restricted syntax at the expense of expressiveness.

Ruby vs Python
by Chiwaw on Sat 19th Mar 2005 22:45 UTC

"Really, Python guys overestimate the ability to write readable Python code, when compared to Ruby."

Really, having to deal with both languages, I don't get this assessment. I always find both languages equally clean and easily readable.

re: Ruby vs Python
by Dewd on Sun 20th Mar 2005 00:04 UTC

You are correct, but my POV makes me prefer Ruby's readability to Python's. And this should be a shocking realization to the indent 4 spaces Python guys. :-)

A question from a Linux rookie
by I. Blackney on Sun 20th Mar 2005 07:32 UTC

How would either Ruby or Python compair to COBOL in readabitity and cleanliess? I'm realatively new to Linux but I've had a enty-level IBM COBOL/400 class in college.

Re: A question from a Linux rookie
by Richard Dale on Sun 20th Mar 2005 12:28 UTC

How would either Ruby or Python compair to COBOL in readabitity and cleanliess?

MOVE COBOL TO TRASH.
GOTO RUBY-CLASS.

RUBY-CLASS.
PERFORM LEARN-RUBY UNTIL MUCH-HAPPIER.
EXIT.

Re: Re: A question from a Linux rookie
by Anil Wang on Sun 20th Mar 2005 14:44 UTC

I don't know Ruby, but a quick look at the Ruby tutorials:
. . http://pine.fm/LearnToProgram/
. . http://www.math.umd.edu/~dcarrera/ruby/0.3/
. . http://www.ruby-doc.org/docs/UsersGuide/rg/
. . http://en.wikipedia.org/wiki/Ruby_programming_language
. . http://www.rubycentral.com/book/index.html
here's Richard's (gang up on COBOL) example in Ruby:
==============================

trash = COBOL
rubyClass

def rubyClass
. while not happy
. . learnRuby
. end
end

LOL
by Dewd on Sun 20th Mar 2005 16:01 UTC

COBOL.trash!
while not happy?
. learn_ruby
end

Just throw some regexp's into the mix!
by Myrd on Sun 20th Mar 2005 17:43 UTC

. def self.strip_html(text)
. attribute_key = /[w:_-]+/
. attribute_value = /(?:[A-Za-z0-9]+|(?:'[^']*?'|"[^"]*?"))/
. attribute = /(?:#{attribute_key}(?:s*=s*#{attribute_value})?)/
. attributes = /(?:#{attribute}(?:s+#{attribute})*)/
. tag_key = attribute_key
. tag = %r{<[!/?[]?(?:#{tag_key}|--)(?:s+#{attributes})?s*(?:[!/?]] +|--)?>}
. text.gsub(tag, '').gsub(/s+/, ' ').strip
. end

ruby obfu?
by lichtkind on Sun 20th Mar 2005 22:58 UTC

hard to believe they have nearly as much fun as with perl obfu. even ruby has a lot of perlish syntax it is in many ways very limited in comparsion with perl so you can be less creative. and obfu is THE freestyle discipline where all is allowed und you can turn all freedom to your advantage.

ok im perl monk but also fan of ruby but beside of interest i never would do ruby obfu.