I've been meaning to reply to this, since I've been specifically mentioned. Sorry for the delay.
On Sun, 2007-08-05 at 11:49 -0700, William Stein wrote: > 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. > > I also disagree with this, although not from much real job experience. Probably, most code is poorly documented. This might just be because documentation is often just an afterthought, and perhaps a boring afterthought. > > > 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? I would like to say that I always write like that, but unfortunately that probably isn't true. Anyway, while I may be influenced by the fact that other people might look at the code, it's just a simple fact that well documented code is more maintainable. For example, it has been about a week since I last really looked at that code, and if it was poorly documented, then by now I probably would have forgotten how it worked. The point about the pari code being poorly documented might also have had some influence. For example, I didn't want to someone else to have to search for Rademacher's paper, or to try to figure out just how to reduce precision properly, etc. --~--~---------~--~----~------------~-------~--~----~ 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/ -~----------~----~----~----~------~----~------~--~---