4 ms·
Why I Program In Ruby (And Maybe Why You Shouldn't)
- awt 19y agoThis idea is definitely a step forward for me in understanding why I prefer one language over another. Thanks to the poster.
- jamesbritt 19y agoWhile 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.
- qaexl 19y agoThat 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/WarrenBuffett.html 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.
- mynameishere 19y agoThe 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.
- raganwald 19y agoIs 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.
- mynameishere 19y agoLet'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 http://en.wikipedia.org/wiki/Tit_for_Tat
- raganwald 19y agoYou 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.
- fauigerzigerk 19y agoThe 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.
- Andys 19y agoIn 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.
- deleted 19y ago[deleted]
- rontr 19y agoI 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.
- staticshock 19y agothe 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.