Teaching my son to code

“How do you write a video game?” – Luca, my 11-years old son, asked, some weeks ago, during his summer holiday.

With Joshua, his older brother, I had made some moderate attempts, years earlier, to interest him in the topic of code and programming, but it didn’t interest him. He has many qualities but he’s not into Lego building either, or anything remotely connected to engineering, so I didn’t push him. It’s not his cup of tea.

But kids are all different, and Luca asked. He knows I work at Microsoft… so I was obviously the go-to person for this question.
So, what do I teach him now – where do I start?

Over the years I had kept an eye on what literature and toolkits were available to introduce kids to programming, to keep myself up to date. When I was young, our home computers came with a BASIC. Computers were simpler, they did less things, there were less ‘layers’. There was the well-known LOGO out there, indended as a teaching language, but that was it.

Of course by now the situation has greatly improved – there are a lot of resources out there… but do they really teach you well?
To various degrees.

There are more things (sites/toolkits/languages/books) out there, but I find that all most of those resources are somehow missing the point: they focus too much on teaching ONE language in particular, but they do not lay the foundation to how to DESIGN a good program. They teach you to code, but they don’t point out good or bad design choices.
In particular they don’t lay a good foundation of object oriented programming concepts, and generally seem to be ignoring object orientation and just teaching – the old ways – procedural programming. This is at least my experience with Microsoft SmallBasic, and now with some books (with great Amazon reviews) around Python, such as ‘Hello World’ (Manning) or ‘Python for Kids’ (No Starch Press).

I would have actually favored Python, as at least is a modern and open language and not proprietary. Those books might even be easy to follow and learn something, but ‘Python for Kids’ has a chapter on ‘objects’ – chapter 8 , starting on page 98. ‘Hello World’ waits until chapter 14 (fourteen) before talking about objects. And it does for just 3 pages. SmallBasic doesn’t really even seem to bother explaining anywhere what objects classes are and why they exist – it just tells you to accept the ones provided as a fact of life and just use them. In the meantime examples are filled with global variables and teach you sloppy practices.

I know that for many people who had started before OOP was common, and learned procedural programming, they later had to get used to the change, and it wasn’t easy. Anyone?

 

So why all these books all have to start with ‘variables’ and ‘loops’ and ‘functions’ and how to get user input (and use it insecurely) and all that sort of procedural crap? That’s just syntax. That is NOT the difficult part, every decent coder will tell you. You can look that up. Every language has the same sort of loops, you write them slightly different, but that’s not what’s difficult. There will always be another syntax, another parameter, another API… but you can look those things up. We are in 2015. We have the internet now.

Understanding object orientation, instead, “Envisioning” your classes and determining what the right behavior to give them, and doing this right is what is tricky. That’s why if you want to teach *programming* (and not just language X or Y) you need something better – something that teaches the important stuff FIRST and foremost and makes sure you ‘get it’ before getting you lost/bored in repeatable details that can be looked up. Better setting some standards from the start – kids are just learning and will be very open to accept the guiding practices you give them.

Then, once that theory is in and you understand that in modern systems you basically always define behavior for objects, then you can do that in any language. Better, you can *think* and design better programs, in any language.

This is why I ended up discovering and liking Greenfoot very much.

Generally I am not a Java fanboy, but the way Greenfoot’s IDE is designed demonstrates a lot of effort and thought has been put where it matters – teaching and visualizing the concepts of object oriented programming. The design work takes into account the visualization needs of both teacher and student, and makes teaching object orientation possible even at a young age.

To better understand what I am talking about, anyhow, I suggest you look at the lessons (some for students, but especially those with teacher commentary!) in the videos at http://www.greenfoot.org/doc/joy-of-code

So when Luca asked, I started with him long the same lines of what is described in this blog
http://blogs.kent.ac.uk/mik/2008/01/teaching-my-daughter-to-code/
In the blog post, the author describes how he coded a simple Doctor Who – inspired videogame in Greenfoot, and talks thru the process of teaching (for the parent/teacher) suggestion how he explained certain things, providing and commenting small working snippets to speed up some parts of the process.

I was pretty lucky – since Luca also likes Doctor Who, we could basically follow the same ‘storyline’ the blog outlines and build a very similar game. Ours turned out a little different (by choice) but those articles gave us a fantastic start, and we had a lot of fun going thru it.

He learned enough of it over just a couple of days (I spent maybe 4 hours with him, he tried some other things for another couple hours), that he tasked himself (he came up with it spontaneously!) with building something else from scratch, and he made another simple game with two cars that could freely drive on the screen, and had to dodge trees, that he’s now playing along with his little sister!

Young geeks

Does he know all of Java? Of course not. Neither would he know everything of Python, or Basic or anything else. But he got the basic concepts of OOP down, and those will stay. By the time he might want or need to dust this skill for any type of academic or professional use, languages will have evolved and changed anyway… but I am pretty sure this experience I gave him would still hold useful. I am not planning on ‘pushing’ him any harder than he already pushes himself – after all, he’s only 11.

So, thanks, Greenfoot, for focusing on the right things! I would recommend you to anyone who wants to teach programming to kids.

Imaginary Friend Sara (about public school in the United States)

This is one more post about things that disturbed us in America, and eventually led to the decision of coming back to Europe.

No, I don’t mean to say everything about America was bad. It wasn’t. We have learned a lot. We did amazing things, met some incredible people and visited places and nature that is so beautiful it can’t be described with words or pictures: my limited attempts to portrait the beauty of that continent are on my photos on Flickr… but in real life it is so much more fantastic. I loved to see Eagles flying over us; I enjoyed camping like primitives among huge trees that have seen an ancient world and shared those spaces with the Native people, in harmony; it’s not in many places in the world nowadays that you can drive thru forests or deserts or prairies so beautiful that take your breath away for hundreds of miles; I even had a good laugh when the occasional raccoon decided to climb on our tree at night and eat all the plums (which sounded like a Pig was stuck on the tree, by the way – another strange night episode, but actually funnier that the one with the police I wrote about in my previous post).

But we also experienced a society that, weighting all factors, is not the one we want our offsprings to grow in, and after the first euphoric and exploratory years we couldn’t really see ourselves growing old there.

So, here’s another story that happened to us. And – as the pain it caused is starting to heal – I am still grateful it did happen and life manifested itself this way, because it truly opened our eyes.

 

One day in November Sara said to my wife: “You know, mum? I have a friend called Sara – she stays out of school, and Sarah enters the school. Then we meet again when I come out.”

Sara and Sarah. A trailing ‘h’ and a fairly different pronunciation (you’d pronounce it ‘Sara’ closer to ‘Zara’ than how you say ‘Sarah’ with an American-English accent). But wait, it’s not just about the name – the kid was really telling us she was not allowed to be herself – Sara – in school, where she has to pretend to be someone else – Sarah (the only way people in the States were able to pronounce her name), to meet expectations and handle the pressure in school. The name was just a label for the different ‘roles’, but this was to us a wake-up call: hearing this from your 5 years old, as a parent, deeply hurt my wife (and myself, later).

Sara had always been a very happy and nice little girl.
But she was telling us she had been wearing a mask, doing everything according to the book in school, while she was being deprived and denied in her own self-image and esteem.

This was her first year in kindergarten – previously she had been in a ‘cooperative’ pre-school, which had been a relatively nice experience, as basically all the mums were co-teaching the toddlers, so my wife could really be involved in her education and have a clear idea of what was going on.
But at the public school, the school year had only started for a couple of months, and we didn’t really know what to expect – sure, Luca, our older son, had started school in America when he was 7 – before that he had done kindergarten and began elementary school in Italy – and his first couple of years had been largely ‘English full immersion’. With Joshua we had seen junior high and high schools. Lots of math, largely, I wasn’t particularly happy of the programs either… but with Sara we saw the public school system from the start and that made us even more unhappy.

We expected that 5 years old kids, even if they had to start learning something ‘mental’, would still be allowed to play and to interact to some extent with each other.
That is not what we found: it was more of a crash course in obedience, submission and a rat race to learn things way too fast and way too early, that completely stressed out our kid.

In the photo below you can see how she had developed an eczema from continuously biting her lower lip – basically respecting the ‘stay quiet’ and ‘listen’ and ‘don’t talk unless you are asked to answer something’ she was given as rules. You can also see she was forced in a stiff ‘standard’ type of smile, not natural at all. If it wasn’t that the topic is about my daughter and it hurts, it would almost be ironic this is the ‘official’ picture for the picture book of the year… so the school can keep good record of how they did that year…

Sara school photo america 2014
What were they asking of her, you might be wanting to know.

Well, we found it pretty intensive that in 12 hours a week (3 hours a day for 4 days):

  • The kids were supposed to learn to read, write, and count and do math with numbers under the 20 – way too much ‘logical’ thinking at that age, too fast, too soon.
  • No time (or not allowed) to interact with each other (kid to kid) during the lesson and learn social skills and boundaries – just listen to the teacher and return the results, fast, because they need to be measured. Wikipedia has a good comment on those standardized testing and programs:
    •  […] Critics argue that the focus on standardized testing (all students in a state take the same test under the same conditions) encourages teachers to teach a narrow subset of skills that the school believes increases test performance, rather than focus on deeper understanding of the overall curriculum. For example, a teacher who knows that all questions on a math test are simple addition problems (e.g., What is 2 + 3?) might not invest any class time on the practical applications of addition, to leave more time for the material the test assesses. This is colloquially referred to as “teaching to the test.” […]                        
  • They only had a break of 10 minutes each day: 10 minutes are not enough at that age they still need to run wild and play spontaneously…
  • Even in those 10 minutes, they were NOT even allowed to eat anything. Because of other kids with food allergies. About this, we even arranged for her brother Luca – who was in the same school but a higher class and was having break at the same time – to provide her snack in the courtyard. The teacher ‘closed an eye’ on it, until someone found out and complained to the Principal of the school. No, really, my kid needs to eat, and even eat something healthy, *especially* if you expect them to be able to focus and use their brains. They won’t offer them to others, and it’s easy to implement some slightly more tolerant policies (i.e. please don’t give you kids snacks of some categories that cause allergies. Albeit a future post on food allergies – and food in general – in the States is probably something I’ll write in the future.). I know that when I am short on sugar, I get grumpy and I can’t think straight myself – good sugar is actually good for your brain
  • There was, however, time to recite the Pledge of Allegiance (almost) every day. If you don’t know what the pledge of allegiance is – it’s because you come from a (even if only slightly) more decent country like myself. Also, if you are European, you might have studied that the Americans came to rescue us from the evil Nazi’s in second world war, so you might have this feeling that Americans wouldn’t do the same things as the Nazi’s… would they? Well, you can read about the pledge on Wikipedia but essentially it is a ritual where you swear your loyalty to the American flag that you’ll love it and respect it and be a good robot citizen, to say it my way. The whole thing is coupled with holding a hand on your heart, or with a military salute. There is an interesting photo (and its comments) you should read
    • A photo of a child is titled: “little girl giving the Heil Hitler salute 1934.” It is so funny to read comments from U.S. citizens (and others) remarking that the photo is disturbing because it shows how pliable children are. No one is aware that it was the salute used in the U.S. and originated in the U.S. (see the work of the symbologist Dr. Rex Curry). None of the U.S. citizens is aware that the photograph could be of a U.S. girl (and not a german girl) and the commentators would not know. The thought has never entered their minds. They cannot even make a comparison to the modern Pledge of Allegiance ritual and gesture in the U.S.   

[About similarities in the american public school system and the Nazi schools, you should also watch this Disney movie, which ironically was part of American’s Anti-Nazi propaganda during World War II]

  • No real ‘playing’ as kids are not really allowed to touch/get close to each other during play – everywhere they stress about respecting ‘personal space’
  • Kids were given ‘rewards’ when performing what we would consider simple normal tasks – i.e. putting back your chair next to the table (rather than leaving it a mess in the middle of the room) is something we do expect kids to learn early on and do simply out of respect and courtesy. Not something that has to be specially ‘awarded’ like having been heroic or patriotic. Especially if the reward is this stupid bottle with more Stalin-style (I compared to the Nazi – let’s use a different totalitarian example) propaganda:

Bibitone

  • Kid’s behavior was tracked and also ‘rewarded’ with stickers and ribbons and tickets every week – green, yellow and red. I think it’s what they use in some prisons in Europe, not in toddler schools:

Stayed Green all week

 

The above list should have given you an idea. And I am sure I am missing and I have forgotten about some details.

If the above looks ‘normal’ to you – it doesn’t have to be like this. It’s not like this across the ocean in many countries.

And by the way – we were not leaving in a ‘bad’ or ‘poor’ area either – this is one of the ‘best’ school districts around Seattle, where a lot of educated people live who work for big companies such as Microsoft, Google, Nintendo, Boeing, Amazon, etc…

I broke down when I understood what I made my kids go thru, by coming to work to the States. Thru this and to other episodes.

I am convinced that many people – both Americans from previous generations (when schools were better) or even immigrants like us – don’t even *realize* they are exposing their children to this type of programming. Largely because life is frenetic, work is demanding, and both husband and wife both work.

We (me and my wife) like other school systems and methods, like Waldorf, or even Montessori (for some kids it works well, albeit not for all) – that place an emphasis on raising individuals that can be critical thinkers and self-standing humans, not obedient calculating machines.
Anyhow, I didn’t even like a ‘mitigation’ such as sending them to a private school of that kind – they do exist, but private schools are *so damn expensive* that they are really only affordable by a very small rich segment of society. If I had one kids, maybe, but with three – 20 thousand dollars a year per kid are just not something many families can get by, and those are the prices… but even if I could afford it, I believe that gating access to ‘better’ schools thru money just makes the school environment an ‘elite’ one: not only unfair for those who cannot afford to access it, but even detrimental for the students who can, as they get no exposure to ‘real’ society and are raised in a ‘bubble’, which kind of defeats the purpose and premise of those schools’ supposedly more ‘open’ views. This is of course also what allows some people to go to ‘prestigious’ colleges and get jobs easily, while others can’t even try getting close to the bottom of the ladder. But higher education and access to workforce – is another topic I might look at in a future post, not right now.

Back to the specific effect this school experience had on Sara: I showed the ‘stress lip’ physical sign above, but there were also deeper psychological effects on her (not) growing up – in fact even regressing in some sense. For example, the summer before she started kindergarten, she was starting to draw more detailed ‘puppets’ – not just a head with ‘sticks’ – she was starting to add bodies and fingers and more details… and then, only a couple of months in kindergarten, she was only drawing heads again. And small ones.

Guess what happened once we moved to the Netherlands and she started attending a (public, tax-funded – here it’s normal) Waldorf school?
In this last couple of months her drawings ‘evolved’ again, and they started featuring bodies again (in fact, the body is now drawn before adding a head on top of it – and it even gets a belly button!) and hands and feet have become more detailed due to the stimulation of being immersed in physical/practical/interpretive activities as opposed to just ‘mental’ ones like it was the case at the public school in the states.
Besides drawings, she has had a growth burst – she grew a few centimeters all of a sudden, and started changing not one but FOUR teeth, and she’s literally blooming with vitality.

And the imaginary friend? We have not heard from her again – there is just the real Sara now:

Sara and the windmill

On this website we use first or third-party tools that store small files (cookie) on your device. Cookies are normally used to allow the site to run properly (technical cookies), to generate navigation usage reports (statistics cookies) and to suitable advertise our services/products (profiling cookies). We can directly use technical cookies, but you have the right to choose whether or not to enable statistical and profiling cookies. Enabling these cookies, you help us to offer you a better experience.