5 ms·
If you don't know the language, you won't be writing, editing or improving code in it anyway. Your test is therefore irrelevant for programming languages.
by kick 7y ago
If you don't know the language, you won't be writing, editing or improving code in it anyway. Your test is therefore irrelevant for programming languages.
- Cyph0n 7y agoPerhaps, but passing this test implies a lower learning curve, which is extremely relevant for programming languages.
- kick 7y agoIt really doesn't. k's ancestors were taught to high school students and admin in incredibly short spans of time. Here's an anecdote from Kenneth Iverson about a man who learned APL in two weeks, completely alone, and the results after he taught his students it: My daughter Janet attended Swarthmore High School, and recommended Rudy Amann (head of the math department) as an excellent teacher. I therefore approached him with a proposal that we put an APL terminal in his school as a tool for teaching mathematics, suggesting that he first spend the summer with the APL group to assess the matter. Rudy responded that he could spend only two weeks, which he did. I gave him an office with a terminal (and the Calculus text in APL that I had written after our earlier experiment with high school teachers), and invited him to come to me or anyone in the group with questions. Since he never stirred from his office, I despaired, but at the end of the two weeks he announced that he wished to go ahead with the project. Rudy was pleased with the results, and told me of canvassing those of his students who went on to college, finding that they were pleased with the preparation he had given them. One thing he had done was to use some of the final two “review” weeks to show them the translation from things like +/ to the sigma notation they would encounter in college. Here's another where they taught it to high school teachers, with a direct explanation as to how students responded: I believed that APL could be used in teaching, and Adin said that to test the point we must take a text used in the State school system, and try to teach the material in it. He further proposed that we invite active high school teachers. We hired six for the summer, with the plan that two (nuns from a local school, who could provide a classroom in which we supplied a computer [typewriter] terminal) would do the teaching, while the other four (with a two-week head start) would write material. To our surprise, the two teachers worked at the blackboard in their accustomed manner, except that they used a mixture of APL and conventional notation. Only when they and the class had worked out a program for some matter in the text would they call on some (eager) volunteer to use the terminal. The printed result was then examined; if it did not give the expected result, they returned to the blackboard to refine it. There were also surprises in the writing. Although the great utility of matrices was recognized (as in a 3-by-2 to represent a triangle), there was a great reluctance to use them because the concept was considered to be too difficult. Linda Alvord said to introduce the matrix as an outer product — an idea that the rest of us thought outrageous, until Linda pointed out that the kids already knew the idea from familiar addition and multiplication tables. Finally, it was this interest in teaching that led us to recruit Paul Berry, after seeing his Pretending to Have (or to Be) a Computer as a Strategy in Teaching when it appeared in Harvard Educational Review, 34 (1964), pp. 383-401. (From KEI's delightful but sadly unfinished autobiography: https://www.jsoftware.com/papers/autobio.htm https://www.jsoftware.com/papers/autobio.htm)
- virgilp 7y agoSo then, why is K less popular than pretty much any other language? Because people are stupid? Uninformed? There's a lack of PR-minded people working with K? What exactly is your theory? It's funny that a language this flawless is slightly less popular than S or D or pretty much any other one-letter language. There must be something that makes it unappealing for the masses of programmers - what is it?
- vnorilo 7y agoMasses love javascript. Just saying. More seriously, core language quality is not the primary driver of language choice. Otherwise we'd all be using something with S-expressions, Hindley-Milner, dependent and linear types. ducks
- virgilp 7y agoJavascript must've done _something_ right, no? Yes I know it's bad from "language design" perspective, but we all know what it did right: it was embedded out-of-the-box on a very popular platform (the browser). So, there is an explanation. Do note that I didn't claim "popularity == quality". I'm not even claiming K is bad!!! Just that it's strange for something so clearly superior to everything else to be such a niche language. Surely it must have downsides...
- vnorilo 7y agoWhy is it strange? Think of languages like Lisp, Smalltalk, Haskell. You may not find them on top of TIOBE, but their innovations do trickle down to mainstream, indicating that the designers of mainstream languages find them worthwhile. Array languages are very much poised to do the same, if they did not already: numpy is essentially a poor (and verbose) man's array language embedded in python. Or consider Matlab.
- virgilp 7y ago> "A LISP programmer knows the value of everything and the cost of nothing." Here, a very old quote that tells you directly what is wrong with FP - the performance on old hardware sucked. For a very long while compilers/interpreters were not good enough. The cost/benefit equation changed in recent years, and sure enough, FP ideas are becoming mainstream. Again, I'm not saying that array languages don't have fundamentally great ideas. I'm saying that articles like this one do them no favor - they're just smug rants. Show the world you understand the downsides, and you get a better chance of promoting the upsides.
- saagarjha 7y agoUh, no? I read a lot of code, and much of it which is in languages I cannot write. But I can often get the gist of what it's doing, and this in itself is quite a useful thing to be able to do.
- kick 7y agoFor you, not for anyone actually working with the language. Which again points to the test being entirely irrelevant for the stated purpose. Some random high school student probably can't read your Swift. Sure, it might help them out somehow with the Excel functions they're needing, but it doesn't change whether or not Swift is a good or bad language, or whether the test actually means anything significant.
- saagarjha 7y agoI think a random high school student who has just finished AP Computer Science should be able to read my Swift, at least when the task itself is not complicated. Maybe not all of it, but I think it's a failure if they can't get the gist of it. (Interesting anecdote: I have gotten emails from people who have translated some of my Swift code which talked to an API endpoint I reverse-engineered to their platform of choice. They knew what at GET request is, but they were familiar with was JavaScript or Kotlin or whatever–but they were able to make use of code written in a language they couldn't write. I think that's really great.)
- kick 7y agoYou added more criteria to this high school student. Almost every one of them will have to use and program spreadsheets, few learn to program using an ALGOL-like language. The idea you put forth disqualifies any programming language that isn't derivative of ALGOL: it's exactly the sort of thing used against Lisp dialects, and many other languages that have shown themselves to be quite wonderful ("What's cdr? That's stupid!" "You're telling me you use color instead of operators? Malarkey!" "What in Hell is Reverse Polish Notation?! This is America!"). APL (and derivatives, but using APL as it's the chief example of the paradigm and because if you know APL, k is readable) doesn't require a semester in a classroom, it requires a week or two and a book. (Question: when did they start teaching AP Computer Science?)
- kazinator 7y agoIf people don't know a language, yet find it readable, they are more likely to end up getting involved in doing those things. Poor readability is not a good way to keep people out; you're not selecting for talent.
- kick 7y agoIf the language is readable beforehand, but brings a 30% productivity decrease to those proficient in it compared to what they could have with one that wasn't, even the best programmer will be mediocre. Further, the best have had a long history of finding APL and derivatives appealing: Ken Thompson? Liked APL. Alan Perlis? Loved APL. Rob Pike? Has spent years on an APL interpreter. APL isn't lacking fantastic programmers. k has shipped with a Python-like sugar layer for years now (q). Readable to most, but without the notational value, much is lost. Q'Nial (one of my favorite programming languages) is readable by most. It's very verbose, but by all means an APL-derivative. It's not as useful a tool as one with notational benefit, and never attracted much interest. Anyone close-minded enough to ignore something entirely because they don't understand it at first isn't likely "top talent."
- neonate 7y agoYou're overestimating how readable any programming language is to non-programmers.
- saagarjha 7y agoWith decent identifiers you can kind of guess the purpose of things without understanding anything else about it. A file with words such as "latitude" and "coordinate" and "distance" in it is probably something to do with maps, for example.
- neonate 7y agoNon-programmers making sense of code in this way is extremely rare. I don't think this is a priority in programming language design, the same way that making dashboards accessible to non-pilots is not a priority in airplane design. That would certainly be a poor reason to sacrifice major improvements in airplane efficiency or safety. Designing simpler dashboards for student pilots as a learning device is of course a different matter.