Tell me more ×
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.

Which is the programming language you wish you had learned at the very beginning of your programming career?

Also mention the reason.

share|improve this question
2  
@Homo: Which guidelines of the big 6 do you think this question apply? Thank you. See more: blog.stackoverflow.com/2010/09/good-subjective-bad-subjective – bigown Oct 2 '10 at 15:24
2  
You mean the first language, or the second/third? – user1249 Oct 9 '10 at 8:58
10  
@bigown: forget that six crappy rules -- if we'll follow these rules, very few actual question could be asked on this site, and programmers.se would eventually die. – Lorenzo Oct 9 '10 at 18:05
5  
+1, Great question. – missingfaktor Oct 15 '10 at 17:27
4  
Such a great question closed as "not constructive"!!! And not even by votes, but from a single administrator!!! – Lorenzo Oct 27 '10 at 21:47
show 7 more comments

closed as not constructive by Mark Trapp, Walter, aasc, bigown Dec 1 '10 at 12:14

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.

17 Answers

up vote 21 down vote accepted

Python

It is easy to learn for an absolute beginner, yet includes support for powerful features such as proper OOP, higher order functions and closures. It also comes with a pretty big library, so it is easy to get something useful up and running in a very short time.

I think the same case can be made for other similar languages like Ruby.

share|improve this answer
1  
@Pekka: I agree with the brackets hatred, however I prefer a bottom-up approach. Begin with C/Pascal, learn the basics of memory management, of the hardware, and then make your way up and appreciate the power of abstraction. – Matthieu M. Oct 10 '10 at 10:47
2  
@Matthieu M.: I also agree that teaching fundamentals about the machine (e.g. pointers) early on with a language like C. But IMHO, the first language (as opposed to an early language, not necessarily first) should make the introduction to programming as painless as possible. Things like memory management are a huge pain even for experienced programmers. My thinking is that C is good as a second language. But like much else here, this is highly subjective and YMMV - I know lots of people who learned C first. – MAK Oct 11 '10 at 8:37
1  
I must admit I in fact begun with Computer Science Theory, and saw my first algorithms / structures on paper which seems in fact closer to Python than C... but we delved into Pascal (urk...) about 6 months after. I chafted more at the lack of library (no sort routine...) than at the language itself though. – Matthieu M. Oct 11 '10 at 19:18
show 1 more comment

C (Not even C++)

As low level as possible without being impractical as assembler, you have to work with the basic elements of the operative system and concepts that will always be useful to program.

It's harder than starting with higher level languages as Python, Ruby or even Java, but it will pay on the long run.

share|improve this answer
3  
I still don't know C or C++ very well, but I wish I had learned C first as it is the foundation for so many things, including the interpreter for other languages. Otherwise, my vote would have been for Python. – bogeymin Oct 10 '10 at 23:35
1  
@acidzombie24 Well, I think if you disagree a -1 is fine ;-) – Khelben Oct 13 '10 at 7:47
4  
I strongly disagree. When you start learning programming, IMHO it's better to start learning logic and reasoning, than to have to spend most of your time dealing with low level stuff and tracking down pointer bugs. It's good to know the lower levels, but don't start there. It's just too darn painful. – John Reynolds Nov 28 '10 at 12:47
show 4 more comments

Lisp

Why: elegance, expressiveness, generality, power of macros, and functional paradigm - as well as any other paradigm of interest. Shifts one's perspective from instructing the computer step by step, to designing languages. Still very relevant today, decades after its invention - in fact, experiencing a renaissance, particularly with Clojure - a modern Lisp dialect.

Instead, I learned Basic, Pascal, and C early on, and was so disgusted I lost interest in coding for years. But such was the state of technology at the time; Lisp wasn't easily and freely available for home computers.

Check out the magnificent classic, The Structure and Interpretation of Computer Programs and its video lectures to (re) experience the magic and fun of programming.

share|improve this answer
1  
I learned Common Lisp as my first language, and it made learning other programming languages much harder (they didn't feel right after the lisp experience). – Ryszard Szopa Oct 9 '10 at 21:24
2  
+1 for SICP reference. must-read (and viewing) for developers. – Kevin Won Oct 12 '10 at 22:20
show 1 more comment

This question is difficult to answer. I was going to say LISP, or Haskell, or any other functional programming language for that matter, but then thought again:

The programming language(s) with which I am most comfortable these days would not necessarily have been the right one(s) to learn first.

I got into programming when I was only 9 years old. BASIC was an easy language to learn. (Of course, in retrospective, I shudder at the kind of code I wrote back then.) I would probably have struggled a lot more with a language like Haskell and all its mathematical influences and terms ("Y-combinators", "lambda expressions", "monads", "arrows", anyone?) Instead, I basically followed the historic, or "mainstream", progression from structured programming (GW BASIC) to procedural programming (Turbo Pascal) to OOP (C++), and have finally arrived at more declarative and more functional forms of programming (C#, F#). I am hoping to learn Haskell soon.

(The reason for my current interest in declarative and functional programming is that I am impressed by their expressiveness, and because I feel that computers, and compilers in particular, have finally become powerful enough to run programs written in such high-level languages with good performance.)

While this progression took me approx. 15 years, which is quite a lot, I think it was a natural way for me to learn programming, internalise important theoretical concepts, and also to understand why programming languages today are the way they are.

When I was at university, we had to program with Java. Many of my colleagues there who had never before programmed anything struggled with seemingly simple things like syntactic rules ("Why and when do I need to put those {} brackets around something?"), or OOP ideas ("What's the difference between a class and an object?", "What does static mean?"). I put some of their typical problems into question form here, but in fact, they didn't even have the proper vocabulary yet to ask these questions directly.

To conclude my answer:

Learning how to program well and really understand what's going on takes time, and it's perhaps a very good thing to take the long road and make some detours before arriving where one wants to be.

share|improve this answer
show 2 more comments

Commodore/MSX/Sinclair/Amiga Basic

You're probably thinking I'm insane now. 'We had to walk in a snowstorm, uphill both ways,' I hear you say. 'We had to PEEK and POKE, we debugged bad GOTOs with PRINTs, 16 kB of memory was a luxury, and you want to be part of it?! You're a loony!'

Well, here's the thing: you have fond memories of all those good times you spent playing around with your computer when you were young. When you get together, you can share war stories and laugh over how terrible programming was. And you can actually appreciate how modern technology made things easier for programmers.

We, on the other hand, got everything easy; everything just works, memory and storage are practically infinite, debuggers and profilers are dozen-a-penny, documentation is two clicks away, and if something is really difficult, we can ask on StackOverflow and get excellent advice in no time. I really wish I had hard times, I really wish so.

share|improve this answer
3  
"everything just works" and you program for a living? – user1249 Oct 9 '10 at 8:56
show 3 more comments

Haskell

Programming in (idiomatic) Haskell requires a rather different mindset than imperative languages, and it can be really hard to shift into that mindset when you're used to C, Java, Python, etc. I'm not sure if a "native Haskeller" would have similar problems moving to an imperative language, but sometimes I wish I had learned Haskell first so I could grok some of its style better.

share|improve this answer
2  
learning Haskell first is like learning Chinese as your first foreign language if you speak English natively. Very low chance of success. Incredible language, not a good first choice. perfect second choice. – Kevin Won Oct 12 '10 at 22:21
show 1 more comment

C#. I started out with lower level languages that weren't conducive to work.

Reverse of other answer saying "C... As low level as possible without being impractical as assembler" but on the flip side: C# is high enough to do end-to-end solutions without having to rely on learning the guts.

share|improve this answer

Pascal

I know it is not practical since Pascal it is of less use in the work life, but it is strongly typed language, so you learn to program the right way:

  • Variable definitions always at the start of a method.
  • variables should be initialized before their use.
  • no garbage collection, so you learn the memory model good.
  • and many other points that I forgot.
share|improve this answer

Assembly.

I believe that if you don't understand low level operations (what happens in the CPU, the RAM, etc), you can't be a complete programmer.

share|improve this answer
5  
-1, assembly is important, but I wouldn't want it to be my first language ever. – Lord Torgamus Oct 9 '10 at 5:06
2  
I must disagree my lord ;) – user2567 Oct 9 '10 at 15:07
4  
I wouldn't down-vote, but I would agree Assembly is a bit too low for first-language. Definitely something I want to learn, but first? That's a bit sadistic imo. – WernerCD Oct 9 '10 at 18:02
1  
@pierre you do not deserve downvotes. Some may disagree (including myself) but honestly learning assembly for a computer science undergraduate would be a great starting language. And I spent time as a TA for an a course during my undergraduate where students implemented a assembler, linker, loader for a language the teacher designed each quarter. – Chris Oct 12 '10 at 11:54
show 5 more comments

D from Digital Mars

It's universal, allowing you to write system-level code or high-level, depending on the subset of the language you use. Being similar in syntax to C and binary compatible with it makes it highly practical as well. Too bad it's not too popular and does have a lot of 3rd party tools to work for it; maybe I would have switched to writing mostly in D long time ago.

share|improve this answer
show 2 more comments

According to Me,C Language is the first Language to learn by an every developer, because if u learn t c language very well , u can able to learn the Object Oriented Programming Languages very easily.I feel C is the Basic Foundation for an every developer, since all Languages inherit the features of C and if u are going to develop embedded applications, C language will help u to develop embedded applications in fragile manner.

share|improve this answer

I started with Pascal, soon followed by Assembler/C and then C++. I wouldn't change this order except, maybe, for Pascal (which is quite useless nowadays).

I know I got lucky because it happened that the most "famous" languages of the time were also the "better" to understand the basics.

I pity nowadays beginners (at least of Java and C#) which grow up without truly mastering the difference between automatic and dynamic variables. (I also was used to pity them for not knowing the difference between the memory model tiny, small, huge etc but now that's only useful for historical reasons).

share|improve this answer
1  
Pascal wasn't necessarily useless. I started on Pascal as well. Followed by assembly (coincidence?) Went on Pascal for Windows and then Delphi, Followed by C, then to VBScript. Love from Pascal, to Delphi brought immediate love for C#, because it had so much similar to Delpi but with C syntax. Loved it immediately. Love it still. Passionately. – Robert Koritnik Oct 11 '10 at 14:02
show 1 more comment

I don't wish that anything from my past was different. Why bother pondering past regrets? Everything that I've done has helped shape who I am now.

I get the feeling that your question is actually "Help me decide which language I should learn first." If so, I suggest it's a question that is a waste of time. Instead of wasting time thinking about what language you should learn first, spend your time actually doing the learning. Then you can learn another one if that doesn't speak to you. The value of learning is 100% greater than the value of thinking about what you might do.

Ruby. Perl. Java. FORTRAN. Doesn't really matter. Pick one at random. Quit thinking and start doing.

share|improve this answer
show 2 more comments

Assember / C.

You get to understand how compilers / assemblers / linkers work, you can "see" the software drive serial ports, VDUs etc. and you get to understand how the whole stack works.

Visual Studio, Netbeans and Eclipse are great IDE's which ramp up productivity but offer no understanding as to how things actually work.

share|improve this answer

Logo

Visual Feedback

Logo gives you immediate gratification because it has a visual Turtle that you're moving around screen. I successfully started programming with BASIC at 8 years old because I could write "10 Print "Hello World" "Run". Moving a Turtle is a lot cooler than printing some text.

Immediate Success

Logo has the immediacy of a scripting language, for example you can type:

Forward 10

You don't have to 'write a program' or 'create a class' or 'create a Main method' that most other programming languages require as step one. You don't even have to type 'Run' from the BASIC days.

Structured Programming

Beneath the ease of use is a language which introduces the simple concepts of structured coding and classes, unlike BASIC. It's starting you on the right path for a 'professional' language.

To MoveForward Forward 10 End

MoveForward

Logo is a great language to use for the first six months of programming. It's simple. It's visual. It's immediate. It's structured.

share|improve this answer

The same language I learned first: C++. The way it was taught to me told me about more than just "you type this it does that". It taught me the fundamentals of how computers work, exactly what a variable is, what bits and bytes are, ext...

Twenty years later can't remember a damn line of C++. But because of the principles I learned from that language I'm constantly able to pick up a new language whenever I need to.

share|improve this answer

Any programming language as long as I learnt it from the right instructor.

My big mistake wasn't learning visual basic first. It was learning visual basic from one of those "learn it in a week" style books. It's not the language that caused my bad programming habits, it's the way that I learnt it. Afterwards I had to unlearn everything I thought I knew before I could really learn how to program.

Syntax changes, but good concepts and habits last a lifetime.

share|improve this answer
show 1 more comment

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