DEV Community

Cover image for 'Which programming language should I learn first?'

'Which programming language should I learn first?'

ladyofcode on January 19, 2024

Spoiler alert: it's not automatically JavaScript We have on our hands another contentious topic (at least according to Tech Twitter/X): ...
Collapse
 
sreno77 profile image
Scott Reno

I don't think it matters what language you start with because learning to program involves "learning to think like a programmer." Pick whatever language seems to work for you. If you want to learn application programming, consider C/C++. If you want a "general purpose" language, consider Python. If you want to learn web development, maybe try PHP or C#. Programming skills that you learn will be transferrable from language to language.

Collapse
 
ladyofcode profile image
ladyofcode

I've met people who build apps without fully knowing what their code does - especially when they're pasting hacks to solve issues without understanding what's happening. I was initially riled because they weren't really 'thinking like a programmer' and calling themselves a developer (which, technically, they were). To me thinking like a programmer means we take the time to understand a problem, and understand how we solve it too, and in the process do that the best way we can.

I agree that the language doesn't matter all that much, but simply coding doesn't mean everyone will involve 'learning to think like a programmer' - or at least a good one. If thinking like a programmer means something different to you, then fair.

Collapse
 
sinvalfelisberto profile image
Sinval Felisberto

Thats the point, man! We need to know how the things works. They are just tools. We need to understand how the things are done.

Collapse
 
verthon profile image
Krzysztof Sordyl

While I agree with your point, imagine someone will start with COBOL 🤣 For web-development the JS is more versatile, as it can be used on both client and server.

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

If someone were to ask me what language to learn first, the most important question is:

How quickly do you want to find a programming job?

If it's not an immediate concern, I'd recommend learning something like Pascal. Next to zero relevance on the job market, but the language is structured in a way where you still have to build stuff yourself that other languages just give you out of the box, and that forces you to think about how to structure code.

Then read the wizard book, maybe try some lisp to get a sense of just how different programming languages can be, and how best practices in one language can be complete anti-patters in another.

Then start learning some language with more practical applications, like C# or JavaScript, or anything else that you can actually get paid for. At that point you can focus on just learning the language, instead of having to learn programming at the same time.


If the answer is I need a job yesterday, then yea, learn PHP and go build wordpress sites, then figure out how to advance your career from there. It's a lot easier to learn the fundamentals of writing quality software with food on the table.

Collapse
 
oluwalonire profile image
Moshood Abdullahi Ayomide

Hi, I quite support you on this Idea, Learning JavaScript is like an exclamation between all those Languages, It was only Javascript that got my brother his job and now he's all grown to the position of a Senior Front-End Developer

Collapse
 
ladyofcode profile image
ladyofcode

Love this advice for someone! Valid and nuanced to a specific situation, as advice of this kind should be.

Collapse
 
peerreynders profile image
Collapse
 
ladyofcode profile image
ladyofcode

So was Scratch. They certainly have their place - it's just not everywhere. Thanks for the links!

Collapse
 
peerreynders profile image
peerreynders • Edited

Here is one interesting opinion:

One difference between the Scratch/Code.org/Tynker school of thought and the Racket/Pyret school of thought is that only the latter conveys the idea of composition from a minimal base case. The Scratch/Code.org/Tynker design is to have tens of special-cased primitive blocks for multimedia features. The Racket/Pyret school of thought is to have core constructs. For Racket, instructions that manipulate multimedia are normal functions. Maybe the difference is that Scratch, Code.org, and Tynker do not have an actual function call construct, but rather each block has its own syntax for providing arguments. The negative consequence is that learners see programming as combining many special instructions, not building programs from a few primitives. A good programming language has a minimal core calculus that all language features elaborate into, and the “pop coding” languages are not aware of this idea.

Culturally we were expected to learn programming as a side effect of learning a ”useful” programming language. (Has anybody ever learned visual design from CSS?)

This is adequate if you are never going to use another one. There are consequences however if you need to move on later.

”You're first programming language is the hardest” is a misconception; it's largely a result of people simply learning another dialect within the paradigm they are already familiar with. Moving from one paradigm to another tends to involve a lot of frustrating unlearning.

The educators behind How to Design Programs recognized this. They came to the conclusion that commercial PLs contain too many distractions when the focus needs to be on training the thinking behind designing programs—this is what ultimately lead to Pyret.

So if there is a chance that one has to learn more than one programming language in one's career/lifetime “planning to throw one away” could be a profitable strategy.

And it's not like Pyret is useless … you can even use it with Google Sheets … I don't even want to know how many people entered programming via spreadsheets.

Excel is the world’s most widely used functional programming language

Simon Peyton Jones

Collapse
 
pengeszikra profile image
Peter Vivo • Edited

ctrl + shift + j -> javascript
mac: option + command + j

Collapse
 
ladyofcode profile image
ladyofcode

Followed by Alt + F4 and then deciding to run a farm instead

Collapse
 
pengeszikra profile image
Peter Vivo • Edited

Image description

Collapse
 
eljayadobe profile image
Eljay-Adobe

The "best" language to learn depends on your interests.

"I want to learn to program." Learn Python. (I learned with BASIC. Python hadn't been invented yet.)

"I want to really learn to program for realz." Read SICP, it is available for free, online (thank you MIT & authors!). It uses Lisp.

"I want to program web applications." Learn JavaScript.

"I want to make awesome iOS programs." Learn Swift.

"I want to make programs for Windows." These days, I recommend learning .NET, and that means programming C#. Although F# is also a good choice, and The Book of F# is excellent.

"I want to make programs for Android." Learn Kotlin.

"I want to be a super-leet-hacker!" Learn assembly language. (I learned 6502. Then 68000.)

Collapse
 
68wooley profile image
Graeme Robinson

Job security? Learn Java. There'll be jobs maintaining the billions of lines of legacy code out there long after the cool kids have decided they're too good to learn it.

It'll be the "lab coat and beard" Cobol job of the next few decades (or at least until AI actually learns to code). :-)

Collapse
 
ladyofcode profile image
ladyofcode

COBOL had a stable release in 2023 😭 We joke about this ish but picking the hottest new tech isn't necessarily conducive to job security. I wouldn't recommend Java every time as that's mostly in government jobs in my area, but the same principle applies!

Collapse
 
devdufutur profile image
Rudy Nappée

Java to learn OOP concepts, then JS to forget all this sh*t 😁

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

You can do some fairly decent OOP in JavaScript these days.

Collapse
 
devdufutur profile image
Rudy Nappée

You can but no need !

Collapse
 
ladyofcode profile image
ladyofcode

I should hope so! JS hasn't thrown that all out of the window.

Collapse
 
ladyofcode profile image
ladyofcode

LOOOOL, accurate. I literally did that a while ago, but it turned out JS still has classes and other OOP concepts I can't quite ditch. React hadn't even switched over their docs for the longest time 😆

Collapse
 
syxaxis profile image
George Johnson • Edited

I'd narrow it down to languages that you know you will use in production areas you intend to work. Example I'm a sysadmin so I know Perl ( I'm that old! ), C, C++, C#, Golang, I'm OK with Java and even a some Python, I know Unix shell script and Powershell very well. I don't know Javascript or Typescript and have no wish to learn as they will not help me that much as the other langs in my infra/sysadmin career.

Also depending upon your work, you don't have to know a language inside and out unless that's your actual career, most coders I know know enough about each language to get stuff done, most know around 2 langs extremely well, another 4-5 quite well and maybe another 4-5 adequately enough to get by with some basics. It all helps as you're more adaptable and you can always gen up on a specific language if you get a great job offer come along 'cos you know coding as a discipline, not just as a language.

When I started coding as a kid it was 1982 and BASIC was it, then I did Z80 Assembler, then Pascal. When I a teen in high school it was BASIC/C/Pascal. When i got my first job it was shell script/DOS batch/C. By 1994 I was working on DecAlpha and Sun boxes, so I needed shell script, C, Perl. By 2000 I was doing more Windows and Java was big news, so I learned Java. In 2008 I was learning C# so I could work with the dev teams. In 2015 I started learning Python and Golang, I prefer Go right now. I hadn't touched C++ in about 5 years and someone needed some help with an Arduino project, so I spent 6 months doing Arduino coding. I haven't touched Perl since about 2005, it's now basically dead in business. Remember though, I'm not a coder, I'm just an infra engineer and sysadmin on Unix/Linux and Windows. It's just constant change but the discipline remains the same, coding is coding.

So my point is work out where you think your career path is going, pick langs that will work best to secure work for the next few years, keep your options open and be ready to change languages every 7-8 years.

Collapse
 
amulyakumar profile image
Amulya Kumar

To answer your question effectively, it is essential to consider your specific goals, background, and preferred application areas.

If you're new to programming, starting with a versatile language like Python or JavaScript can provide a solid foundation due to its extensive libraries and resources for various applications.

However, if you are interested in web development, learning HTML, CSS, and JavaScript together is also a common beginner's path.

Collapse
 
ladyofcode profile image
ladyofcode

They certainly can! I think beginner web devs have it easier picking tech than some other types of devs, to be honest. Not that the work isn't difficult - just that the entry pathway is a bit clearer. Perhaps because there are SO many of us being vocal 🤣

Collapse
 
citronbrick profile image
CitronBrick

There's a sister i.e. a lightweight version of Java called Processing, which can be used to easily draw shapes & animate them. This was the 1st language that I learned quickly & I love it. Now it's used as JavaScript library.

Collapse
 
joemama123 profile image
Your Average Roblox Game Dev

I think you should learn Python or Java

hi
Enter fullscreen mode Exit fullscreen mode
Collapse
 
ladyofcode profile image
ladyofcode

Learn both at the same time and recommend Jython 🤣

Collapse
 
dannydev06 profile image
Danny akinola

It also depende's if you want to become a frontend or backend or a freelancer

Collapse
 
ladyofcode profile image
ladyofcode

It definitely does! The nuance concerning someone's situation and goals should be considered properly

Collapse
 
lajbel profile image
lajbel

I think you should think in anything you want to do, then learn the language of your tool or framework.

Collapse
 
ladyofcode profile image
ladyofcode

How would you recommend to a total newbie who has never coded before to pick a tool or framework?