Maybe Processing because it is about making things rather than writing programs and it's community is not caught up in computer science; instead it is built around creativity.
But in general, I would not focus on which language is better but which language can be used to improve something that they already do. For a writer, Emacs Lisp might be a good choice. For a photographer, Lua and Darktable might be a good choice. For a graphic artist, Python and Gimp or Inkscape. It's not programming language that matters so much as programming practice.
There are also languages like Snap that are beginner friendly.
BTW, if it's on their own, then it might make sense if the 18 year old chooses. It's ok if they change their mind.
>> it's community is not caught up in computer science
We're not talking about Haskell/Scheme/Lisp/ML/etc, right?
If memory serves me right, I started learning Python in 2003 (still in high school at that time). My impression was Python is easy to understand, pretty much like good old BASIC.
Processing is a flexible software sketchbook and a language for learning how to code within the context of the visual arts. Since 2001, Processing has promoted software literacy within the visual arts and visual literacy within technology. There are tens of thousands of students, artists, designers, researchers, and hobbyists who use Processing for learning and prototyping.https://processing.org/
versus the landing page for Python
Python is a programming language that lets you work quickly and integrate systems more effectively.https://www.python.org/
Is there any reason you're only asking about those three languages? I'd say cater to the teenager's interests.
Do they like PC games?
Maybe look into C# scripting for Unity.
Lua is used for scripting/modding in tons of games. Minecraft I believe is one of the big ones.
Do they like mobile apps?
Java, Swift, Xamarin, NativeScript all come to mind.
JavaScript, Python, and Ruby are all wonderful, but I'm just wondering if there's a reason to limit it to those three. I'd say whatever technologies fall in line with the kids interests are best.
I picked those 3 because they have quite a bit of a community around each. If you are going to self learn, I thought it would be important to have a good amount of learning material both online and in book form to learn from.
The communities around Ruby, Python and Javascript are probably more oriented toward professionals than is ideal for a new programmer. While there is good content for beginners, there is also a mountain of mediocre and obsolescent content and another mountain of content that is only partially related, e.g. Rails, TensorFlow, React respectively.
I would recommend Python because I think it is best option to learn fundamental programming concepts like conditionals, loops, functions, recursion, data types, basic algorithms like sorting and searching. It has beautiful semantics which is more consistent than in Ruby or JS.
After learning fundamental concepts he can easily start learning more complex languages and concepts with practical applications. For example he can learn Java and Android programming or alternatively Web programming with Python/Django or Python/Flask.
Python, because it's the rare combination of "wildly popular" and "keeps you out of trouble". Ruby has always had a one-framework-town kind of feel to it, with Rails being the one thing people automatically associate with the language. Javascript has the popularity, on the other hand, but it's a minefield in so many ways. The browser is not fun to work with for anything serious, and code written in node bitrots very easily.
So, it's Python. Python has footholds in a variety of places. It's not the most expressive in some respects, but the built in types are more than sufficient to power any student code.
A possible alternate is Go. Go doubles down on keeping you out of trouble by pressing so much code into a uniform style. This may excite some students and frustrate others depending on which threads of thought they're trying to follow.
Thanks, I have seen the first book before. The second one looks interesting. I think TDD is a good concept especially from an API design point of view.
I love both Ruby and Python, but would actually recommend Go.
Go is easy to get started with, has very readable code, fewer keywords to remember and internalize, and lets you fire up a webserver in a few lines of code on all platforms without having to install any extras.
It's also extremely performant, which isn't really important, just attractive.
Ruby, specifically Ruby on Rails. There are alot of plugins and resources to quickly setup a website. Ruby does have a learning curve, but activerecord, devise, carrierwave, and Rails' industry support really help you use alot of different technologies quickly.
As a person who loves Ruby, I would 100% avoid rails at every juncture.
If you want to write business software or "get things done", rails can help you to do things in the rails way.
However, I dont think its good to have a very VERY large set of conventions; you spend most of your time learning those and dont really spend your time solving problems in a way that teaches you about how to think about computing.
Actually those Perl books are cleverly written and fun to read (like much of the official documentation) as opposed to the dry literature of many other programming languages. You may like Perl or not but that is a fact.
That "Which Python?" is an important question and that the existence of two versions of Python can make finding correct information harder is one of the reasons I am not wild about recommending Python to beginners -- particularly those who are going to be learning on their own.
The functional trio: map, filter, reduce is one place where it matters. In Python2 that was simple Python stuff. In Python3 map, filter, reduce is unPythonic.
I have 3 languages that I would and do recommend for any new programmer:
- Python, because it looks like pseudocode and it's hard to fuck up as a beginner. Plus, if you're trying to do something real/effectful (rather than write implementations of algorithms) imperative code matches your intuition.
- Haskell, because it looks like maths and it's hard to fuck up as a beginner. It's really easy to convert any maths stuff that they know verbatim into Haskell and have it Just Work without accidentally having to worry about, for example, how many times a piece of code is run.
- C, ASM or LLVM IR (leaning towards the first because it has great tutorials), because it matches how a computer really works. Ok, yeah I know, it doesn't, but it's closer than anything else that you'd actually want to use. C and manual memory management has gotten a bad rap recently, mostly because of all the security vulnerabilities it causes. Sure, you don't want to have to think about memory safety as an application developer but when you're learning it's OK to accidentally read or write uninitialized memory or cause a segfault as long as you've got good debugging tools to turn it into a useful learning experience.
Haskell has a steep learning curve. This is not a bad thing: it means that you climb so much higher in the early days of learning if you are successful. You learn more.
But! It also means that it is harder to climb that hill and you might just slide down. You need good support.
Is this their first time programming? If yes, the approach to learning computer science is more important than the particular language used.
There's something to be said for David Malan's approach in Harvard's CS50 [0]. He and his team work very hard to make computer science exciting and get the students to have some results quickly. The production values are incredibly high. He takes the class through C and Python.
Coming from a very different approach, you have Matthias Felleisen at NorthEastern University and his How to Design Programs (HtDP) book [1]. Matthias has written extensively on the decisions behind HtDP [2][3]. HtDP uses teaching languages built into DrRacket (which was originally based on Scheme) to gradually introduce new concepts to students.
HtDP is based on the classic Structure and Interpretation of Computer Programs (SICP) from MIT [4], but it addresses some criticisms of SICP as an introductory text. Namely that SICP leans too heavily on domain knowledge outside of computer science.
The course webpage [5] for Fundamentals I from NorthEastern is not very useful for self-study. Instead check out the EdX course "How to Code: Simple Data and Complex Data" [6] by Gregor Kiczales at University of British Columbia.
Unfortunately the course has been branded as "how to code" for marketing reasons, but overlook that because it is a very solid offering that is directly based on HtDP. In fact, Gregor's page outlining and summarizing the HtDP design recipes for How to Design Functions, How to Design Data, and How to Design Worlds, is significantly clearer and easier to comprehend than the original explanation from the book.
The only limitation with the EdX How to Code course is that for some reason they are only "open" for enrollment once pear year. Fortunately the first course is currently open at the moment. Obviously don't bother with the verified certificate/MicroMasters stuff, the content is the only important thing.
Also of note if you're still looking for Python based, is the newish Berkeley CS61A course taught by John DeNero [7]. It is the most all-in-one option for self-learners as the book, the course assignments, and the videos, are all freely available online, and well organized. Similar to HtDP, DeNero's CS61A is also based on Structure and Interpretation of Computer Programs. I have not yet gone through this course so I can't speak to the content first-hand. Of historical note, the course was taught by Brian Harvey using SICP and Scheme up until he retired a few years ago. Brian wrote his thoughts on the change and there was a discussion here on HN [8].
DeNero has written his own book called Composing Programs [9]. Additionally the couse uses Phillip Guo's pythontutor.com for visualizing assignments.
All in all I would say if you are good at self-teaching and don't mind the lack of videos or course materials, check out SiCP. Otherwise, if high production values are appealing then check out CS50. And if you want an all-in-one package that has some of the same solid foundation as SiCP, then go for Brian Harvey's CS61A.
I will recommend learning any two of those three. They are all useful, commonly used, and it's super helpful to understand how to do things in a couple different languages. Basically, it'll be hard to feel like you really understand programming until you start thinking about the strengths and weaknesses of any given language.
I would say he or she should pick up whatever the people close to them use, because that's who they're going to turn to for help first. Yeah, there's a lot of online resources for just about every language and platform out there, so you've got plenty of people in the world who have blogged about X or asked questions about Y on stackoverflow, but ultimately its hard to beat sitting there with someone who walks you through the rough parts like stack traces that are absolutely shit and don't point to the root of the problem in that one out-of-the-way class method, or can point you in a more productive direction when you decide to rewrite a framework you didn't know existed.
Of course, some people learn things better the hard way, but that's what I wish I'd had...
* Ruby and its clones are declining as their signature frameworks (Rails, Grails, etc) are replaced by newer ones like Node, Go Http, etc
* Python has the version 2 or 3 problem for now
* Javascript is too complicated
I think in 20 years time when the dynamic language fad has well passed, like the 4GL fad before it, there'll only be 2 dynamic languages left in the market, just as the 4GL's dwindled to only Visual Basic and perhaps Delphi.
They'll be Python 3 and Javascript, so choose one of those.
Depends on what you want to do. Each language has an advantage in its own domain.
If you want to build for the web then I would recommend learning Javascript. You really can't avoid Javascript on the web so it is a good thing to learn it well. You can even learn Node in order to make it easier to set up a backend for your web app. The quickest way to get started with the web these days is to learn Javascript and use it with a Node server on the backend. There is a lot of noise in the Javascript community with tools such as React, Angular, Webpack, Typescripts, etc. that are very good for advanced production code. For a beginner, I recommend that you just stick with Jquery until you have to write a large codebase (>50,000 unique lines of code).
Python is just a pleasure to work with. I personally use Python to write code that solves math problems and to build small personal projects. Some people say that there is a problem with Python version 2 to 3 transition. As a new programmer this should not be a problem for you. Just start with Python 3. If there is a package that you want to use, it will probably be ported over soon. If you start with Python 2 then you will need to update your codebase for the transition which is neither fun nor worth your time as a beginner.
Ruby is a great scripting language. I think that many of the things that you can do with Python you can do just as well with Ruby. If you are already good at Ruby or know some people who can help you then you should go with Ruby. If you are new to both Ruby and Python, I would recommend learning Python since there are way more applications for Python (i.e., data science and machine learning).
WebAssembly is coming. So unless they need to code for the web right away, pick the best language for learning, and/or the most productive language, because getting relatively fast results is how you keep young people (unless they're natural programming nerds) interested.
49 comments
[ 4.6 ms ] story [ 114 ms ] threadBut in general, I would not focus on which language is better but which language can be used to improve something that they already do. For a writer, Emacs Lisp might be a good choice. For a photographer, Lua and Darktable might be a good choice. For a graphic artist, Python and Gimp or Inkscape. It's not programming language that matters so much as programming practice.
There are also languages like Snap that are beginner friendly.
BTW, if it's on their own, then it might make sense if the 18 year old chooses. It's ok if they change their mind.
Good luck.
If memory serves me right, I started learning Python in 2003 (still in high school at that time). My impression was Python is easy to understand, pretty much like good old BASIC.
Do they like PC games? Maybe look into C# scripting for Unity. Lua is used for scripting/modding in tons of games. Minecraft I believe is one of the big ones.
Do they like mobile apps? Java, Swift, Xamarin, NativeScript all come to mind.
JavaScript, Python, and Ruby are all wonderful, but I'm just wondering if there's a reason to limit it to those three. I'd say whatever technologies fall in line with the kids interests are best.
I think that is going to be a big problem for a beginner
After learning fundamental concepts he can easily start learning more complex languages and concepts with practical applications. For example he can learn Java and Android programming or alternatively Web programming with Python/Django or Python/Flask.
The syntax, semicolons, etc are minefields.
or
The syntax, semicolons, etc can teach good habit and save a lot of headaches in the future (missed a semicolon here, missed a semicolon there.. etc)
So, it's Python. Python has footholds in a variety of places. It's not the most expressive in some respects, but the built in types are more than sufficient to power any student code.
A possible alternate is Go. Go doubles down on keeping you out of trouble by pressing so much code into a uniform style. This may excite some students and frustrate others depending on which threads of thought they're trying to follow.
Ruby and Python are so similar though just go with one.
Also, a plug for Hanami, because people are still supporting non rails frameworks despite Rails dominance.
http://hanamirb.org/
And then you say: It is 2017. Python 3.
If they are a beginner, they would probably start with scikit-learn, which works on Py3.
As does TensorFlow. As does Theano. Etc.
If you want to learn web programming, follow it up with this one that is also free: http://chimera.labs.oreilly.com/books/1234000000754/index.ht...
Go is easy to get started with, has very readable code, fewer keywords to remember and internalize, and lets you fire up a webserver in a few lines of code on all platforms without having to install any extras.
It's also extremely performant, which isn't really important, just attractive.
If you want to write business software or "get things done", rails can help you to do things in the rails way.
However, I dont think its good to have a very VERY large set of conventions; you spend most of your time learning those and dont really spend your time solving problems in a way that teaches you about how to think about computing.
You mean Python 2 or Python 3? If you are a beginner and just starting - Python 3, without a doubt.
(Well, even if you aren't a beginner you should use (or switch to) Python 3)
- Python, because it looks like pseudocode and it's hard to fuck up as a beginner. Plus, if you're trying to do something real/effectful (rather than write implementations of algorithms) imperative code matches your intuition.
- Haskell, because it looks like maths and it's hard to fuck up as a beginner. It's really easy to convert any maths stuff that they know verbatim into Haskell and have it Just Work without accidentally having to worry about, for example, how many times a piece of code is run.
- C, ASM or LLVM IR (leaning towards the first because it has great tutorials), because it matches how a computer really works. Ok, yeah I know, it doesn't, but it's closer than anything else that you'd actually want to use. C and manual memory management has gotten a bad rap recently, mostly because of all the security vulnerabilities it causes. Sure, you don't want to have to think about memory safety as an application developer but when you're learning it's OK to accidentally read or write uninitialized memory or cause a segfault as long as you've got good debugging tools to turn it into a useful learning experience.
But! It also means that it is harder to climb that hill and you might just slide down. You need good support.
There's something to be said for David Malan's approach in Harvard's CS50 [0]. He and his team work very hard to make computer science exciting and get the students to have some results quickly. The production values are incredibly high. He takes the class through C and Python.
Coming from a very different approach, you have Matthias Felleisen at NorthEastern University and his How to Design Programs (HtDP) book [1]. Matthias has written extensively on the decisions behind HtDP [2][3]. HtDP uses teaching languages built into DrRacket (which was originally based on Scheme) to gradually introduce new concepts to students.
HtDP is based on the classic Structure and Interpretation of Computer Programs (SICP) from MIT [4], but it addresses some criticisms of SICP as an introductory text. Namely that SICP leans too heavily on domain knowledge outside of computer science.
The course webpage [5] for Fundamentals I from NorthEastern is not very useful for self-study. Instead check out the EdX course "How to Code: Simple Data and Complex Data" [6] by Gregor Kiczales at University of British Columbia.
Unfortunately the course has been branded as "how to code" for marketing reasons, but overlook that because it is a very solid offering that is directly based on HtDP. In fact, Gregor's page outlining and summarizing the HtDP design recipes for How to Design Functions, How to Design Data, and How to Design Worlds, is significantly clearer and easier to comprehend than the original explanation from the book.
The only limitation with the EdX How to Code course is that for some reason they are only "open" for enrollment once pear year. Fortunately the first course is currently open at the moment. Obviously don't bother with the verified certificate/MicroMasters stuff, the content is the only important thing.
Also of note if you're still looking for Python based, is the newish Berkeley CS61A course taught by John DeNero [7]. It is the most all-in-one option for self-learners as the book, the course assignments, and the videos, are all freely available online, and well organized. Similar to HtDP, DeNero's CS61A is also based on Structure and Interpretation of Computer Programs. I have not yet gone through this course so I can't speak to the content first-hand. Of historical note, the course was taught by Brian Harvey using SICP and Scheme up until he retired a few years ago. Brian wrote his thoughts on the change and there was a discussion here on HN [8].
DeNero has written his own book called Composing Programs [9]. Additionally the couse uses Phillip Guo's pythontutor.com for visualizing assignments.
All in all I would say if you are good at self-teaching and don't mind the lack of videos or course materials, check out SiCP. Otherwise, if high production values are appealing then check out CS50. And if you want an all-in-one package that has some of the same solid foundation as SiCP, then go for Brian Harvey's CS61A.
Hope this is useful to someone.
[0] CS50 at Harvard: https://cs50.harvard.edu
[1] How to Design Programs book: http://www.ccs.neu.edu/home/matthias/HtDP2e/
[2] Essay by Matthias on The Philosophy of HtDP: http://www.ccs.neu.edu/home/matthias/OnHtDP/turing_is_useles...
[3] Essay by Matthias on Growing a Programmer: http://www.ccs.neu.ed...
Of course, some people learn things better the hard way, but that's what I wish I'd had...
* Ruby and its clones are declining as their signature frameworks (Rails, Grails, etc) are replaced by newer ones like Node, Go Http, etc
* Python has the version 2 or 3 problem for now
* Javascript is too complicated
I think in 20 years time when the dynamic language fad has well passed, like the 4GL fad before it, there'll only be 2 dynamic languages left in the market, just as the 4GL's dwindled to only Visual Basic and perhaps Delphi.
They'll be Python 3 and Javascript, so choose one of those.
If you want to build for the web then I would recommend learning Javascript. You really can't avoid Javascript on the web so it is a good thing to learn it well. You can even learn Node in order to make it easier to set up a backend for your web app. The quickest way to get started with the web these days is to learn Javascript and use it with a Node server on the backend. There is a lot of noise in the Javascript community with tools such as React, Angular, Webpack, Typescripts, etc. that are very good for advanced production code. For a beginner, I recommend that you just stick with Jquery until you have to write a large codebase (>50,000 unique lines of code).
Python is just a pleasure to work with. I personally use Python to write code that solves math problems and to build small personal projects. Some people say that there is a problem with Python version 2 to 3 transition. As a new programmer this should not be a problem for you. Just start with Python 3. If there is a package that you want to use, it will probably be ported over soon. If you start with Python 2 then you will need to update your codebase for the transition which is neither fun nor worth your time as a beginner.
Ruby is a great scripting language. I think that many of the things that you can do with Python you can do just as well with Ruby. If you are already good at Ruby or know some people who can help you then you should go with Ruby. If you are new to both Ruby and Python, I would recommend learning Python since there are way more applications for Python (i.e., data science and machine learning).
WebAssembly is coming. So unless they need to code for the web right away, pick the best language for learning, and/or the most productive language, because getting relatively fast results is how you keep young people (unless they're natural programming nerds) interested.