DEV Community

Cover image for How to pick first programming language?
Marinsborg
Marinsborg

Posted on • Originally published at marinsborg.com

How to pick first programming language?

Introduction

In my "Intro to programming from zero" post, I explained basic programming concepts and I also told you that programming concepts are independent of programming languages.

Programming language is just a tool that you use 'to tell a computer what it needs to do'.

In this post, I will list some of the popular programming languages and explain what are they used for and what you can do with them. The goal of this post is to help you pick one of the languages and start coding.

Let's start with the list.

Python

Python is one of the most popular programming languages in the last decade.

It is a high-level general-purpose programming language. It has a large number of libraries that can be used for various branches of the industry.

It is a very easy language to learn, it uses indentation instead of curly braces and it does not need to use semicolons. Since it is easy to learn, it is often a language of choice of people that are not programmers like scientists, mechanical engineers, accountants, etc.

Used for: data science, data visualization, machine learning, task automation, web development (server-side), game development, etc.

Resources to learn from: Automate the boring stuff with Python - a great online resource to learn Python from. It has an introduction to Python and then it shows you how to solve some everyday tasks.

JavaScript

JavaScript or JS is the programming language that some people love and some people hate. It is used to develop interactive web pages or applications. About 97% of pages use JS on the client-side to control web page behavior. It is usually used in combination with HTML and CSS.

It also has a large number of libraries that help you easily solve various types of tasks.

Used for: frontend web development, backend web development (node.js), game development (browser games), mobile applications (react native)

Resources to learn from: The Odin Project - it is a page that offers a full-stack JavaScript path for free. Do I need to say more?

Java

(Do not confuse Java with JavaScript, they are not similar at all)

Java is an object-oriented, general-purpose programming language. Java was and still is a pretty popular language mainly because of the Java virtual machine that enables to run Java code on many different types of devices. It has a syntax that is similar to C and C++ but it is not a low-level language as those two are.

Used for: web development (server-side) - good for large enterprise applications, desktop applications (Windows and Linux), mobile development (Android apps - however, Kotlin is now more popular for Android developers)

Resources to learn from: Programiz - site that explains Java from start

C#

C# is also a general-purpose programming language that is similar to Java. It is developed by Microsoft and it is like a direct rival to Java. There is nothing much to add without going into unnecessary details.

Used for: web development (server-side), desktop applications (Windows), game development (Unity), mobile development (Xamarin)

Resources to learn from: Microsoft's official page - it has a bunch of video tutorials and documentation

Go

Go or Golang is compiled, fast and easy to learn open-source programming language that was developed by a team at Google. It has the ability to support concurrency in a non-blocking way which makes it scalable when you need to run multiple concurrent processes. It is a still relatively young language and that can have its disadvantages. However many people love using go for its simplicity and more and more companies are starting to use it in some of their processes.

Used for: infrastructure, web development (server-side), data science, machine learning

Resources to learn from: Golang BootCamp - book that has everything you need to know to start with Golang

Conclusion

In this short post, I gave you some directions you should use when choosing your first programming language. Decide what you want to do and then pick one.

If you can't decide then I would suggest you pick Python. It is the easiest one to learn on the list and you have a good chance to find a job with it.

If you are interested in the popularity of each language and what is the average salary that developers get for working with that language then you can look here at the StackOverflow 2020 survey.

What are you waiting for? Pick one language and start!

Discussion (21)

Collapse
peerreynders profile image
peerreynders • Edited on

Pyret was designed to be the first programming language.

One of the enduring lessons from the Racket project is that no full-blown, general-purpose programming language is particularly appropriate for introductory education. By the time a language grows to be useful for building large-scale systems, it tends to have accumulated too many warts, odd corners, and complex features, all of which trip up students.

A Data-Centric Introduction to Computing

Pyret vs. Python

For the curious, we offer a few examples here to justify our frustration with Python for early programming.

The idea behind Pyret — learning programming before an industrial programming language — is to set up a Proactive Transfer.

A form of transfer of training in which the learning and/or performance of one skill influences another skill yet to be learned.

Anecdotally:

It’s mind boggling that your HtDP students are better C++ problem solvers than people who went through the C++ course already

Which resonates with Edsger W. Dijkstra's statement:

It is not only the violin that shapes the violinist, we are all shaped by the tools we train ourselves to use, and in this respect programming languages have a devious influence: they shape our thinking habits. This circumstance makes the choice of first programming language so important.

Collapse
marinsborg profile image
Marinsborg Author

Interesting. I need to research about it a bit more. Are there any jobs available that needs this language?
Or is it just for education?

Collapse
peerreynders profile image
peerreynders • Edited on

At this point it's a teaching language but

Will Pyret ever be a full-fledged programming language?
Yes.

That doesn't mean it will ever become a prevalent vocational programming language.

  • "The shortest distance between two points is a straight line."
  • "The shortest path is not always the fastest."

People intuitively believe that they will acquire the skill of programming while they learn their first vocational programming language because they create a false equivalence to learning to communicate when they learn their first natural language when they grow up.

But with programming you'll likely have to learn multiple programming languages during your career — some of which exist in completely different paradigms.

From that perspective it's an advantage to start in a "sweet spot" and branch out from there. But there is no industrial programming language that exists in that "sweet spot" — that is where Pyret tries to position itself.

In terms of research:

While successful, the Scheme-syntax left some students behind which is ultimately why Pyret was developed from the ground up.

There are a number of videos with Shriram Krishnamurthi and Matthias Felleisen talking about their work available on the web.

Thread Thread
marinsborg profile image
Marinsborg Author

Thank you for this. I have never heard of it before.
I wrote in the previous post that programming concepts are not bounded to programming languages. And I explained logic using flowcharts.
I'll make research on this for sure.

Thread Thread
peerreynders profile image
peerreynders

And I explained logic using flowcharts.

Flow charts are about "flow of control" or as Rich Hickey would put it Place-Oriented Programming (statement-oriented) — "data-centric" programming tends to focus a lot more on "flow of data" (value-oriented; expression-oriented).

Both PLOP and VOP are valid but they are also quite different. In terms of learning progression, VOP seems to be easier to learn and the VOP -> PLOP transition seems to be (a lot) easier than PLOP -> VOP for a lot of people.

Thread Thread
marinsborg profile image
Marinsborg Author

I am glad you shared this with us. Would you maybe write some post to promote this language for beginners?

Thread Thread
peerreynders profile image
peerreynders • Edited on

What is there to say beyond what is already stated on A Rationale for the Pyret Programming Language?

And whenever I broach the subject of learning "to program" before learning a "practical" programming language the response invariably ends with:

That seems excessive and like an unproductive path to get going.

Peter Norvig: Teach Yourself Programming in Ten Years

Proactive transfer simply doesn't make a lot of sense to people.

In 2009 MIT's introductory programming course, 6.001, switched from Scheme to Python:

Nowadays you muck around with incomprehensible or nonexistent man pages for software you don't know who wrote. You have to do basic science on your libraries to see how they work, trying out different inputs and seeing how the code reacts. This is a fundamentally different job, and it needed a different course.

In terms of educational resources the competition for an audience is immense so why would students choose to work in a language that appears nowhere in the job postings or isn't the latest shiny object in the tech world?

Pyret is never going to be trendy.

Even with the anecdote I've already shared there'll likely never be conclusive evidence that Pyret is indeed a better choice for most people (there are always exceptions) — there are just too many variables that can't be controlled.

  • Both courses were taught by different instructors with different personalities, teaching styles and using different course designs.
  • Students are usually free to switch courses early in the term, so the representative attitude of any student choosing to take one course over the other could be very different.

Pyret was designed to be better for teaching/learning programming — but whether it's actually successful is anybody's guess and YMMV will never be eliminated.

Another aspect is that it's never been easier to start programming with something, so lots of people get exposed early in life in an unstructured way. This leads to situations where poeple resent having to learn another programming language that most employers don't recognize or will give them paid work for.

So really all that can be done is to raise awareness that Pyret exists and why it exists, so that people that are in this for the long haul can at least take it under consideration.


When I learned to program I learned FORTRAN, BASIC, APL and COBOL. Now APL was way out there, too much so, especially as it required a special keyboard (or just added another layer of hurt by using an ASCII keyboard — imagine entering a program by typing the number codes of unicode code points). In hindsight FORTRAN, BASIC, and COBOL weren't actually three different programming languages but just three different dialects of the same programming language. Then we got to Pascal in 2nd year; it was way nicer than the earlier ones but again — just another dialect. Had to work with some SQL precursor/competitor in 3rd year aside from x86 and 68000 assembly. Didn't get to C until 4th year for OS programming and image processing.

For an AI graduate course got to choose between LISP and Prolog; foolishly chose Prolog (yay! Pattern matching) — it seemed shinier at the time. Up to this point now it's been strictly structured programming. I had to teach myself C++ and Object-Oriented analysis/design/programming on the job. Essentially became an OO dogmatist especially in the face of people using C++ as a "better C" claiming OO status while continuing to program procedurally.

Learned C# for MCAD/MCSD.NET certification. Learned Java for SCP/SCBCD/SCWCD certification.

Tried to learn Ruby and ended up tossing Programming Ruby across the room (deepest apologies to the authors; the only other book I did that to is Information Modeling and Relational Databases; Chapter 3 is good but the book had the annoying habit of assuming knowledge early on that it would only impart later). So at this point if it wasn't using a C-style syntax it was going to be a problem for me.

Learning JavaScript seemed like a good idea but JavaScript: The Definitive Guide, 5e somehow missed the mark for me, though I managed to regain some momentum with JavaScript: The Good Parts but felt somewhat thwarted by Functional Programming in JavaScript.

So I decided that my "in a rut OO mindset" needed shaking up — and took on Clojure. It was ugly and utterly painful but ultimately worth it. Liberated of that imperative mindset I was able to move on to Elixir (this time the Ruby-style syntax did not slow me down one bit), Erlang, visit Haskell (as a tourist), OCaml.

Had a quick glance at Go (meh), Python (meh), PHP (meh).

Started two years ago with Rust and one year ago with TypeScript (though I still don't really consider that a language).


It is from this perspective that if I was to start programming today I would hope that some mentor would strongly recommend that I have a very good look at A Data-Centric Introduction to Computing (Pyret) and How to Design Programs, 2e (Scheme).

But that's just my opinion.

Thread Thread
peerreynders profile image
peerreynders
Collapse
leouofa profile image
Leonid Medovyy

I started programming with Visual Basic. It got the job done lol.

I think Swift Playground (apple.com/swift/playgrounds/) is great to get started programming and learn basic concepts. It’s really holds your hand and keeps the code from erroring out.

Once you get the basics down. I would just follow your interests. I focus on web dev and like Ruby the best, but everyone has their own preferences.

Collapse
marinsborg profile image
Marinsborg Author

I agree. I started with C as my first language but I switched to Java because there were no jobs that required C knowledge in my area. And right now I work with C# and I like it.
Like you said, once you get basics downs, it is much easier to learn new language.

Collapse
mohan_aggarwal profile image
MOHAN👨🏻‍💻 • Edited on

What about Kotlin??

Collapse
marinsborg profile image
Marinsborg Author

Kotlin was menioned in Java section for Android development.
It is a great language but I still think that there are more entry level jobs that look for Java developer than Kotlin.

Collapse
mohan_aggarwal profile image
MOHAN👨🏻‍💻

Yes, but u know Kotlin can be used everywhere where java is being used today because it is 100% interoperable with java, it can also be compiled to js, so it can be used for web frontend and node js, other than that it can also be compiled to native binaries that enables it be used for ios development, web assembly and native programming. Also it can be used for data science, data visualization and machine learning and it is preparing to be used for other fields too. It is a very great language, i love it so much, and as u mentioned it is much more popular for android development.

Thread Thread
marinsborg profile image
Marinsborg Author

Do you it is worth to learn it as a first language? I think that there is still larger demand for Java developers than for Kotlin but I might be wrong.

Thread Thread
mohan_aggarwal profile image
MOHAN👨🏻‍💻 • Edited on

Yes kotlin is an awesome language as a first programming language because it teaches u everything from basics, to oop, to functional programming, many beginners said that they liked kotlin since it allows them to write their code very imperatively and fluently, experts coming from other languages said that they see kotlin provided a lot of new and rich set of features that their previous language were not having, other than that many universities and colleges r starting to introduce kotlin in their courses to introduce oop and android, small to medium companies starting to move to Kotlin so they can write their codes in much safer and easy way. Other than that there is still much need of java developers, but need of kotlin developer r increasing by the day. Kotlin is maybe new to someone but u should know that kotlin is already 10 years old now, im very much happier with kotlin with no regrets inside, and its going to be much more amazing than ever.

Thread Thread
marinsborg profile image
Marinsborg Author

Yes, I heard that Kotlin is praised by experienced developers, mostly Android developers. I did not know it is in demand. I will look into it and see how it is so I can start recommending it.

Collapse
pandademic profile image
Pandademic

Great Article , but you labeled C# in your list as C in the header

Collapse
marinsborg profile image
Marinsborg Author

Thank you. I fixed it.

Collapse
pandademic profile image
Pandademic

No Problem

Collapse
scottshipp profile image
scottshipp

What about shell programming? That could be a good entry point because there's a shell on every computer already, and they can immediately benefit from their scripts.

Collapse
marinsborg profile image
Marinsborg Author • Edited on

It is useful to know shell. However, I focused on languages that are in demand on job market and easy to learn.