3 ms·
With context, I can understand "We co___ed together some crazy hack" and "We c___le our infants to show love and affection." These sentences almost give defini
by kazinator 7y ago
With context, I can understand "We co___ed together some crazy hack" and "We c___le our infants to show love and affection."
These sentences almost give definitions to the partially obliterated words, which is why we can guess what those words are. We can form plausible definitions, and then work backwards through our vocabulary by pattern matching.
(I would probably guess "cuddle" for the second one; I have negative associations with "coddle", since it's mainly used in describing situations when ineffective adults are supported economically, and protected from the consequences of their bad decisions.)
The strings in your APL/J/K are not existing vocabulary words that you're re-iterating with a context that gives their definitions. (Some of them may be idioms that appear in other programs, including other people's programs, but others are local inventions in the program.)
If you obliterate parts of them with underscores and then hand that to the next programmer, they are screwed.
Cobble and coddle are confusable. If we use cobble as a parameter name in some C function, and later refer to it as coddle elsewhere, only the compiler will notice. (Provided it's not the case that they are both defined, and have compatible type.)
extern int coddle;
// ...
void frob(int cobble)
{
// [ snip 300 lines ]
if (some_condition || (another_thing(foo) &&
some_condition(foo, coddle++))
do_that();
// [ snip 400 lines ]
}
My eyes will likely will not spot that the "coddle++" isn't "cobble++", and the compiler has nothing to say. Doubly so if I'm not aware of the existence of the coddle global.
I remember copious instances in the past when my brain decided to hide a difference like that, and then "cached" the decision so that it remained hidden even after staring at the code. Once you believe that coddle++ is incrementing the cobble parameter, your brain may not let your eyes take a fresh look at it.
Very recently, I was tripped up for a while by a sentence in some documentation that talked about PTP (precision time protocol) and P2P (peer-to-peer) in the same sentence. It didn't make sense until a fifth re-reading with a coffee break in the middle.
- xelxebar 7y agoNot sure what to tell you if you're convinced I'm lying. The latter half of your argument I find strange. It is arguning against APL/J/K using a C example. Mimicking this tactic, I could argue that C is completely unreadable because it indents things at so many different levels. If my x86 assembly did that it would be a huge mess and hard to follow. The languages are just so different that the syntax of one offers properties completely alien to the other, "What is this weird x=2 syntax? I just want 2 in my rax register and C doesn't let me do that?!" Part of the issue with APL/J/K is that to understand some of the coolness, you really do just need to trust the evangelizers and drink the koolaid. Maybe you'll end up thinking we're all just loonies, but if you give it an honest try, I suspect something will click and you'll see the point we're trying to make.
- kazinator 7y ago> using a C example I see; it's okay for you to use the English language with sentences involving cobble and coddle, but not okay for me bring that back around into a computing context, using a language other than APL, J or K? I used C because it's a lingua franca of computing, in which it is natural to use identifiers like cobble and coddle. We can use Python, if you like, or JavaScript, Pascal, Lisp, Haskell, Basic, ... or a Makefile, shell script, HTML, CSS, Sendmail config file, LaTeX, ... Thea argument is that coddle and cobble are, in fact, plausibly confusable as identifiers in computing, where we don't have the right kinds of linguistic context to spot a mix-up. If I have <div class="cobble"> in some HTML, and the CSS has a .coddle { ... } selector, I can see not being able to spot the problem. Furthermore, I have a point in that a sequence of symbols in your APL program which is particular to that program and not a common idiom is not comparable to a word like "cobble". It's more like "cmzblx" versus "cmzdlx". Because (at least local) identifiers can usually be freely chosen by the coder, I can avoid this kind of problem. I can easily change "cobble" to "horse" (which doesn't look like "coddle") throughout a source file and be confident that it still means the same thing, because the letters are not operators that encode meaning. > to understand some of the coolness, you really do just need to trust the evangelizers They're too late; I might have been fooled as a 16-year-old in 1987. > What is this weird x=2 syntax? I just want 2 in my rax register and C doesn't let me do that?! When I first saw a BASIC program with assignments to some variable X, I thought they were a system of equations for the machine to solve. I parsed the syntax right, though; it was just the semantics that was off.
- xelxebar 7y agoHrm. Let's step back for a moment. Your responses read to me as defensive and it is not my intent at all to attack your position. If you do not want to deal with APL/J/K, that's perfectly fine. Your interests and goals are very likely different than mine. All I wish to communicate is my experience, "Hey, this language seems really weird and counterintitive and completely non-sensical on the suraface, but I spent some time actually learning it and it turns out that these first impressions were wrong!" You know how modern mathematical notation is really compact compared to the "more readable" prose that used to be used in the past? The funny part is that the prose is a lot harder to parse than the modern notation, provided you already know the latter. APL/J/K is a lot like executable math notation in that way. What about you? Is there some core point you are trying to get across that I/we seem to be missing? > I see; it's okay for you to use the English language with sentences involving cobble and coddle... So my answer is that, yes, my analogy with English is relevant, because it attempts to communicate to you what it feels like to read unfamiliar J code in practice. Your analogy with C is making a different point, that opaque identifiers with similar spellings and similar contexts are confusable. I agree.