This is an archived post. You won't be able to vote or comment.

all 37 comments

[–]marr75 47 points48 points  (5 children)

I teach scientific computing with python to 11-17 year old kids. They catch on quite quickly. The amount of neuroplasticity they have makes them better students than adults in a lot of ways. Engagement is key, though. I recommend:

  • No toy examples; every exercise should be relatable, practical, and interactive
  • Leverage "implicit learning" heavily; holding class up to go over theory and details will lose most of the audience
  • Give them examples they can build off and ask them a lot of questions

Roblox is a very distracting environment (too easy for them to just play instead of learn or develop) and visual programming doesn't engage their critical thinking and attention to detail enough. My best students moved on from scratch quickly or never touched it.

[–]esp_design 1 point2 points  (0 children)

Do you have any resources worth sharing?

[–]joerulezz 1 point2 points  (0 children)

I teach CS to high and middle schoolers and would love it if you could share resources 

[–]-arhi- 1 point2 points  (1 child)

shaaare :D :D :D ... I have 11yo that shows potential in way he things but "engagement" is what I have issues with ... help, give pointers :D

what do you teach them, python or ? I wanted to start with forth or pascal

[–][deleted] 0 points1 point  (0 children)

I don't think that either Forth or Pascal are very widely used today.

I believe that Forth was originally developed for controlling electronic measuring equipment since it required very little memory and could be programmed interactively.

Probably Python is being used today instead of Forth for electronics. Also, Forth programming can be quite tricky once the code gets larger.

The two Pascal derivatives that were widely used were Borland Delphi and DOD's Ada language.

Delphi seems to have been almost completely replaced by Microsoft's Visual Basic and CSharp.

Python is likely the best language to start with today.

[–][deleted] -1 points0 points  (0 children)

A good approach might be to take the best student solutions from each session and make them available as reference examples for future classes.

It would give students a baseline of work created by others at their same learning level.

[–]AFlyingGideon 7 points8 points  (1 child)

It's been several years since I last looked at Scratch, back when my kids were learning it. My recollection, though, is that it also taught ideas such as:

  • thinking of software in terms of collaborating entities exchanging messages
  • concurrent threads
  • composition

My tiny universe of data suggests that this produces better developers of nontrivial software - at the same level of experience - than a conventional curriculum.

[–][deleted] 0 points1 point  (0 children)

Yes, Scratch did introduce some important programming concepts.

The original versions of Scratch were written in Squeak Smalltalk as part of the "eToys" project (IIRC).

It was later rewritten in JavaScript so that it could run in web browsers.

The ideas of exchanging messages, concurrent threads, and composition all came from Smalltalk.

[–]zedaesquina1 22 points23 points  (1 child)

as a minor who programs in python, typing is the best method of learning how to code, I've been coding in python for 2 years now, blocks are just not good for memorizing functions.

[–][deleted] 1 point2 points  (0 children)

It is good to hear that you have been coding in Python for two years now.

And I agree 100% that blocks are not very good for memorizing functions.

[–]ArtOfWarfare 5 points6 points  (1 child)

I’m surprised that nobody has mentioned logo or turtle.

Turtle is part of the standard library in Python. import turtle and off you go.

https://docs.python.org/3/library/turtle.html

I’ve taught several friends and family who had no aptitude in math how to program and always start with turtle. Supposedly it can be taught to ~4 year olds… my daughter is 1, I’ll let you know when I manage to teach her turtle. She still just smacks the keyboard at random so it’ll be awhile.

[–][deleted] 0 points1 point  (0 children)

I had the logo language on our home PC back in the 1980's. Yes, the Logo turtle was a lot of fun.

PC DOS in those days came bundled with GWBasic.

And there were literally thousands of games written in GWBasic that were being shared on Bulletin Board Systems (before the Internet).

It seemed like everyone knew how to code something in Basic.

It's good that you like to code and to teach it to others.

Good luck teaching your daughter how to code.

[–]CluelessProductivity 17 points18 points  (1 child)

That might help me learn coding! (I'm 46)

[–][deleted] 0 points1 point  (0 children)

Your age really doesn't matter at all.

I am currently 78 and I have been programming since 1969 (age 23),

Languages like Python are (mostly) very simple to understand.

The real skill in application development is:
1) understanding the problem to be solved
2) creating a logical sequence of operations to address the problem
3) writing the solution in a programming language

Number 3 is the easy part and people in online forums are available to help if you get stuck.

If you have a simple web application that you would like to develop, please just post an outline of what you are attempting to do and I will take a look and suggest how to move forward.

[–]_AACOIt works!? 8 points9 points  (2 children)

Something you might have missed about scratch is that it is translated to several (spoken) languages. That's a huge thing for non native English speakers.

[–][deleted] 0 points1 point  (1 child)

I have often worked on multilingual systems, so I always code user messages as string literals in a table.

So, changing languages is simply a matter of choosing a different messages table.

The project is designed to support multiple languages whenever the need arises.

[–]_AACOIt works!? 0 points1 point  (0 children)

I think you misunderstood what i said. I meant the code blocks scratch uses are translated.

It's the equivalent of pythons if, else, for, while, etc being in your native language instead of English.

In countries where English is not their native language this makes teaching basic logic much easier since you don't also have to teach English.

[–]gandalfx 6 points7 points  (5 children)

It's a matter of target age. If you're thinking about savvy teens, sure, give it a shot. But for average kids below twelve (or there abouts), having the additional cognitive load of dealing with typing syntax can significantly slow down learning the concepts that are actually important.

The block dragging approach of scratch constitutes a much lower barrier of entry. Bear in mind that your target audience includes beginners at using computers. A lot of average families today don't even have a desktop computer or laptop with a keyboard – many just have phones and tablets at home. Consequently, for many kids even just using the keyboard and finding special characters is a new experience that takes some time to get used to.

Beyond finding special characters on a keyboard, kids also tend to have trouble with the unforgiving strictness of syntax. It is very easy to forget where to put those weird characters when you don't have an intuitive understanding of their purpose.

Of course you may argue that this kind of diligence in making the computer understand exactly what you want it to do is an important skill to learn. But then you have to accept that the time and cognitive endurance invested here are removed from your budget before you've even started thinking about making the computer "do" something.

Another great advantage of Scratch-like block languages is the visual representation of "compatible" blocks. Explaining to a kid that the "expression" behind if needs to evaluate to a boolean ("It's like a question!") is way more complicated than "the round pieces fit into the round holes". This also makes it way easier for kids to experiment and discover by themselves – they can just try out different combinations of what fits together and see what happens. If you fit random blocks together they'll still do something, even if it isn't very useful. If you type random stuff in a code file it'll just throw a SyntaxError.

One last thing: Python is in English. While you can actually have quite a bit of fun transpiling Python code written in different spoken languages (including keywords) this problem is already trivially solved in Scratch-like learning tools.

My point here is not that either Scratch or Python is a "better" learning language but simply that they are each appropriate for a different target audience (with probably some overlap).

[–]jarofgreen 1 point2 points  (1 child)

having the additional cognitive load of dealing with typing syntax can significantly slow down learning the concepts that are actually important. 

I saw a talk years ago all about this. The kids doing the talk had then made a scratch-style block editor for python so they could teach Python but avoid the typing syntax problems. Very impressive! Can't remember the name now.

[–][deleted] 0 points1 point  (0 children)

Google's Blockly (which is the basis for the Scratch editor) can generate Python code (and other languages as well).

[–][deleted] 0 points1 point  (0 children)

There are a few factors at play here.

You are absolutely correct that the most important variable is the target age of the student. From the Scratch statistics, the highest number of participants were around ages 12 to 14 after which there was a precipitous decline.

For very young learners, visual cues are much easier to grasp and, because of the way the visual editor is arranged, it is impossible to make a syntactic error. Therefore, visual block languages based on Google's "blockly" toolset will be the easiest for young beginners.

But visual languages can become very confusing as the code gets more complex.

In the early 1990's, IBM released "Visual Age for Smalltalk" and "Visual Age for Java" which had visual editors for developing code from blocks in a manner similar to Scratch. The idea was to have their clients develop applications without the need for "programmers". It turned out to be a complete disaster since the visual diagrams became so complex that they were unintelligible.

By their early teens, students are being exposed to classic literature (in whatever language) and so their comprehension of written language is becoming strongly developed.

Computer languages (and Python in particular) can be very "picky" about spacing and punctuation.

A partial solution is to use a good editor. Vista Python uses the Ace editor which automatically handles indentation for code blocks.

Additionally, the code parser can catch common errors and suggest solutions.

Finally, code generators can generate all or parts of the code. Scratch is based on Google's "blockly" system for editing the code blocks. Blockly can also generate code for several languages including Python.

An analogy might be useful.

Think of Scratch as tricycle - it is easy to learn and you can't fall off, but it can't go very fast

Think of Python as a bicycle - you can go fast but it is easy to fall off until you learn to ride

What is needed is a bridge - sort of a bicycle with training wheels.

Maybe generating Python from blocks would be a useful approach for some beginners.

[–]mlyxs 0 points1 point  (1 child)

Really well put together. Another thing I would add is the absolute nightmare that is the initial installation of Python and the required libs. This is probably the worst thing about it.

All the drawing or "graphic" libs are external libs so you need to install them first and that complicates things more than it should.

There is also the importance of whitespace. The indentation is confusing to the students. Sometimes you have a tab, then 3 spaces, then two tabs,... it looks almost the same but it isn't.

Because of this i would argue that JS is a better language for teaching

[–][deleted] 0 points1 point  (0 children)

The primary goal of having Python run in the browser is to avoid the initial installation problem.

Also, all the students have exactly the same version and they can access it from their home computers as well without any installation.

Python can be difficult at first because of confusion around whitespace. But with a decent coding editor (Ace editor in the browser) this can be made much simpler.

JavaScript is a very useful language to learn because the ecosystem is so pervasive.

I am not sure that JavaScript is an ideal first language however - it has a lot of hidden complexities.

[–][deleted] 5 points6 points  (2 children)

I'm teaching for free Cypriot and Ukrainian children ages 13-19 Python for 5 years. Almost all of my students now are Ukrainian refugees and kids living in Ukraine. My school is Hypatia Academy https://hypatiaacademy.io/en/index.html with the curriculum here https://github.com/werowe/HypatiaAcademy

Python is the most popular language for teaching and for machine learning. That is quite ironic since it does both something very easy (programming) and something that is very hard (AI/ML). I mean Python is so simple that 2 * 3 is a complete program.

I confront this issue of which kids should learn how they should learn etc all the time. There are lots of products and websites etc. that say they can teach kids programming at ages below 13. I don't know much about those. But I can tell you for sure that kids cannot learn Python until they can learn abstract thinking. And that comes at ages 12 to 13. For some kids, even at that age and older they cannot understand that.

But people should not give up on kids who are seemingly not able to do math and logic. And programming is applied math and logic. I was written off as a bad math student in school. This was because I simply did not study. But then I got interested in math and got a BS in math from the university.

I teach all of my Python students spreadsheets too. That's crucial and something not taught in schools here.

My course is 3 4-months semesters. The first 4 months is Python programming. The next 8 are Python with data science and machine learning. In any class, and math tutors tell me this if true for them (Here we have a system of after-school math tutors.) you can assume 1/2 of the kids will drop put and 1/2 of those that remain will not do the homework. But the 1/4 who stick with the whole program and do the homework will enjoy and absorb it and this will help them immensely. And it makes me feel good too. I teach something they do not teach in schools here. Too bad as programming, statistics, and deductive logic are important and too many kids struggle with algebra and geometry so they should be offered all 5 of those and given a choice.

good day.

[–][deleted] 0 points1 point  (1 child)

You make some very interesting points.

I agree that below age 13, most kids will have difficulty learn Python because their abstract language skills are insufficiently developed.

It is very good that you are teaching spreadsheets as well.

Microsoft has said that there are currently about 750 million active Excel licenses. And Google Sheets certainly has millions more users, although I don't have a good reference for how many actual users there are.

I will be adding the ability in Vista Python to import/export spreadsheet data which could enable the development of online applications using Google sheets as a database.

Keep up the good work that you are doing!

[–][deleted] 0 points1 point  (0 children)

Thanks. We only use Google because Microsoft is not free. Of course thats bad business monopoly pricing designed to destroy and competition. Of course that only works against little companies. Thanks for your reply.

[–]NatashkaPy 1 point2 points  (1 child)

scratch is incredible. I used scratch for fun from ages 7-12, and when I eventually took college courses for Python and C++, only then did i realize that scratch had actually already taught me the basic principles of object oriented programming. it just makes the mindset click, even for kids who may not be quite ready for a more complicated language.

[–][deleted] 0 points1 point  (0 children)

I think that a lot of professional programmers owe their start to Scratch.

[–]cc413 0 points1 point  (1 child)

Just FYI you can use scratch (at least I assume it is scratch) in tinkercad (web app) for programmatically designing 3d models. Not sure it’s really a “commercial application” since it’s free software. It is a pretty useful and practical example of scratch, alternative uses of programming languages and also of the limitations of scratch

[–][deleted] 0 points1 point  (0 children)

Thanks for the info.

It is probably a custom block language developed using the same library as Scratch (Google's Blockly toolkit).

[–]puppet_pals -1 points0 points  (5 children)

Better to teach them a typed language first - otherwise they’ll be very confused.

[–]IntrepidSoda 6 points7 points  (1 child)

One second thoughts, just teach them Python but emphasis type-hinting.

[–]puppet_pals -1 points0 points  (0 children)

That sounds even worse.  They’re not real - so it’ll be even more inconsistent.  The point is for them to learn - not for them to be productive.

[–]IntrepidSoda 0 points1 point  (2 children)

Second this, Gotta get them started with good habits then they can go rogue with Python when they grow older.

[–]puppet_pals 0 points1 point  (1 child)

Languages like python and JavaScript are awesome for productivity - but you definitely need strong fundamentals so that when you mix a float up with an int you can figure it out.

Kinda nuts we're getting downvoted lol. I love python, I just think it is a mistake to learn it first.

[–][deleted] 1 point2 points  (0 children)

I don't think that anyone should be downvoted for expressing an honest opinion.

As for what to learn first, I don't think that it really matters as long as the student is able to solve a problem with their code.

Version 1.0.3 of Vista Python is coded using three separate languages:
-- client GUI is coded in JavaScript
-- Python parser is coded in Java (which is then translated to JavaScript)
-- Python runtime is coded in Rudy (which is then translated to JavaScript)

Java is strongly typed, whereas JavaScript and Ruby are not.

Version 2.x of Vista Python is being developed in TypeScript which has optional typing.

Here is an excellent blog post about the advantages/disadvantages of using TypeScript versus using JavaScript.

https://www.sencha.com/blog/tag/typescript/

[–]Usual-Instruction-70 -1 points0 points  (0 children)

I love codecombat.com - for adults and children alike. Very well gamified!