You may have recently seen posts and videos along the likes of “Python: The best starting programming language” or “Why you should start with Pytho...
For further actions, you may consider blocking this person and/or reporting abuse
Given the choice between Javascript and Python, I'd lean towards Python for a starting language for two reasons:
Python is strictly typed; Javascript "isn't". JS allows you to "get away with" sloppier type handling and variable practice than Python does, and that leads to bad habits. (Yes, there's Strict Mode, but it's neither a complete fix nor mandatory.)
Python is consistent in its syntax. Javascript infamously isn't. Trying to understand
var
vs.let
or==
vs.===
as a non-beginner either turns into cargo cult programming (bad) or a shruggish attitude about sloppy mode (worse). Python's syntax is largely lacking in surprises.Unrelated, I also would choose Python over Java for OOP/Functional reasons. Java's OOP "best practices" are infamous, and you'll spend quite a bit of time unlearning them. Python's design facilitates and encourages good OOP, as well as functional, and any combination thereof.
All that said, while I still hold up Python as a good language for beginners, there are many others to choose from. Javascript and Java are still valid starting points, as much as I personally don't recommend them.
In the end, it's more important to pick ANY LANGUAGE and start learning, rather than obsessing over which one. Every language has advantages, and every language is going to have a negative effect on the steepness of some other language's learning curve. Python → Ruby is more natural than Python → C++, but Java → C++ is in some ways worse. C++ → Java or C++ → Ruby is a cakewalk, but C++ → Haskell is pain, where Python → Haskell is pretty easy.
Maybe we need to stop telling people "you should learn X first", and just encourage them to pick up whatever language looks interesting to them. In the end, it is not going to matter all that much.
Of course, I totally agree with you, it’s way more important to just start than starting with something specific!
And everyone likes different things, some people will prefer Python, others JavaScript and so on.
Every language has own problem to solve.
Agreed your ending note..Peace.
I started with C.
i have the similar thoughts on this.
but u don't need a
package.json
to run javascript.your browser is a good place to start, no installations cause they are mostly preinstalled.
and even for native stuff, u can use deno, no
package.json
.Yes, of course, that is totally true. In that case I used it as an example because, at least for me, when I found out that Python didn’t need anything, it felt kinda awesome, because I was mostly using Node.js at the time ahahah
I had this same feeling. For me it stemmed mainly from getting people to understand what was happening in a for loop. Python (and others) abstracts most of it so it's easy to get by without ever thing about indexes. When people ask me which language to start with I usually point to JavaScript, but it really depends on the meaning behind the phrase "start with". If that means the very first taste of programming, then Python is great since it reads closer to human speech and hides some details that aren't needed in the very beginning. But if "start with" means the language one really dives into in order to learn the fundamentals of computer sci/programming, then no Python wouldn't be my choice. You sorta mentioned this in your post, I just thought I'd highlight it. Congrats on your first article here!
Ps I started with Java then JS then Python
That’s pretty much spot on how I feel ahahah
Thanks, can’t wait to write more!
I have thought this as well. Java forces you to think ahead about things. You need to consider your return data type or whether it returns anything at all. It gets you thinking about objects from the start vs python which can be a long mess for people first learning. I think Java is a great first language.
Yes, I agree! I feel like Object Oriented languages are great to start with because, at first, you can literally imagining you're handling an object when thinking about a class, but it also teaches you to know exactly what you want to do and how you want your object/variable/class to work, making you need to think ahead!
I didn't experience that. I started with Python and then picked up C++ in a couple of days. I think what helped me is whenever I learnt something new/different in C++, I quickly went back to Python to see how it differs. That way I kind of always had a comparison on top of my head about what works in Python and what works in C++ and where both behave similarly.
Fair enough, everyone is different (obviously), but that was actually a really interesting way of doing things, going back to understand how much it differs from what you're used to!
I feel like it somehow "keeps you in check", because like that you're learning how to program, not just how to write Python code or C++ code.
I don't agree with that at all. Because python is easier to read, it makes python a very fine choice for studying algorithms or math. You don't have to remember some verbose language syntax to get started with basic ideas (assigning values to variables, loops, conditions, functions, classes, etc.)
After about one year of practice, it's up to you what you want to do: switch to C or C++ if you want more fine-grained control and better performance, or learn C# if you're developing primarily for Windows platforms (which I also find better to work with than Java, but that's another story), or go off the rails and learn a functional or esoteric programming language.
Nothing you learn in python was in vain, because these concepts generally translate very well between languages (heck, you could even write your code in C with bindings to python!)
You might have already guessed correctly in that Python was also my first programming language, but this didn't make it harder for me to pick up other languages such as C# or C++. From what I have found, people usually prefer the programming language they first learned to be the best for beginners, because that's the language they're most comfortable in.
Started with Javascript which for me has kind of been a struggle because of trying to understand some of the principles like hoisting and tricking/manipulating data types. I was starting to understand it then I decided to practice some python. I've completed about 7 or 8 programs without much direction. I do believe trying to learn Javascript actually helped me fly through python even though I don't consider myself a competent programmer yet.
I do believe that starting with something harder is more beneficial. It's as everyone says, do the hard part first and you'll feel better when doing the easier part later!
I think that the argument that you should learn a harder language before learning a simpler one is a bad argument. Programming is hard enough to learn as it is. Most people give up. Making to harder is not going to help them. If harder is better, then why not learn assembly. (I have heard someone actually suggest this.) I am not saying that everyone should learn the easiest language either. I think the language you choose to start with should be one that will help you achieve your goals. Assembly could be a good choice if you are interested in how a cpu works but most potential programmers are not that interested in the cpu. How hard it is to learn should be a factor in your decision. But you should learn towards easier languages because it will make the path less steep and you are less likely to give up.
I personally learned python first and it taught me how to think properly and how I can use the operations given to accomplish what I want
I had no issue after that switching to Java and it was significantly easier to switch vs learning python
I understand where you are coming from. My first language was C and when I started learning python it was such a joy to learn because of how simple it was compared to C. Like what you said, learning a tougher language might be better in the long run and I'm glad I learned C first.
I think about this when recommending a first language to someone..
But if I say something like C they might find it difficult and gave up soon so I would rather suggest something like python which they are more likely to stick to.
I also felt the same! I started with Java, then a little bit of C, C# and PROLOG, but JavaScript what the next language that I really learned, and is currently my main language.
When jumping to Python, even though it was weird at first, everything felt like "Oh, it's that simple?", which felt great!
But I get what you're saying, and, in their defense, C is a pretty hard looking language, I felt like it wasn't as intuitive as other languages, so maybe recommending a middle-ground would be a better option. Of the top of my head, you could always recommend Java, C# or even JavaScript, or rather TypeScript, if you want them to think more about object types and future-proofing code in general.
I agree with you.
I think people should just learn to generalize and not overfit on a syntax.
I meant a project which needs dependencies
Similarly, I also started with python. The thing that bugs me the most is probably the missing semicolon. C++ does not forgive like python does 😂.
For sureeee! I started with Java, so that was natural for me, but the opposite happened, writing curly brackets everywhere ahaha
Well, I still do that when switching from JavaScript to Python
Fun fact: not, and, or and xor are valid keywords since at least C++98.
They do what you think they do.
They are rarely used.