Thread: The value of learning a new programming language

  1. #1
    Registered User
    Join Date
    Oct 2006
    Location
    UK/Norway
    Posts
    485

    The value of learning a new programming language

    I have just finished my second year at university now (Wiiiiiiiiii) and I have a bit of time before I start work and I was thinking about maybe teaching myself a new programming language, but I was wondering if it is really worth it or if my time is better spend working on a personal project in a language I already know?

    So far I know C++, C#, Javascript and a bit of a few scripting languages. I am by no means an expert in any of them.
    If I were to learn a new language what would you recommend? I have heard that learning a new language is good as it might give you a different way of thinking about problems and make you a overall better programmer.

    Thanks and wiiiiiiiiiiiiiiiiiiii again for completing the year

  2. #2
    Making mistakes
    Join Date
    Dec 2008
    Posts
    476
    I would recommend C++.

    There is IMO no need to always learn a new programming language. You'll be amazed about how many things about C++ you don't know. Try to get better in C++ or in C# and it will help you much more than the 999th quickly-and-dirtily-learned language.

    But if you want a new way of thinking about programming, I'd really recommend assembler or LISP. They're not widely used anymore, but I think they're clearly two of the "best" programming languages out there. I personally only know a little about them, but I'm already fascinated and will learn one of them as soon as I have time.

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    You could learn enough Python in a day to be dangerous.

  4. #4
    Making mistakes
    Join Date
    Dec 2008
    Posts
    476
    Well, maybe not in a day, but Python is also fine. I use it and like it. But choose carefully.

  5. #5
    Complete Beginner
    Join Date
    Feb 2009
    Posts
    312
    Quote Originally Posted by Brafil View Post
    But if you want a new way of thinking about programming, I'd really recommend assembler or LISP.
    That's what I had in mind when I first read the initial post. Speaking of "assembler", IMHO it completely suffices to read an introductory tutorial and maybe try to implement something trivial, e.g. cat(1). This will help in procedural and imperative languages like C.

    In contrast to that, a new programming paradigm, especially functional programming, will greatly advance your overall programming skills. I think ESR once said that even if you don't program a lot in Lisp (Scheme, Haskell, Oz, ML, whatever), the experience of finally getting the clue will make you a better programmer in whatever language you prefer. The basic concepts of functional programming are so deeply fundamental that you can apply (and will probably miss) them in more pragmatic programming environments.

    (lambda x.x x)(lambda x.x x)

    Greets,
    Philip
    All things begin as source code.
    Source code begins with an empty file.
    -- Tao Te Chip

  6. #6
    and the hat of copycat stevesmithx's Avatar
    Join Date
    Sep 2007
    Posts
    587
    I personally think java would add nicely to your toolkit.
    Not everything that can be counted counts, and not everything that counts can be counted
    - Albert Einstein.


    No programming language is perfect. There is not even a single best language; there are only languages well suited or perhaps poorly suited for particular purposes.
    - Herbert Mayer

  7. #7
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Nah, java is too much like C# to offer you anything new or interesting.

    Functional programming FTW!

  8. #8
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300

    Post

    This could get to be an interesting discussion. I just started learning ruby (surprise!) -- because of "rails" -- and I have to say that learning another language (probably any) is a lot of fun for me at this point (I would claim proficiency with C and perl and competence with javascript and knowledge of bash shell scripting).

    Ruby literature, etc, is hyperbolic so I decided to google "ruby negative criticism" just to make sure there isn't some hidden pitfall. I didn't find much; one article is this one:

    Bitwise Magazine:: What’s Wrong With Ruby?

    by a CS professor who was asked for an opinion. He actually doesn't have much to say specifically about ruby (he doesn't like it or scripting languages), but he did have some sort of interesting general observations like this one:
    As an undergraduate in the 1970s, I was exposed to the Prolog, taught it by its originators, and assured it was a revolutionary language, so much easier to use than conventional programming languages, almost like a human language to use, as it was based on human-derived logic rather than building a language to run a machine. Personally, I did appreciate Prolog, but it was a minority taste. It was a humbling experience, in my later years, having to teach it to a new generation of undergraduates, who almost all found it extremely difficult to use.
    Which made me think of the personal and subjective element. If I were asked to recommend something, I'd probably stand up and shout "PERL!", but my justifications would be in essence personal and subjective (which the previous posts in this thread seem that way to me too).

    So what about possible "objective" criteria? I am not familiar with the traditional arguments about what does or does not make a good language (eg, how "strong the typing is"), but it seems to me that probably most of the ones that actually see widespread use are in essence, good languages, and that none of them are very likely to contain elements that would put them in a class of their own.
    As Fred Brooks put it there is no silver bullet, "no inventions that will do for software productivity, reliability, and simplicity what electronics, transistors, and large-scale integration did for computer hardware". A telling point is that the first proposed "silver bullet" he mentions is the then widely touted language, Ada, whose impact proved rather limited.
    He then says Ada was sunk by OOP which came along right after that (so maybe there was a silver bullet, haha).

    The most critical flaw, I think, in his subsequent reasoning is that he then kind of tries to say "why bother with ruby or any such new fangled thing when the past 40 years is littered with flash in the pan fads". Now I simply don't know enough to say for sure, but it seems to me that C is pretty much it for the "low level" end of the "high level" languages. Beyond that, everything does appear to be evolving -- and the modern OOP scripting languages are probably a very significant step, but the old guard are still lusting after the things they loved so much in the 70's & 80's.

    So, stepping back from my affection for perl, I would say it is very weird and fascinating. There are endless things to learn if you enjoy learning. It's also very idiosyncratic. These idiosyncrasies become apparent if you compare it to python, ruby, even PHP et al. which I think resemble each other more than they do perl (but of course I've only glimpsed into this). What that is worth I don't know.



    If I were you, h3ro, I would go with C or Java. But if you are interested in history, there are a lot of neat things out there, no doubt. Eg, "functional" languages like LISP*, which would probably be "more different" than anything else (again, if you enjoy learning). Otherwise, choose something pragmatic, ie, that might get you a job one day.

    My other point I wanted to raise is about all the people out there who are constantly saying stuff like "well, I've been programming C++ professionally for decades, and I am still learning about C++". Learning what? Generalized tricks and techniques (which have less to do with "a language" and more to do with programming itself)? I simply do not believe that after that there is some element of syntax or something that has evaded your grasp. You know the language. The end. Which kind of means, in the course of a lifetime, it might make a lot of sense (and --eek-- fun!) to have a series of relationships that last a few years, and then move onto to something new**. Objectively, the new may or may not be "better", but in terms of the evolution of the industry, this has to be a positive factor. And logic dictates that it is, in fact, better, since "improvement" does not happen in some backwards alternate universe (whereby the best computers were built in 1968). Ruby seems pretty darn nice to me

    A last little quote:
    Programming is a skill a few take to naturally, but many, despite the keenness for the technology shown by joining a Computer Science degree, struggle with and never master. The many attempts to introduce it in new ways, with different languages or different paradigms have only convinced me, since none of them have shown conspicuous success, that the programming language used is not the issue.
    *I think the guy who wrote that article is big on "Haskell"
    **You might even end up as a better programmer than you would have if you'd just stuck to one thing, hoping you could be the supreme C++ master of the universe. So I say yeah, learn another one.
    Last edited by MK27; 05-16-2009 at 11:34 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  9. #9
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Java is spreading faster than cancer, so it would be good to learn.
    Perl would also be a good choice.
    Maybe some other web stuff like Flash...?
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  10. #10
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    > So far I know C++, C#, Javascript and a bit of a few scripting languages. I am by no means an expert in any of them.
    Perhaps you should work on that.

    Being a "hello world" programmer in 20 different languages isn't much of a skill set.

    After about the 4th or 5th, they all start to look pretty similar anyway. At that point, knowing how you would solve a problem is much more important than where the braces and semicolons go (that's just bookwork you can pick up in a couple of weeks).

    The "how" skill takes years of practice, and is very re-usable across programming languages.

    Also consider learning about all the other aspects of programming if you want to be anything more than a cube-jockey.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  11. #11
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,412
    Quote Originally Posted by h3ro
    If I were to learn a new language what would you recommend? I have heard that learning a new language is good as it might give you a different way of thinking about problems and make you a overall better programmer.
    I concur with your own initial analysis. If you want to learn new concepts from exploring a new programming language then a programming language whose primary paradigms are different from those languages that you already know would be good. (Admittedly, C++ is a multiparadigm programming language, but certain paradigms may be better learnt with programming languages specifically geared towards them. You can then come back to more advanced C++ topics to see how you can apply your new knowledge.)

    Quote Originally Posted by MK27
    My other point I wanted to raise is about all the people out there who are constantly saying stuff like "well, I've been programming C++ professionally for decades, and I am still learning about C++". Learning what? Generalized tricks and techniques (which have less to do with "a language" and more to do with programming itself)? I simply do not believe that after that there is some element of syntax or something that has evaded your grasp. You know the language. The end.
    Scott Meyers once described C++ as a federation of languages: C, object oriented C++, template C++ and the parts of the standard library derived from the standard template library. It is certainly possible to be an experienced C++ programmer without fully exploring all aspects of C++. The point to recognise is that C++ is more than just the core language. There are idioms that are more or less specific to C++.

    Furthermore, C++, like other programming languages, evolves over time. This can be seen in the development of new ideas of how to use C++ more effectively (possibly borrowed from other programming languages), and this in turn may result in changes to the core language and additions to the standard library, as can be seen in the upcoming C++0x.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  12. #12
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Originally Posted by MK27
    My other point I wanted to raise is about all the people out there who are constantly saying stuff like "well, I've been programming C++ professionally for decades, and I am still learning about C++". Learning what? Generalized tricks and techniques (which have less to do with "a language" and more to do with programming itself)? I simply do not believe that after that there is some element of syntax or something that has evaded your grasp. You know the language. The end.
    Knowing the syntax and knowing the proper use of the language are very different concepts. Syntax is about 1% of my daily battle and the rest is application of the language to the problem at hand. That is not so simple. Arrogance precedes bad design.

  13. #13
    Banned ಠ_ಠ's Avatar
    Join Date
    Mar 2009
    Posts
    687
    Quote Originally Posted by laserlight View Post
    I concur with your own initial analysis. If you want to learn new concepts from exploring a new programming language then a programming language whose primary paradigms are different from those languages that you already know would be good.
    In that case, I'd recommend brain........(wordfilters prevent me from saying its whole name)

    Code:
    ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
    that was hello world
    ╔╗╔══╦╗
    ║║║╔╗║║
    ║╚╣╚╝║╚╗
    ╚═╩══╩═╝

  14. #14
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Bubba View Post
    Knowing the syntax and knowing the proper use of the language are very different concepts. Syntax is about 1% of my daily battle and the rest is application of the language to the problem at hand.
    We are in 100% agreement. "Problems" can be conceived of as fitting into catagories, which is why you have "algorithms" that are independent of syntax. Implementing an algorithm might be a matter of experience or cleverness, insight or inspiration. Or totally straight forward.

    "Libraries" are usually things that solve problems for you, and they are by nature endless. So in that sense, I guess one could be learning (eg) C++ (or perl) forever. I believe there is a clear cut distinction there tho, such that there is really no language that cannot be more or less mastered in a relatively short period of time, presuming you have already "mastered" one. Like, measured best in months, not years (I think JVene or someone wrote somewhere 18 months for C++...which sounds like a lot to me, if you mean 40+ hours a week...you get the point).
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  15. #15
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,412
    Quote Originally Posted by ಠ_ಠ
    In that case, I'd recommend brain........(wordfilters prevent me from saying its whole name)
    CornedBee came up with the idea of calling it BrainF to satisfy the word filters.

    Quote Originally Posted by MK27
    "Libraries" are usually things that solve problems for you, and they are by nature endless. So in that sense, I guess one could be learning (eg) C++ (or perl) forever. I believe there is a clear cut distinction there tho, such that there is really no language that cannot be more or less mastered in a relatively short period of time, presuming you have already "mastered" one. Like, measured best in months, not years (I think JVene or someone wrote somewhere 18 months for C++...which sounds like a lot to me, if you mean 40+ hours a week...you get the point).
    It sounds like you are referring to this post. Without knowing the context of what Stroustrup wrote, it is tough to say what that estimate actually refers to. Maybe it refers to a complete beginner learning C++ in an academic curriculum filled with other subjects (in which case 18 months sounds too optimistic for me with respect to an average beginner if "mastery" of C++ is the aim).

    Speaking of "mastery", I would say that it is not well defined. Also, it is not clear to me what you mean when you say that "there is really no language that cannot be more or less mastered in a relatively short period of time". Are you talking about the syntax of a programming language, or are you also talking about effective use of a programming language?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Learning assembly language really helps understanding how computers work
    By movl0x1 in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 05-15-2007, 01:30 AM
  2. Benefits of learning assembly language?
    By 747ken in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 11-02-2003, 07:16 PM
  3. Fun Learning a New Language
    By UnregdRegd in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 09-30-2003, 10:03 PM
  4. Learning a new (non-programming) language
    By nickname_changed in forum A Brief History of Cprogramming.com
    Replies: 31
    Last Post: 08-02-2003, 09:10 AM
  5. Languages dying
    By Zewu in forum A Brief History of Cprogramming.com
    Replies: 31
    Last Post: 07-29-2003, 10:08 AM