Extending playgrounds for teaching Swift

The introductory playground at the start of the Swift book is a very good idea.


I work as a maths tutor, which boils down to "how to teach a brain new skills". Essential is 2-way. You present something. Straightaway you ask a question. This stimulates recall in the student's brain. Similarly giving an exercise stimulates recall.


This is "training".


The traditional "lecturing" style of teaching is ineffective. Too much information entering, no reinforcement. It's lacking 2-way.

Playgrounds provide much of this already. You can present material and give an exercise.

In fact, you could define in a separate file:

func f() {
   for i in 1...3 { print( i ) }
}

And then in your main playground, say:

f()
1
2
3
Try implementing f yourself

And the student can use CMD+CLICK either to check/inspect your solution, or if they get stuck.

That's good, it practices recall.


But what is currently lacking is the ability to unfold a section:

Challenge: print the numbers from one to 10
<foldout>
Solution:
for i in 1...10 { println(i) }
</foldout>

Another very useful tool would be the ability to display text by hovering.

Seeing as "getting people productive" contributes directly to their success, I think it would be in Apple's interest to put a lot of energy into this new method of brain-patterning.


An additional observation is to avoid prose. The closer you can get to zero prose, the better. Look at TEFL -- Teaching English as a Foreign Language. The idea is that your English teacher only speaks English, and your student only speaks Nepali. Not a single word in common. And it provides a methodology for communicating the language, similar to the way a mother teaches a child. It has been demonstrated to be very successful.


It provides direct patterning of the target language.


If anyone is aware of any publicly available playgrounds that attempt to teach Swift in this way (or otherwise for that matter), please do post a link! I am watching this space keenly.


π

Extending playgrounds for teaching Swift
 
 
Q