18 ms·
As someone who is fluently bilingual and speaks a third language and is also proficient or better in a half dozen programming languages along with having writte
by User23 6y ago
As someone who is fluently bilingual and speaks a third language and is also proficient or better in a half dozen programming languages along with having written code in many more, this is completely obvious to me. Learning a programming language is much closer to learning a complex board game than it is a natural language.
- danishdev 6y agoI am autistic.. I read code and "interpolate" across lines quite well. On the other hand, finishing one basic written sentence can sometimes be a surprising struggle.
- DoreenMichele 6y agoHuman language tends to be pretty fuzzy. Code seems to be quite precise and very pedantic about details. In human language, you can play with idioms, metaphors, double entendre, etc. In writing code, you miss one symbol and it breaks.
- magusdei 6y agoYou can play in a similar way with code. It's just that other developers will hate you for it.
- astrange 6y agoIt was pretty popular when Ruby and JS came on the scene. I think it’s receded now but there are still tools like Homebrew that are worse than what came before, but people switched to them because they were written in Ruby instead of Perl, and somehow that made it cool.
- eyelidlessness 6y agoThis. And the more programming languages you learn (especially across paradigms), the more each new language is more of a tree search of basic fundamentals. Certainly some paradigms fit oddly in others, but even then familiar patterns emerge[1]. [1]: For example it’s occurred to me a few times that early Node interfaces were an opportunity to introduce monad types to idiomatic JS development. Sure, it was callback hell, but basically everything that touched IO had an Option type, just in the form `type Callback<T> = (error: Error, value?: never) => void | (error: null, value: T) => void` Edit: I’m sincerely disappointed the sibling reply got downvoted and dead, it was a valuable contribution. To resurface, the sibling commenter distinguished the cognitive experience of code versus human prose from the perspective of someone who’s autistic. It’s a distinction I share (diagnosed ADHD, undiagnosed but strongly suspect ASD spectrum). Edit 2: no longer dead so I'll defer to the sibling comment.
- ChuckMcM 6y agoI like that example of "learning a board game." When I read text I "hear" conversations, and when I read code I "see" structures. Definitely different parts of the brain being activated.
- datameta 6y agoI find this mirrors my experience. Although written language does eventually call upon highly visual parts of the mind, the structures and mechanisms I visualize when reading code are more highly dimensional than the initial mentally vocal interpretation of text. A program small enough to hold entirely in my mind that I know well, such as a piece of demo-scene code I'm golfing, is a sort of multifaceted non-visual abstract sculpture with features and values that interconnect in a seamless manner that I can interact with and predict the effect of my modifications on. I highly enjoy being utterly engulfed in the flow of this simultaneously logical and artistic activity.
- Cerium 6y agoThat is how I have thought about code as well. I sort of grasp the "shape" of it, and the analogy to a board game is a good one. I think it supports why it is hard to talk about code, if we thought of it as speak-able units we could paraphrase it.
- ako 6y agoThis is also why visual low-code programming might actually succeed: it's closer to how you think about code than the actual code. It has the opportunity to visualize the structures you want to see, so you don't have to make that translation yourself.
- tug0fwar 6y agoI agree, this is probably because we never 'speak' (although write) in programming languages trying to convey something. This goes same for 'hearing' (although we read and understand, hopefully). We always use human languages for those purposes, well, except for those times we speak in pseudo-code.
- userbinator 6y agothis is probably because we never 'speak' (although write) in programming languages trying to convey something Have you told anyone to grep, cat, mount, fsck, or sudo? I'd say the more experience one has with a programming language, the more reading and writing it feels like a natural language.
- NoSorryCannot 6y agoThese are borrowings or coins into a natural language. A word from bash does not mean you are speaking bash any more than saying macaron would mean you are speaking French.
- pdonis 6y ago> this is completely obvious to me This was my reaction as well: what, they needed to do a study to figure this out?
- vncecartersknee 6y agoscience isn't when you just decide that things are obvious and leave it at that lol. They probably have data and an experimental methodology and stuff now that future authors can build on to try to answer more complex questions.
- deleted 6y ago[deleted]
- andreareina 6y agoOn the one hand, the design of Python implies that they think the natural language parts are important. On the other hand, yes we should confirm things that are our intuition says are completely obvious, otherwise when our intuition fails (as it frequently does, see the point about Python) we end up optimizing the wrong thing.
- vncecartersknee 6y agoI feel exactly the same, I've been learning a second language and it's nothing like learning programming, in fact arguably the opposite, I've found that obsessing over grammar is almost detrimental to making progress with a new language. The confident students who aren't concerned with getting all the specifics of grammar exactly perfect are the ones that are making the most progress toward being conversational, they're able to express themselves and actually have something resembling a conversation, despite using the wrong prepositions here and there or conjugating verbs wrong sometimes. The more "academically" minded students who obsess over getting the grammar correct like a math equation are still struggling to form even basic sentences outside of solving homework problems on a piece of paper. I've noticed that I've been making much better progress now that I've been focusing on just trying to express myself even if I'm making mistakes. Which is obviously the complete opposite of using a programming language.
- colmvp 6y agoInteresting. I feel like coding is not that dissimilar. In the early phases of learning a new coding language, I learn how to write lines of code. Sometimes it compiles, most of the time it would cause errors. At some point it works, but a more seasoned engineer could easily find places to refactor it in order to make it more extensible/flexible, easier to read, less brittle, and most importantly to this discussion on coding language, more idiomatic. Now, you could say surely I could've seen these by reading the docs and learning about certain library features or patterns specific to the language. But in my experience, I tend to learn faster by first exercising my brain and trying it out on my own take before having someone (be it a mentor or a tutorial/book) correct me so that I have a bit more context about why an alternative approach is better.
- godelski 6y agoI don't understand this. If your code has wrong syntax it doesn't compile. If wrong grammar you can get very wrong results. But in english you can say "I go store" and it's understandable (which btw, can be a direct translation from several languages)
- NL807 6y agoSimilar situation as you. I view programming more like seeing patterns, structures and constructs for solving problems, which is completely divorced from natural language grammar. The "language" part in programming is really just a vernacular term for describing differences in syntax, and has no parallels with human spoken languages.
- gabereiser 6y agoWhoa, the complex board game analogy is new to me but it rings so true. Like you I’m bilingual. Like you I know many programming languages (dangerous level or above). To equate learning “syntax” of the language as learning a complex board game is such a great analogy.
- motakraxxer 6y agoI was originally surprised by the study and your comment, since I generally find no difference between natural languages , math and programming languages. (I am a math major). However, most of the people I interact with find my exposition methods curious in sense of structure. So, I shared this study with some of my friends, and they agreed with the study too. When I pointed out my surprise to them, they told me that I speak like a computer program in the sense of structure of exposition. So, I guess I agree with this study in general, and actually would love to know what's going on in my brain. For what it's worth, I am fluent in 4 natural languages from two different families and I'm learning a fifth language. Also, I'm fluent in multiple programming languages.
- godelski 6y agoI'm curious what's your first language. I'm learning Mandarin and find that it feels much closer to a computer language than English or Latin based. Though I don't think I'd say learning Mandarin (or any language) is anywhere near what it's been like learning computer languages. I find mathematical language different from both as well. They do feel like 3 different parts of my brain. Though math I'm highly visual (not this way in programming or English, but visual in Mandarin).
- motakraxxer 6y agoMy first language is Marathi which is an Indo-Aryan language. My other languages are West Germanic: English Indo-Aryan: Hindi, Bengali Dravidian: Kannada And currently, I'm learning German.
- nmfisher 6y agoThat could be because Mandarin grammar is actually relatively simple, the difficulty is in “naturally” expanding your vocabulary (since characters take an order of magnitude longer to learn). It wouldn’t surprise me if a lot of it feels like brute forcing syntax and keywords - there’s no way of reasoning through it, you just have to knuckle down and learn it. It’s also part of the driving force behind my app (link in bio) - it can take a long time (i.e. years) to get comfortable carrying on a conversation, so I want to help people practise in a less intimidating environment.
- pgt 6y agoYour comment is insightful and suggests that perhaps we should try to design a programming language that feels more like a natural language.
- ZephyrBlu 6y agoI don't think making a programming language more like natural language would be helpful. It's much harder to learn a natural language than a programming language.
- infogulch 6y agoAnd also harder for a computer to interpret and execute a natural language.
- creata 6y agoOr perhaps we should accept that programming a computer is more like playing a board game and less like speaking, and optimize languages along those lines.
- goto11 6y agoThis have been tried. Languages like Perl and AppleScript was deliberately designed to feel more like natural languages. It turns out this lead to a worse programming language.
- DonaldFisk 6y agoLike COBOL? Basing a computer language on a subset of English was done for several query languages, ranging from SQL to Attempto Controlled English (https://en.wikipedia.org/wiki/Attempto_Controlled_English https://en.wikipedia.org/wiki/Attempto_Controlled_English).
- Ma8ee 6y agoThey tried that with COBOL and to a certain degree SQL. We would probably do a better job today, but the idea isn’t new.
- tremon 6y ago
- kitd 6y agoI would say, however, that designing software uses similar mental processes to translating text from one language to another. You take ideas in one form and express them in terms idiomatic to the other.
- ahartmetz 6y agoBut for two completely different audiences: One extremely precise and extremely stupid, the other is a computer. Just kidding! The other is a creature like you and me.
- m463 6y agoI think because the term "language" is used in both places people carry over preconceptions from one to the other. Sort of like computer viruses and biological viruses.
- jonplackett 6y agoAs someone who is a lot less proficient in coding languages and speaks a bit of Spanish. It’s still really obvious. Not sure why anyone would think of them as equivalents aside from both being named a ‘language’
- aksss 6y ago> board game Legos with the all the rules of AD&D 2nd Ed.
- noneeeed 6y agoAs a total monoglot who regrets not learning languages properly when he was a kid, this still seems pretty obvious to me that at least I don't read code in the way I read natural language, or maths. However it's always good to have intuitions like this confirmed or refuted by actual investigation, and putting them on a more solid footing within the broader context. My personal experience of reading code has always felt more like looking at a mechanical mechanism, or perhaps solving a paper maze where you see the whole thing at once but can focus on parts as well. It isn't something I look at one line at a time, I read it in structural blocks, almost a breadth-first reading. I see the if/else statement and structure before I see any of the details of each branch. It's a deeply non-linear process of going up and down levels of abstraction where necessary, and ignoring details at lower levels that are irrelevant to the task at hand.
- sanedigital 6y agoNo reason to regret it—there's still plenty of time to learn now!
- JoeAltmaier 6y agoNot just writing code; reading code is different too. Often I page thru code, looking around, getting the size and shape of it. I don't read every word; I'm not sure what I am doing but it isn't the same as reading. Absorbing, maybe.