Re: [R] Programming Concepts and Philosophy

2008-06-23 Thread Philipp Pagel
On Fri, Jun 20, 2008 at 10:04:46AM -0500, hadley wickham wrote: 2008/6/20 [EMAIL PROTECTED] [EMAIL PROTECTED]: On 20 июн, 11:06, Wacek Kusnierczyk [EMAIL PROTECTED] wrote: the result may be that the more beautiful the code, the more the performance sucks. Sad but true. If you do

Re: [R] Programming Concepts and Philosophy

2008-06-23 Thread jim holtman
To quote Jon Bentley (Programming Pearls): The fastest, cheapest, most reliable piece of code is that which isn't there; design as much out of your code as you design in. On Mon, Jun 23, 2008 at 3:57 AM, Philipp Pagel [EMAIL PROTECTED] wrote: On Fri, Jun 20, 2008 at 10:04:46AM -0500, hadley

Re: [R] Programming Concepts and Philosophy

2008-06-23 Thread stephen sefick
This is a lot like music- a good musician knows better when not to play than when to (guitar teacher I had 15+ years ago). stephen On Mon, Jun 23, 2008 at 8:33 AM, jim holtman [EMAIL PROTECTED] wrote: To quote Jon Bentley (Programming Pearls): The fastest, cheapest, most reliable piece of

Re: [R] Programming Concepts and Philosophy

2008-06-20 Thread Wacek Kusnierczyk
Simon Blomberg wrote: I try to use a functional programming style. I define functions within functions when it is helpful in terms of information hiding. I avoid writing functions with side-effects as much as possible, so the only communication of the called function with the caller function

Re: [R] Programming Concepts and Philosophy

2008-06-20 Thread Jan T. Kim
On Fri, Jun 20, 2008 at 09:06:24AM +0200, Wacek Kusnierczyk wrote: Simon Blomberg wrote: I try to use a functional programming style. I define functions within functions when it is helpful in terms of information hiding. I avoid writing functions with side-effects as much as possible, so

Re: [R] Programming Concepts and Philosophy

2008-06-20 Thread hadley wickham
However, on a more fundamental programming philosophy note, the fact that R does not allow multiple references to one object is a limitation. One of the fundamental principles of good programming is that there should be a one-to-one correspondence between instances in the program and objects

Re: [R] Programming Concepts and Philosophy

2008-06-20 Thread Spencer Graves
Maybe I missed it, but I haven't seen in this tread mention of Venables and Ripley (2000) S Programming (Springer). I found it interesting and useful, though I have not used it as much as MASS -- partly because it is more specialized and it's coverage is not as broad. Spencer

Re: [R] Programming Concepts and Philosophy

2008-06-20 Thread Simon Blomberg
: Wacek Kusnierczyk [mailto:[EMAIL PROTECTED] Sent: Fri 20/06/2008 5:06 PM To: R help Cc: Simon Blomberg Subject: Re: [R] Programming Concepts and Philosophy Simon Blomberg wrote: I try to use a functional programming style. I define functions within functions when it is helpful in terms

Re: [R] Programming Concepts and Philosophy

2008-06-20 Thread [EMAIL PROTECTED]
On 20 июн, 11:06, Wacek Kusnierczyk [EMAIL PROTECTED] wrote: the result may be that the more beautiful the code, the more the performance sucks. Sad but true. Andrey __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Programming Concepts and Philosophy

2008-06-20 Thread Marc Schwartz
on 06/20/2008 10:04 AM hadley wickham wrote: If you do nothing to your code, in 18 months time its performance will have doubled because computers will have become faster. Your code will not get easier to understand by itself. I suspect a good fortunes candidate... :-) Marc

Re: [R] Programming Concepts and Philosophy

2008-06-20 Thread Ramon Diaz-Uriarte
2008/6/20 hadley wickham [EMAIL PROTECTED]: 2008/6/20 [EMAIL PROTECTED] [EMAIL PROTECTED]: On 20 июн, 11:06, Wacek Kusnierczyk [EMAIL PROTECTED] wrote: the result may be that the more beautiful the code, the more the performance sucks. Sad but true. If you do nothing to your code, in 18

Re: [R] Programming Concepts and Philosophy

2008-06-20 Thread Esmail Bonakdarian
hadley wickham wrote: 2008/6/20 [EMAIL PROTECTED] [EMAIL PROTECTED]: If you do nothing to your code, in 18 months time its performance will have doubled because computers will have become faster. Your code will not get easier to understand by itself. Very nicely put .. and true too!

[R] Programming Concepts and Philosophy

2008-06-19 Thread Murray Jorgensen
I am wondering if people on the list could recommend books that they have found helpful about programming concepts and style? I often find that students write R programs by copying existing code but could really benefit from the understanding of more general programming ideas. An example would

Re: [R] Programming Concepts and Philosophy

2008-06-19 Thread Simon Blomberg
I try to use a functional programming style. I define functions within functions when it is helpful in terms of information hiding. I avoid writing functions with side-effects as much as possible, so the only communication of the called function with the caller function is through the arguments