‘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.
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….
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.
Strange coincidence that nearly all the sponsers are Cocoa developers?
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.
absurdity, surely?
” … 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.
“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.
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. ๐
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.
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.
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
COBOL.trash!
while not happy?
. learn_ruby
end
. 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
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.