On 8/5/07, Justin C. Walker <[EMAIL PROTECTED]> wrote: > > On 8/4/07, Alec Mihailovs <[EMAIL PROTECTED]> wrote: > >> From: "Alec Mihailovs" <[EMAIL PROTECTED]> > >>> > >>> It actually may be true (regarding to Mathematica). Their code > >>> may be very > >>> poorly commented (and AFAICT it is.) > >> > >> And the motivation for doing that is very simple. If you (a > >> developer) do it > >> that way, so that you are the only one who could understand the > >> code - less > >> chances that you get fired. > > > > Scary. Unfortunately, you're quite right. > > This is pretty cynical, and I can tell you from my experience in many > jobs over enough years to have earned my grey hair: it ain't so. > Most reasonable engineering managers hate this kind of thing, and > work pretty hard to get clean and readable code from their > engineers. Anything else, at least in larger companies, is asking > for serious maintenance problems. To be clear about this: the job is > to produce something that *can* be easily maintained. > > Take a look at unix kernel source sometime :-}
Thanks for the clarification. I'm actually totally clueless about commercial code, having never worked in such companies and -- of course -- hardly having had a chance to look at such code. > > I think Jon Bober's code for number of partitions is a very nice > > example > > of how open source is so much better. > > Jon's code is a very good example of what everyone wants from code. > It certainly is not an example of open vs. closed source. But it is -- at least -- an example of open source code. The corresponding closed source code is whatever implements that function in Mathematica, and I can't give it as an example to compare with, since I can't look at it. Only Jon can really answer this (Jon?) but I tend to suspect -- and maybe I am wrong -- that Jon wrote his code the way he did, because he knows he's posting it to potentially 100 people to look at every time he posts an update. There must also be something to the fact that he knows people will always have a chance to look at his code and inspect it, that increases the chances he'll document things. Moreover, just perhaps, the fact that the open source PARI code to do the same thing was poorly documented and wrong (!) and was sort of embarrassing to PARI, might have also made him want to document things more. Or I could be making up nonsense. Jon, why is your code so well documented? William -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---