From: Elliot Temple Date: 2006-06-10T12:43:08+09:00 Subject: Fun Coding (was: I love Ruby - But how bright is Ruby's Future?) On Jun 9, 2006, at 8:10 PM, M. Edward (Ed) Borasky wrote: > > Oh, yeah ... one more thing. This may be the wrong thread to bring > this > up, but it's certainly the right *forum*. I'm tired of hearing "Ruby > programming is fun, and programming in other languages isn't." I've > programmed in macro assembler, Fortran, C, Lisp, Pascal, Forth, Ada, > Perl, Java, Awk, R, Neliac, APL and even some microcode. It's *all* > been > fun! Even the microcode ... even the Neliac. > > Then again, I've never programmed in C++ or worked on a project as a > junior member of a 1500-person team. :) there are things that make coding more or less fun. maybe all coding is more fun than flipping burgers. but not all coding is equally fun. here are a few thoughts: if you were required to use copy/paste as a replacement for methods, that would get annoying quickly (if the methods take arguments, just edit the paste by hand each time to use the right value :) ultimately, any technique with unnecessary repetition can get frustrating when you know better ways to accomplish the same task. ruby does a good job of helping us avoid repetition. it's always possible in other languages (at least if you count code generators). but in ruby it's often convenient. and if you're being paid to do something, you have to do it reasonably fast, so you can't write a code generator to avoid a little copy/pasting. also, a lot of us aren't perfect. so we'd like to avoid repetition, but don't always know how to, or notice the repetition. ruby helps us notice it, and avoid it. sometimes ruby helps us avoid it without even noticing anything has happened. this could increase the subjective fun factor of ruby, because we find ourselves writing better, DRYer code. similarly, by being higher level than some languages, ruby sometimes helps us to write complex, interesting algorithms. ruby is prettier and less verbose than some languages. hitting extra keys on the keyboard is a form of needless work/repetition. pretty and elegant code seems fun to me. if we can still read our code a month later, maybe that's fun. if we can read our code to our girlfriend because it's so much like English, maybe that's fun. -- Elliot Temple http://www.curi.us/blog/