tag:blogger.com,1999:blog-34927953.post2775141324203986629..comments2023-07-09T02:39:33.734-07:00Comments on Jack Cough on Software: Teaching Functional Programming To KidsJosh Coughhttp://www.blogger.com/profile/04509343962912103631noreply@blogger.comBlogger49125tag:blogger.com,1999:blog-34927953.post-20471242358934349162017-04-12T04:10:36.009-07:002017-04-12T04:10:36.009-07:00I am very impress on your information, Its a reall...I am very impress on your information, Its a really very impressive blog. I really got some another very nice information , so thanks for sharing these tips!!!!<br /><a rel="nofollow"><b></b>Programming For Kids Singapore<br /></a>Anonymoushttps://www.blogger.com/profile/04422694083927825523noreply@blogger.comtag:blogger.com,1999:blog-34927953.post-33301616292868646792016-08-01T05:57:51.558-07:002016-08-01T05:57:51.558-07:00I am teaching functional programming to my kids wi...I am teaching functional programming to my kids with kids.klipse.techYehonathanhttps://www.blogger.com/profile/12200119323595401195noreply@blogger.comtag:blogger.com,1999:blog-34927953.post-24187545868718551052009-07-23T14:20:07.792-07:002009-07-23T14:20:07.792-07:00For metafunctions, don't use machines that tak...For metafunctions, don't use machines that take numbers as inputs! Talk about something more concrete. like:<br /><br />motorcicle -> BigFactoryMachine -> MotorcicleReparingMachine<br /><br />plane -> BigFactoryMachine -> PlaneReparingMachine<br /><br /><br />then you can use the created machine:<br /><br />brokenMotorcicle -> MotorcicleReparingMachine -> FixedMotorcicleAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-34927953.post-83957771821954113952009-05-24T12:09:23.894-07:002009-05-24T12:09:23.894-07:00Have you tried a machine that takes a number and o...Have you tried a machine that takes a number and outputs another machine (just simple currying), and after that a machine that takes a number and another machine that takes two numbers, outputting a specialized machine that takes one number?<br /><br />It seems to me like using this approach higher order functions are simple concepts, the distinction between function application and the function as a value is very clear with a physical metaphor.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-34927953.post-17371433847096859202009-05-22T21:11:17.869-07:002009-05-22T21:11:17.869-07:00Good stuff. I tried teaching my daughter w/ Logo,...Good stuff. I tried teaching my daughter w/ Logo, but it went nowhere. You were wise to start without the computer, which in my experience got in the way of the actual lesson.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-34927953.post-23591886805766670782009-05-22T11:13:08.045-07:002009-05-22T11:13:08.045-07:00@Mitch Blevins - the type mismatch thing is great....@Mitch Blevins - the type mismatch thing is great. :) we had some fun with that today. since we were dealing with machines, it was easy to pretend the machine had an alarm. the alarm goes off on a type mismatch.Josh Coughhttps://www.blogger.com/profile/04509343962912103631noreply@blogger.comtag:blogger.com,1999:blog-34927953.post-21392472431167193812009-05-22T11:11:04.046-07:002009-05-22T11:11:04.046-07:00@Askatasuna you're right! i looked at that book an...@Askatasuna you're right! i looked at that book and it is almost exactly the same. thanks! it gives me a lot of material to teach him.Josh Coughhttps://www.blogger.com/profile/04509343962912103631noreply@blogger.comtag:blogger.com,1999:blog-34927953.post-29296286577391250092009-05-22T11:10:29.066-07:002009-05-22T11:10:29.066-07:00Wow. So many nice comments, its really hard to kee...Wow. So many nice comments, its really hard to keep up!<br /><br />And, so many software suggestions...phew. I will take the time to get to them.<br /><br />I also found this to be very nice: http://joshblog.net/projects/logic-gate-simulator/Logicly.htmlJosh Coughhttps://www.blogger.com/profile/04509343962912103631noreply@blogger.comtag:blogger.com,1999:blog-34927953.post-71231629716986775292009-05-22T07:45:50.144-07:002009-05-22T07:45:50.144-07:00@cjh who said "...you are creating a machine which...@cjh who said "...you are creating a machine which returns a Sneetch in the Star Bellied monad!"<br />Oh, no! Another one of those darn <A HREF="http://www.haskell.org/haskellwiki/Monad_tutorials_timeline" REL="nofollow">monad tutorials</A>. I guess not really... just a Star Bellied monad unit. return :)Evangeloshttp://www.google.com/noreply@blogger.comtag:blogger.com,1999:blog-34927953.post-87107723679051102382009-05-22T06:08:52.235-07:002009-05-22T06:08:52.235-07:00Great stuff! You've inspired me to get around to ...Great stuff! You've inspired me to get around to uploading <A HREF="http://www.scribd.com/doc/15720543/Squarrows" REL="nofollow">Squarrows</A>, which is a set of similar materials, although coming from a different perspective, that I used successfully with a group of 9- and 10-year-olds a year ago.Oliver Steelehttp://osteele.comnoreply@blogger.comtag:blogger.com,1999:blog-34927953.post-3590574005294785872009-05-21T12:00:20.609-07:002009-05-21T12:00:20.609-07:00Excellent post. Really good stuff there.
If you ...Excellent post. Really good stuff there.<br /><br />If you want to learn a little more about functional programming, I'd highly recommend <A HREF="http://www.htdp.org" REL="nofollow">How To Design Programs: An Introduction to Programming and Computing</A>.<br /><br />It's a book targeted towards an introductory audience (not quite kids, but designed for high school computer science students). Great book, though, and available online for free. It makes use of the Scheme programming langauge, and concentrates on functional programming.<br /><br />I wouldn't give it to a child on their own, unless they were truly a genius at programming, but I think you could work through a lot of it with a child and get a lot out of it.Christopher Cashellhttps://www.blogger.com/profile/17212804857619277232noreply@blogger.comtag:blogger.com,1999:blog-34927953.post-70170118337814260312009-05-21T11:40:56.244-07:002009-05-21T11:40:56.244-07:00One thing I thought about reading this. For trying...One thing I thought about reading this. For trying to teach about 'machines that create machines from other machines', you can start with the idea of a machine that takes in e.g. a number and creates a machine out of it. e.g. a machine, that given a number, returns a machine that adds that number to any input. This seems like an easily understandable stepping stone, and could also introduces the concept of closures. <br /><br />You could then bring in the concept of a machine that 'composes' two other machines together, creating a machine that 'contains' both machines wired together somehow, as the next step.... and you'd probably have to discuss polymorphism at this point too....Marjorie The Spam Treehttps://www.blogger.com/profile/13658246905140670874noreply@blogger.comtag:blogger.com,1999:blog-34927953.post-11606089473962620002009-05-21T10:49:22.628-07:002009-05-21T10:49:22.628-07:00Reading through all of these comments, I noted the...Reading through all of these comments, I noted the one that the Reddit dudes are complaining about about the Sneetches being stateful. One is tempted to dismiss them as pedantic twits, but for two things,<br /><br />1) Eventually in the Dr. Seuss story we have a race condition the situation breaks down, not only because the Sneetches run out of money, but also because they can no longer remember who was who.<br /><br />2) We see a comment like @Thrustvectoring who wants to introduce stateful memory as a machine, which is a FUNDAMENTALLY different thing, and breaks down the whole metaphor of a machine as a function.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-34927953.post-75561784766157325482009-05-21T08:05:19.618-07:002009-05-21T08:05:19.618-07:00The great thing about teaching kids this sort of t...The great thing about teaching kids this sort of thing is they don't ask you why they're learning it. They can just have fun with it. I am in college and I see that while students may eventually get interested in their classes in programming, they seem afraid to have fun while they are supposed to be learning. I guess it is the idea that school should be a "job" or serious and stern and not about enjoying the process of learning.<br /><br />I wish we had this available in schools.<br /><br />Thanks for the article!Harperhttps://www.blogger.com/profile/11177290323264273072noreply@blogger.comtag:blogger.com,1999:blog-34927953.post-77935028605100297742009-05-20T23:44:05.355-07:002009-05-20T23:44:05.355-07:00Great idea!
This kept my 5-year-old occupied for 2...Great idea!<br />This kept my 5-year-old occupied for 2 hours tonight.<br /><br />Some observations:<br />The sneetch star-on and star-off machines were a great introduction.<br /><br />We also tried a mama-making machine:<br />Gracie -> [Mama] -> Mama<br />Daddy -> [Mama] - Nana<br />etc<br /><br />It is fun to run in circles yelling "Type mismatch! Type mismatch!" when you try to put a number into a sneetch star-off machine.<br /><br />Apparently, a 5yo has a concept of type coercion, because (according to her):<br />2 -> [Mama] -> 3<br /><br />Some novel functions she came up with:<br />Dirty Dishes -> [DishWasher] -> Clean Dishes<br />Food -> [Dog] -> Poop<br /><br />Dual inputs can be done with colors:<br />Blue -><br />Yellow -> [Mixer] -> Green<br /><br />Rhymes are fun, but have amgiguous outputs. We argued about which is correct:<br />Grace -> [Rhyme] -> Face<br />Grace -> [Rhyme] -> Chase<br />etc.<br /><br />This ambiguity can be resolved by introducing state (ack!) into the machine (a machine that remembers). For example, re-use the first letter of the last transformation:<br />Bat -> [Rhyme] -> Cat<br />Tall -> [Rhyme] -> Ball (re-use the B from Bat)<br />Hop -> [Rhyme] -> Top<br />etc.<br /><br />Projection is not allowed:<br />"What happens if we put one machine into the slot of another machine?"<br />"That's silly, Daddy!"<br /><br />All in all, lots of fun.Mitch Blevinshttps://www.blogger.com/profile/09476167560094979019noreply@blogger.comtag:blogger.com,1999:blog-34927953.post-11468570058207063262009-05-20T22:23:27.020-07:002009-05-20T22:23:27.020-07:00just another thought ...
and if we're talking tea...just another thought ...<br /><br />and if we're talking teaching "how to think like a programmer, engineer, scientist, etc" then is it helpful to get so specific, or does it give too much weight to the abstract when, in the end, all we really want is control over our environment? <br /><br />natural curiosity and experimental method go hand in hand when you're around kids. i'd challenge us as adults to do something kids think is freaky neat then trick them into learning something while we have their attention. say robotics, as Ankur suggests above, or, along the same lines, instructables.com, makezine.com, etc. <br /><br />there's some ridiculous stuff you can do for under $0.50 like LED Throwies http://tinyurl.com/28u44vsherifhttp://public.amgando.orgnoreply@blogger.comtag:blogger.com,1999:blog-34927953.post-52884038545872091732009-05-20T22:22:01.445-07:002009-05-20T22:22:01.445-07:00seems no one has mentioned Alice yet so check this...seems no one has mentioned Alice yet so check this out: http://www.alice.org and there's a 12 minute walkthrough on the same site here (see 2nd video): http://tinyurl.com/3a9ru2. good stuff.<br /><br />if we're talking teaching "programming" then wouldn't examples exploring data, decisions and loops cover it pretty well at this level instead of arithmetic? your boxes, the Dr. Seuss reference, etc. all work for those 3 topics: say data are the sneetches, boolean is hasStar? and loops is lotsa sneetches gettin' stamped. could be introduced gradually, ie. not in one sentence like i did here.sherifhttp://public.amgando.orgnoreply@blogger.comtag:blogger.com,1999:blog-34927953.post-54723075319082422952009-05-20T21:08:17.293-07:002009-05-20T21:08:17.293-07:00Dood, great post. You really have something here....Dood, great post. You really have something here... the basis for a kids book or a cool iphone app, maybe? Stick with this.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-34927953.post-21854405841255719992009-05-20T19:16:54.355-07:002009-05-20T19:16:54.355-07:00Iteration! Recursion! These are things your buddin...Iteration! Recursion! These are things your budding programmer should learn, and are the basis of most programs. Recursion is obviously a difficult concept to understand, but with the right metaphor, you should be fine!Deanhttps://www.blogger.com/profile/02460119335568304337noreply@blogger.comtag:blogger.com,1999:blog-34927953.post-19269058874744659212009-05-20T17:53:13.945-07:002009-05-20T17:53:13.945-07:00Jack,
The reddit folks should not get so mad abou...Jack,<br /><br />The reddit folks should not get so mad about the Dr. Seuss example. You aren't creating a machine which is modifying its input. No, you are creating a machine which returns a Sneetch in the Star Bellied monad!cjhnoreply@blogger.comtag:blogger.com,1999:blog-34927953.post-26153558413261735952009-05-20T16:58:46.334-07:002009-05-20T16:58:46.334-07:00There is a way to teach programming in high school...There is a way to teach programming in high schools that is similar to how you have been doing it, though with fewer number-based exercises and more image composition exercises. You want to look at <A HREF="http://drscheme.org" REL="nofollow">DrScheme</A> and the book <A HREF="http://world.cs.brown.edu" REL="nofollow">How to Design Worlds</A>.Guillaumehttps://www.blogger.com/profile/00722827827627546541noreply@blogger.comtag:blogger.com,1999:blog-34927953.post-204949822117271102009-05-20T16:50:29.604-07:002009-05-20T16:50:29.604-07:00When you get to monads let me know. I figure that...When you get to monads let me know. I figure that maybe an explanation that works for an eight year old can help me.<br /><br />Or maybe I'm having so much trouble because I'm NOT an eight year old.Jimhttp://shallowfij.appsot.comnoreply@blogger.comtag:blogger.com,1999:blog-34927953.post-35919313052074190182009-05-20T16:40:06.948-07:002009-05-20T16:40:06.948-07:00Actually I kinda screwed up my examples, but the i...Actually I kinda screwed up my examples, but the ideas there...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-34927953.post-24000159866455983812009-05-20T16:38:27.970-07:002009-05-20T16:38:27.970-07:00I think you could bridge to machines that create m...I think you could bridge to machines that create machines by first teaching variables using the (?) symbol with sets of machines. Kids know (?) represents an unknown, but can be confused if letters are introduced poorly; school will do that badly soon enough. Then you have:<br /><br />(?) := +<br /><br />5 --> [?] --> 8 --> [=] 13<br />becomes<br /><br />(?) := { +, -, * }<br /><br />8 --> [?] --> 5 --> [=] { 13, 3, 40 }<br />then<br /><br />(?) := ^2 +<br /><br />4 --> [?] --> 5 --> [=] 21<br /><br />...err, my example is a little messy, but I think variables will get you where you want to go. Also, it looks like you have great intuition on this so you can clean it up if you like the direction.<br /><br />Great Job :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-34927953.post-80696951721889620532009-05-20T15:41:59.994-07:002009-05-20T15:41:59.994-07:00Be careful, you might end up teaching kids ascii a...Be careful, you might end up teaching kids ascii art instead.Anonymousnoreply@blogger.com