Ruby, Now In English 20
PM4RK5 writes: "For those of you interested, the News & Observer had an interview with Andrew Hunt about Ruby, in response to a book he and David Thomas authored. The book, "The Pragmatic Programmer" was written for the old-fashioned programmers who seek to learn how to use newer technologies, and use them better. It has an example of code differences between Java and Ruby, on how to print 'Ho Ho Ho.' Contains information and thoughts on its current applications, how its growing, and the types of things that it is suited for."
local press (Score:2, Informative)
since i know all 6 people who read this article are going to skim it for exactly the same thing i did, here it is:
To print "Ho Ho Ho" in Java, you have to write code like this: 'for (int i=0; i 3; i++)
{System.err.print("Ho ");}.'
In Ruby you write:
'3.times do print "Ho " end.'
Re:local press (Score:1)
Both those programs are buggy.
Neither produce the expected output.
Re:local press (Score:1)
Re:local press (Score:1)
for i in range(3): print 'Ho '
It's a little less complex than the ruby example, and much less complex than the java one.
Re:local press (Score:1)
Re:local press (Score:1)
print 'Ho ' x 3;
print 'Ho ' for 1..3;
Mind you, I think it's great we have a handful of languages in the same problem domain-- diversity is spiffy.
Re:local press (Score:1)
Last year in English (Score:3, Informative)
More interesting might be slides from last month's Ruby conference [rubyconf.org] as well as a nice writeup with pictures [chadfowler.com]. Wish I could've been there!
Pronoun Mixup (Score:1)
Re:Pronoun Mixup (Score:1)
Actually, that's not entirely true. They used ruby in the scripts they used to format, etc. the text for the "Pragmatic Programmer".
Familiarity (Score:1)
In the end, this may not be a "bad thing" for Ruby....