views:

9792

answers:

95

Which programming languages not only make you more proficient in the particular language your are learning, but also have a direct impact on the way you think and understand programming in general; therefore, making you a better programmer in other languages. Basically, which languages have the biggest impact on understanding the how and why of different programming concepts?

What about Scheme? I have heard good things about that.

I thought about taking the simplest of problems and implementing them in various languages. Has anyone done this?

+62  A: 

LISP, C, and Smalltalk.

I'd probably say Haskell if I were smarter.

LISP is beautiful for understanding symbolic processing. C is beautiful for understanding the von Neumann architecture as it was embodied in the 70s-90s. Smalltalk is beautiful for understanding OOP, which is the dominant model for discussing complex software systems.

Larry OBrien
+1 for Smalltalk
Mef
I would be interested in hearing why exactly Smalltalk is best for understanding OOP. Are there any articles on the internet that explains the 'why' part? (eg: why Smalltalk, instead of say Python, for understanding OOP?)
Sridhar Ratnakumar
Well, I know that once-upon-a-time there was a confusion in Python between "old-style" and "new-style" classes, but I don't know if that's a relevant criticism anymore. More generally, though, I would say that the 'why' of Smalltalk is that it immerses you in OOP in both programming and the environment, while I can at least imagine a Python or Ruby programmer (say) just being happy defining imperative statements or functions. This is absolutely a YMMV situation, of course.
Larry OBrien
+22  A: 

Definitely C and C++. C because it forces you to work just a notch above asm. So you do best if you understand the language really well. And C++ because it is a good combination of high level features such as OOP and templates and C.

Evan Teran
+2  A: 

For me it was the language that took me the longest to understand when I first started, C++. I started with Apple Basic when I was 12. I think that did more harm than good. ;)

TheCodeMonk
+15  A: 

I found Eiffel to teach me the most - I got object oriented programming down, design by contract, error handling, program flow, etc. Granted it was not the first programming language I learned, but the rigidity of the language meant that I had to follow all the rules, therefore the concepts became completely ingrained in me.

Elie
Eiffel is a very underrated language when it comes to learning OOP!
Evan Teran
And Bertrand Meyer's book Object Oriented Software Construction is hands down *the* book about, well, Object Oriented Software Construction, independent of the particular language you use and despite the fact that the old first edition was released in 1988, long before most OO languages in use today
Jörg W Mittag
+12  A: 

ML and Smalltalk. Though I only ever touched them in an undergrad programming languages course.

shoosh
ML is a language that is somewhat similiar to lisp but is object oriented and has very interesting typing abilities. Schools usually teach it as part of programming languages / type theory courses.
Uri
ML is not object oriented. Ocaml is, but I think Standard ML is more likely what he used in undergraduate classes.
Amuck
+137  A: 

I think C still has the most impact on my day to day programming. I spent ~2.5 years doing mostly C work at school and for hobby projects. While I don't think bare bones C is the greatest product development language, it's an incredibly educational one. C gives you practically nothing. Anything you want you have to build yourself.

I feel like this gives me a distinct advantage these days. The knowledge of how the underlying system works (after all, all languages end up talking to the OS in one form or another) it allows me to reason about what my high level language is likely doing under the hood. That's simplied more problems than I can remember.

JaredPar
Hear hear! The insight provided by knowing how things are done in C provides incredibly useful insights when dealing with (well, C and C++) Python, Java, and the CLR languages, especially C#.
Blair Conrad
I was going to say the same thing about assembler. But mostly it's the same thing, but to a slightly lesser degree for C.
Darron
I agree... pointers in C was what first made me understand what variables really were.
Charles Bretana
hmm... C, yes, but a lot of higher level concepts you simply can't learn in C (or you can, but painfully). C is a good start, but one should branch away from there.
Claudiu
Interesting... I C... i mean "see" ...
I would go as far as saying that if you don't know C, then to some extent you don't *really* know what you're doing as a programmer... Fortunately, I can say things like that in a comment in order to avoid the inevitable downvoting. ;-)
Charles Salvia
C is definitely THE language.
vash47
+12  A: 

chronologically:

Assembler (6502-Z80), C, C++, Lua, Scheme

in fact, i tried a couple of times to learn Lisp and/or Scheme, but i just didn't grok it. it wasn't until after really understanding Lua, that i could tackle Scheme.

Javier
+4  A: 

Assembler, I used to work with embedded systems using 6502 and Z80 CPUs. High level languages are much nicer and they are all I work in today, but with Assembler you had to really understand how computers worked.

Jim C
+14  A: 

Assembly Language. Learning how the machine moves and interprets data really makes clear some of the choices high-level language designers have to make. Plus, it gives you a much greater appreciation for being able to work in higher level languages.

Also, check out Charles Petzold's Code: The Hidden Language of Computer Hardware and Software for a good look at how low-level components are put together to create a complicated programmable machine.

Finally, learning Scheme, reading SICP, and watching the accompanying video lectures has definitely been enlightening for me. It's really having an impact on how I think when I'm programming.

Bill the Lizard
Agreed. It was this that helped me connect the dots between code and the CPU. Haven't touched it since Uni, but still...
Stu Thompson
http://en.wikipedia.org/wiki/Assembly_language <- Assembler is the tool that creates machine code from an *assembly* language.
Martinho Fernandes
@Martinho: Corrected. Thank you.
Bill the Lizard
+7  A: 

I'd have to say Smalltalk because it gives you an exceptional portal into object oriented design and thinking. At the time I learned it I was using primarily C++ so reflection and run time hierarchy changes were something I was not used to (though Java supports them, to a degree).

These days I also think that people who program in Java or .NET and have never learned C/C++ should actually learn those langauges to understand how things work in the background. Understanding the runtime is important.

Uri
+7  A: 

C was the first language I learned, and I think it's one of the best languages to learn first. Schools are starting to teach Java first now, which I think is a mistake, but that's another topic...

Although I say C because it happened to be the first language I learned, I honestly believe that if you can be proficient in C or C++, you can learn pretty much any language from there with not many problems..

Ryan Thames
+62  A: 

As much as I'll be criticized for it, if you really want the zen to come to you, you're going to have to get dirty in an assembly language. As I write code, in the back of my mind there seems to be a little optimizing compiler going all the time that keeps me aware of what I'm doing. If I don't understand how the compiler of a high-level language is going to treat my code, its time to examine what I'm doing - either learn more about that language, or rethink whether I'm using it properly.

There's no substitute for really understanding what you're up to, no matter what language you're hacking with. If your compiler is truly smarter than you are, don't expect to be doing the best code you could be.

Agree 100%. It also makes you appreciate HLL's a whooooole lot more.
Kyle Rozendo
Completely agree with this. Adventures in referencing and dereferencing, bitjuggling, picking which of several add-instructions best suits your needs, appreciating what's needed to code a loop.
Martin
I agree. I'm probably never going to code in assembler again, but I learned a lot while doing so and programming became much less mystical. It definitley helped me understand C as I saw some of the obvious reasons why C is the way it is.
mfperzel
Understanding assembly language in some way solves the Symbol Grounding Problem of programming. Even the most abstract juggling of data needs to connect to what the processor will be doing.
bitc
Agree. I've seen far too many programmers who don't even know how the computer itself works - they don't know what the CPU does, what the stack is, how memory is organized, etc. Every programmer should have at least a basic understanding of how the computer executes programs at a low level, and assembly language teaches you that.
Jesper
+11  A: 

Scheme, assembly and Pascal would be my main 3.

Pascal was the first language where I had a few new elements added to my list of programming concepts: Explicitly giving variables a type, using pointers, and removing line numbers from my code as before I had developed mostly in Basic where types were limited to numbers, strings, and arrays.

Assembly in my case was a Commodore PET but it was still another change in how to write a program into a computer as you had to allocate space for things, handle branching instead of a simple if, and my favorite procedure to write: The waste time routine, which incremented counters over and over again so that when a user typed there was some control over how far the little ship he controlled would move.

Scheme was the first functional programming language I was introduced to as well as having a very different syntax from previous languages that took a little while to get used to as well as the idea of a list being quite different than my previous languages.

JB King
+3  A: 

Not as general as your question, but learning Erlang with this excellent book, helped me understand and make effective multi-threaded code.

pmlarocque
+43  A: 

Definitely Haskell. I don't know it extremely well (yet), but it's definitely made me a better programmer. It's helped me think through abstract algorithms better, and encouraged me to keep ideas like referential transparency, etc., in mind, even when I'm not using a functional language.

mipadi
Yes -- Haskell, but I'd say it's nicer to get deep in three or four radically different languages. For example, Haskell, some Lisp, Prolog and C.In Haskell, I'd go at least into Monad transformers; in Lisp, I'd master macros and semantic metaprogramming tricks (semantic metaprogamming: using eval or synamically redefining symbols at execution time); in Prolog, getting used to metaprogramming. In C, getting comfortable with function pointers, types and type casts, all "not often used" operators like shift etc. Maybe Smalltalk would be nice too, but I haven't used it much.
Jay
+9  A: 

Nobody's mentioned Tcl yet. That was a real eye-opener for me. I got into Tcl because of Expect, but I grew to appreciate it later for the insight into just how minimal the syntax of a language can be, and still be useful. The extensibility of it was a revelation at the time, too.

I had the same experience with Tcl that many others had with Lisp, though I felt at the time like Tcl was more approachable than Lisp...

Mark Bessey
+1 for a tcl answer. Also, tcl is more lisp than most are willing to admint. First a big part of the language is [op [op [op arg ]]] and second, in tcl everything is a string (and code is a string)
TokenMacGuy
Tcl is also nice for DSL. Look at the Portfile in the macports system to appreciate this. Eg: http://py26-pyqt4.darwinports.com/dports/python/py26-pyqt4/Portfile
Sridhar Ratnakumar
+1  A: 

Prolog helped me see the limitations of logic in programming. IOW, there's a lot of human imagination and creativity that has to go into a useful program.

sep332
+4  A: 

Assembly and C are strong, if only to teach you how memory management works.

But quite honestly, the single language I've learned which taught me the most is JavaScript. On the surface, JavaScript looks like a cheap, throwaway language, but really It's a functional language masquerading as an object oriented language, masquerading as a Procedural language. You can implement stuff in it at all levels without understanding the next higher level, but then once you've mastered the level you're at, you find there's more to learn at the next level up.

Of course most implementations of JavaScript are annoyingly incomplete and buggy, but the language itself is actually pretty beautiful.

C#, Java and ActionScript 3 are good for learning OO principles, but honestly, JavaScript has taught me the most new ways to think about code and about software development.

Adam N
I think Javascript is very underrated. The ease which with functions can be passed around makes it extremely powerful. If there was a standard version of it for outside the browser with a standard library with IO/Networking/other stuff I would use it for scripting in a heart beat.
Cervo
You might want to check out the Adobe AIR or Aptana AJAXER platforms, which provide more complete JavaScript stacks, with actual IO libraries, and Networking Libraries. There's also the possibility of writing to the Mozilla XUL codebase.
Adam N
+10  A: 

I find that anything that shifts my thinking helps. I am a C# developer so working with Ruby helped get me out of one way of thinking.

JavaScript is also a good one. I'm not talking about showing alerts on a web page, but really digging deep into JavaScript helped. It's been referred to as the most misunderstood language, but if you start to understand the strengths (and weaknesses) I think it makes a huge difference in the way you look at writing code.

Just my 2 cents.

Andrew Van Slaars
I was pretty shocked when I first looked closely at JavaScript and realized that the toy language included in browsers was full-blown object-oriented, forced me to think about objects in a new way (prototype vs class-based), and really cemented my understanding of closures.
Nicholas Piasecki
+18  A: 

I'd say it wasn't until Python that I really started getting OOP, unit testing, design patterns, etc. Having a dynamic environment I could use to tinker with things was tremendously helpful. With a compiled language, just making random changes until the code compiles is too tempting to pass up sometimes.

Bill Williams
+14  A: 

Pascal is my favorite programming language to learn basics. Its syntax is very clean, has pointers and very easy to start.

frameworkninja
+1 Turbo Pascal is very didactic
Pascal Thivent
+1 for bringing back the memories of my first programming language :)
wsanville
I started with Turbo Pascal 7, continued with Perl and PHP, but I learned most when I switched to C++.
tstenner
-1 Turbo Pascal is not a language
GetFree
+18  A: 

Ruby (and Rails) showed me how clean and DRY code can really be. It forced me to take my C#/C++ to the next level, building highly reusable classes.

Jon Smock
Lots of Ruby stuff is now possible also in C# 3.0
lubos hasko
Lots of C# stuff is available in C++, Objective-C, Ruby and almost every other language.
Brock Woolf
Lots of C# are stolen from other languages. Does that make C# better?
Camilo Martin
Lol @ the Ruby toolbox fanbois coming out the woodwork
Pierreten
+5  A: 

Although I may have learned programming with Apple Basic, I didn't really understand procedures and the like until I learned Pascal (MPW Pascal in this case). Pascal was a good foundation for learning programming, but I didn't really understand what was going on until I learned C.

C (later C++) is what really introduced me to how programming works. Learning memory management made me more careful about what memory I use and where. It's also where I started understanding data structures better, and learning how data structures control how data is laid out in memory.

Java is what taught me about real Object-Oriented principles and how Software Engineering works. It showed me how code reuse would work in a (nearly) perfect world. Java showed me that libraries can be more than just useful subroutines, they can be integral parts of your program if you use them carefully.

Later, I learned Scheme and Prolog, and they expanded my boundaries on what I thought programming was. They showed me that there's more to programming than just objects and procedures. They showed me (Scheme mostly) that programming can be elegant and dynamic, that it's not just about writing a method and running it.

These days I'm looking at Eiffel and some of the more esoteric languages like Shakespeare and Whitespace. It's always interesting to see what other people consider to be programming. If anything, you might learn something about programming you never knew.

ReaperUnreal
+1  A: 
  • Assembly and C to understand general operation of a computer, those were the languages I started with.
  • LISP helped understanding how to use Emacs effectively and transformed it from a disliked to a regularly used editor for me.
  • Eiffel helped me a lot to understand static typed object-oriented programming languages like C++ and Java
  • I learned a lot about Refactoring, Patterns and testing on Java and also learned to understand that some techniques are necessary because of the concept (or limitations) of the language
  • Squeak and Ruby did the same for dynamic OOP languages
  • Erlang helped me to rediscover my love for functional programming because of its simplicity and to understand concurrency and recovery in a distributed environment better
  • Haskell and Miranda for functional programming
  • Javascript is one of the languages that I feel that it can teach me a lot because it is somewhere between OOP and functional programming
  • Scala and C++ helped me see where the limits of complexity for a programming language are
boxofrats
+2  A: 

C and Scheme.

C gave me a better understanding of what was going on in higher level languages. When you understand how memory allocation works, you avoid stupid efficiency mistakes like repeatedly concatenating immutable strings.

Scheme is an amazing first class high level language. It's syntax is clean and simple. Because recursion is essential to almost any program you write in the language, it forces you to think in a different way than procedural programming languages like C++ and Java. This in turn helps you write more efficient code in those languages. This is not a language just for beginning programmers. Every programmer should be able to write concise Scheme code.

For reference, The C Programming Language by K&R and Structure and Interpretation of Computer Programs by Abelson and Sussman are essential programming books which use these languages.

For the second part of your question, I'm not sure what the benefit of writing a lot of programs in different languages would be other than showing you how similar programming concepts are across most languages.

mweiss
+1  A: 

Not because of the language itself, more because of the IDE, but MATLAB did more for my programming skills than anything else. It has a built-in profiler, which was enlightening for me. It was also the first scripted language I used, and the ability to try stuff out on a command line and then save the code to a file is very good for exploring new programming concepts. Factor looks like it's got many of the same advantage of MATLAB, and more functionality and it's free, so I'm considering switching to that.

Python was fun, but didn't make me a better programmer, and I'll always have a soft spot for C, my first language.

Disclaimer: I am not a programmer, per se, but rather a researcher who does a lot of programming.

PlexLuthor
+4  A: 

Pascal and C++ were the two that did the most for me. Pascal gave me the abilities to grasp most basic concepts quite easily and early, then switching to C++ really took me to the level of becoming proficient at programming.

For other languages, Java, assembly, and perl were useful in demonstrating the simplicity of implementing the same concepts in different ways, but I rarely touch those any more. Of those three, I found assembly the most difficult to learn from as a lot of instructions felt backwards and switching from C++ or Java to assembly then back really made my head hurt trying to remember just how things were supposed to work.

Tom
+1  A: 

C was a revelation for me because before that all I'd seen was BASIC. C seemed to be designed for a working software developer; the ++ operator alone was a sure sign that someone that writes code for a living designed the language. It really made me think of software development in a whole new way.

C++ was also a paradigm shift because when used right, classes and OO are a better way of developing software. Of course the converse is also true--it can be damned hard to debug C++ code exactly because of all the hidden features. As another developer said to me--"With C nothing is hidden".

Onorio Catenacci
+4  A: 

I think Pascal is great for learning. Its syntax is easy, it's basically English.

C is very good too but it's sometimes very hard for the ones who doesn't have any idea of what programing is.

I learned OOP with Java. For me it was very good. Java forces you to program in Oriented Object Paradigm. I don't know the other OOP languages you said (Smalltalk, Eifeil, etc) I'll search for them.

+2  A: 

Ocaml in my case, but any robust functional language can be substituted. Once you understand functions that return functions and apply functions to functions recursively by passing themselves into these functions, then classes, pointers and templates start sounding much simpler. :)

Marcin
+1  A: 

I'd echo the support for C and assembly language as great learning tools. I feel one should learn as much assembly as is necessary to really understand how the computer works, and then move on to using C exclusively for a while in order to get some system-level skills in place.

To contribute a language I didn't see on the list:

Forth is an excellent language for learning about functional decomposition. When it comes to mind-boggling programming approaches, Forth was Haskell back when Haskell was just a twinkle in a math geek's eye.

I highly recommend taking your new assembly language skills and using it to implement a Forth compiler. They're easy to write and it's a real eye-opener to the nature of computer programming and "thinking outside the box" or normal programming paradigms.

However, your chances of using Forth to make money are pretty low unless you're into embedded programming. So do it for the thrill of the experience. ;)

Jason L
+2  A: 

Languages that I learned how to deliver product with (i.e. taught the discipline of engineering and process): Java, C#, SQL

Languages that deepened my understanding: Squeak/Smalltalk, Ruby, Python, Scheme/LISP/EMACS, Forth, Erlang, Objective-C

Languages I wish I'd never had to learn: MUMPS, BASIC, VB.NET, Perl, C++

Languages that feel good to use: Ruby, Python, C#, Objective-C

Languages that physically hurt to use or learn: Perl, Scheme/LISP/EMACS, Erlang, C++

Regardless of what languages you decide to learn, make sure you understand these concepts:

  1. actual object oriented programming (vs. class oriented programming a la C++) - Squeak/Smalltalk, Ruby, Objective C
  2. meta-programming - Ruby or Python
  3. message passing vs function/method calls - Ruby, Erlang or Objective-C
  4. non-synchronized parallel programming (i.e. without semaphores) - Erlang or Python
+5  A: 

Probably the most "mind expanding" language I ever learned was Lisp. Once you really grok Lisp, you will never be afraid of recursion again. Thinking functionally can also help you to clarify your C++ some.

For learning software engineering in general, you can't beat Ada. The language won't let you get sloppy with types like C does, so you have to learn to think out your designs before you sit down and start coding. It also discourages pointer use much more than C++ does, so you learn all sorts of useful tricks for avoiding pointers (many of which are applicable in C++). Also, its general pickyness, while incredibly annoying at first, eventually trains you to be much more careful and precise when you code. That will help you in any language.

T.E.D.
+5  A: 

It depends on what you are trying to learn. These is roughly the languages that helped me learn the following:

  • General programming - Pascal
  • Pointers and memory management - C
  • Object Oriented programming - Java
  • Reflection - ML
djensen47
+5  A: 

I started with Pascal, then - till now - I`m learning C++. Learn the basics of Assembler.

chester89
+3  A: 

The largest impact on my understanding of programming has not been a particular language, but a programming languages course. This is almost diametrically opposed to C - it's the theoretical underpinnings of what we do, as opposed to learning the way the machines we've created to help us program do things. Only now do I actually understand what a closure is, and why they are important to get right, along with static scoping. I also grew a larger appreciation for static typing, and taught me that a language without type annotations isn't necessarily a dynamically typed one.

We also learned about continuations and how they apply to web programming, and various other things.

The languages we used to achieve our goals were Scheme, Haskell and a bit of Javascript (there is some interesting FRP stuff at the end of the course), but just learning the languages themselves wouldn't have brought the same level of understanding.

Claudiu
+1  A: 

Erlang for showing a better way to do concurrency than the shared state memory approach common in most mainstream languages. Getting into thinking in a functional style was a nice side effect.

madlep
+3  A: 

I hope i don't get bludgeoned for this, but x86 Assembly has taught me the work behind the code so to speak. I am glad it was one of the first languages i looked into. Always looking for more optimization, speed, and smaller executables drove me to learn ASM, and believe it or not it will help you write better high level code. Whenever I use C I am constantly thinking of optimizations -- what the fastest way is to make a huge calculation or iterate through massive amounts of data. Read up on the "Write Great Code" series if you're interested to learn that little bit more.

John T
Where can I find the "Write Great Code Series"?
Xaisoft
John T
+3  A: 

The thing I love most when learning a language is when it teaches me a new way to think about programming

I barely used Lisp and yet it introduced to me to so much. Before Lisp, I only thought in the imperative paradigm

Python is where I get a more sweet syntax of Lisp. That's where I started to use first class functions and the way datatypes can just be spelt out makes it all so elegant. It also got me to start tabbing code. The structures that mix naturally makes everything feel concise and readable, something I had previously not thought possible

C++ brings pointers. Before C++, I thought all datastructures were just fancy arrays

Assembly is weird. Programming in such a deliberate language is like playing an RTS that has excessive micromanagement. It's one of those languages we should all learn but not use

Demur Rumed
+4  A: 

Although being in the Smalltalk business byself, I'd definitely say Lisp (or Scheme).

Follow the chapters of SICP, and you understand computing better - even if you already have many years of experience, you wil get new insights and the "AHA"-feeeling of a deeper understanding.

regards

blabla999
+2  A: 

Definitely C.Because it even gives you an idea of how any programming language's compiler or executer works.

Manoj Doubts
Except for the languages that support features like first class namespaces, tail recursion, or continuations that cannot be done idiomatically in C (many of which compile directly to machine code).
Justin Smith
+12  A: 

Haskell

Couple of reasons:

  • It enabled me to think about some problems common in object oriented

    • Side effects
    • Type issues
    • Null pointers
  • it also gave me new insights into programming

    • Lambda's (anonymous functions)
    • Recursion
    • Complex data types
    • Lazy evalution
    • Inmutable data
    • List comprehensions

It also enabled me to better express my algorithms/math in shorter code using pattern matching. Many of these ideas are now becomming available in languages like ruby, c#,python and LINQ. If you learn haskell you can see where some of those ideas were inspired by.

Tomh
+2  A: 

As much as all others are going to disagree with me (assuming anyone reads this far down in the list of posts): PHP

What the hell? PHP??? Yes, PHP and languages like it directly address the problem at hand. When I work in lower level languages, I get wrapped up in implementation. When I work in higher level languages, I get wrapped up in OOP thinking. In both cases, I often stop and think -- how would I have done that in PHP. I never then go on to code as though I were working in PHP, but it reminds me to put my focus back on solving the problem and less on over-engineering or esoteric design ideas.

I'm certainly NOT calling PHP some sort of panacea. It simply reminds me that I set out to create a certain output, and to not let myself get unnecessarily distracted. When I reel myself back in after getting re-centered, my coding gets better and faster.

Dinah
+1  A: 

I am still a student but my first language - Java, has been the most important to me. While some people might moan about "java schools", I have to disagree. My University taught us algorithm solving and thinking first, then we were introduced to Java. I think the reason was that it is popular (obviously), but also easy to set up and start programming. Just download eclipse for example. We didn't use any of the built in Java features though - we coded our own linked lists, etc. At first, we just used the main method but very soon after starting we were introduced to OOP with classes and methods.

"C gives you practically nothing. Anything you want you have to build yourself."

If you want to learn, the obvious solution is just to build everything yourself anyway - no matter what the language. I would recommend Java as a first language to anyone I know because it allows you to start without getting bogged down in details and with the eclipse IDE, they'll be programming in no time. Then they can explore other languages with features such as pointers and memory management.

GreenRails
+4  A: 

Pascal, C++ and Java

Pascal gave me the basics of loops, procedures and if's. C++ gave me understanding of OOP. And Java teached me to chose architecture before I even start to write code.

Dmitris
+1  A: 

My answer is python, but not for the reasons given by Bill Williams.

Python's OOP features are swell, but I've touched many languages that do OOP well.

The interactive interpreter is also very nice, but In some ways, my first interactive programming language, HyperCard, almost has python beat.

As far as compact/readable code goes, Python is really spectacular, but with enough care, C++ provides a language for DSL that can be exceoptionally terse and clear.

What really gave me some new tools for thinking about programming in python is generator expressions. Although It's great to be able to shorten 6 lines of iterative code to an expression in a function call, a bigger benefit is that it expresses the whole algorithm together. without allocating any memory. Or really doing any excess work.

I've found that If i really understand the algorithm i'm trying to code, it almost always comes out as a generator expression. It's only when i'm exploring the problem and figuring it out that i write lots of if and for and try except statements.

TokenMacGuy
A: 

Learning C seems to be the favorite answer here, same for criticizing Java.

But I have some experience with C people who 'try' to learn Java.

Well, they have some problems. They would NEVER EVER come to the idea, that a calculator can be modeled by representing different arithmetic operations through individual classes (implementing the same interface).

Instead, evey single C programmer would go with some stupid "int" flag which will be evaluated by some everywhere-copy-and-pasted switch-case.

I am sorry, but these C people are just too stupid for the most basic OOP concepts. I don't see the real advantage here.

Oh yeah, they also say that connecting the concept of structs and functions is OOP.

ivan_ivanovich_ivanoff
+2  A: 

Ada, for giving a modular way of thinking. This is the most useful feature I use in other languages such as C and bash.

Ada is also a great language for learning how to write dirty code despite its many constraints. I think of the multiple usages of the 'ADDRESS attribute.

mouviciel
+2  A: 

The first language I learned (BASIC on an Amstrad CPC 464) taught me a love of programming.

C++ taught me that programming is hard.

Object Pascal, by way of Delphi, was the first language someone else taught me, and through it I learned about working with other programmers and some basic good practices.

Matt Ellen
A: 

I don't think that I can pin this down to any one language. If I had to choose one, I'd probably say Python because it's the one I've programmed in the most. But beyond that, I've been influenced by C++, assembly, Lisp, Ocaml, Python, and Prolog. I also have to mention Forth. It's a language I would never want to program in, but I learned a lot about programming by writing a crappy interpreter for it (that I still have a soft spot for).

And if you count it as a programming language, I'd say that SQL has had a big effect (both in what it does right and what it does wrong). It exposes both the benefits and the dangers of declarative programming.

In general, I don't recommend being influenced mostly by one programming language. Expose yourself to all of them. The worst that could happen is that you learn how not to program.

Jason Baker
A: 

Personally, no language has done this for me. Language is largely syntax. There are implementational differences between them (i.e. OOP vs. procedural, etc.) but I found that I learned the most by doing and refactoring. Creating something that works is not as easy at making something work correctly and efficiently. I think that this is something that applies to any language and is more a tool of the developer than a result of a language.

If anything, language might help introduce you to concepts that you previously did not know existed, but the concepts generally transcend any single language.

joseph.ferris
not quite sure why someone downvoted you, so I "upvoted"; I don't fully agree but the answer is at least "reasonable", and makes some good points (concepts are more inportant than languages, and concepts transcend languages). That being said, each concept typically has a language that helps you best understand it, so it makes sense to practice the concept in that language first.
Virgil
+3  A: 

Common Lisp. It has many useful features not usually found in mainstream languages, such as dynamic variables, signals, generic functions and macros.

These are in fact useful generalizations of the way how things are usually implemented (of global variables, exceptions, polymorphism and preprocessor, respectively). That's why I learnt a lot about programming from Common Lisp.

J S
+1  A: 

For me it has to be PHP, mainly because it's the first one I became familiar with. I'm by no stretch of the imagination a "natural programmer" - I can do it with the books and examples infront of me, but in many ways I'm much more comfortable with the design side of the web etc. PHP's all around you on the web, and there are many examples of PHP on the web - tutorials, 'how-tos', etc., as well as applications written in PHP.

I first became familiar with PHP through running web discussion forums (initially PHPBB and later SMF), where I could see from my knowledge of what the forum was doing, what the PHP behind it was doing.

I've taken courses in javascript and Coldfusion, as well as vaguelly looked at Java, but I always go back to PHP. It's close enough to natural English language that you can easily understand what's going on, but both the procedural and OOP methods help you become familiar with the concepts you need to use for other languages.

Everyone's always told me that every programming language is useful in learning other languages, because there are always concepts you can carry across from language to language.

NeonBlue Bliss
+1  A: 

Well when i started programming i used C# it was really challenging but i learned lot from it then when i went to college i did lot of C which made me understand lot of concepts and helped me appreciate C# more

Yassir
+2  A: 

It may sound funny, but... The first one was Pascal -- because I had learnt BASIC before, and structured programing was, well, painful (I had to think in a totally different way). Later, it was Prolog, because I had to give up the kind of low-level concerns I had before when I was programming. Later Common Lisp and Haskell made a huge difference also. I did learn other languages, but these were the most important to me.

Jay
+3  A: 
  • My first programming was on a TI-59 programmable calculator. This taught me about conditionals, loops and register management.

  • My first programming language was BASIC. This taught me about structuring programs (just a little) to make them readable and maintainable.

  • Pascal gave me a lot of insights into strong typing. Pascal was the first language where I could write code that ran correctly the first time, after I got it past the compiler.

  • Assembly language taught me about memory allocation and performance. It was a good prerequisite for C.

  • I learned OO programming from Delphi.

  • I learned design patterns with Java.

  • I learned functional programming with Ruby. Much more so now, with Clojure.

Carl Smotricz
+1  A: 

Ruby's blocks helped me become a better programmer. They gave me a better understanding of callback programming.

Geo
+1  A: 

My short answer is: the second language I learned.

I started out with C++, learned it and did some projects. I always felt that I would like to understand more. It was when I decided to also learn Python that some wisdom found me. The reason is that I approached the language with the "how does this language differ from c++" mindset. Looking up several aspects of what Python was doing and how it did it boosted my understanding of how languages worked at large.

mizipzor
+37  A: 

Any other language

Whenever I started to learn and actually use a new language it was a huge boost to my understanding.

I didn't matter what language it was, even "bad" languages helped, because they tought me to appreciate the "better" features of others.

DR
+1. You remind me of this adage: "Those who do not study history are doomed to repeat it."
Hai Minh Nguyen
+3  A: 

I'm really happy for you folks and I'mma let you finish but switching from BASIC/Z80 assembly to Turbo Pascal for me has been the greatest paradigm shift of all time, all time!

I was introduced to a huge array of features like structured programming, object oriented programming, a world without "goto", a very flexible type system, compiled code, concept of libraries. I won't even go into the benefits of the IDE concept.

ssg
+1  A: 

Visual Basic 5/6

Hold on! Hear me out. I coded some of that stuff in my first gig out of Uni. I'd grown up coding Sinclair ZX81 and AppleSoft BASIC, learned some C, Pascal, Assembly, SQL, Perl and Java, and bash scripting in University.

But, after graduating Uni, I spent the next two years coding server-side (!) VB5 and VB6 because the founder thought that VB was the greatest thing since sliced bread. It was there that I learned that not all languages are created equal, that some languages and language 'features' are undesirable, and that I, as a software development professional, needed to be informed, selective and opinionated about the tools I used to complete the task.

Gawds...awful flashback there...trying to implement Interfaces in VB6...

Stu Thompson
+1  A: 

Assembly language, Forth, and APL.

Knowing assembly language forces you to know how the computer "thinks." It also lets you look at the output of compilers.

Forth and APL took my brain down two very different tortuous paths that probably informed the last 30 years of my programming life.

Nosredna
+1  A: 

Intel x86 Assembler

Travis Heseman
A: 

Rebol is first candidate for that as you can use its unique Domain Specific Language feature to emulate other languages see

http://github.com/hostilefork/rubol http://reboltutorial.com/blog/scala-val-keyword/ http://reboltutorial.com/blog/scala-var-keyword/

or if you want to understand functional programming like Map Reduce http://reboltutorial.com/blog/map-reduce-functions-in-rebol-towards-massive-parallel-functional-programming-part-i/

Rebol Tutorial
A: 

first C, then C++, then comes BASIC and PASCAL

Paxi
A: 

Assembly.

When you understand how assembly works, the magic is gone.

Paul Nathan
+1  A: 

For me the following languages where eye openers.

  1. Firstly the most important is Microcoding - this made assembly language real
  2. Then it is Assembly language / Machine code which made high level languages and programming in them real.
  3. Then it was C as it connected the dots between assembly language and high level data structures. Forth also took me some way down this path.

After that I always mentally reduce to C and assembler and oaccsionally metal microcode to 'get it'.

For me programming is and I think always will be making something else (usually a machine) do some thing I want. Since we're on SO I'd say that more specifically as programming computers and so the above made the software to hardware divide crossable for me.

Every language I've come across and some instersting points that them compelling to express some idea better than others - e.g. OOP, P-CODE (inc JVM and CLR), VB, ADA etc...

However ultiametly I've always reduced to CPU, memory and a couple connecting buses.

Preet Sangha
A: 

I'm currently looking into Erlang. It's given me a whole new perspective on how to program. All I've done up to this point has been imperative programming, so seeing how functional programming works really filled in a gap I didn't know was there.

You'd probably get the same with any functional language, but Erlang is pretty easy to learn. Though probably a bit more difficult to master.

Tor Valamo
+3  A: 

ML, a functional language taught me that there are other useful languages besides my beloved C#. Learning a non-object oriented language for the first time really put things into perspective and has given me a greater appreciation for all of the different flavors of languages out there, like logic programming, constraint programming, etc.

wsanville
+32  A: 

PHP. It taught me that quality isn't important. Nobody cares.

stesch
+1 sad but true
finnw
Pithy. +1. It taught me more marketing than programming though.
Noufal Ibrahim
A: 

The answers that most sense to me related to C/C++; honestly, I think that what helped me learn to code was having access to limited machines (first machine: Apple II! 48K RAM and no lower case letters without a mod chip!) and lousy tools -- back then you had to understand how the machine itself worked in order to write code that worked/performed decently.

These days, I still find myself relying on the "simple stuff" that works -- C, basically, with a few C99 or C++ features. (If you rely too much on C++ features, your code breaks with the next release of GCC. C, however, tend to be stable -- you can still compile code written 20 years ago!)

This might mean that I have to code some things from scratch that I could find in a Java library; but the translation is simple (C, Java, JavaScript, Google GO!, C#, etc are all the same!), and i know more-or-less exactly what the compiler is going to do with the code I write.

I do also use other languages -- and in my company we rely largely on a home grown cross-platform functional language. But because of C, and because I had to pay attention to hardware details in the past, I understand better what our compiler and virtual machine is going to do with the code I write, and I therefore produce better code.

fullreset
A: 

C

As most of the other languages interpreters were written in C and its syntax having impact on any other language.

Enjoy coding
A: 

There are quite a few responses, but I will add mine. My programming career falls into three phases. From 1974 until 1987 I programmed primarily in assembler languages on several different kinds of minicomputers; from 1987 until 1998 I programmed mainly in C (and tools like shell, AWK, autoconf, libtool, yadda yadda) in various *NIX environments: device drivers, client server programs, database internals; from 1998 to present I have programmed for the web mainly in scripting languages: perl, php, tcl, ruby, just a little bit of python and some javascript.

I have to say that one of my greatest epiphanies came while programming in Ruby when I began to understand what object oriented programming was all about. I still have an awful lot of learning to do because programming, as a profession, is very much a moving target, and it is very faddish.

leed25d
A: 

Visual Prolog taught me that it is possible to combine OOP and prolog principles effectively together, which is a unique mix, although sometimes difficult. Prolog has also shown that in some cases, you just have to write a problem description instead of a solution, and the rest is managed by the programming language (leap of faith required). Python has given me an ideal of side effectless programming. Python programming has also provided me most information on data structures. C++ and Java have taught me how to use debugger effectively (done it too much). PHP has reminded me that the salary is also one of the motivators. TI-86 Assembler showed me how computer really works, although I think that is not so essential nowadays.

Ville Laitila
A: 

I have learnt C in my first yr of my UG. But i felt some what difficult to understand the concepts of why we are using such languages. But in my 2nd yr i learnt C++ - Object Oriented Programming really interesting.. The OOPS concept attracts me a lot.. (Inheritance,Polymorphism,...) And now PHP - frameworks -Codeigniter which is easy for me to learn .But above tat cakephp we had a nice cookbook in online and makes to better understand the MVC pattern of what is the actual process running in the backend.

Aruna
A: 

C++, Python, JavaScript

C++: Learning pointer's is a necessity, until you understand how to keep track of pointers and memory it's hard to visualize exactly what a program is doing. C++ really makes you think about what the computer is doing, I don't have any raw C experience so I'd assume C is the same. Just thinking about how an application could be made Object Oriented without language support is a helpful way to really understand OOP.

Python: Python is full of brilliant abstractions and well thought out syntax. Learning to use decorators effectively is a good way to learn to identify non-typical abstractions.

JavaScript: JavaScript can bend your mind! Learning to use closures in JavaScript is a simple way to get a grasp of programming with first class functions.

Michael
A: 

When my father bought me an Apple ][, I ran a simulation program on it:

  • it comes with a graphical interface
  • it can simulate any code in memory by changing the ip (instruction pointer)
  • it updates all registers, flags, accumulator graphically in chronological order

watching the small dot following around screen, then I learn how my computer work.

does anyone recall the name of the program?

my answer to this question is: assembler

Then I learned BASIC. Those 10, 20, 30, ... 100 line numbers really help to understand how computer follows my instructions.

Years later when I was in college, I learn C and understand memory, pointers, interrupts, recursion, difference between stack and heap.

When I learned Ada, I saw how concurrency can be described in code naturally.

When I learned dBASE, that shows me something on form layouts.

When I learned SQL, I found computer can do updates of multiple records by one command.

Visual Basic was very good illustration of event-driven programming.

Delphi showed how hand-crafted source code can be interchange-able with GUI-generated code.

C++ showed me constructor, destructor and vtable.

Ruby shows me beauty.

Objective-c takes me to AppStore ;-)

ohho
A: 

6502 assembly then Common Lisp. Every other language I've used falls somewhere in between those extremes.

Donnie
A: 

I Learned programming from C++, and new stuff such as events, and new OOP tech using JAVA. Note: I am a .net developer.

Amr ElGarhy
A: 

You really have to use multiple paradigms, if you wish to become a world-class programmer. The mostly-voted answer (right now) says C, and I partially agree (that answer already enumerates all the right reasons for using it). But it doesn't tell you what you'd be missing: e.g. object-oriented programming, functional programming etc.

After you master C, you have to play with C++ (again, not the best language in terms of productivity, but nothing like it for understanding how various object-oriented concepts get implemented "under the hood"). No, Java/C# is not the same, it has simplified the model to make it easier to use (ok, you get more productive, but you also miss some things). Note though that C++ doesn't really teach you how you should actually use and object-oriented language :) (C++ can very easily be misused). For that, I think a better option is Eiffel.

Then, you have to play with a functional language; Scheme is good, so is Haskell. You have to understand the concepts, some of them made their way into "mainstream" programming languages (and even more into libraries), but there's nothing like doing programming in a purely functional language; changes the way you think about things.

Then, it doesn't hurt to play for a while with some declarative languages.... start loking at prolog (try to wrap your mind around its programming model) and then move to CLIPS (which started as declarative but moved to rule-based). This is likely to help you if you ever need to write a domain-specific language.

I wouldn't say "do assembly programming" - it adds very little value on top of what C already teaches you. Instead, get Hennessy&Patterson's book and learn about computer architecture: it will probably help your programming skills more that you think. Oh, and it doesn't hurt to read the Dragon book either - to understand a thing or two about compilers.

Finally - start playing with mainstream languages (C#, Java) and scripting languages like Lua & Python, etc. By now, you should find it pretty easy to adapt to them; but you'll find things to like at them, and you'll find where they are most useful. Oh, and study a bit Javascript... just because it's so popular on the web, and its object model is fairly... unique (I'd say "broken" :P, but nevertheless it's interesting to know it, even if it may not be quite so interesting to actually use it).

[later edit] Oh, and someone else said in a comment: Ada for learning various concurrency concepts. But really for concurrency, the king is Erlang; it's best to learn it after you got used with some other functional programming, and have mastered the functional programming stile.;

Virgil
A: 

I'd say Python. It didn't necessarily help me understand all parts of programming better, but it really raised my expectations about what a language should be like.

It stays out of my way, it's simple and it doesn't make me write all this code extra code. The syntax is decent. I can guess a lot of the things I'm looking for. Lots of the things I need is included. Unit testing is easy.

Before I even enjoyed writing Perl. I didn't mind things like the function objects in C++. Now I do.

Python isn't perfect, but it sure made a lot of things easier when coming from C++/Java/Perl

Mattias Nilsson
+1  A: 

I'd vote Haskell/Lisp for the mathematical side, and assembly for the machine side. Even though I'm not a great programmer, I admire these 2 point of views.

anta40
+1  A: 

Here was my trajectory of major milestones:

machine code -> BASIC and assembly -> C -> C++ -> Perl 5 -> Objective Caml / Haskell / Scheme -> Twelf -> the predicate calculus.

I often wish I had taken this path in reverse.

james woodyatt
A: 

Assembly (as a lowest) SML, then Haskell (as a highest) a lot of crap in the middle like C, Fortran, Pascal, C#

UserControl
+1  A: 

which languages have the biggest impact on understanding the how and why of different programming concepts?

Each programmer will cite one language from each paradigm. For me, probably ARM assembler (low-level), BBC BASIC (structured programming), Standard ML (functional) and Mathematica (term rewriting). That could probably be replaced with any assembler, Pascal/BASIC, SML/OCaml/F#/Haskell/Scala/Clojure, Mathematica/Pure and augmented with paradigms I haven't learned yet (e.g. logic like Prolog).

I thought about taking the simplest of problems and implementing them in various languages. Has anyone done this?

Many people have done that. Rosetta Code is probably the best-known and most active repository today. See Code Codex as well. There are also some more specific sites such as my own Ray Tracer Language Comparison.

Jon Harrop
A: 

I started with Ruby. But I hated it.

Then I discovered Javascript :D

M28
A: 

Interestingly for me JavaScript was a significant language. (I'm a C/C++ and C# programmer mostly)

Javascript is the language that began to gently introduce me to functional programming, delegates, callbacks, and functions as first class citizens.

John Weldon
A: 

By the time I was done with a 5-week course on prolog, I knew recursion inside and out.

callingshotgun
+1  A: 

When I was a child, I thought as a child, I acted as a child, and I modified BASIC code for hours -- to no particular end -- which taught me that I could control the computer.

As a young man, I learned VB (5), which taught me higher-level logical thinking and enabled me to program larger things.

In college, I learned Java (1.4), which showed me what VB's "events" really were, and from which I learned basic object-oriented programming concepts.

I learned C, which taught me simplicity.

I learned (SWI-)Prolog, which destroyed my view of programming, and taught me to express myself to a deductive logic interpreter.

I learned F#, which showed me that the functional programming paradigm was basically equivalent to a deductive reasoning system.

I learned Python, which taught me brevity, and that object-orientation still functioned in a kingdom of verbs.

I learned PHP, which forced me to write properly reusable libraries of code.

After college, I learned Ruby, which has shown me the power of predictable interfaces, the power of metaprogramming, and that the Art of Computer Science should be full of an unexpected and giddy joy.

I've learned Javascript, which shifted my expectations of object-oriented design, and reminded me why I like functional programming.

And I've learned Perl (5), which has shown me the utility -- nay, requirement -- for software planning and design up front.

Whether tomorrow for me holds Erlang or Go, Clojure or Haskell, Lisp or APL, I will always know that there is something to be learned from every language -- whether you like it or not.

anon
+1  A: 

Designing my own gave me the most understanding of programming and programming languages, naturally.

As for serious other languages, Scheme, Haskell, C and C--.

As for theoretical languages: Untyped lambda-calculus, System F, Turing Machines

Lajla
+1  A: 

C is the basis of everything. :-)

A: 

Sadly, many lessons in life comes in a negative way: how NOT doing something. In this regards, I thinks the languages most teach me of how not doing things are been : Cobol (The Most Horror Language), Visual Basic, Java and its clone C#. In the opposite site, I thing that a few languages worthy of learn are: Lisp, Forth, Haskell, Erlang, Ruby

Nisanio
A: 

C++ and assembler language. I'm now very aware of object orientation and how to code efficiently and preventing exceptions such as NullPointerException (known as Segmentation Fault, if you're a C++ user). Basically, I program code and customize it to be effectient even at bit level (it's good for when writing cryptographical algorithm such as Rijndael).

The Elite Gentleman
A: 

As far as I can tell, no one has responded to the part of your question that asks, "I thought about taking the simplest of problems and implementing them in various languages. Has anyone done this?"

See http://99-bottles-of-beer.net/ !

David Matuszek
A: 

Im going to also have to go with C/C++. I've learned the most from it, and even though it can be frustrating at times it has taught me alot. And all the extensions/libraries and just general info for it always helps.

Mercfh