I've been making my living as a developer for more than 40 years. My take is that languages come and go. All of them are compromises that do some things better and more easily than other things. It doesn't really matter what language you learn first, as long as you understand that what you really need to learn are the underlying concepts, not the syntax or the libraries. If you do that successfully, you will be able to pick up new languages relatively quickly.
I kept expecting "that said, JavaScript is..." At the end haha
There is no "most versatile programming language". That is a myth.
The choice of a programming language for a project depends on the projects requirements. It could be a script language like Python, PHP, JS, or even Perl or Bash. Or something compiled like C, C++, Rust, or even Pascal or Prolog. It always depends on the project.
Heck, if you have to build something sticking to a COBOL or FORTRAN system, using anything else would probably a stupid idea in the first place.
So if anyone tells you "Programming language X is the one and only solution for everything", it is more an admission of a severe lack of knowledge and experience.
While this is true, I will say there are some languages built for very specific problems that make poor tools for general use.
Trying to build a distributed web app in Matlab or Mathematica would either be a flex or a complete waste of time, for instance.
That's what i said: the right tool for the right job.
Python or C++ are way more suited to build all the applications you listed.
And IMHO JavaScript is one of the worst language ever created. PHP is also a very bad language, it seems like the web attracts all the bad stuff.
There was this business analysis someone wrote about years ago trying to nail down which programming language was the most successful, which they measured by how many business problems it solved.
The winner? Visual fucking Basic.
Because it was so accessible that people in businesses the world over used it to implement simple and sometimes complex solutions to problems without reuquirkng a big dev team and all the complexity that comes with writing “real” software.
I see JS in the same boat. It’s a mess. But it’s so widely deployed (free with a web browser!) and used for so many things that in reality it’s one of the top dogs, even though everyone who knows it well enough to understand its quirks thinks it’s a pile of shit.
I believe it. Every company I've ever worked at has used Microsoft Excel to do things it absolutely should not be used for.
This is unfortunately true can't tell you how many times I have found VB attached to filemaker pro and an access db with 1000s because the customer wanted one table per customer.
If this is your first language I wouldn't focus on variety too much. Just pick something and start building. Once you pick up one language, the next one will be easier. On that note, Typescript (JavaScript with type enforcement) is a great first language. It's multi-paradigm so you get exposure to lots of concepts and can use it in many different ways. That means you can learn tons of concepts without having to learn the syntax of another language first.
Make sure you use typescript, not JS. I'm assuming this is a learning experience for you. You'll learn about type enforcement, get much more out of your IDE, build safer programs, and be better prepared for your next language.
DM if you have any questions about getting started as a developer.
The best language for starting is the language you find easiest to learn.
But Rosetta Code lists a lot of programming tasks solved in a lot of different languages. Just browse a bit and if you're lucky you just fall in love with one of the languages. Then, difficulty doesn't matter.
Once you learn and master one language, the main concepts will usually transfer across, and with minimal effort youll be able to pick up any other language.
So starting with JS is fine, but don't be afraid of switching later down the line. Choose the right tool for the job.
Knowing Javascript is super useful. You'll get a lot of people recommending other languages, mainly because Javascript has its quirks that will bother you eventually. Those are valid criticisms of Javascript. But it is useful because of how universally available it is. Web apps get hate for being slower than native apps, but it is nice being able to put a browser-based project together, knowing that basically every computer on earth will be able to run it.
I think your general idea is correct. You'll probably also find that, once you know one language, you'll end up picking up others much more quickly.
I've always thought that it's easier to learn something if you are somehow drawn towards that thing. So if you find Javascript appealing, go for it. Don't bother trying to learn the "perfect" or "best" programming language; there isn't one anyway.
Javascript is a language full of weird quirks. A language with fewer footguns would probably be smoother for learning fundamentals. Python is pretty good in terms of letting you do the thing, instead of making you find a third party library (not that one, that's deprecated) or having unexpected default behavior ( in JS [1,2] + [3,4] is the string 1,23,4, for example)
TypeScript adds more guard rails, but is a little more complex to get going.
I would Start with rust today. The compiler always tells you what is wrong and there is a clear way of doing things. It is a bit harder to pick up but you will get a better understanding of why things work.
The learning material is also good.
For me the JS ecosystem is a nightmare. It changes so frequently and it seems not to be the place where thoughtful engineers build stuff. Just the wild west. To exhausting for me.
My current favorite language is Rust. But I would never advice beginners to start with. Rust requires a deep understanding how memory works. Without the knowledge it is just fighting the borrow checker, which can be fustrating for beginners. For the same reason I would never advocate for Java: it is pretty hard to write java without understanding the oop paradigm.
Javascript is used everywhere, yes, but you definitely should spread your focus to other languages as a student. At minimum definitely dig into C for low level understanding and rigor, and a "real language" like C# for exposure to all the great features and paradigms in that world.
Learn what looks like it makes sense to how you think. I’d argue Python is still #1 with js at #2. There’s still a ton of crusty Perl and Java holding more than you want to know together as well, so you have choices.
Learning more programming languages isn't the hard part of becoming a decent programmer. You're optimizing for the wrong thing here.
You should choose a language that works well for the specific projects you think you're going to do in the near term. Depending on exactly what sort of projects you want to do, Python, Typescript, C++, and Rust are all languages I might recommend. I wouldn't recommend raw Javascript for anything other than doing some tutorials before learning Typescript.
Without more information, I'd recommend Python.
The only legit reason to use javascript is if you need something that runs in a web browser. Unless you do need that, pick a better language.
Obligatory fuck Brendan eich.
Powershell? Is that a language? I used that to propel a lot of my projects in the past. I could do almost anything with it.
PowerShell is the Micro$lop Windows shell language. You can do a lot with just about any shell language, although if you're (wisely) using Linux, I recommend Bash as a shell.
I think that's used on windows like a command line, but I never looked into it (wasn't using the terminal when I was on windows)
You can write VR games in Javascript. https://immersiveweb.dev/
Figure out how that makes you feel and you'll have your answer on whether JS is right for you.
Traitor!!!
Wide varety of things is something, but maybe ask yourself what would you like to build? What interests or excites you? And then make a choice based on options that are suited for that thing. I wouldn't be motivated unless I was building things I like and find fun.
I'd say technically it's Rust, because you can do everything from embedded/kernel development to web frontends (via WebAssembly).
I do like the versatility, but I agree with what has already been commented, that you shouldn't worry about this yet.
Newbie programmers always consider it a daunting task to learn a new language and then you're a few years in and just inhale a new language on a weekend for fun.
And when I say fun, I do mean that it's actually educational to learn multiple languages. They emphasize different concepts, which gives you a new perspective and new patterns for solving problems.
rust is now the most versatile language. however it is not yet the most popular or easiest language
it's pretty great tho
Ask Lemmy
A Fediverse community for open-ended, thought provoking questions
Rules: (interactive)
1) Be nice and; have fun
Doxxing, trolling, sealioning, racism, toxicity and dog-whistling are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them
2) All posts must end with a '?'
This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?
3) No spam
Please do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.
4) NSFW is okay, within reason
Just remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com.
NSFW comments should be restricted to posts tagged [NSFW].
5) This is not a support community.
It is not a place for 'how do I?', type questions.
If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.
6) No US Politics.
Please don't post about current US Politics. If you need to do this, try !politicaldiscussion@lemmy.world or !uspolitics@lemmy.world
7) No Hit-and-Run questions.
Please don't delete your post for no apparent reason. If you plan on deleting a question later, say so in the post, or if you feel that you have a good reason to remove it, message a mod beforehand. It's not fair to the ones who took their time to answer, and it's not in the spirit of the community.
8) No Bots.
Posts or comments from bots, LLM's, AIs, Neural Networks, Transformers, or Marvin the Paranoid Android are not welcome in AskLemmy. Real humans only please.
Reminder: The terms of service apply here too.
Partnered Communities:
Logo design credit goes to: tubbadu