Live data from Hacker News

Ask HN: Ruby, Python, or JavaScript for teenager?

news.ycombinator.com

21–30 of 50 posts

Re: Ask HN: Ruby, Python, or JavaScript for teenager?

#21
post #14
post #3

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 choic…

>> 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/

Re: Ask HN: Ruby, Python, or JavaScript for teenager?

#22
post #10

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…

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.

Re: Ask HN: Ruby, Python, or JavaScript for teenager?

#24
post #9

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…

Sounds good, but then someone asks: Python 2 or Python 3? And then you realize python has it's own problems...

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/

Re: Ask HN: Ruby, Python, or JavaScript for teenager?

#25
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.

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

Re: Ask HN: Ruby, Python, or JavaScript for teenager?

#26
post #24
post #9

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…

Sounds good, but then someone asks: Python 2 or Python 3? And then you realize python has it's own problems... 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/

> but then someone asks: Python 2 or Python 3?

And then you say: It is 2017. Python 3.

Re: Ask HN: Ruby, Python, or JavaScript for teenager?

#27

Go with Python. It is easier to understand and some really good tutorials out there.

Which Python?

> Which Python?

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)

Re: Ask HN: Ruby, Python, or JavaScript for teenager?

#28
post #24

Earlier quoted context omitted.

Sounds good, but then someone asks: Python 2 or Python 3? And then you realize python has it's own problems... 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/

> but then someone asks: Python 2 or Python 3? And then you say: It is 2017. Python 3.

Sure, but a lot of useful machine learning libs are still dependent on 2

Re: Ask HN: Ruby, Python, or JavaScript for teenager?

#29
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.

Re: Ask HN: Ruby, Python, or JavaScript for teenager?

#30
post #28

Earlier quoted context omitted.

> but then someone asks: Python 2 or Python 3? And then you say: It is 2017. Python 3.

Sure, but a lot of useful machine learning libs are still dependent on 2

They're not starting with ML, and by the time they would it'll be trivial to "learn" Python 2 as a Py3 programmer.
Post reply on HN