From Psychology to Logic: Learning Computer Programming in the Kitchen

From Psychology to Logic: Learning Computer Programming in the Kitchen
English


Instructors

Tanzeela Ali
Student in Computer Science
Superior University
Lahore, Pakistan

Lesson Feedback

Introduction

This lesson focuses on the biggest problem faced by any young programmer - i.e. the LOGIC BUILDING required while solving a particular problem. With programming, the solution to a particular problem lies in the head, but one is unable to convert it into a computer program. This is because the thought processes of a human are much faster than the sense of observation. If this thought process could be slowed down, logic to solve a programming problem could be found very easily. This lesson focuses on converting this psychological thought process in a step-by -step logic fashion that a computer program can understand. This lesson is recorded in a kitchen where the basic programming concepts are taught by giving examples from the process of making a mango milk shake. This lesson teaches the 4 following techniques: 1) Swapping two variables by swapping a glass of milk with a glass of crushed ice; 2) Finding max from an array by finding the biggest mango; 3) Sorting an array by arranging the jars; and 4) Understanding the concept of a function, parameters and return type by comparing it with the blender/juicer. The lesson targets those students who know the syntax of programming in any language (C or GWBASIC preferred), but are unable to build the logic for a program. It can be taught in a class of 45 to 50 minutes.

这节课聚焦在任何一个新手程序员可能面临的的最大问题-例如,当解决一个具体问题时所需要的逻辑构建。编程时,一个具体问题的解决方案基于头脑的思考,但是,人们却不能把它转化为计算机程序。这是因为人脑的思考过程要比感官观察快得多。如果思考过程能够慢下来,用来解决编程问题的逻辑就会很容易得出。这节课的重点在于把思考过程转化为电脑易于理解的一步一步的逻辑形式。这节课在一间厨房里录制,在那里,以制作一杯芒果奶昔的过程为例,来讲解基本的编程概念。这节课教授了以下四个技能:1)通过交换一杯牛奶和一杯碎冰的例子来学会交换两个变量;2)通过找出最大的芒果来学会在一组数中找出最大值;3)通过排列罐子来学习排列一个数列;4)通过和搅拌器/果汁类比,理解函数,参数,和回车命令的概念。这节课所针对的是那些了解任何语言(最好是C or GWBASIC)的编程,但是对于程序的逻辑构建有一定困难的学生。这节课可以在45-50分钟内完成。

本授業は、若手のプログラマーなら誰しも直面する最大の問題に焦点を当てます。すなわち、ある問題を解決しながら必要となるロジックビルディングをすることです。プログラミングでは、ある特定の問題への解決策は頭の中にありますが、コンピュータプログラムに変換することができないのです。これは、人間の思考プロセスの方が観察感覚よりもっと速いからです。もしこの思考プロセスのスピードを遅くすることができたら、プログラミング上の問題を解決するロジックは大変容易に見つけられます。この授業は、この心理学上の思考プロセスを、コンピュータプログラムが理解できるような段階的なロジックに変換することを中心に行います。この授業は、台所でマンゴーミルクシェイクを作る過程を例に取ることによって基本的なプログラミングの概念を教えます。この授業では、以下の技術を教えます。1)グラス1杯分の牛乳とグラス1杯分の砕いた氷を交換することで二つの変数を交換すること。2)最大のマンゴーを見つけることで、配列から最大を見つけること。3)瓶を配置し直すことで配列をソートすること。4)ブレンダーやジューサーと比較することで、関数、パラメーター、戻り値の型を理解すること。この授業では、どのコンピュータ言語でも(CあるいはGWBASICが望ましい)プログラミングのシンタックスを知っているが、プログラム用のロジックをまた組めない生徒を対象としています。45分から50分の授業で教え終えられます。

Instructor Biography

Tanzeela is a student majoring in Computer Science at Superior University in Pakistan. Learning and teaching are her two most favorite jobs. She loves programming and mathematics and currently works as an associate software engineer at "i2c inc".

Tanzeela是巴基斯坦苏比略大学计算机系的一名学生。她最喜欢的两件事就是学习和教书。她喜欢编程和数学以及目前她在"i2c inc"作为一名副软件工程师所做的工作。

Additional Online Resources

Scratch
Scratch is a project of the Lifelong Kindergarten Group at the MIT Media Lab. It is designed especially for ages 8 to 16, but is used by people of all ages. Scratch helps young people learn to think creatively, reason systematically, and work collaboratively — essential skills for life in the 21st century.

Khan Academy: Intro to JS: Drawing & Animation
At Khan Academy, students can use the Academy’s programming environment to build graphics, animations, and interactive visualizations. The site contains many tutorials on how to program.

Learn to Code Part III: Arrays and Logic Statements
This site is provided by Lifehacker and presents the lesson, Learn to Code Part 3: Arrays and Logic Statements

 

Scratch
Scratch 是MIT 多媒体实验室终生幼儿园组的一个项目,它专为8到16岁的人群设计,但是可以被各个年龄的人使用。Scratch帮助青少年学习创造性思维,系统性推理和团队协作精神——这些21世纪生活的基本技能。

Khan Academy: Intro to JS: Drawing & Animation
在Khan学院,学生能够运用学院的编程环境来制作图表,动画以及互动性的视觉作品。这个网站包含了许多如何编程的教程。

Learn to Code Part III: Arrays and Logic Statements
这个网站由Lifehacker提供并呈现了一节课,学习编程Part3: 数列和逻辑语句。