Which programming language should I learn first?

in programming •  8 years ago  (edited)

When you get started with programming one of the first obstacles is picking a language. A mistake beginners often make is asking experienced developers where they should start:

The truth is it doesn't matter.

The first programming language I was taught was Pascal. This was long after my childhood experiments with ST BASIC. The year was 1998 and I was 17 years old. In case you're not familiar with pascal, here's its "hello, world":

program HelloWorld;
begin
  WriteLn('Hello World')
end.

I've not used this language since. If you were to ask me to write a program using this language now, I'd need a book. In fact, I had to search for the example above.

That doesn't mean it was a waste of time. Through Pascal I learned basic programming concepts such as variable assignment, loops and if statements; it even introduced me to object oriented programming.

I had a blast creating text-based GUI's. I remember during a lesson when the power went out I was so in the zone I geeked out and began writing code with a pen on paper. It was fun!

Programming languages share a lot of concepts. As a beginner, it's more important for you to learn those concepts than to focus on learning a particular language. Instead of trying to find the best language, take the advice of Allen Wirfs-Brock and think of it in terms of a toolbox that will grow:

Or to use the same analogy I used in how to get started with programming, where I compared learning programming to learning to ride a bike: you would never ask someone which bike you should learn to ride first. Any bike will do, so long as you can reach the pedals.

Regardless of the language you choose you will learn something. You'll add another tool to your growing toolbox. So just pick a language, any language, and start having fun.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thank you for this. I have been keen to go into programming. I believe I have that mind, but lack the physical skills.
Shouldn't the question, "What do you want to do" come into it as well as what language to use?
I wouldn't recommend Java to a guy who just wants to code websites for example.
I have been asking myself this question for a long time, and the end result is I would love to contribute in a meaningful way to the development of Blockchain. So with that in mind, what language should a total newbie start with first?

Java's actually fine for websites but definitely has a longer ramp-up period. Grails is a framework based on groovy (which is java but with a lot of the annoying BS chopped off) that runs on the JVM. I've heard it's pretty good.

It does matter a little bit what you want to achieve. Some languages are more suitable for certain tasks, but there are also a lot of misconceptions. Java, for example, is used a lot to make websites, often with the Spring framework.

Generally speaking, you can do anything with a language. Where I work we have a website written in C++. It seems insane, but there were good reasons for picking C++ at the time.

If I'm forced to answer the question, I say newbie's should pick a mainstream language that has a large support community - you are going to need help in the beginning :)

should I imagine that is a very long code?

The website in C++? That depends on what you consider long! ;)

The programmer who wrote it is extremely good. He even wrote a templating engine and SOAP API for it. It's the kind of project that if you study it, you can learn a lot. It's not perfect (he seldom wrote tests), but the design and implementation is very good.

Allen Wirfs-Brock is wrong, at least if you care about being employed. The easy winner here is Javascript. It's got tons of weird behavior but also lots of options and huge variety of tools and approaches. It is used from embedded programming to web pages so it is VERY applicable if you are good.

People who can afford to program just for fun are both super odd (in that this is their fun time) but also extremely fortunate. Programming takes up a LOT of time. Most people don't have that much time free to do things that don't get them paid.

The focus is on learning. When you start learning, you shouldn't focus too much on "what is best" and "what are other people learning" because you're a beginner.

Experienced programmers can learn a new language in a few weeks, and know enough about the language's idiosyncrasies in a few months to be relatively proficient.

It's the concepts and paradigms that underpin all languages that are important to learn, especially in the beginning.

I disagree. You should very much be focused on that, at least if you care about employment OR about any particular projects. Certain languages really do have advantages - sometimes large ones - in certain domains. If you want to do web work you really don't have a choice about the javascript. If you are interested in working on operating systems or talking to hardware then you will need to learn C.

Javascript and C don't work even remotely similar to one another, just the syntax looks similar. To spend a lot of time on one while you interests lie in the other realm is just silly.

Certain languages really do have advantages - sometimes large ones - in certain domains.

If you only every learn JavaScript, how will you know?

Javascript and C don't work even remotely similar to one another, just the syntax looks similar.

Isn't that an argument for building a toolbox?

I started with PHP as my programming language of choice. At the time it seemed like a good idea, the world was just starting to go "Cloud" crazy and PHP was an artisan type language i.e. had some age behind it. I do not regret it at all, sometimes I think maybe I should have chose a younger language such as Ruby or NodeJS but those thoughts leave quickly when you realise PHP does everything you need it to.

Plus PHP has helped me move onto the OOP languages such as Java for Android Dev.

Swift 3.0

finally, today is the best programming language to start learning imho

Nowadays kids get into programming with Minecraft.

That sounds like a lot more fun than reading a book on ST BASIC when you're ten :)

Many people say: PHP or Python.

The biggest obstacle I've been running into while learning how to code is that I don't have someone that can sit there and go over my code and debug it for me. So any time I start taking lessons, there comes a point where I just can't figure out I did wrong, and I have to give up. I've gone back to the same lesson a hundred times and still can't figure out it.
That is my major hang-up, and a friend of mine who has been trying for years to learn on their own feels the same way. You need an actual person to tutor and help you through the rough spots or else you simply can't move on to the next lesson.

It's indeed very difficult to overcome difficulties when you're working on your own. There are resources like stackoverflow.com and r/programming on reddit where you can ask for help, but you're right, it won't compare to having someone there to sit there with you and explain it.

I recommend just moving on to other lessons and resources. You might just be stuck due to the context, and as you progress in other areas and go back, it might become clearer. Don't give up!

I was doing JavaScript on Codeacademy. The other lessons I found were all about website design, though. Thanks for the support

Yes indeed.

I learned VisualBasic, then Java as part of my college courses. PHP I had learned on my own.

I recommend people picking a higher level language to learn object oriented programming, and learn how it's really done from the beginning, at least after you learn the basic syntax/structure to coding. Then you know about function/methods/procedures, and then can apply that logic to any language. I don't recommend the Ruby and other framework languages. They take something away from the overall understanding of programming and make it "simpler".

Take care. Peace.