DEV Community

Discussion on: How to teach programming to my 10 years old nephew?

Collapse
 
kspeakman profile image
Kasey Speakman • Edited

Church! I mean, Alonzo Church. Yeah I also wish there were more resources to start kids with functional programming. The great thing about it is you can start rather simply (if presented that way), get a lot of value just from practicing immutability and referential transparency, and then later it surprises you with extremely reusable concepts based on provable math.

Collapse
 
drbearhands profile image
DrBearhands

I'm starting to think provable math should be at the basis rather than something to discover later. Show that composition of effects is not fundamentally different than composition of numbers as by e.g. addition or multiplication. I think that might give people a far better understanding early on about the usefulness of functional programming.

Thread Thread
 
kspeakman profile image
Kasey Speakman

I agree with this in general. However, it depends a lot on your target audience. Some audiences won’t survive a math based curriculum whereas they could survive a more procedural learning track, except with immutability and pure functions. Then later they can discover all this amazing reusability based on math goodness. Analogous to multiplication tables before algebra (before calculus).

Thread Thread
 
drbearhands profile image
DrBearhands

Maybe, but I think our view of math has been characterized far too much by stuffy classroom mathematics. I myself only started liking math after university.

Your analogy with multiplication tables and algebra is a good one. Here too I might be inclined to argue that learning algebra first might be better. Algebra expresses meaning, learning multiplication tables is just caching results.

Thread Thread
 
kspeakman profile image
Kasey Speakman

Both approaches probably have their place.

In my case, I am mentoring a middle school youth. She is smart, but I still don't think starting with category theory would be the right approach for our circumstance. Typing something and seeing it affect the screen is more likely to keep interest at this stage.

Functional programming could be great for either approach, but as you said, most of the learning resources are not geared for it. Which is unfortunate.