Daniel Von Fange

Life, Code, and Cool Stuff

Learning Programing With Fairy Tales.

Last week, my little sister asked me to show her how to program - she wanted to write her own random fairy tale generators. She learned quickly, and had the skills she wanted in about an hour.

I picked JavaScript as a good beginner language (it just beat Ruby - since with Javascript she could easily put her code on a web page and show others her work). We both opened up a shared document in SubEthaEdit, and activated web preview. As either of us typed, the final result of the JavaScipt program showed in the preview. It was a great way to teach, and to learn.

We ran though all kinds of things about variables, objects, and arrays. We used fairy tale variable names:

She has decide that camelCasing variable names is ugly, so she writes her variables LikeThis.

I did not show her functions, or control structures yet. When she wants to do something she can’t do with her current knowledge, that will be the time to learn new things.