9 ms·
Why is it difficult for developers to learn another programming language? [pdf]
- ashtonkem 7y agoIs it? My personal experience makes me think that it isn’t. I’ve programmed professionally in eight languages if you count significant line changes, ten if you count any change. At this point changing editors is harder than changing programming languages.
- Twisol 7y agoYour first language is hard because you're learning a ton of things all at once, only one of which is the language itself. Your second language is hard because it's not the first, even though it's probably pretty similar. But the differences will catch you out. A second language challenges the mental models you built up with the first language -- you have to tear some of your understanding down and come up with a more generalized perspective. Languages similar to the first two become easier to pick up after this point, because you're mostly looking for a handful of differences, not a total paradigm shift. But languages that are sufficiently different, like C and Haskell, require a lot more of the ground-up type of work you thought you'd left behind by now. It gets easier and easier as you cover more of the conceptual landscape. But I'd be willing to bet that many developers haven't had to journey far from home.
- ashtonkem 7y agoI’d agree that similar languages are easier to learn, but once you’ve learned how to learn a programming language, new ones are easier, even if they’re dissimilar from your prior languages. For the record, my professional work includes languages as dissimilar as PHP, Java, and Common Lisp, while my hobby hour work includes Rust and Haskell. That’s a pretty wide range of the language space that exists today, IMO.
- Twisol 7y agoMy language gamut is similar to yours -- I don't disagree. I usually find it straightforward to pick up something new too. But there are still languages I know are going to take a lot more time for me to grok, like Coq. (I tried Coq a few years ago, and even though I already knew a fair bit of Haskell, the differences were enough to completely throw me off.)
- mikekchar 7y agoI agree with you. I think there are some problems with the study. For example "Does cross language interference occur?" Not only does it occur, but that's literally how you learn a new language. You make assumptions based on the languages you know. You write code. You notice that it doesn't work the way you expect. You try to understand what is different. It's by far the fastest way to learn a language rather than a problem. The learning strategies of successful language learners show this: Learning on their own, Just in time learning, Relating new language to old langue. I would say that the "Language interferences" are just a product of the learning method. Putting yourself in the deep end and trying to swim always results in a little water in you lungs ;-) The fact that it is challenging does not imply that it isn't desired. In fact there is a whole branch of skill acquisition theory called "desirable difficulties". While I think their theories of what would make the process better are interesting, I don't actually agree with their conclusion - that we should proceed as if their theories are correct.
- burlesona 7y agoI find the opposite is true. Learning the first programming language was hard, the second was easier, the third and fourth easier still. At some point you develop intuition about what computers can and cannot do in a universal sense and then you realize every language is just different nuances and emphases on those capabilities, and it becomes pretty easy to pick up a new one very quickly. Edit: after reading the paper I understand the emphasis is on conceptual mistakes people make when coming from one language into another - you assume things work like A and make mistakes when B works differently under the hood and you don’t realize it until banging your head against it for a while. That experience does ring true, but I stand by my original comment, this is mostly only an issue for language #2, and with each language it gets easier as you begin to think more in universal terms and have fewer assumptions and gaps where you’ve been accustomed to something that “just works” in the environment you’re most familiar with.
- j88439h84 7y agoHard to know if it's universal or just all the language designers being influenced by the same stuff.
- burlesona 7y agoWell, there’s some of both. Languages all influence each other, and most of them are “inspired” by a specific parent or two - “D is Better C,” etc. But there are also a handful of core CS ideas and computer hardware characteristics that derive a lot of what computers can do and how to do it well, and that stuff shows up as pretty universal across many languages.
- deleted 7y ago[deleted]
- kalium-xyz 7y agoDefinitely both, in any software you take user expectations into consideration. Also all programming language designers are humans most of who know English, this gives a shared cultural context.
- 7y ago
- raz32dust 7y agoTitle is a little misleading as it seems to imply that programmers find it difficult to learn another language. But there is no such implication in the study. The study really seems to be about specific language features that can contribute to making it harder/easier to pick up.
- dnprock 7y agoMy CS college program made me take a programming language fundamentals class. I still remember it. The class was one of the most difficult classes. We had to learn 4 programming language paradigms: imperative, declarative, object-oriented, and functional. In each paradigm, we learned to write programs in a chosen language. I find the experience very useful for my software career. It helps me learn new programming languages quickly. When I see functional operators, I remember Haskell. I'd recommend to master one language in different paradigms. It pays dividends. https://en.wikipedia.org/wiki/Comparison_of_programming_paradigms https://en.wikipedia.org/wiki/Comparison_of_programming_para...
- nayuki 7y agoI had a class that was even more intense, CSC324H at the University of Toronto. We learned Scheme emphasizing on higher-order functions, ML emphasizing on static typing, Haskell emphasizing on lazy evaluation, and Prolog emphasizing on {Horn clauses, unification, backtracking}. All in the span of a 12-week semester.
- MattGaiser 7y agoI mostly get stuck on the function, func, fun, void, def, etc. Most other stuff is very similar.
- blackrock 7y agoThe pure language features itself, is not hard to learn. This is just the tip of the iceberg. It’s all the frameworks, and their undocumented features, that sometimes doesn’t make sense, but it’s the way it is done, which is what makes learning new languages hard to master.
- StandardFuture 7y agoThis comment could not be upvoted enough. There is a massive productivity level difference between someone who has mastered their expertise in a language's ecosystem and someone who is just coming to the language but able to understand the "linguistics"/syntax quickly (usually because they carry some similarity to an already known PL). This is not even considering all the little "gotchas" each language will have. Although, Stackoverflow et al. help ease this a bit.
- cleansy 7y agoOn top of that there is also understanding the philosophy of a language. Learning python as my 3rd productive language was 3 full-time weeks, "Doing things the pythonic way" took years.
- ozim 7y agoThat is also why getting into frameworks is a bit hard for people who are used to do things without frameworks. Like people who stick with JQuery and find Angular hard, because you have to do stuff "Angular way". You can write a lot of javascript and switch to typescript but "Angular way" is yet another thing to learn. I can write python and understand the code, know some quirks but for large code base I would probably be lost because I don't know "python ways".
- voz_ 7y agoMy anecdotal data appears to point to the opposite. My first language (JS) involved learning: - What is even programming? What is a function? an argument? What is state? What are types? - JS itself - How browsers work - JQuery (do people still use that?) - NodeJs - How backends work - How databases work Then, the subsequent language, Java, was only different in patterns, paradigms, keywords, and frameworks (at least, at the amateur level I was going at). Args were still args, strings were strings, sure we had classes instead of functions here and there, but for a beginner it was close enough. Java, the second language, was far easier to learn. And so forth, with each language becoming progressively simpler.
- mettamage 7y agoHa fun! I've had the order switched. I'd argue that you had an easier time. Why? Chrome Dev tools and loosely typed (avoids some beginner questions that'll have easy answers when you have a bit more experience). Also, NodeJS encourages exploring the commandline, Eclipse doesn't.
- yomly 7y agoJS is a really horrible language to learn from the perspective of a teacher. So many concepts dumped on you all at once. Before you even know what a function is, you have the entire DOM API dumped on you and is available in the global scope. If you try to learn OOP in it, you have the choice of trying to grapple with the leaky ES6 class keyword or you get prototypal inheritance and `this` will come up. That said, from a learner's perspective it's great: you have the entire DOM available to you instead of having to learn how to take the car of the cdr of a list and wondering how that has anything to do with building the next Airbnb/Uber of this world... At least with Python/Ruby they commit hard to terseness / fluent interfaces so you have less syntactic noise to deal with, and Haskell commits hard on equational reasoning so you can pick up computation if you've come from a mathsy background. Or Scheme which is as close as you can get to "no syntax" as you can (IMO)
- tiborsaas 7y agoI used to teach programming with JS. It was not really a blocker for me at any level. When we hit some quirks I stopped to explain why this is and how it's different in other languages. Maybe because I like JS made me enjoy teaching it as well :)
- cm2187 7y agoIn my opinion it is all down to muscle memory. When you don't even need to think about whether this class will behave one way or another, you just know that if you type it this way it will work without a doubt.
- njharman 7y agoI think this depends a lot on the developer. Some Devs I work with want to dabble with many tools and solve problems by picking (or creating) a new tool rather than learning how to solve problem with existing tool. They learn, and are talking about (and trying to get team to adopt) other languages all the time. Personally, I want to totally master a small number of tools. (perhaps just my inability to master many). So, it's not that I find it hard to learn new lang. It's I'm unwilling to waste effort on it unless there is advantage. And to overcome the mastery I have attained after 25 years of Python that advantage has to be large. [btw Past langs include VisualBasic, Pascal, PHP, C, C++, and PERL. But only PERL did I use long enough for mastery] Neither is obviously better/correct. Like I said, it depends on how the developer best works.
- nnq 7y agoIt's easy to learn new languages, hard/slow to learn the ecosystem... We should get better at creating mixed-ecosystems and cross-language libraries... the JVM was a step in the right direction but most new development completely forgot about that!
- timClicks 7y agoWell Microsoft was facing an existential threat so invested in its own universal runtime. As for languages designed after Java, many of them are responding against it. They don't want users to require slow startup costs, for example.
- csunbird 7y agoAgreed. There is also another problem: For example, I know that I can code with C# but I do not know what is the traditional workflow for designing a micro-service in .NET You just do not know how to "Do things in the right way"
- peter_retief 7y agoNot really true, it gets easier the more languages you learn. I do know of developers who spent their whole working lives using only one language and they are very good at that one language. (I am thinking of MUMPS and the developers I met when working in the medical s/w field) Should we just learn one language and do we gain by knowing many and why are there so many languages that do the same thing? If there were to be one language what would it look like? https://en.wikipedia.org/wiki/MUMPS https://en.wikipedia.org/wiki/MUMPS
- squidkid 7y agoWhat i struggle the most when coming to a new language is the tooling that comes with it. And how do I structure my code in this new language. Sure some things are universal, but some things are just hard to find out. The js ecosystem is an especially tough example for this.
- Karishma1234 7y agoI have found it easy to pick up new languages. The only time I get confused is when two languages have exact same syntax but when they behave differently.
- smitty1e 7y agoCan we just call "cross-language interference" an "accent"? When I code VBA macros, I pile up all of the "End If" and other compiler noise in column 80, with comments. Because I'd really rather be coding Python.
- tiborsaas 7y agoI think the title should have been: When it's difficult to learn a new language, why is that? Some paths are easier than others so it really depends on the new language and where someone is coming from. I started with PHP/JS on a self taught basis. Then I started to develop interest in other languages. Python was a no-brainer, C++ looked quirky but okay, in Java most thing looks familiar. But functional languages get me. Rust is another beast, but totally looks tamable. Haven't finished the article yet, but it has some great insights.
- kissgyorgy 7y agoWhat is really important when learning a new language is just forget any idioms you learned the last time! Know how computers work, and have a general knowledge about memory management, data structures, algorithms and clean code, but try to understand the new language's idioms. You will have an easier time and make less mistakes. For example, there are typical mistakes when a C or Java programmer uses Python for the first time, I can tell somebody's history just by looking at what idioms they try to force on Python which shouldn't. Example for C programmer writing Python: for i in range(len(mylist)): print(mylist[i]) Example for Java programmer writing Python: Starting hello world with "class HelloWorld:". LOL You don't need to start with classes and objects in Python!
- keyle 7y agoI write JavaScript and python daily. I'm fairly fluent in many languages including C++. The only language/platform I'm having difficulty with is Swift and MacOS (Cocoa)! It's a pile of ancient junk and 5 versions of a new language with absolutely turd documentation from the platform and a gigantic pile of "meh works for me". It feels like trying to run in moving sands with your eyes closed and your hands tied. I'm only saying this to make a point: sometimes it's not the developer having a hard time as much as the ecosystem making it a living hell.
- loopz 7y agoCircumstances and expectations might be different. When starting on your first language, was different than the second, and different from your third, etc. Your first language, you know you don't know much. So you try out and play with it. If you're unlucky, you get stuck, don't get the books, software or help that would make you proceed (ie. machine code for C64), so would need something else or give up altogether. For some experiences, you just need to know the right people, be in the right circumstances. On your second language, you probably already seen program listings in several languages already. You expect to get up and running after a few hours. This might happen if the paradigms are the same. For a completely different paradigm, you could need to grind it over time or start over as a beginner in that paradigm again. Also, for many, learning new languages, frameworks etc. are not the fun part anymore, so get less emphasis on playfulness and spending time with it. When preference is on being productive, one might miss many big opportunities.
- sacks2k 7y agoIn terms of your career, it's better to become an expert at one language than a jack of all trades. I can quickly move from language to language, but make the most money as a consultant for languages in which I'm an expert. I also think many developers use a single language for work and don't have much time after work to learn another one.
- justinlloyd 7y agoMy anecdotal evidence is exactly opposite to the paper. I would expect the title of the paper to appear as a headline trotted out in some mass media publication with the article written by a journo that dabbled in BASIC in high school and decided that programming and software development wasn't for him. Maybe I've forgotten what it is like to not be able to program, in the same way I don't understand how to not swim, or how to not ride a bike, or how to not read and write, but learning a new language, learning it well, to be facile in the language and the standard APIs that come with the language (ignoring the tens of thousands of obscure little npm packages in javascript for instance) is not a huge amount of work.
- mbrodersen 7y agoIt isn't in my experience. A list of languages I have used professionally: C, C++, Java, C#, Javascript, Typescript, Assembler (PowerPC), SQL, ... And for fun: Basic, Pascal, Haskell, Lisp, Scheme, Idris, Assembler (Z80 and I86), ... Only Haskell was hard to learn (but most definitely worth it).