News for hackers. Stuff that matters.
Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by fauigerzigerk on Saturday November 24, 2007 @04:10PM (#83240)
The article sounds so beautiful, so beautiful, all the joy and the flowers and the harmony and the japanese and the danish and the total lack of language wars and crusades ... sorry, seems I've fallen asleep at the keyboard.

Anyone remember how you felt when you moved from C++ to Java? Wasn't it a joy? As if somebody had thought, hey I'll make a language for people to enjoy. No memory management! Yeah! No obscure macros! Just clean, beautiful code that everybody could immediately understand and nobody would shoot themselves in the foot.

We didn't think about how many times we would have to type getSomeField() { ... } and setSomeField(...) {...}. We didn't think about how entire frameworks, byte code manipulation weirdness, special purpose runtime containers, poorly integrated language extensions, etc would have to be written and deployed to overcome the metaprogramming deficiencies of Java. We were so glad to get rid of those breathtaking C++ compiler errors resulting from template crazyness that we didn't think about how statically typed languages really need type parameters.

For short, we didn't think about anything relating to the power of the language, we just felt joy and a big relief that the C++ curse had been taken from our souls, aching for harmony.

At least for myself I can say I'm not going to make that same mistake a second time. F..k harmony and joy! Let's switch our brains on before we jump onto the next language! I'll take a language war any day if it makes me think hard about how the features of a language behave once a system grows.

Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by tx on Sunday November 25, 2007 @12:29AM (#83287)
I lost you at the beginning of the 2nd paragraph. Nobody who knows how to muscle their ways in C++ feels good after transitioning to Java. There is nothing "liberating" in this hog for someone who knows C++. There is nothing in Java that one can call "beautiful" or "enjoyable". I am sorry to sound like an idiot (yes, I have re-read what I just wrote) but I cannot help it - Java is full of hidden messages like "oh, we feel like you're too stupid to have this or that kind of power, so just sit in a sandbox and enjoy the ride". And indeed, most programming idiots I've met in my career called themselves "Java programmers".

No statically typed language without powerful template system nor multiple inheritance of some sort should be considered usable in this age and time. Java/C# (same shit) was designed for "enterprise software" development, something a CS grad should never, never, never consider doing.

Ruby is the opposite of all that - Ruby represents ultimate freedom of expression. C++ runs circles around Java in that regard. Ruby only takes it several levels higher. In Ruby you really do feel like changing the world, as long as your world is written in Ruby as well. It's sad you missed it as the main point of the great post.

P.S. Go get yourself some decent C++ book.

Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by fauigerzigerk on Sunday November 25, 2007 @03:36AM (#83307)
First of all, I didn't say anything negative about Ruby. Yes, maybe I missed the point of the article. Maybe the author just wanted to say "Ruby is good". But I read the article as saying something about how to choose a language based on joy and harmony and that's what I take issue with, not with Ruby in particular.

Second, I have read a lot of good C++ books and I'll even admit that I take some perverse kind of pleasure from template acrobatics as presented in Alexandrescu's Modern C++ Design for instance. But in 1995 - 1997 I was overwhelmed by the complexity of C++ and Java was a relief for me and many others. Yes it was naive, and yes every ex C++ programmer started to miss things very soon. But even after learning so much more about C++, I still feel the complexity/power ratio of C++ is awful.

In 1995, when Java came along, C++ was less powerful. There was no proper template support, no standard library, not even a string class. You had to use evil stuff like MFC to get anything done at all. And it took until the early 21st century for anyone to really grasp templates and write good books about how to use them. So, that's why I still understand the gut reaction of relief when Java emerged. But, as I said, I regret to have reacted in a such a purely emotional way without checking out other options. You apparently did, and you have my respect for that.

Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by Andys on Saturday November 24, 2007 @09:13PM (#83268)
In the past 2 years I've adopted Ruby for 99% of my coding needs. My experience sounds different to yours:

I started with plain C when PCs were so slow you needed a compiled language. When I moved from C to C++ in order to better write Windows applications, it was nice to have classes, constructors/destructors to make memory management easier, but the other stuff (eg. templating system and supplied hash/array/string classes) caused pain and I avoided it.

I was excited about Java. It seemed like a cleaner language for ex-C programmers to move to OO, but then I got really irritated when trying to actually use it for developing real applications, for all the reasons you mentioned.

I kept searching, dabbled with functional programming in Haskell, and happily used Perl for a long while until finally discovering Ruby.

To me, Ruby was like a Perl that really was more enjoyable to use. By that I mean I really value a system that quickly lets me express my thoughts and lets me get applications up and running faster. Often, well-written Ruby looks like pseudocode.

In my case, subconsciously the enjoyment factor of the language really was a stumbling block that slowed down my progress on my projects.

There have been no downsides. CPUs haven't stopped getting faster since my first steps in ASM/C 15 years ago, so I have no Ruby performance problem. Architectural changes that Ruby enables make it fun to write performant code.

Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by Goladus on Saturday November 24, 2007 @09:41PM (#83270)
I agree that a language should be chosen primarily for the features that suit your needs. Expressiveness, stability, reliability, etc.

But within a given domain, there is often no clear choice which has the best features. This is especially true for Ruby, Python, and Perl. Some people are happy in the fires of CPAN hell, for example.

Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by jamesbritt on Saturday November 24, 2007 @12:42PM (#83209)
While haven't recently seen it , the ruby-talk list has had a permathread of "Python v. Ruby". With the exception of some trolling, the responses tended to be some variant of "try both and pick the one that best fits your head."

I was struck by how little the Ruby community (at least at the time; this may have changed in the last year or two) seemed to care if other people dropped their current fav language to become Ruby converts. Rather, the mood was, if you choose Ruby, great, we're here to help and welcome, but if you don't, we hope you choose something that makes you happy.

Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by qaexl on Saturday November 24, 2007 @02:57PM (#83230)
That was how I've always seen Ruby and Python. I've tried Python before and didn't like it. It had nothing to do with any technical reasons and was purely aesthetics.

The article's main point is that Ruby is supposed to make you feel good. It's origin is Japanese, and the language itself is more like a Zen garden. 'Harmony' is a word that has as much impact in the Japanese and Chinese cultures as 'freedom' and 'dream' does in America. Although diluted from its contact with the youthful American culture, those cultures has a fascination with ancient, or at least the wisdom of the elders. Here, there is a fascination with the youthful and the new. That's why you see news of 12-year-old kid raising $6 million in VC funding for an MMO e-commerce product.

In Chinese and Japanese stories, both old folklore and current modern renderings of it, there are stories of the young getting rewarded for listening to the old sages. In the Japanese stories in particular, there is a common theme of the older generation passing on the world to the newer generation by allowing them to make their own mistakes while having faith that they will survive and prosper. Translated into American terms, at best you would hear "get rewarded for working hard", and "we're younger so we know what's 'cool'."

So you hear a lot of news of young startups and the kids that started them up. When you hear of old Mrs. B starting up a new furniture chain because she had a disagreement with the upper management of the company she owned and sold to Warren Buffett (http://mba.tuck.dartmouth.edu/pages/clubs/investment/WarrenB... ), you don't get the sense that Mrs. B is lording it over her hirelings, "You should do this because in my experience ... ". Instead, you get the sense that at age 97, Mr. B. is still more youthful and active than the executives she hired in her first company.

The point is that the cultural undertones of 'harmony' gets seriously lost when transplanted into the American culture. People here often have other reasons for picking up Ruby.

So why might someone here write in Ruby? Because its expressive power gives you the freedom to make real what only you can see (vision). Because you can concentrate on improving the product and add new features. Because it is part of the current crop of technologies that lowers the requirements for a startup ... so you can drop everything, pursue the American dream -- write something millions want to use, make some big bucks, and retire young so you can enjoy the rest of your life. Or at least before you hit middle age.

Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by mynameishere on Saturday November 24, 2007 @12:53PM (#83212)
The messianic zeal of Christianity's shameful Crusades a thousand years ago

What a strange tangent. The Muslims were in the "holy land" (and a thousand other places) because of incomparably violent zeal. I suppose the defense of Vienna is also shameful for the zeal of the Sobieski.

Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by raganwald on Saturday November 24, 2007 @12:55PM (#83214)
Is this a long-winded way of saying that two wrongs make a right? That if "they" use torture we ought to use torture? That...

Oh, sorry, my mistake, I thought I was on reddit. I'm actually on ycombinator, which is a completely different community. Let's talk about startups, please.

Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by mynameishere on Saturday November 24, 2007 @01:05PM (#83217)
Let's talk about startups, please.

You will notice:

1) The lead article is not about startups.

2) I quoted a passage that was from the lead article.

3) I commented on that passage.

So, if you have some sort of objection, please refer to the person who submitted it, or to the author, and not me. Thanks.

ADDENDUM: two wrongs make a right

Sometimes. http://en.wikipedia.org/wiki/Tit_for_Tat

Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by raganwald on Saturday November 24, 2007 @07:07PM (#83259)
You know what, you're right and I'm wrong. Communities are whatever their members make of them, and the upmods for your comment suggests to me that this community thinks that's worthy of mention.

When I said startups, I actually included programming as part of startups, due to the flavour of PG's essays, so I thought the article was relevant for ycombinator. But again, it's not up to me.

And honestly, I wouldn't have said anything about your comment except I had just come from reddit, where more than half of the comments on the programming sub-reddit were about whether he should have included pictures, about whether the actress was hot, and about whether Japan really does have a cultural identity distinct from America.

I guess I was just crotchety about the fact that nobody seemed to be paying any attention to what I thought the article was about. I was being selfish.

I was wrong to try to tell you what you should and shouldn't say on a forum: forums are for the members, they needn't follow my preconceptions about what is on or off topic, what is relevant, or what is or isn't important in an article.

So... if you want to get into a whole Christians vs. Muslims through history thing, I'll get out of the way.

Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by mynameishere on Saturday November 24, 2007 @10:41PM (#83274)
Please to note that my initial objection was basically of the same flavor, ie, "why is the article conflating programming languages and the Crusades?"
Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by r7000 on Sunday November 25, 2007 @10:23PM (#83461)
"Religious wars" is a long-standing metaphor when discussing programming languages.

http://www.google.com/search?q=Religious+wars+programming+la...

Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by edw519 on Sunday November 25, 2007 @12:20PM (#83338)
Nice post. Didn't see a copyright or DRM. Permission to cut & paste it into my own future posts?
Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by raganwald on Sunday November 25, 2007 @10:40PM (#83471)
please help yourself. as for copyright, "your ideas will go further if you don't insist that they carry you go along with them."
Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by Rickon on Saturday November 24, 2007 @03:01PM (#83231)
"Oh, sorry, my mistake, I thought I was on reddit. I'm actually on ycombinator, which is a completely different community. Let's talk about startups, please."

Supposed to be cute, I guess, but you must not be paying attention--note the "title" tag on each page and count the number of programming-related submissions on the main page.

Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by mwerty on Saturday November 24, 2007 @11:07PM (#83278)
Maybe I am over analyzing: Given the current visibility of Islamic extremism, its less distracting to talk about current non-issues.
Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by rontr on Sunday November 25, 2007 @04:36AM (#83310)
I wish the author said why programming in Ruby makes him feel good. His statements could be made about any language. Many people program in language X because they like language X, and that doesn't apply just to Ruby. "I program in Ruby because it makes me feel good" is an empty statement.

Did you program in other languages? Did they also make you feel good? Why/why not? Do you think languages in which you haven't programmed could make you feel even better than Ruby?

I hope most people who program in Ruby have better reasons than "it makes me feel good." If they didn't, I wouldn't feel good programming in Ruby.

Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by staticshock on Sunday November 25, 2007 @12:53PM (#83345)
the fact that it could be said about any language is part of his point. ruby isn't the one true language. just program in whatever language makes you feel good, be it ruby or not. nevertheless, some languages feel more zen-like on the average. for instance, find me one person who ever felt good programming anything in cobol.
Re:Why I Program In Ruby (And Maybe Why You Shouldn't) by awt on Saturday November 24, 2007 @11:34AM (#83204)
This idea is definitely a step forward for me in understanding why I prefer one language over another. Thanks to the poster.