Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Is it true that a person with fairly good fundamentals in programming can easily learn any programming language?

Well, when I say programming languages, I refer to the agile and dynamic languages like PHP, Perl, Ruby, etc but not the former programming languages of the distant past.

I've worked only on java, groovy and flex to some extent. So considering the fact that I am an amateur programmer but a fast learner, on a rough basis, how long would it take to get a foothold on any one of such languages?

share|improve this question

closed as primarily opinion-based by gnat, Bart van Ingen Schenau, GlenH7, MichaelT, Kilian Foth Dec 13 '13 at 8:37

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Replace "Any" with "Most". –  user1249 Apr 15 '11 at 9:43
4  
What makes a language 'agile'? I thought agile was a development process. –  oosterwal Apr 15 '11 at 12:55
16  
Mastered easily? No. Learned easily? Yes. Mastery implies a level of expertise that requires years of usage in any language. Learning how to use any language once your fundamentals are in place should be a given. –  Joel Etherton Apr 15 '11 at 13:15
    
No, it's just true for similair languages. Knowing Java will not help you learn Haskell, but help you learn C++ and so on. Knowing PHP won't help you learn assembly, but it will help you learn Ruby. –  iveqy Dec 11 '13 at 9:11

12 Answers 12

up vote 41 down vote accepted

Yes, with reservations.

Four weeks ago, I would say I had professional-level skill in C and C++, and amateur-level skill in Java. My boss asked me to write some software in JavaScript, with which I had zero experience, and off I went.

Over the next two weeks, I read many sample code snippets, found all the cool libraries, and wrote my program. It's done, and it works. Then last week I bought a JavaScript book, and I've been reading it, and boy, I did not know what I was doing. Now I understand why my objects were acting so strangely.

So now I say, I know a little JS. I can read it and work with it, but I'm sure what I'm writing is inefficient, hard to read, and does not follow best practices.

In general, a fast learner can take a week and start producing low-quality product in a new language. If you know Java, you can pretty quickly pick up C, C++, PHP, Python, JavaScript, but only well enough to modify code or write well defined functions. (Perl may be harder because regex's are complex.) In order to properly architect a system in a new language, you would probably want a year of developing professionally under experienced mentors.

share|improve this answer
18  
I'd venture to say that it takes two years. The first year should leave you relatively proficient, the second year should leave you relatively efficient. –  Tim Post Apr 15 '11 at 7:03
4  
I had this experience many years ago (after learning about a dozen languages)... I had to work in Ada. To write code in Ada took a few days. To really get into the head-space of the language/run-time system designers and write GOOD code, that took a year. –  quickly_now Apr 15 '11 at 7:04
1  
To be honest, I learned Java this way too. I'm currently at the 1-year mark, and I would say "relatively proficient" is accurate. –  Brad Apr 15 '11 at 7:16
1  
The reason is that your fundamentals, even strong maybe, just where not broad. If you had known of other languagues, with closures, list comprehension, other data-structures and ohter scoping rules before jscript, you might have had less problems. –  Peter Apr 15 '11 at 13:13
    
I had a similar experience with VB.net, until I read the code that my boss (with several years VB experience) had written... oh dear. Code smells like duplicate code tend to transcend languages! –  DisgruntledGoat Apr 26 '11 at 0:56

Basically the answer is yes... and no... it depends on what you mean by fundamentals and mastered easily.

FACT

  • Knowing the fundamentals of programming will help regardless of the language. By fundamentals here I mean things that are not specific to a given paradigm. Things like algorithmic, Abstraction levels, isolation etc.

  • Knowing well the fundamentals of a given paradigm (OOP, functionnal etc) will make easy to learn languages supporting the same paradigm. One could say, knowing a language well will enable you to pick up quickly languages of the same family.

  • With every languages learned in the same family the next one will me a lot easier, I would not be surprised should this learning curve be exponentially faster as you know more.

MYTH

  • When moving to a new different paradigm knowing well a language of the first paradigm will not be as helpful as learning a language in the same family. In fact, depending on the difference between them, you may very well have to first unlearn a few things before you can move forward and really grok the new paradigm.

--- edited last section based on comments ---

Fact...

  • Knowing a first Paradigm can help you learning the next...

but

Myth

  • Don't get cocky it can just as well slow you down or be of no help at all for the third paradigm.
share|improve this answer
    
all good except for the last one. anecdotally, knowing a procedural programming language like C was no help whatsoever when trying to learn a logical language like Prolog, and in my case it got in the way, e.g. "Q: how do i code a loop in prolog?" ==> "A: you don't". –  Steven A. Lowe Apr 15 '11 at 14:15
2  
The anecdotal evidence I've heard here and there suggests that you can start a programming newbie on Scheme fairly easily, but that it's a lot harder if they've been programming in BASIC or C# or something like that first. –  David Thornley Apr 15 '11 at 14:26
1  
@Steven & David : I was not quite certain about that last one. I did go from procedural to Object to functional but have not attempted logic family yet. I did find it easier as time and experience goes but dared not generalizing. I will modify the answer based on your comment. –  Newtopian Apr 16 '11 at 2:49

for any similar language, yes

for languages with radically different paradigms, not so much

example: you know C++, you want to learn Java, piece of cake; you know VB.NET, you want to learn Prolog...the whole cake, possibly three or four cakes

share|improve this answer
1  
I agree. There are some languages that are just following a completely different philosophy; thus it's not trivial to switch for example from an imperative language like C to a logical programming language like Prolog without putting some effort. –  faif Apr 16 '11 at 9:51

I believe the brief answer is: "sort of true but hard to verify". It is very difficult to learn the closely associated API, usages, idioms, and paradigms (OO, functional, etc.) than the actual syntax of a language. I think the language itself is easily conquered if you have strong knowledge and experience on programming fundamentals and some compiler knowledge, but difficult to master because of auxilliary stuff.

Clear example would be going from one language to another; C to Java. The code syntax closely resembles to C-style programs, but you also need to know the java api's (generics, garbage collection, etc.) and most likely, in our current "IT landscape", some third-party frameworks (Spring, jUnit, Hibernate and so on) to do something useful for businesses. So if you've done C before, the language syntax wouldn't be the issue, it's the rest.

This is coming from me who knows Java, C#, Javascript, HTML, CSS, Delphi, etc. I may not know every nook and cranny about the frameworks or libraries that I use, but I know my way around and can learn quickly because of my experience using different ones from earlier. For a "quick learner" it's all lateral thinking really.

share|improve this answer

Fundamentals of Computer Science you'd need to know include not only the mathematical foundation (set theory, logic, graph theory, algebra, information theory, algorithmic information theory, etc.) but also a number of programming languages, at least one from each group - i.e., one imperative (possibly with OOP, but that bit is not mandatory), one eager functional, one lazy functional, one logical, one concatenative or stack-based.

With this base you'd be able to easily learn any given new language in no time. If some bits are missing you might end up facing severe resistance.

And the best way of learning the language inside out is implementing a toy compiler or interpreter for a significant subset of it (of course without a standard library - that's the most complicated and the most boring part of any language).

share|improve this answer

I thing the consensus here is that having good fundamentals will help to some extent, and I don't disagree with that. However, one point that is missing from the other answers is the issue of picking up the idioms of the language, and I think to master a language you must be writing it idiomatically.

For example you can write reams of completely correct C# without ever using the using statement to automatically dispose of objects, but in well written idiomatic C# you will see using {...} a great deal. I don't know of any none-.Net languages that have this construct (although I know very few others and my Java is rather rusty so I could be wrong), so even an expert coming from another language that doesn't have this feature will need to learn this idiom from scratch as it were.

share|improve this answer
    
There are similar idioms widely used in Lisp and Scheme, so it won't be anything new for one coming from that background, and one will deliberately look for this feature in any new language. –  SK-logic Apr 15 '11 at 9:06
    
Yes, but if you are coming from, say, Pascal or ADA it would be a completely new idiom that you would not even know to look out for until you saw it. –  Steve Haigh Apr 15 '11 at 9:24
    
that's exactly the reason why I believe that one must know at least one language from each group in order to be able to learn any new language and choose tools wisely. –  SK-logic Apr 15 '11 at 10:08
    
@SK-logic: When I saw things like "using" and "try...finally", I had no problem understanding them as the rough equivalent of the Common Lisp "unwind-protect". However, language features like that may not show up in a given multi-paradigm selection of languages. –  David Thornley Apr 15 '11 at 14:30

It's a true statement for some definition of "fairly good" and "easily".

The better your understanding of the fundamentals, the easier it is to transition from one language to another. If you're an expert Java programmer that has a solid understanding of object oriented languages, for example, the basic syntax differences between Java and C# should be relatively easy to master in a week or two. It will take longer to understand how the functionality in all the associated libraries maps from one to the other, but you'll probably have a decent handle on the basic libraries in a month or two. Then, it's a matter of figuring out those cases where the standard approach to a problem in language A doesn't translate directly to the standard approach in language B (i.e. you want to use LINQ in C# rather than JPA in Java) and getting comfortable enough in the new language that you're thinking in it rather than thinking in the old language and "translating". That will probably take three to six months depending on how well the functionality you typically use maps. At the six month mark, the expert Java programmer would probably be a reasonably efficient and competent C# developer. But as with anything, you can spend years learning all the intricate details, mastering various libraries and add-ons that aren't part of the language but are part of the surrounding ecosystem, and generally improving yourself as a developer in that language.

share|improve this answer

I would say it completely depends on a person's enthusiasm to learn the new language. When fundamentals are strong and if he can understand how the new language interprets anything then its quite easy to learn any language.

Best example is my self. I've worked with quite a few languages even though I've done most of my work in C# but I started my career from C and went on to learn C++, Java, VB, PHP, scripting languages, perl and so on. Anywhere throughout this term I never felt like I cant learn this language.

share|improve this answer
3  
And the languages you've described are more or less similar to each other. For a challenge, try to learn Haskell, or Scheme, or Forth, or Prolog. –  David Thornley Apr 15 '11 at 14:31

I found it never hard to learn a new programming language, to the contrary, it was great fun most of the time. Yet, there are languages I looked at but never understood, because I could not grasp the idea behind them, if there was any. One example is COBOL, I never understood what had to go in which DIVISION and SECTION and why. Other examples are PHP and Groovy. With PHP I tried to understand why one would need it in the first place, given that there is perl. Perhaps someone can explain. With Groovy I do also not understand a bit of the concepts behind it.

share|improve this answer

It all depends.

I know that's often the answer...

But what does fundamentals mean?? A lot of people who have fundamentals for one paradigm (like OO) does not have them for other paradigms (like functional).

A lot of people coming from OO and know all design patterns, might have no clues of functional design patterns or stuff like list comprehension, currying, tail-recursion, closures...

So YES : if fundamentals mean fundamentals of all paradigms.

In this case the problem is that javascript use a lot of paradigms, like procedural, OO and functional a bit and has a strange scoping coming from java, c++, ...

So the fundamentels don't help in this case, but picking up more fundamentals here and still converting to another language may get easier and easier the more patterns you get in your toolbox.

share|improve this answer

Don't forget that the art of computer programming is the art of staying EXACTLY what you mean. So any means of telling the computer what do do, from Java to Access to Excel to Visual Fortran, is a programming language.

And some languages are just plain bad. IMHO Excel and Basic are bad languages; Java and C++ are good languages. FileMaker scripting is a terrible language. HTML can be excellent if you're not sloppy.

Can you learn it? If it's good, yes. If it's bad, depends on your disgust threshhold. Things that make you want to puke are hard to learn.

Don't every commit to using language X on a project unless you have seen and played with language X already.

share|improve this answer

The answer is "This is a fact not a myth!"

I'm just like you, I've also worked in various technologies viz. java, .net and recently worked with iPhone, android and blackberry.

The net is full of resources, just go through the information understand that, implement that and move further.

In fact "Technology is made for developer not developers are made for technologies, Technologies changes but developers don't".

:)

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.