I certainly agree that documentation helps, and that often even more helpful (as Raul usually points out) are some example inputs.
My point below was that some of the steps obfuscate the code making it harder to see what was going on. When I develop code I often end up with long one-liners that are not necessarily easy to read - sort of tacit spaghetti code. How much effort I put into making the intention of the code more obvious depends on how much I think myself and others will use the code. That effort includes simplification, breaking the line up into meaningful chunks, formatting and documentation. > From: Markus Schmidt-Gröttrup > Sent: Tuesday, 16 November 2010 09:05 > > It is not easy to read and understand the lines. So what? How can I > know its intention? > I have written programs that look similiar. But I knew the intention > and normally wrote down it. > So for programs like this writing J is an engineers task, reading an > archaeologists. > An engineers program in my opinion should show up a bit of > documentation. > > Am 15.11.2010 19:41, schrieb Sherlock, Ric: > > It isn't hard to parse, but I can't say I find it easy to read. I > think that is because it has several irrelevant steps that make me > wonder what it is trying to do. I think the following are equivalent > and easier to read (for me) > > [: +/ (({.&.":)&>@p:@i. > > or > > +/@(({.&.":)&>@p:@i.) > > > > Please excuse typos; composed on a handheld device. > > > > -----Original Message----- > > From: Björn Helgason<gos...@gmail.com> > > Sent: Tuesday, 16 November 2010 04:39 > > To: Programming forum<programming@jsoftware.com> > > Subject: [Jprogramming] tacit programming > > > > > > It would be interesting to know how many J ers can easily read tacit > > programs. > > > > A line like > > > > [: +/ [:> [: ".&.> [: [ [: {.&.> [: [ [: ":&.>@p: i. > > > > This is something I am not too comfortable to read nor write just > like that > > even if I do know what it is supposed to do. > > > > Question is if people see it as a better way to program like this > tacitly > > than just do it in more lines and easily understood steps? > > > > -- > > Björn Helgason, Verkfræðingur > > Fornustekkum II > > 781 Hornafirði, > > t-póst: gos...@gmail.com > > gsm: +3546985532 > > sími: +3544781286 > > http://groups.google.com/group/J-Programming > > > > > > Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari > einfaldleikans > > > > góður kennari getur stigið á tær án þess að glansinn fari af skónum > > /|_ .-----------------------------------. > > ,' .\ / | Með léttri lund verður | > > ,--' _,' | Dagurinn í dag | > > / / | Enn betri en gærdagurinn | > > ( -. | `-----------------------------------' > > | ) | (\_ _/) > > (`-. '--.) (='.'=) ♖♘♗♕♔♙ > > `. )----' (")_(") ☃☠ > > --------------------------------------------------------------------- > - > > For information about J forums see > http://www.jsoftware.com/forums.htm > > --------------------------------------------------------------------- > - > > For information about J forums see > http://www.jsoftware.com/forums.htm > > __________________________________________________ > Do You Yahoo!? > Sie sind Spam leid? Yahoo! Mail verf�gt �ber einen herausragenden > Schutz gegen Massenmails. > http://mail.yahoo.com ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm