Talk:Bitmap: Difference between revisions

Content added Content deleted
m (provided example)
(→‎Amount of comments: You're on the case so I'm happy)
Line 47: Line 47:


:::: With regards to the Code Golf comment, I agree that the objective is not to show the shortest possible answer, and I understand that sometimes solutions, especially for a language like J, will be perceived by someone not familiar with it as an attempt at Code Golf. In most cases though I think that is a misconception and is simply due to the increased semantic density of the language achieved by its grammar and use of symbols to represent functions and operators. This is similar to the difference between the representation of a phrase or concept using one or two Chinese characters rather than a whole sentence in English. I don't know any Chinese and I don't expect to understand it without first learning the meaning of the individual symbols. On the other hand I admit that in many cases the readability of some solutions (especially for beginning users) could be improved by breaking up longer lines into shorter chunks and giving them appropriate names - for example the [[Standard_Deviation#J|J solution for Standard Deviation]] could have been provided as the one-liner: <lang j> stddevP=: [: %: +/@:*:@(- (+/ % #)) % #</lang> - not an especially complex J expression, but breaking it up in to chunks as on that page adds to readability in my opinion. --[[User:Tikkanz|Tikkanz]] 22:51, 30 August 2009 (UTC)
:::: With regards to the Code Golf comment, I agree that the objective is not to show the shortest possible answer, and I understand that sometimes solutions, especially for a language like J, will be perceived by someone not familiar with it as an attempt at Code Golf. In most cases though I think that is a misconception and is simply due to the increased semantic density of the language achieved by its grammar and use of symbols to represent functions and operators. This is similar to the difference between the representation of a phrase or concept using one or two Chinese characters rather than a whole sentence in English. I don't know any Chinese and I don't expect to understand it without first learning the meaning of the individual symbols. On the other hand I admit that in many cases the readability of some solutions (especially for beginning users) could be improved by breaking up longer lines into shorter chunks and giving them appropriate names - for example the [[Standard_Deviation#J|J solution for Standard Deviation]] could have been provided as the one-liner: <lang j> stddevP=: [: %: +/@:*:@(- (+/ % #)) % #</lang> - not an especially complex J expression, but breaking it up in to chunks as on that page adds to readability in my opinion. --[[User:Tikkanz|Tikkanz]] 22:51, 30 August 2009 (UTC)

::::: Having had a loop at those examples, it's clear that excessive terseness is an issue with J code (since it can lead to things that are a challenge to comprehend) and that you're already on the case. Which is very good. In the specific case of comments, they're good anyway, since even a novice can quickly learn to remove them. It'd be greater if we had some syntax highlighting too; even the basic kind helps ever so much. —[[User:Dkf|Donal Fellows]] 08:00, 31 August 2009 (UTC)