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.
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...
- 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.
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.
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.
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
Of course, some people learn things better the hard way, but that's what I wish I'd had...
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.
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.
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.
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/* 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.
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.edu/home/matthias/Thoughts/Growing_a_Prog...
[4] The Structure and Interpretation of the Computer Science Curriculum: http://www.ccs.neu.edu/racket/pubs/jfp2004-fffk.pdf
[5] Fundamentals I at NorthEastern: https://course.ccs.neu.edu/cs2500/
[6] EdX course based on How to Design Programs: https://www.edx.org/micromasters/software-development
[7] John DeNero's CS61A at Berkeley in Python: http://www-inst.eecs.berkeley.edu/~cs61a/fa16/
[8] Brian Harvey: Why SICP matters https://news.ycombinator.com/item?id=4784827
[9] John DeNero's Composing Programs Book: http://composingprograms.com
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)
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.
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)