有没有一些有意义的百分比的学生谁不能学习编程?

Ben I. 10/30/2017. 17 answers, 21.591 views
struggling-students

几天前,我有一个高中二年级学生(现在是第三个CS班,已经通过了前两年)看了这个Java代码3-5分钟,并且无法弄清楚它做了什么:

int answer = -1;
while (answer < 1 || answer > 5){
    System.out.println("Please enter a number from 1 to 5.");
    answer = myScanner.nextInt();
} 

她无法确定循环的结束条件,并不明白为什么answer最初设置为1-5范围之外的数字。 她需要理解这段代码的理解,由另外一位老师在上一节课中讲述,而第二次来自我的第一个原则。

我不特别需要这个学生的帮助。 我会辅导她,给她额外的工作表。 她几乎肯定会一路顺风,但如果过去是一个很好的指标,她可能永远无法把它放在一起,没有一些外界的帮助,更大的项目是不可能的(我会确保她收到)。

然而,每年我都会找到一小部分似乎不明白的学生。 他们通过了,但是随着他们四年的过去,CS的重大计划变得越来越困难。 Must it be this way?

有没有证据或理由相信有学生真的不能学习编程? 或者,回答这个问题, 是否有任何证据或理由相信每个学生真的可以学习编程?

5 Comments
15 chrylis 10/30/2017
一个值得注意的观点是Joel Spolsky对于指针和“得到它”的看法我已经认识到,理解C语言中的指针并不是一种技能,而是一种天赋。
7 Cort Ammon 10/30/2017
我将不得不挖掘答案,但这样的问题以前被问到。 评论和答复指向一个研究,一个教授创造了一个“测试”,以确定你是否永远“得到它”。 他证明这是一个很好的测试。 许多年后,他回来说:“我很抱歉,我宣称这个测试是有效的,事实上并没有。”
17 Ben I.♦ 10/30/2017
@CortAmmon也许你指的是臭名昭着的骆驼有两个驼峰 ,它的部分撤回
7 Andrea Lazzarotto 10/31/2017
“一定是这样吗?”是的。 和数学一样,弹钢琴什么的。 每个人都有不同的智慧。 有些是数学导向的,有些则不是。
14 Ben I.♦ 10/31/2017
@Lynn我同意代码可以更清楚,但它还不是很复杂。 在Java中学习多少课程后,有人不能遵循这个代码片段仍然是合理的,尽管它可能是不完美的? 20? 100? 500? 万?

17 Answers


Buffy 10/30/2017.

学生don't学习的原因有很多,但是为什么学生don't学会非医学的原因。 撇开医学原因,例如荷尔蒙失调或其他疾病,我认为不学习的学生过去没有什么学习的愿望,或教学不好。 即使有学习障碍的学生,也可以学习既定的愿望和耐心的教学,但是要使学生能够学习很多的工作和理解。 曾经与学生共同的问题是极度内向。 这可能使学生难以寻求帮助和提出问题。 如果你能找到方法来帮助学生以积极的方式处理这个问题,那就太好了。 看到这个问题更多关于这里的想法。

欲望

有些学生不知道你在教什么,因为他们很少有学习的欲望,也没有动力去投入工作。 他们可能因为错误的原因而在你的课程中,如果只有可能的话,宁愿在其他任何地方。 他们把时间,但没有别的。 你可以为他们做很多事情,因为这个愿望需要在内部。 有些学生经过一段时间的冷漠后才发展出欲望,但我不认为这很普遍。 我在CS大学里只有大学生,因为他们的家庭(父亲)只有留下来才会支持他们。 如果可能的话,这样的学生可以被辅导学习更有趣的东西,即使除了计算之外还需要这样做。 更好的是,如果你能够劝告父母更好地支持他们的孩子。

当然,有些课程是必需的,所以一些课程的兴趣会更高,有些则会更低。 如果你知道学生的目标,你可能能够把目前的课程连接到这些目标,增加兴趣和渴望。

教学不善

许多学生由于教学不善或冷漠而在CS中表现欠佳(如数学); 尤其是一些教师认为可以留下一些学生的态度。 并不是每个学生都要花相同的努力来教学,每个学生的学习方式都不一样。 我在这种情况下的口头禅是“你的学生不像你”。 他们的学习方式与你做的不同。 你作为教授在教室里的存在已经足够证明你是一个特例。

有些特别聪明的孩子在学校做得不好,因为他们很无聊,没有什么是令人兴奋的to them付出了努力。 有些学生发现其他学科特别容易,并不知道学习是什么样的。 有些学生不学习,因为没有人教过他们how to learn 。 有些人认为听到某种东西意味着他们已经学会了这些东西,而当他们不记得某些东西时,他们会感到惊讶,因为他们想知道为什么你从来没有把它教给他们。 有些学生对于一个小小的事物有一个根本性的误解, 有些学生从来没有积极的学习经历(也许一般,也许只是在一些话题上),而且只是讨厌这个过程的一切。 有的老师对学生说难以置信的愚蠢的东西,甚至有的机构对学生的处理方式非常愚蠢,积极地对学生造成伤害。

我在这些事情的学习和教学背景中都有例子。

作为一名学生,我小时候觉得不是很明亮,几乎被“拒之门外”重复上一年级。 不过,我只是对学校感到无聊。 从来没有人打扰告诉我为什么我在那里,为什么或者我该如何努力取得成功。 很无聊,我是一个麻烦制造者,导致缺乏教师的支持。 之后,我接受了智商测试,结果报告给我的是“你可能有能力在一所初级学院取得成功,但可能只会被完整的本科课程所挫败”。 当然,我后来获得了博士学位,所以评估是有点“关闭”的。 在HS中,我实际上学到的第一个课程是Plane Geometry。 我被那里的问题所困扰。 在此之前,数学也许是我最糟糕的话题。 当然博士学位是数学的。

在教学中,我曾经有过一个有两个问题的学生。 首先,他正在死于一种慢性疾病,而且还被一些早期的老师误以为操作者的优先性,他用一个太简单的计算器加强了他的优先性。 他似乎无法在初级程序设计中学习,并学会了憎恨它。 他以为自己很愚蠢,他没有get it ,他认为他的所有老师也认为他是愚蠢的。 我想我还是设法在他死之前说服他,但是在他的困难的原因变得清楚之前,我们碰了一下头。 花了一点时间才能说服他,我并不是在积极试图欺骗他。

我曾经有一班几乎都做得很差的学生。 由于我的教学方式是面对他们,而不是背对着他们讲课,诊断非常简单。 从来没有人教过他们如何在教室里学习。 他们被动地坐着,听,看,不采取行动。 我问他为什么不记笔记,他指着他的头说:“都在这里。” 那么,我有其他的证据,所以不得不中断教学大纲,实际上教他们如何学习,并迫使他们真正做到这一点。 我在本网站的另一个答案中讨论了部分方法。

解决方案

如果你想教每一个学生 ,但是,你需要know every student 。 如果有人做得不好,你需要试着去理解为什么这样做,并根据他们的需求量身定制解决方案。 要做到这一点,你需要处理合理数量的学生,当然,如果你是800名学生的教授,个人的关心必须由你的助手的军队给予。 但即使机智20左右的学生,你需要帮助。 这就是配对和小组工作如此重要的原因,为什么你不能总是让学生选择自己的小组。 你需要从小组成员那里得到反馈(同伴评估),你需要找到方法来处理你所学到的东西。

教导每个学生的解决方案不是单独地教导每个学生,而是要找到方法让每个学生都能学习他们需要学习的东西on their own terms. 不是每个学生都想获得第一分。 他们想学习“就够了”。 他们satisficing而不是optimizing 。 你也可以为他们做这个工作,所以“不赚头”并不意味着“失败”。

成功的故事

我曾经有两个学生(编译器课程),在失败后重复课程。 这两人的同学一般都是我在一个小组中所拥有的最好的。 但是,这两人似乎从来没有在CS的积极经验。 他们似乎很沉闷,需要反复解释最简单的想法。 幸运的是,课程以渐进式的方式进行授课,学生可以积累积分,而不是在考试中表现出来:项目课程。 我说服他们到我办公室的时间,此后再也没有一次他们不在那里。 幸运的是,其他学生不需要这么高的维护费用。 我也有简单的方法让学生在自己工作的时候提出问题,所以只要他们需要,他们可以得到小的帮助。 结果发现,这两个结果(a)在课程结束时正确地解释了我(b)获得了这个学期的最高成绩,(c)激怒了那些认为我把这两个人放在上课让自己看起来不好。 我最后一次与他们的联系是提醒他们他们做了什么,如果他们愿意投入相同数量的工作,他们可以在别处重复这一点。 我认为团队合作在这里也有帮助,他们彼此支持。 请注意,我不需要花费额外的时间来完成这个过程。 办公时间是必需的,问题邮件列表是我所有课程的共同特点。 另一个问题在于寻求使这种不寻常的沟通变得容易的方法,但是我认为现在需要更好的答案。

5 comments
28 KRyan 10/31/2017
这也缺乏任何证据。 你可能会think “不学习的学生过去没有什么学习的愿望,或者过去的教学不好”,但是你能否用一些证据来支持这种说法呢? 我已经读过与这种说法相悖的证据,尽管这种说法远没有任何铁证,但我认为这个问题迫切需要的不仅仅是普遍性和可能的​​想法。
3 KRyan 10/31/2017
(在这里做一些尽职调查)似乎我读过的论文表明,他们有证据表明,不是每个人都可以学习计划的证据已被撤回,夸大其结论。 However ,你可以在这里看到撤回 - 但仍然不是极大的鼓舞。 这说明收录的论文中的大量数据是真实的,如果对这些数据提出的解释缺乏足够的证据,我们仍然留有一些我们不知道的原因。
2 KRyan 10/31/2017
简而言之,我强烈建议您再次找到实际的研究和证据来证明您对标题问题的答案是“不”。您只是断言,然后进入所有的假设,为什么学生失败,尽管缺乏注定要失败的人口。
20 Buffy 10/31/2017
实际上,教了大约45年,我的样本是> 10K。 每个学生当然都是一个轶事,但也有很多。 既然我也教过不同的地方,我想我已经看到了大部分的可能性。
1 Carl Christian 10/31/2017
@Buffy:我爱你的回应。 我现在讲课,我的第一个助教是21年前的工作。 你没有说出一件从个人的经验或从我的父亲那里听不到的东西:)

nova 10/31/2017.

也许。 很难证明一个消极的。

知道如何以任何方式帮助教育工作者?

如果这种知识有所帮助,那么这与那些信仰可能有害的所有方式相比如何呢?

  • 放弃“不能得到”的学生
  • 不反思教学如何改进,因为失败的人“不会得到”
  • 在“不明白”的学生中注意“模式”

有一些私人的学生,我有严重的疑虑。 重复的解释没有进行。 追踪之后的痕迹是缓慢和费力的。 然后...以后...最终...他们知道了。 明年他们通过了课程。 后来他们找到了一个程序员的职位。

我意识到I just can't know 。 学生们回来把它们放在一起。 如果我分享了我的判断,就会完全失去成功。 我只能帮助每个学生尽我所能。 这包括相信每个学生都有能力学习编程。

5 comments
8 Ben I.♦ 10/31/2017
这是一个令人惊讶的实际答案。
1 kubanczyk 10/31/2017
这个回答说,无论你尝试多少错误的预测(模式或其他),你都无法预测可观察到的数量X.像以往一样。 所以基本上说科学是行不通的。
17 Michael0x2a 10/31/2017
@ kubanczyk - 来吧,不要自相矛盾,答案并不是说“科学不行”或任何愚蠢的东西。 相反,这个答案是说,无论预测的价值是什么,教育工作者要做的最好的事情就是帮助所有的学生尽其所能。 所以,既然预测的结果不会(至少不应该)影响你的教学方式,而且由于预测是困难的,为什么还要花费精力去担心呢?
5 Mehrdad 11/01/2017
我觉得你在这里有点太天真了 如果A人需要10倍的工作量才能在学校“获得”B人的主题X,那么在工作中就会有和学校一样的不平常的机会。 这意味着雇用他们从事这项工作可能对他们和雇主都不利。 当他们被雇用时,你不会期望看到这个,因为他们可以(而且应该)已经花费了10倍的时间来成为像所有其他人一样好的申请。 但是他们认识到这一点对他们来说可能是有用的知识:他们可以尝试做一些他们擅长的事情。
2 nova 11/01/2017
@Mehrad我认为你假设每个人都有编程主题的固有学习率。 我不认为学习科学支持这一点。

Ben I. 11/01/2017.

正如我在问题中指出的那样,我的经验是,有些孩子似乎从来没有出现过。 我的数据来自一个相当小的团队(肯定在我的职业生涯中,有1000个孩子正在学习CS),而@ Buffy的想法是,这些学生是satisfying而不是optimizing可能是正确的。 但是,我还没有看到有说服力的证据。 我有什么证据呢,虽然可能是不科学的,但事实上,确实有这样的学生,他们的大脑根本就没有连接到这个领域。

看起来情况是,他们付出了巨大的努力,可以获得一些非常基本的能力,但这些材料并不适合他们的思维方式,就像不是每个人都能感受到音乐的某些方面一样。 (见聋哑人和4%的先天性色情人类)

重要的是要指出,我not说这种音乐残疾的人不能学习音乐, 相反,我认为音乐的高度(如与专业音乐家有关)可能永远不可能实现 。 还值得注意的是,4%不是一个非常低的数字; 在教学生涯中,会遇到许多有这样的障碍的学生要克服。

编程需要大量的排序能力,非正式理解(和保证)后置条件的某种直观能力,以及同时理解多个抽象层的能力。

因此,在正常的能力分布范围内,有理由认为将会有一个(而不是非本质的)一些会对这个主题产生巨大困难的人。 而且,类似于音乐,可能并不是他们无法学习编程的任何特定方面,但是,无论他们工作多么艰苦,他们可能永远都不能真正能够把所有的东西放在一起。

5 comments
1 Buffy 10/30/2017
我承认有些人有“巨大的困难”。 但这不是“不能学”的东西。 问斯蒂芬霍金困难。 我也承认我没有音乐的能力。 但我也没有欲望。
6 Douwe 10/31/2017
我作为一名开发人员(主要是教授实习生/小辈,也是我们当地单身人士的探索老师)的经历是,你击中了正确的头部。 在我看来,与音乐能力的比较是显而易见的。 我倾向于给这些学生同样强硬的爱,我的吉他老师给了我:如果你喜欢它,一定会继续下去,但是如果我在哪里,我会寻找其他的职业。 也许他们会“最终”学习,“困难重重”,但是你提到的那个学生永远不会被雇用,因为我们重视“学习速度”而不是实际知识。
6 J.R. 10/31/2017
+1“布线”。 我没有那么多的数据点(只有20多个),但是我曾经教过“非CS专业的编程入门”,这是我所教过的最具挑战性的课程 - 不是因为材料太硬,而是因为太多学生们很难掌握基本概念。 班上有三组:从第一天开始编程的“自然”; 与“ Hello, World ”一起奋斗的“迷失”,随着课程的进展而更加艰难地挣扎; 和那些一开始就挣扎的“学习者”,但最终还是拐弯了。 (我的学生中只有一个是学习者。)
SGR 11/03/2017
我可以讲学习欲望和无能为力的结合。 我无法保持调。 事实上,我只能说一个音符比另一个音符更高或更低,不能超过这个音符。 但是我仍然演奏了单簧管多年。 我唯一的意见是,如果其他人告诉我,我根本没有能力告诉自己。 我努力学习,但是看起来根本不能听到一个音符是不是和谐,音符是或不是。
3 SGR 11/03/2017
我拥有所有的演奏乐器的机制,我无法知道我所演奏的是否是正确的。 以同样的方式,我可以看到一个学生理解程序的所有部分,但却不能理解整个程序的意义。

mamcx 10/30/2017.

考虑这可能是Java的问题。

如果你的第一语言是APL,许多失败...是学生或APL的反映?

另请参阅:

http://lambda-the-ultimate.org/node/5481

Haskell是教授函数式编程原则的正确语言吗? 没有! (如西蒙·汤普森解释。)

我学习了几十种语言,并且教了一些。 当然,有些语言在其他语言不成问题的时候肯定会有问题。


我的宠物理论? 我认为,如果我们接受大多数软件包括编程语言在内的设计都poorly designed ,那么用户不仅要学习如何使用程序(语言),还要努力去解决(糟糕的)设计和下面真正的设计。

5 comments
2 Ben I.♦ 10/30/2017
欢迎来到计算机科学教育工作者 ! 我希望我们今后能听到更多的消息。
5 Mark 10/31/2017
我同意教学编程有“错误”的语言。 但是,如果能够发展出一种“正确”的语言来让任何人学习编程,我预计在过去的半个世纪里,寻找它将会产生至少一些成功。
4 mamcx 11/01/2017
确定它不存在? 帕斯卡或蟒蛇呢? 需要注意的是,“语言教学”的选择是由“必须是行业标准”的观念驱动的,有些地方已经被多年前使用的旧语言所取代,变得流行起来。 所以我不确定这是否被证明。
3 Graham 11/01/2017
如果代码片段使用了Java的一些不太重要的部分,那么这肯定是真的。 然而,这很简单,任何理解一段时间陈述的人都应该能够回答。 而无法理解“在此条件成立的情况下继续运行此代码”意味着他们确实没有掌握代码的工作原理。
4 Mark 11/01/2017
@mamcx,是的,Pascal是作为教学语言创建的。 Python也是如此。 Basic也是。 所以是徽标。 AppleScript有“任何人都可以编程”作为目标。 维基百科列出了几百种其他语言来教人们编程。 然而,不知何故,人们仍然有困难。 也许这不是问题的语言?

KRyan 10/31/2017.

我坚信,除了真正的弱智之外,任何人都可以学习编程。

但是,这纯粹是一种信念, 一个信仰的问题。 它部分地被一些心理学知识和学习过程所知,但在这些事情上,我至多是一个业余爱好者。

不幸的是,现有的证据并不能证明任何人都可以学习编程。 虽然臭名昭着的“骆驼有两个驼峰”的文件已经撤回 ,但撤回本身并不是令人鼓舞的:根据撤回,根本的数据仍然是有效和真实的。 从这些数据中得出的结论太强大了,特别是实际的“骆驼”网页文章这样传递了太多的声明,甚至超过了这一点,但是数据仍然存在。 它提出了一个问题,撤回只是说我们不知道是什么原因造成的,而不是它不存在。

此外,该论文还援引了许多其他人声称在计算机科学方面的普遍低学术成就:它不是一个人在that说法。

因此,我的结论基本上是这样的:我可以很希望所有的学生都能学习编程。 但是,现有的证据表明,如果没有别的办法, 我们还没有学会如何teach所有学生学习编程。 这是否是因为可以做,而我们还没有搞清楚,还是因为做不到,似乎仍然是一个悬而未决的问题。

所以我会建议所有的计算机科学教育工作者试着留意这里的艺术状况,并愿意尝试新事物。 现状似乎还不够。 当然,有一个人cannot学习编程的科学,所以即使这可能是真的,现在放弃那些正在失败的人还为时过早。

2 comments
Ben I.♦ 10/31/2017
你可能是这个领域的业余爱好者,但这是一个完美的分析。 欢迎来到计算机科学教育工作者
Shane 11/07/2017
+1。 非常难过地看到唯一的答案,试图把实际的数据,以教育工作者如此之低。 我不会认为这是一个基于信仰的社区。 可耻:(

Flater 10/31/2017.

然而,每年我都会找到一小部分似乎不明白的学生。 他们通过了,但是随着他们四年的过去,CS的重大计划变得越来越困难。 一定是这样吗?

这样想:

地球上的外星人的土地。 他看到一个人,遇到另一个人。 第一个人翻转第二个人。 作为回应,第二个翻转第一个。
外星人继续与世界领袖,科学家,哲学家见面......每当他遇到某个人时,他都会把他们赶走。 把他们赶走后,外星人的行为是完美的,他没有犯任何其他错误。 No one corrects the alien ,因为他们明白他的文化意识并没有意识到他们的意思,并且他们明白这个外星人正试图打个招呼。 由于外星人能够友善,所以没有人真正被激励来解决外星人所犯的一个错误。 这似乎挑剔。

在外国人与外交人员(和外交思想人员)会面之后,他最终会在对外国人的文化遗忘不甚了解的情况下结束。 外星人开始注意到,即使他仍在试图用人的问候,人们对他的反应也不那么友善。
随着时间的推移,外星人越来越努力地保持与人类的友好关系。 几年后,他终于失败,最终与一个愤怒的人打架。

这个不称职的学生,就像外星人一样,起初处于一个几乎没有错误的位置(第一年只用简单的例子,外星人只是遇到外交思想的人)。 学生/外星人的缺陷不足以使测试/对话失败。
但是随着学生/外星人队伍的进步,情况变得越来越难(例子越来越少,外交人员越来越少)。 最后,学生/外星人的错误足够重要,以至于他们阻止了一个好的结果,这就是学生/外星人第一次失败的地方, 尽管他们一直犯同样的错误

作为一名学生,仅仅是somewhat无能就是一个诅咒。 如果你完全没有能力,那么老师会专注于你,并确保你做对了。 但是,如果你陷入“不够好但足够好”的领域,那么你可能永远不会受到你老师的关注(因为他们把重点放在有更大问题的学生),你永远不会被告知你重做是错误的。

当没有人告诉你你所做的是错误的,那么你不知道你所做的是错误的(或可以改进)。


有没有证据或理由相信有学生真的不能学习编程?

是和不是。

每个人都有capable学习编程,但不同的人会有不同的intuition ,会learn things at a different pace


在大学里,我学习了数字艺术和娱乐。 这个课程在当时是世界上独一无二的,因为它既是艺术设计(概念艺术,徒手画,3D建模)的完整课程,也是技术游戏开发(编程,涉及复杂的几何数学)。

我们班有两个非常清晰的小组:艺术家和分析家(我在后一组)。 艺术家们毫不费力地通过艺术课程,而是需要一步步地学习编程,而且似乎从来没有真正直观地理解某些东西(如int division),而没有经过一次又一次的复杂解释。

而另一方面,分析师则是通过编程课程,但是通常不能设计或绘制任何中等大小的作品,尤其是与艺术家相比。 他们不得不多次重做徒手透视画,而艺术家第一次设法正确,然后有很多时间去改善他们已经成功的画(因此创造了更多的艺术之间的差距)艺术家和分析师制作)。

这个课程无可辩驳地向我证明,有些人与别人不同。 看到每个班级都会发生这种情况是非常明显的。 在艺术课上夸大我的人需要我在编程课上的帮助,反之亦然。

在我一年开学的300名学生当中(我已经省略了中途放弃的学生,300名学生参加了第一年的期末考试), 8成功通过了所有课程。 几乎每个人都被艺术或编程所困扰。

这是我第二次上大学,我不得不承认,在读学生的百分比远高于其他课程。 闲暇时间少于10%,大多数人都在设计夜景(无论是游戏还是艺术,无论他们是谁)。

看到不到3%的学生通过艺术和编程班证明了这一点。


没有

但是又有八名学生成功通过了。

我个人知道其中3个。 一个在课程之前没有编程,另外两个从来没有艺术倾向。 所以有possible学习一项技能,即使它几乎完全正交于你当前的技能。

我也坚信,如果某人不了解某事, 没有向他们解释这个问题,或者他们没有为自己找到足够的动力。


你需要调查无知。

就目前的例子来说,这确实意味着我们应该调查一下她不了解的内容。

她无法确定循环的结束条件

这里有一个无知的“光谱”。 找出哪一个适用于这个学生很重要:

  • 她是否知道一般情况下会用到什么? (不管为什么它在这个特定的例子中被使用)
  • 她是否知道这是一个结束条件? (不管具体情况是什么)
  • 她是否知道这是一个布尔评估? (不管被评估的是什么)
  • 她能否解释评估(评估一个数字是否大于另一个数字),而不是两个评估的综合意图(评估数字是在一个下限和上限之间)

根据哪些描述她的情况(或者我没有列出的),你可以努力填补她的知识空白。

以我大学的例子来说,如果她有一个艺术家的思维方式,她可能永远无法intuititively理解代码,并把它看作第二语言,但是如果付出足够的努力,她应该能够最终确定发生了什么。


如果没有这个对你的个人攻击 ,我认为重要的是要考虑到,当一个老师认为一个学生不能做某事时,这也可能意味着老师是incapable of teaching it
作为老师,你永远无法确定它是哪一个。

这是催款克鲁格效应的变化。 如果运用效果的原则,那就意味着教师对学生无法学习的评价可能只是一种误解。 老师不知道如何有效地教授这个学生,因此认为学生是有缺陷的,而不是自己的教学能力。

This can be subconscious ,对老师也不是恶意的。


从我在编程教学(以及被教授编程)方面的经验来看,衡量学生技能和教他们如何阅读代码最有效的方法就是玩breakpoint guessing game

本质上,在代码中放置一些断点(如果需要,可以在每一行上),启动程序,让学生试着predict下一个断点是什么。
注意:这很容易游戏化。 人们喜欢赌博,所以让他们赌注结果教导他们弄清楚结果是什么。

对于一个学习能力很差而又没有得到的学生(如你怀疑这个学生),你会期望无法做出任何合理的预测,或者不断地说下一步是无法预测的。

通过整个程序。 Keep repeating the same code over and over again, until she makes accurate predictions ( even if she's only reciting it from memory rather than understanding).

Once she is able to recite the steps, change one thing in the code (eg one of the numbers in the while condition). Repeat the breakpoint guessing game.

If she actively disagrees with what you say the next breakpoint will be; that's a really good thing. This means that she has an opinion about the flow of the code. Ask her to justify her claims. Do not correct her, just get her to clearly express her own thoughts. Find the error in her claims, but don't point it out.
Instead of correcting her, show what the next breakpoint is. Ask her to explain why the outcome is different from what she said. Only explain things once she gives up with explaining, or is clearly saying random things and hoping to get lucky.
As a software developer, I notice every day how often I spend talking to myself about how the code is going to flow. This is a quintessential skill for a programmer. If you're too quick to explain, you're effectively preventing her from trying to think for herself. The idea is that she shouldn't rely on what others say, but rather try to find the answer for herself.

Every person should be able to understand the logical flow of a simple code snippet, given enough repetition of the guessing game. Every human is innately able to distinguish and recognize patterns (even if they can't do it intuitively).

Everyone is capable of learning programming, but different people will have different levels of intuition and will learn things at a different pace .

The only people who actually cannot be taught something, are the people who do not want to be taught something (or do not want to put effort in learning). As long as she wants to understand it, she eventually will.


2 comments
thesecretmaster♦ 11/06/2017
I really like this answer, thank you for taking the time to write it. I hope to see you around the site more!
Flater 11/06/2017
@thesecretmaster: You're welcome :)

Nile 10/31/2017.

Always try to explain it some other way.

Try it in another language - there are reasons why BASIC and Visual Basic are used as 'beginner languages', although I would look for 'teaching languages' that entrain a better understanding and good coding habits.

I would no more teach someone to program in Java than I would teach them to fly in an F-104.

However, this isn't about syntax and choice of programming language.

There may be some flaw in your logic, or a gap that you're skating over without even realising that there's an unaddressed assumption or assumed knowledge.

There may be some error in your student's understanding - some unstated assumption or 'gap' that she's filled-in incorrectly and internalised - and she might not be aware of it. If that unstated error leads to a dead-end, that's it: game over. The exercise has failed .

It would be entirely unsurprising that she isn't able to elucidate and express the 'blocking' point: you are working to develop this ability formal logic in your student and you are both well aware that it is developing from a very low base.

The question is: can you reframe the exercise in a way that might reroute you both around a problem that neither of you can identify?

That's enough on teaching technique from me. I coach something else entirely unrelated to coding - although I do coach and mentor my fellow-programmers - and you need to discuss this with your professional colleagues in teaching.

Now to address the more general question: are there students who simply cannot be taught to program?

I'm assuming we're discounting students who have a generally-poor intellectual ability, and that this is about intelligent and able people who have some specific cognitive impairment.

Dyslexic people may have difficulty and it isn't just 'they can't read'. They can interpret symbolic information, but layout and formatting are far more important than you realise.

There are people who simply cannot dial a telephone number or retype an eight-character code unless it is broken up into smaller groups - and you will empathise with them if I tell you to type in "1101110111111111101110111111101" on your keypad right now.

What if your code sample is wriggling in front of them, like ones that binary, and they cannot pin down extract the logic from this unusable and illegible text? It doesn't matter that it's perfectly legible and comprehensible to you, or even to ninety-five percent of your students.

Dyslexic people are very good at concealing their impairment, and at working around or under or over it. Often, so good at both these skills that they work out how to read all by themselves, despite the ineffective assistance of their teachers, and are never even aware that they have dyslexia unless they are tested by professionals.

And now they've met source code, which is another reading skill: text that conveys formal logic, and has none of the structure of spoken language. Or at least, not the structures that they have learned in their internalised implementation of reading.

Try the same problem in Python. And discover that there are coders who are fluent in slicing and never, ever, code a loop - not even in those rare cases where it really is the best way to proceed: I wonder why that is?

Be warned, dyslexic people are also very, very good indeed at spatial visualisation and logical abstraction: the mistakes they make as beginners, including the attempts they make to 'bridge' over gaps like unstated assumptions and assumed knowledge, can be incredibly convoluted. This will be especially true of the mistakes or 'blocks' that they cannot elucidate and explain to you!

It is in the nature of dyslexic peoples' unconscious (but highly-developed )strategies for reading (and, say, successfully associating names with faces) that they apply extremely complex abstractions to everyday problems without even knowing.

This isn't about dyslexic students: I'm using them as one example among many, of students who can program - and program very well indeed - but can be surprisingly difficult to teach.

There is, of course, dyscalculalia: a fundamental inability to perform arithmetic. Or so I'm told: I'm still sceptical, and I would classify these rare students as "people that a long line of increasingly-specialised teaching professionals are unable to teach arithmetic".

If it's real, it probably does have an analogy in a fundamental inability to program.

I am reminded that Bertrand Russell's wife, who spoke seven European and oriental languages fluently, and who was regarded by her husband, among others, as his intellectual equal, never understood the operation of canal locks: despite all attempts at explanation, with working models, by the most eminent engineers philosophers and professors of the British Empire.

So yes, you are probably right that some people will never program; and I am completely in agreement with JWZ's assertion that the extended abstraction required to 'get' pointers, rather than merely use them in a pro-forma way, is absent from all but a tiny minority of the human beings alive today.

A final point, and a deeply unpleasant one: you may have inherited the results of bad teaching in the student's past.

Be warned, some people who are labelled 'introverted' have been very, very badly taught and it is a common malpractice in bad teaching for girls to be conditioned, by a sustained campaign of extremely negative feedback, to step back and step out of a challenging problem that they are not 'expected' to be able to solve. They will have internalised this, and they will have been very thoroughly socialised in the skill of diverting themselves - and you - around that. And they will absolutely steer you around the dangerous confrontations inherent in considering the problem to be anything other than their problem, and their fault.

This is less common with boys but it exists: and the higher education institution that you work in is, perhaps, more of a place for people who have been encouraged or permitted to excel than the place where all excellent students can enter and reach their potential.

You may be very fortunate, with this particular student, to have been given an opportunity to undo that; and, whether this is the case or not, I am very pleased to hear that you have both the will and the resources to find out what she can really do.

3 comments
1 Mehrdad 11/01/2017
I think F-104 and Java is a bad comparison... the F-104 set lots of world records for speed and altitude and had a poor safety record... that sounds much more like C.
Faheem Mitha 11/04/2017
"I am reminded that Bertrand Russell's wife". I was curious about this anecdote, which I'd never heard of before. I think it mght be Russell's grandmother, not his wife. I got an hit on Russell's autobiography, which says "She never could understand how locks on rivers worked, although I heard any number of people try to explain it to her". It's possible one of Russell's wives has a similar problem, but it seems more likely you've read a scrambled version of this anecdote, or remembered it incorrectly.
Faheem Mitha 11/04/2017
From context, his grandmother would have been born Lady Frances Anna-Maria Elliot-Murray-Kynynmound, the second wife of Sir John Russell, once British Prime Minister. They lived in Pembroke Lodge.

ctrl-alt-delor 10/31/2017.

Nature vs Nurture

It seems that nature plays a large role: you can not teach a cat to code (even though they share approximately 90% of our DNA. However most of the variance between humans is probably nurture.

See Carol Dwecks word on growth mindset, for who some learn and some don't. Note that we can have a growth mind set in some subjects, but a fixed mind set in others, “I can't do maths.”, “I can't program.”.

Everyone (that can learn anything) should be able to learn to code at the level of you example. However not everyone will be excellent at it. I have taught a lot of pupils in year7 (UK), they can do this in scratch. Many of them that had good teachers in primary school, can do it when they arrive (see choice of language below).

Therefore help students to get a growth mindset.

Syntax vs Concept

Is the student struggling with reading the language, or with the underlying concepts? If the student does not know the idea of a loop, or the higher level idea of loop until successful. Then understanding the code will be very hard, it may even rely on discovering the idea.

Therefore ensure that students understand the concepts, before teaching a language. This can be done using «robot teacher/student», or other paper/acting/physical based activities.

Procedural vs Functional vs …

Are you teaching in the best language? What influenced your choice of language? Is it the best teaching language? vs Is it popular in industry?

Bertrand Myers has claimed in (I think) “A touch of class”. That it is easier and quicker to teach Eiffel then C# and Java and …, than to teach any one of these from the start. Yes he teaches his CS student all of these languages, but starts with Eiffel, as it is easier to learn (yet also more powerful that the others, and the only pure OO language that I have seen. It is also one of the languages where all the new ideas are coming from (see also lisp) ).

In a camel has two humps (an argument for natural ability, I won't go into why this research is not valid here, but there is one thing of relevance), it looks at mutating-assignment, and shows that student that don't get mutating-assignment struggle to program.

Therefore teach mutating-assignment last. Eg functional, but you can do functional in any language.

Is this semi-functional program easier to read?

do {
    System.out.println("Please enter a number from 1 to 5.");
    myScanner.next();
} while ( myScanner.currentInt() < 1 ||  myScanner.currentInt() > 5 ) 

This code snippet uses «Command query separation», that is every method is ether:

  • a command that does something but does not return anything (a procedure), or
  • a query that returns something but has no side affects (a function).
1 comments
kubanczyk 11/07/2017

Ted Delezene 10/30/2017.

I'd like to preface this by stating that I am not an educator, and thus have had no formal training, however I have had experience while working on my undergraduate in computer science helping people to code. Then after I graduated I helped my wife through an informatics degree in which she had to take programming classes, and I found the following article to be very insightful, and actually described the problems my wife was having quite clearly.

https://blog.codinghorror.com/separating-programming-sheep-from-non-programming-goats/

Now her goal was to just pass the class, as she had no intentions of moving on to any sort of a programming degree, and I'm sure that contributed somewhat to her continued difficulty with the course, but should never fully got over the first hurdle illustrated by the article (a hurdle, that I submit your student is probably having difficulty with at this time).

The authors of the paper posit that the primary hurdles in computer science are..

  1. assignment and sequence
  2. recursion / iteration
  3. concurrency*

The article (and linked paper ( link here ) indicate that some people have extreme difficulty figuring out operator assignment, and they can't tell you the value of variables a and b after the follow chuck of pseudo code (even after explaining the basics of pseudo code).

int a = 10
 int b = 20
 a = b 

The test was administered twice; once at the beginning, before any instruction at all, and again after three weeks of class. The striking thing is that there was virtually no movement at all between the groups from the first to second test. Either you had a consistent model in your mind immediately upon first exposure to assignment, the first hurdle in programming – or else you never developed one!

I hate to use a single study / article to say there are people who can't learn to code, rather I like the idea that, armed with this knowledge, educators can better understand where to focus, and maybe develop better techniques to overcome these specific hurdles.

4 comments
5 Ben I.♦ 10/30/2017
Welcome to Computer Science Educators ! It might be worth noting that the study he is citing was partially retracted, as I described in my answer here .
2 nova 10/31/2017
I really wish Jeff Atwood would post an update / disclaimer on that blog post
1 Michael Kay 11/02/2017
I read that code fragment and saw instantly that the value of (a = b) could only be "false". Wrong! the author was writing in one language, I was reading in another. I think an immense number of these difficulties are actually caused by misunderstanding the notation.
kubanczyk 11/07/2017
The paper sourced in this answer and on CodingHorror blog was retracted by its author .

KriszDev 11/02/2017.

Well I'm not a teacher myself but I can tell about what happens in our programming classes. My class has 32 people in it and we all have to learn coding in C#, a language that basically everyone of us hates. Last year we had the best teacher in the school but he had to go away and we've got one of the worst one. The class is divided into 2 groups with each having 16 people in it. Well truth be told none of us actually wanted to be a professional code but he have to learn it as it's part of the curriculum. So from all 2 groups there are only 4-5 people who is actually interested in it for many reasons. (one wants to make games, other android apps, and the others, including me, as a hobby). Well from what I see in my group (and hear in the other) most kids are not interested in learning coding. Even though they'll need it in their finals they just don't care. When I look around at class I always see around 5-6 people using their phones or sleeping in classes. Well probably because the teacher is not good now all they know is last years things (partially, very partially) and when ti comes to writing anything complex: they just look at each other. And when you ask them why don't you learn if you are concerned about your grades? They would say "because I won't ever use it after school".

Well it's true that my class doesn't really have anything to do with coding, but the system we're in makes us learn them. I sometimes speak with other teachers who teach the kids who are in the ACTUAL class that learn coding and will work as software developers and he says that they aren't interested either . So in my school the kids, who will work as devs, are not interested in it? (that's a 32 people class too) of course there are always a few who wants to learn but in general here it's quite low.

So from what I'd seen and heard you need:

  1. first and foremost: they just look at it as an other subject to learn and have grades from. They are simply not interested in it even if that's what they'll be working as. They need will to learn it.
  2. Then there is of course the power of a good teacher. My current teacher came into this school 4 years ago and well knows nothing and is really boring. Many times we have to correct his code. The teacher should try to make the classes interesting for everyone also maybe she needs some special methods. Like as OP said some extra sheets to test on and experience.
  3. Maybe she doesn't have time to learn or thinks it's not as important as other subjects because it takes more work and time to learn and understand. (for example here we (those who know some more) usually correct other people in the class and explain why that code was wrong.)

And to end this I want to say the same as what that other teachers told me about it: They just don't care about it, they are not interested in it anymore. It's plain boring for them to look at a black console with white letters.


Loren Pechtel 11/02/2017.

(Sorry, too much for a comment) I've had a related experience back in college that I think is relevant. I was a lab assistant, the lab was sometimes used for a computer literacy for seniors class. I could see one fundamental sticking point for nearly a third of the attendees: They couldn't comprehend changing the meaning of a key. The machines were TRS-80s--they don't have a control key. The word processor needed one, thus IIRC the @ key was hijacked for the purpose.

Students either got it or they didn't, the ones that didn't never got it and struggled greatly even with the aspects of the class that didn't involve that. The ones that got it fared much better.

If they didn't understand the remapped key by the end of the second class period neither the teacher nor I had a single success.

I have seen various students that seemed about as clueless when it came to understanding code but I've never been in a position to help them over an extended period of time to see deeper into what's wrong and whether it could be overcome.


Marco Salerno 10/31/2017.

Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.

艾尔伯特爱因斯坦

Coding is an art. It isn't a thing for everyone, you need a vocation to be a programmer. The example that you provided, is something really basic, if she can't understand it, maybe she will never do.

There is a possibility that you aren't a good teacher, but you know, programming isn't something that you can discuss, everything has a sense, a logic, if she can't program, try to suggest her to study something different

4 comments
2 Flater 10/31/2017
I disagree with the notion that a teacher (of X) should be advising a student to not study X (arguments can be made if the student is not their student; but that is not the case here). You mention the possibility that the OP isn't a good teacher; which is exactly why he shouldn't suggest that the student quits the study, he might end up discouraging someone while the fault lies with the OP.
Marco Salerno 10/31/2017
True, that's why i used the word suggest, it's different than saying "you suck"
2 Flater 10/31/2017
That's not really the point. Whether OP phrases it rudely or kindly, it still ends up discouraging the student who may simply have been subjected to a bad teacher in the past.
NRiding 11/01/2017
Or maybe the student is not suited to the vocation, and he's doing the person and society a great favor. As I see it either the student with come to realise that its good advice and adjust their major before it's too late, or they will buckle down and work harder. It's quite possible that the student knows the correct answer, but is afraid that they are wrong so doesn't want to say anything.

NRiding 11/01/2017.

是的,一点没错。 I'm not an educator myself but I've been a programmer for a long time.

Just cause you can write a few lines of code does not make you a programmer. Just like every student who learns English is not going to write a best selling novel.

Do this child a favor and steer them to a different career path. If they can't determine the function of that code snippet they how are they going to debug a truly complex problem. Do you want this person writing aircraft guidance systems, banking software, or self-driving cars?

1 comments
1 ItamarG3 11/02/2017
Welcome to Computer Science Educators ! This answer could be much better if you expand and add explanations to it.

Michael Kay 11/02/2017.

Some personal experience. I have a PhD in computer science and have had a very successful 40-year career in software development. But often, when presented with a new concept, I have had great difficulty "getting it". I think the problem happens when you build an incorrect mental model of what is going on.

I think the first time this happened was on first introduction to algebra: with x=3 and y=4, I was convinced xy had to be 34. There's nothing stupid or ignorant about this, and it doesn't mean the pupil will never overcome it: there's just a misunderstanding that has crept in somewhere, and I think it can be very hard for a teacher to discover where that misunderstanding lies, and correct it, because the teacher simply doesn't realise where the faulty step in the reasoning occurs.

Later, when introduced to programming, I remember I found it really hard to understand function calls. I don't know now what the problem was, just that I had great trouble with it. (I also found it hard to grasp that xy was no longer 34, or even 12, it was now completely unrelated to the values of x and y.)

In recent years I've taught a good number of XSLT courses. One of the areas where I find students really struggling is with recursion. The main frustration in teaching this is that you don't know why students are finding it difficult. Sure, it's a very abstract concept but it becomes so second nature that you no longer see the difficulties, and that makes it hard to help the students overcome them.


user3386 11/02/2017.

Probably almost everyone can learn to play basketball, but if you intend to go up against professionals at some point, the taller you are, the better, because they are going to be tall. If you are not going to be a professional, then no problem, just have fun.

This points out the essential question: Why are we educating people?

  • So that they can get good jobs. Parents push their kids toward or away from things for this reason. (Mine pushed me away from programming, but I resisted and became a programmer and now teach programming.) It is certainly important for everyone to be able to make a decent living, so this horn of the dilemma cannot be refuted.
  • To make well-rounded people. We all need to have some understanding of a very large and rapidly growing number of topics to function well in this world. So this horn cannot be refuted either.

It would be great if students knew early on what they were interested in (as I did) and had the drive to overcome obstacles to get there (as I did), but apparently, mystifyingly, many kids and young adults simply have no idea what they want to do for a living. I don't know where the failure lies for that, but it is the cause of the seeming dilemma that we face. More drive on the part of a student will push them to either eventually succeed, or fail fast. But, like the famous basketball coach said, "You can't teach height", and we can't impart drive.

I agree with everyone who said that it is not a teacher's job to decide what is best for a student - whether they belong in the program or not. Do your best as a teacher and stop worrying about whether it can be done or not. This is the conclusion I came to after 4 years of teaching.


Dan Mills 11/01/2017.

I am not a CS educator, I just do far too much programming in the day job.

A question if I may, what course are you teaching, Programming or Computer Science? I would be disturbed to sign up for a CS course only to have it spend significant time on programming.

From the "Computer Science" title I would expect that actually programming the things would be a very, very small part of such a course (And actually not worth many marks, so why really sweat it). There are far more important things to teach on an introductory computer science course IMO, calculus of sets, complexity, some discrete maths, introductory algorithms, maybe some computer architecture, but programming is not something that it is worth wasting much time on in a CS course.

I don't know if there is anyone who could not be taught to program, but certainly most people can be taught some formal logic and ideas about algorithms. If you can give people the tools to break big problems into manageable chunks that would be counted a win in my view, if you can give them the tools to read specifications with a sufficiently critical eye for ambiguity that would be a HUGE win even if they come out unable to write a line of Java.

1 comments
2 John Coleman 11/02/2017
"certainly most people can be taught some formal logic and ideas about algorithms." Not in my experience. It is not uncommon to see a student who has learned some of the basics of programming to nevertheless struggle mightily when they get to classes like Discrete Mathematics or Algorithms and Complexity. Introductory CS courses typically concentrate on programming for the same reason that introductory math classes concentrate on basic calculus. It isn't what the major is really about -- but it is an essential prerequisite.

Andres Alvarez 11/02/2017.

I am fairly new to teaching and found some students to simply not understand programming. Computer programming involves problem solving and some memorization and not a lot of kids are into that. Let's face it, computer programming can be a bit tedious and frustrating for a lot of people and so its no wonder why some kids don't choose a career in it. In order to be good at programming you need to have some desire and perseverance.

I find the kids that are good at math are also good at computer science. However these kids also lack a sense of creativity whereas the other kids who don't do so well in CS are more extrovert and excel in reading/writing classes.

1 comments
2 ItamarG3 11/02/2017
Welcome to Computer Science Educators ! This answer could be much better if you expand and add explanations to it.

HighResolutionMusic.com - Download Hi-Res Songs

1 Alan Walker

Diamond Heart flac

Alan Walker. 2018. Writer: Alan Walker;Sophia Somajo;Mood Melodies;James Njie;Thomas Troelsen;Kristoffer Haugan;Edvard Normann;Anders Froen;Gunnar Greve;Yann Bargain;Victor Verpillat;Fredrik Borch Olsen.
2 Sia

I'm Still Here flac

Sia. 2018. Writer: Sia.
3 Cardi B

Taki Taki flac

Cardi B. 2018. Writer: Bava;Juan Vasquez;Vicente Saavedra;Jordan Thorpe;DJ Snake;Ozuna;Cardi B;Selena Gomez.
4 Little Mix

Woman Like Me flac

Little Mix. 2018. Writer: Nicki Minaj;Steve Mac;Ed Sheeran;Jess Glynne.
5 Halsey

Without Me flac

Halsey. 2018. Writer: Halsey;Delacey;Louis Bell;Amy Allen;Justin Timberlake;Timbaland;Scott Storch.
6 Lady Gaga

I'll Never Love Again flac

Lady Gaga. 2018. Writer: Benjamin Rice;Lady Gaga.
7 Bradley Cooper

Shallow flac

Bradley Cooper. 2018. Writer: Andrew Wyatt;Anthony Rossomando;Mark Ronson;Lady Gaga.
8 Bradley Cooper

Always Remember Us This Way flac

Bradley Cooper. 2018. Writer: Lady Gaga;Dave Cobb.
9 Kelsea Ballerini

This Feeling flac

Kelsea Ballerini. 2018. Writer: Andrew Taggart;Alex Pall;Emily Warren.
10 Mako

Rise flac

Mako. 2018. Writer: Riot Music Team;Mako;Justin Tranter.
11 Dewain Whitmore

Burn Out flac

Dewain Whitmore. 2018. Writer: Dewain Whitmore;Ilsey Juber;Emilio Behr;Martijn Garritsen.
12 Avril Lavigne

Head Above Water flac

Avril Lavigne. 2018. Writer: Stephan Moccio;Travis Clark;Avril Lavigne.
13 Khalid

Better flac

Khalid. 2018. Writer: Charlie Handsome;Jamil Chammas;Denis Kosiak;Tor Erik Hermansen;Mikkel Stoleer Eriksen;Khalid.
14 Lady Gaga

Look What I Found flac

Lady Gaga. 2018. Writer: DJ White Shadow;Nick Monson;Mark Nilan Jr;Lady Gaga.
15 Deep Chills

Run Free flac

Deep Chills. 2018.
16 Dynoro

In My Mind flac

Dynoro. 2018. Writer: Georgi Kay;Feenixpawl;Ivan Gough.
17 Charli XCX

1999 flac

Charli XCX. 2018. Writer: Charli XCX;Troye Sivan;Leland;Oscar Holter;Noonie Bao.
18 NCT 127

Regular (English Version) flac

NCT 127. 2018.
19 Lukas Graham

Love Someone flac

Lukas Graham. 2018. Writer: Don Stefano;Morten "Rissi" Ristorp;Morten "Pilo" Pilegaard;Jaramye Daniels;James Alan;David LaBrel;Lukas Forchhammer Graham.
20 Rita Ora

Let You Love Me flac

Rita Ora. 2018. Writer: Rita Ora.

Language

Popular Tags