What is the best fruit? The best song? I couldn't objectively tell you.
Which are commonly introduced to beginners? I'd say JavaScript and Python. For JavaScript, JavaScript.info [0] seems to be a favorite. For python, I believe that title goes to "Automate the Boring stuff" [1]. I think FreeCodeCamp [2] has courses on both. Take what I say with a grain of salt though, I haven't been a beginner for a decade and I'm just basing this off of other recommendations I've seen given.
It’s quite simple, and has a ton of resources. The tour of go should help you understand the language at a very high level. It might also help you understand a bit about how the computer itself works (memory and cpu) without making you feel overwhelmed.
If you end up learning Go you might get a decent paying job since it is one of the higher paying languages.
Once u get the hang of programming simple things, try to imagine products you want to build and figure out how you’ll do it. That would teach you basic systems design.
Ultimately all programming becomes the same whether it’s OO or functional or whatever. Doesn’t matter. Eventually you’ll get to a point where you pick the tool that gets the job done. Doesn’t matter what the end looks like - it’s a damn screwdriver.
There is no "best" language, all of them are their own special circle of hell, with advantages and disadvantages relative to the problem you're trying to solve. And if you're learning, the specific language isn't as important as general concepts.
A lot of people start learning with Python, so maybe try that or Javascript. C++ is also good but it can get complex quickly.
I think it depends on how you want to approach learning. If you want to learn in a systematic way and learn how to think about designing programs, and consider coding to be a natural byproduct of that, I would recommend a book such as How To Design Programs[1] (there is also the SICP, but it's a bit more dense than HTDP). It helps you learn from the ground up how to design a program and think about programming and uses a custom language built for learning.
If you want to learn coding in a less rigorous way or one where you make some stuff rather than learning various higher level concept or principles, you could start with Python using Learn Python The Hard Way[2]. Python is generally a good beginner language as it doesn't have that many gotchas compared to a language like JS and it's a language that prides itself on doing things the Python way and (more or less) in one specific way, which reduces the initial learning curve a bit.
You could alternatively approach learning to code by learning something such as generative art in Processing[3] (which is in Java, JS, and Python). This is a cool approach as it helps you both learn to program but gives you something "tangible" and really visual, rather than just text.
All in all there really isn't a best language (and anyone who says so is lying and/or deluding themselves) and there isn't a best way to learn, so it depends on your motivations, desires, and how you learn.
There's no definitive answer for that, but I'll try to answer with the rest of your post in mind and take this as "Which is the best coding language for learning to code?"
The possibilities here are endless, but whenever I'm actually asked this question, the first thing I personally go by is my perception of what kind of person I'm talking to:
Are you a "bottom-up" learner, where they want to start at the very building blocks of how things work? I might recommend C or C++ (or maybe Rust, now?), and a book or two. Are you a "fast feedback" learner, where you need some kind of immediate feedback to whatever you're writing to stay motivated, and want to iterate and figure things out fast? Python or JS come to mind there (which will likely make the learning process more "top down", where you go from "just make something happen" and then dig deeper into why things actually work the way they do, data structures, the underlying type system, etc.)
Somewhere in the middle (in my mind) is my personal favorite language, Go: not bloated, does not abstract away too much, great for learning the building blocks of programming but not as intimidating as C++ or Rust can be. It does require potentially a _little_ more environment setup than something like JS or even Python, which usually comes pre-installed on the OS. But Go's amazing test tooling makes it a joy to write code and get fast feedback with basic test scripts.
I think you should pick the language that will keep you interested and motivated the most. Learning to code can be a very rewarding and very frustrating experience. Starting with a language that isn't conducive to your learning style can make it difficult to stick with.
As a real-life example:
When my boyfriend asked this a few years ago, he seemed like the kind of person who would like to see progress fast: open an editor, play around, and see something come out. For him, I suggested Python. I could have also recommended JS if he had seemed like more of a "I want to see something visual in a browser vs a terminal" type of guy, but he was happy with feedback from the terminal and I thought Python was a decent starting point. After exploring programming with Python, he ended up going to university for computer science and is now in his first job as an SE, so I think it worked!
There is no clear answer to that. Industry in a bandwagon. Repeating rust, go, python or js.
Try .net or clojure. There are serious alternatives out there that people cannt try because no one makes hype trains about them.
Why do you want to code and what do you want to code. Want to do front end web development? Choose JavaScript. Want to write Windows desktop applications? Choose C#. Want to do data analysis? Choose Python. Want to develop a novel way of solving PDEs? Choose Julia, and so on
Learning to program in a vacuum can be a real chore. Much better to pick and problem you want to solve or a concrete thing you want to develop and then pick the language that makes doing that thing the easiest.
1) Pretty much any programming language you've heard of is probably capable of solving most of the problems you're likely to want to solve.
2) Some programming languages are better choices for solving certain problems than others. Python for instance has a wide range of Machine Learning libraries that are very important for anything to do with analyzing data: though you can certainly use many of those tools from other languages. JavaScript is the language of the browser and basically is a necessity for building dynamic websites, and also has some great advantages on the server with Node.js.
3) For most people, IMO either JavaScript or Python is a fairly safe bet, depending on what you want to do. Personally I'd recommend JavaScript just because you can start using it in the browser right away without necessarily requiring too much complicated setup and you can get an instant visual feedback more interesting than just seeing program output in a file or terminal.
The one that is most comfortable for you to use is the best coding language.
Having said that, you need a project of some kind. Any kind at all. It doesn't matter what that project is, because you will throw it away, and more than once. And that project will show you how to code, and along the way you will find your best coding language.
So start your project. Oops you don't know how to do that. So learn how that part is done. Then progress further. Oops, you don't know how to read a file. So learn how that is done, then progress further. And keep on doing this, tiny bites at a time of the project until one day the project is done.
So you look at that project. Along the way you have discovered new and better ways of doing things. Ways that are better than how you coded that part of your project. What to do?
So .... Throw that first project away. Now, rewrite it using all that new knowledge that you have picked up along the way. And you look at that project again, with even more understanding of how to code. You know what? I'll throw that project away again. It wasn't as good as I could have done it.
So you rewrite that project a second time, again including the new ways of doing things that you have learned since doing that project the second time.
Are you game enough to look at that project the third time? Because almost certainly you can now see better ways of doing things that you keep learning all along the way in doing that silly little project three times.
I have a silly little project like this. It is an emulator of the first Z80 computer that I first assembled from a huge box of components way back in the late 1970s. That emulator has progressed over the years as I have rewritten it probably more than a dozen times, and it has got more and more complex, more and more visually attractive over those dozen or so iterations.
Is it the same silly little project it started out being? In some ways, yes it is still the same. On the other hand, it is a completely different 'kettle of fish'. Along the way, I have learned about programming in three different families of Operating Systems. I have learned about two or three different ways of emulating hardware, I have learned how to convert a text-interface into a graphical interface.
And I discovered the programming language that 'works best for me': 'C'.
When I first looked at 'C' I didn't like it at all. Back then I was happier using Z80 and/or 8086 assembly language. That changed about the time I moved from MSDOS to the UNIX family of Operating Systems.
15 comments
[ 4.2 ms ] story [ 35.9 ms ] threadWhich are commonly introduced to beginners? I'd say JavaScript and Python. For JavaScript, JavaScript.info [0] seems to be a favorite. For python, I believe that title goes to "Automate the Boring stuff" [1]. I think FreeCodeCamp [2] has courses on both. Take what I say with a grain of salt though, I haven't been a beginner for a decade and I'm just basing this off of other recommendations I've seen given.
[0] https://javascript.info/
[1] https://automatetheboringstuff.com/
[2] https://www.freecodecamp.org/
It’s quite simple, and has a ton of resources. The tour of go should help you understand the language at a very high level. It might also help you understand a bit about how the computer itself works (memory and cpu) without making you feel overwhelmed.
If you end up learning Go you might get a decent paying job since it is one of the higher paying languages.
Once u get the hang of programming simple things, try to imagine products you want to build and figure out how you’ll do it. That would teach you basic systems design.
Ultimately all programming becomes the same whether it’s OO or functional or whatever. Doesn’t matter. Eventually you’ll get to a point where you pick the tool that gets the job done. Doesn’t matter what the end looks like - it’s a damn screwdriver.
A lot of people start learning with Python, so maybe try that or Javascript. C++ is also good but it can get complex quickly.
If you want to learn coding in a less rigorous way or one where you make some stuff rather than learning various higher level concept or principles, you could start with Python using Learn Python The Hard Way[2]. Python is generally a good beginner language as it doesn't have that many gotchas compared to a language like JS and it's a language that prides itself on doing things the Python way and (more or less) in one specific way, which reduces the initial learning curve a bit.
You could alternatively approach learning to code by learning something such as generative art in Processing[3] (which is in Java, JS, and Python). This is a cool approach as it helps you both learn to program but gives you something "tangible" and really visual, rather than just text.
All in all there really isn't a best language (and anyone who says so is lying and/or deluding themselves) and there isn't a best way to learn, so it depends on your motivations, desires, and how you learn.
1: https://htdp.org
2: https://learnpythonthehardway.org/book/
3: https://processing.org/tutorials
The possibilities here are endless, but whenever I'm actually asked this question, the first thing I personally go by is my perception of what kind of person I'm talking to:
Are you a "bottom-up" learner, where they want to start at the very building blocks of how things work? I might recommend C or C++ (or maybe Rust, now?), and a book or two. Are you a "fast feedback" learner, where you need some kind of immediate feedback to whatever you're writing to stay motivated, and want to iterate and figure things out fast? Python or JS come to mind there (which will likely make the learning process more "top down", where you go from "just make something happen" and then dig deeper into why things actually work the way they do, data structures, the underlying type system, etc.)
Somewhere in the middle (in my mind) is my personal favorite language, Go: not bloated, does not abstract away too much, great for learning the building blocks of programming but not as intimidating as C++ or Rust can be. It does require potentially a _little_ more environment setup than something like JS or even Python, which usually comes pre-installed on the OS. But Go's amazing test tooling makes it a joy to write code and get fast feedback with basic test scripts.
I think you should pick the language that will keep you interested and motivated the most. Learning to code can be a very rewarding and very frustrating experience. Starting with a language that isn't conducive to your learning style can make it difficult to stick with.
As a real-life example:
When my boyfriend asked this a few years ago, he seemed like the kind of person who would like to see progress fast: open an editor, play around, and see something come out. For him, I suggested Python. I could have also recommended JS if he had seemed like more of a "I want to see something visual in a browser vs a terminal" type of guy, but he was happy with feedback from the terminal and I thought Python was a decent starting point. After exploring programming with Python, he ended up going to university for computer science and is now in his first job as an SE, so I think it worked!
Good luck!
Learning to program in a vacuum can be a real chore. Much better to pick and problem you want to solve or a concrete thing you want to develop and then pick the language that makes doing that thing the easiest.
2) Some programming languages are better choices for solving certain problems than others. Python for instance has a wide range of Machine Learning libraries that are very important for anything to do with analyzing data: though you can certainly use many of those tools from other languages. JavaScript is the language of the browser and basically is a necessity for building dynamic websites, and also has some great advantages on the server with Node.js.
3) For most people, IMO either JavaScript or Python is a fairly safe bet, depending on what you want to do. Personally I'd recommend JavaScript just because you can start using it in the browser right away without necessarily requiring too much complicated setup and you can get an instant visual feedback more interesting than just seeing program output in a file or terminal.
Having said that, you need a project of some kind. Any kind at all. It doesn't matter what that project is, because you will throw it away, and more than once. And that project will show you how to code, and along the way you will find your best coding language.
So start your project. Oops you don't know how to do that. So learn how that part is done. Then progress further. Oops, you don't know how to read a file. So learn how that is done, then progress further. And keep on doing this, tiny bites at a time of the project until one day the project is done.
So you look at that project. Along the way you have discovered new and better ways of doing things. Ways that are better than how you coded that part of your project. What to do?
So .... Throw that first project away. Now, rewrite it using all that new knowledge that you have picked up along the way. And you look at that project again, with even more understanding of how to code. You know what? I'll throw that project away again. It wasn't as good as I could have done it.
So you rewrite that project a second time, again including the new ways of doing things that you have learned since doing that project the second time.
Are you game enough to look at that project the third time? Because almost certainly you can now see better ways of doing things that you keep learning all along the way in doing that silly little project three times.
I have a silly little project like this. It is an emulator of the first Z80 computer that I first assembled from a huge box of components way back in the late 1970s. That emulator has progressed over the years as I have rewritten it probably more than a dozen times, and it has got more and more complex, more and more visually attractive over those dozen or so iterations.
Is it the same silly little project it started out being? In some ways, yes it is still the same. On the other hand, it is a completely different 'kettle of fish'. Along the way, I have learned about programming in three different families of Operating Systems. I have learned about two or three different ways of emulating hardware, I have learned how to convert a text-interface into a graphical interface.
And I discovered the programming language that 'works best for me': 'C'.
When I first looked at 'C' I didn't like it at all. Back then I was happier using Z80 and/or 8086 assembly language. That changed about the time I moved from MSDOS to the UNIX family of Operating Systems.