
Ask HN: How to teach programming in primary and secondary school? - torbi
Hi HN!
I&#x27;ve just started a job as a project manager for a school in Sweden, with children ages 6-15. I am going to help them develop the use of programming, makerspace and other forms of digital creation in education. My own background is in engineering, but I have no experience in teaching&#x2F;pedagogics. The school has already purchased a lot of equipment, from bluebots to arduinos and a 3d printer. The project is still in its infancy, so we still don&#x27;t have any clear plan yet. My hope is that, during the year I will work with this, that we can find some kind of framework that will enable the staff and students to work with programming and related subjects and on their own gradually develop the work.<p>I have some questions that I would love to get your input on:
1. What are good ways to introduce children and teens to programming? What are the different &quot;pedagogical pathways&quot;? 
2. How can we adress that all students will learn at different speeds, with varying levels of interest and require different levels of difficulty to keep them challenged? Now that I think about, I guess this is a general challenge in all fields.
3. Is there a map of different concepts that are basic to learning programming, like logical operations and control flow? Is there any kind of knowledge base available of exercises for these different concepts?
4. Any good tips of good learning tools&#x2F;platforms? Like bluebot, quirkbot and rpi or pure software tools like lightbot?
5. Are there any reasonable limitations for what should be focused on? I am thinking that there are so many different concepts and tools to introduce and work with and that it may be that we try to do too many things at once.
6. Do you know of any specialized and active forums&#x2F;communities for programming in education? Also any research communities? Are there any good papers for getting up to speed with the research in the field?<p>This is my first post, please feedback if I&#x27;ve missed anything. Thank you for your help!
======
kma5445
Hi Torbi! I know some teachers, schools and "programming clubs for kids" in
Finland that have done exactly the same thing for many years now. Most of the
material I know is, unfortunately, in Finnish but I think I could translate
some of it if needed. Being at work now, I can't quite write you answers now,
but I try to remember to answer you later! Meantime you can send me mail
kma4554 gmail.com, I'm very glad to help, especially with 1, 2, 4, and 5.

------
brudgers
The PLT Group has studied programming pedagogy for several decades, that would
be the *pointer I'd follow first for academic journal type material on
programming pedagogy.

------
dragonbonheur
I'll be as honest as possible with you - teach them BASIC, despite what
Dijkstra said and despite what the high priests of computing may say about
what Dijkstra has said.

The reasons why -

Children need to see the results of their work instantly, and by results I
mean that they can ship their code in an executable format that another kid
can click on and run without having to load runtimes or libraries. A lot of
BASIC dialects are compilers, like FreeBASIC and QB64.

A child who has learnt BASIC can quickly make games with actual sprites
without having to look for the right library and the documentation that goes
along with those libraries. A lot of people will tell you that Python comes
"with batteries included" but you'll find that you always need something else
to actually ship an executable that does everything you want - with python
you'll need to learn how to use pygame with it and good luck for shipping an
executable - with most versions of BASIC the documentation is complete and
accessible and to compile code you just press F5 or F9, depending on the
compiler or interpreter. With python it's good luck again to make something
run really fast - that genetic algorithm you felt crazy enough to write? The
high priests will tell you "Oh you'll have to use CPython for that speed
boost". Maybe you're just making a cool plasma effect or fire effect, well
good luck again in python - in FreeBASIC when you use the PSET function it
runs well enough, using pointers it's really fast.

About that compiler or interpreter thing. Some BASIC dialects compile code to
machine code, others turn your code into an intermediate language and run
that. Most good dialects will allow you to ship executables.

There's a BASIC for every platform out there and the dialects by the different
vendors out there are similar enough that you will be able to port code
easily. FreeBASIC and QB64 for Linux, Mac, DOS/FreeDOS and Windows - GAMBAS
for Linux (which also runs on the Raspbery Pi). BlitzPlus, Blitz3D and
BlitzMAX for windows (are now free), RFOBASIC and RCBASIC for Android, Great
Cow BASIC for PIC and AVR micro controllers (here's a tutorial for arduino
boards
[https://sourceforge.net/p/gcbasic/discussion/629990/thread/5...](https://sourceforge.net/p/gcbasic/discussion/629990/thread/583d9bcc/))

Modern BASIC is not what Dijkstra was familiar with in the 1960's. Modern
BASIC doesn't need line numbers. Modern BASIC does not look like spaghetti
code - you can use structured programming concepts and even object orientation
to organize your code. And the best part is that you can be done teaching the
basics of BASIC in two weeks max and the kids will be able to learn the rest
by themselves and ship code immediately after that - whether they want to sell
their work or share freely.

As for documentation and tutorials the forums for these dialects of BASIC are
very active and you can easily convert code form one dialect to another, so
you will always find new and interesting material to teach.

Some useful sites are:

petesqbsite.com

freebasic.net

[http://forum.retrogamecoding.org/](http://forum.retrogamecoding.org/)

[http://www.blitzbasic.com/Community/_index_.php](http://www.blitzbasic.com/Community/_index_.php)

[http://games.freebasic.net/](http://games.freebasic.net/)

[https://sourceforge.net/p/gcbasic/discussion/](https://sourceforge.net/p/gcbasic/discussion/)

[http://gambas.8142.n7.nabble.com/](http://gambas.8142.n7.nabble.com/)

[http://www.schoolfreeware.com/QBasic_Tutorials_-
_QB64_Tutori...](http://www.schoolfreeware.com/QBasic_Tutorials_-
_QB64_Tutorials_-_Programming_And_Code_Examples.html)

[http://www.bettiesart.com/tc/blitz/](http://www.bettiesart.com/tc/blitz/)

For 3D games programming using Blitz 3D-
[http://jnoodle.com/Blitz3D/](http://jnoodle.com/Blitz3D/)

Demoscene and graphics coding forums
[http://www.dbfinteractive.com/](http://www.dbfinteractive.com/)

Of course, since BASIC has been popular since the 80's microcomputer boom you
can always find lots of old magazines to adapt old programs and games from on
Archive.org - MSX BASIC, Acorn/BBC BASIC or Amstrad BASIC magazine code
listings should be the most readable.

~~~
informatimago
Don't be silly, use Smalltalk !

~~~
dragonbonheur
I guess you didn't really read anything of what I wrote, just saw BASIC and
went in high priest mode.

How do you even ship an executable with smalltalk? With a 30 megabyte
(minimum) virtual machine and the whole interpreter? Now that's silly.

~~~
brudgers
If I download a 30MB file it will take 8 seconds. If I put it on my
thumbdrive, the drive will have 99.9% free space.

30MB is a webpage these days. Not saying it is good. Just saying it is.

~~~
dragonbonheur
You'd be wasting a lot of lifetimes if every kid learning a programming
language wasted your minimum of 8 seconds to download a runtime to run
something as simple as hello world.

A lot of people in developing countries don't have your luxury of bandwidth
either. And besides, how many games on Steam are written in smalltalk? How
much software running on Linux? So little in the best case scenario that
nobody cares

~~~
brudgers
I agree a no bandwidth premise challenges a many assumptions -- I actually
started with the thumb drive bit (even available in Sweden from whence the
question comes) -- particularly assumptions about content delivery.

Anyway, I'm not advocating Smalltalk even if I think it's a good idea to
seriously consider old technologies. My thoughts were more along the lines of
'30MB' as of the same logical form as that time I thought, '180 KiloBytes! Why
would I ever need two floppy drives?'

~~~
dragonbonheur
What the hell am I doing arguing with a high priest? You guys need more than
thinking out of the box, you need to think out of the Valley. High priests are
the reason why software is bloated and sucks nowadays.

~~~
brudgers
If by 'valley' you mean the Chattahoochee valley -- which ain't much of a
valley but Valley, Alabama is named after it -- then I'll cop a plea since
Valley ain't that far away.

Old habits die hard and a few years ago, my BASIC background showed its head.
I was writing a kludgomatic and the example code for the key library call
needed to make it work allocated an array[10000] and I was like, that will use
up all the memory and be slow. It didn't and it wasn't because of Moore's Law
type effects.

Last year I was fooling around with RPi's and I bought a box of ten 16GB
microSD's for about $50. That's 160GB of solid state storage for about what I
paid for my first box of 3.5" DD DS disks.

Worrying about software bloat is a nice problem to have. It means one has
options...and compute and leisure and is willing to give up YouTube and
NetFlix

