Preferences

Same in Lithuania.

Everyone who intends to do a degree in computer science is taught Pascal, olympiads are in Pascal/C++.

Whether it's a good language to teach highschoolers (students in general, not preparing for olympiads) or not, I am not so sure. On one hand, yeah, it's pretty simple.

On other hand, I'd lean towards Python simply because it's more widespread in industry, as a result you have tons of well documented libraries for pretty much everything a highschooler will care about. Therefore, making it much easier to develop something useful, which results in higher motivation. And REPL, ipython notebooks are really neat for learning.

But that's the theory. In real life, you have loads of teachers who know only the very basics of Pascal and teaching them a new language might be... challenging (I've witnessed enough teachers struggling with basics of Pascal).

So all in all, it seems like Pascal is a reasonable option.


I think Python is a good language, but not for learning.

Everything that relates to theory (scoping, object system, typing) is poorly specified and has loads of special cases that can only be understood by using the language a lot.

My largest concern about using Python as the first teaching language for serious programmers (or you can say those who intend to pursue a CS degree) is that it's too "magical". The dynamic type system, the flexible Pythonic tricks, "hidden" (at least not explicit and obvious) details about the memory model, etc.

As a programmer, I like many of these characteristics. However, when I was helping the lower-year students with programming, I found many starting with Python faced tremendous difficulties in understanding pointers, references, and types later on. Some of them even resisted learning these concepts and further resisted using C/C++/Java, claiming that it's world of Node.js/Python/Ruby.

I'm not sure if it's just that I'm getting old (not really...).

To be honest they should teach JavaScript instead of Python in highschools. Websites ('web apps'..) are a big deal in, atleast, teenager's life, so they could atleast install Tampermonkey plugin and script some functionality for their favorite websites.

Meanwhile after learning python if you won't work in IT is useless. Plus requirement to install Python, include python in PATH and use CMD to launch .py scripts is a detterant, while with Javascript you just press F12 in browser and bam - development environment ready and lets you to manipulate open web page, which is also more exciting than console applications.

This is what I tell people: Start with Python.

"I heard of Python; I was thinking of learning that or JavaScript..."

No. I'm from the future. You should start with Python.

The only problem I have with Python is its weird scoping rules and the fact that it's dynamically typed. But it's overall LESS weird than JavaScript. Beginning programmers need a clean, minimally weird language, ideally with a REPL, in which to grasp the basics: namely that computers follow composable sequences of instructions and these instructions need to be written in an unambiguous way. In the 80s we used cut-down BASIC dialects for this; today, Python is as close to optimal a choice as we can get.

Starting people with JavaScript and Web pages to make programming "more relevant to today's users" is like giving Hamlet a backwards ball cap, skateboard, and sunglasses to make him "more relevant to today's teens".

That's a very Windows-centric view of the world. Macs are increasing popular in education and come with Python pre-installed. Linux comes with Python pre-installed. iOS / Android require installing an app to do local programming either way, and I'd argue the Python writing apps are better than their javascript writing apps.

Microsoft should fix the "bug" that its operating system is missing interpreters for Perl, Python, etc... (Oddly enough, this list also includes javascript!)

Microsoft includes VBScript and JScript interpreters -- WScript and CScript. https://en.wikipedia.org/wiki/Windows_Script_Host
Windows actually has a Javascript (well, the JScript dialect of ECMAScript) interpreter out of the box in the form of Windows Script Host. It also supports VBScript. You can play with it on the command line using the cscript command.
The most interesting part is that you can script applications with it. I recall writing a script that played Google's running game during the Olympics a while back when I was learning to program.
> That's a very Windows-centric view of the world.

Heaven forbid we pander to 80-90% of the market.

>To be honest they should teach JavaScript instead of Python in highschools. Websites ('web apps'..) are a big deal in, atleast, teenager's life, so they could atleast install Tampermonkey plugin and script some functionality for their favorite websites.

I've never ...monkeypatched websites, and I've been a professional web programmer for 17 years. Now, I could very well be an outlier, but I don't recall any of tens of tech colleagues or friends in over 4 countries really going into that.

I don't think that's a valid use case for teenagers to learn JS for. There many other reasons of course -- but monkey-patching "their favorite websites" would be very low in that list.

Good point. A few weeks ago I made a similar point here on HN, that web dev is good for starting.

Given more thoughts, I am fairly conflicted/confused about web apps vs Python :)

Web apps, as you've said, are pretty straightforward, minimal setup, extremely easy to relate to. I guess many folks who aren't familiar with coding have an idea for web site or two. That makes it a great motivator, no doubt. If a friend asked where to start, I'd probably point to this direction. HTML5 games is a pretty good choice too, and Phaser is a neat framework to start with.

However, there are a few problems with this approach.

First, most of the development/studying would be more about the details of browsers/jQuery/javascript itself. How to get the content of this input, how to attach this event, etc. The problem is that it doesn't do much to teach the mindset of programming. You know, when to apply for loop, when while loop, etc.

The other problem is that web dev is moving much much faster than most of the education systems in the world. In 2010, you probably would have taught about jQuery. In 2015, you probably would use vanilla JS as it's good enough, modern browsers are following the standards well enough. And then you have all the html5 elements (video, etc), css3 properties which are fairly important nowadays but didn't exist 5 years ago (or the browser support was poor).

So, web dev might work quite well for motivated individuals and equally motivated teachers but probably less so for mainstream education (i.e. highschools).

Python has it's place. When teaching kids, I guess it comes down to two things - are you targeting the lowest barrier to entry to make something whiz-bang to appeal to the largest common denominator of "I use Facebook so I'd like to make 'computer things'", in which case, alright they can install Tampermonkey and mess with a really inconsistent language like Ecmascript5[1] then spend a lot of time explaining things like the DOM and how to traverse it, then the issue of how to manipulate certain things (what do if getElementByName isn't working because someone decided to not properly tag things?), followed by now we have to teach them CSS so they actually can alter the aesthetics or worse, teach them JS so can actually add functionality (which involves all of the ES5 shims and a huge confusing ecosystem that even people in the industry like us have to spend tons of time working on).

On the other hand Python can be installed with one binary on Macs, Windows, and Linux with 300 packages and an IDE[1] and they'll be able to use it with the Excel spreadsheets down the road which they'll inevitably have to deal with if they're the average white-collar office worker. (See: http://xlwings.org/ and say goodbye to VBA). The large majority of people will actually use Excel on a regular basis and if their job involves reconciling a lot of semi-structured data, as it frequently occurs with my friends in the social sciences or other non-CS fields, they'll largely benefit from Python.

Not only that but after having a core Python knowledge, with the same Anaconda package, you'll be able to make your own QT-native crossplatform full GUI binaries with an 'import PySide' or write your own 'web apps' with equal ease.

If your goal is to maximize the performance of your students in international competitive programming competitions, then you should be teaching them out of Competitive Programming and Steve Skeina's book so they recognize what category the problem falls into (it's usually one of 5 or 6), along with C++ plus the standard C++ libraries that everyone uses that loads in GMP, makes matrix manipulation easy, etc.

If your goal is to cater to the guys to teach fundamentals to those who are going to matriculate into the CS uni path, then both are wrong and you should be teaching out of something like the SICP from the 'top down' and something like ML from the 'bottom up'.

[1] https://www.continuum.io/downloads if you don't like Anaconda, there are a boatload of competitors like https://python-xy.github.io/ that come with Spyder, which I think we both will agree offers a better development experience than Tampermonkey.

Errata: [1] in the end-notes was supposed to be a link to the notorious EC5 equality. http://www.phoronix.com/forums/forum/software/programming-co...

What was actually annotated as [1] in the end-notes should have been annotated as [2] with the proper link. The "IDE[1]" annotation should be altered to "IDE[2]".

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal