摘要 人在一個經常變化的環境中,依靠不斷地自我學習與經驗累積的方式發展出自己的認知與智力來適應此環境,以此再配合「類此推理」的能力來解決目前接觸的任何類似問題及事物,並能夠利用本身所知的知識應用到可能碰到的任何新問題並解決之。根據皮亞傑(Piaget)的說法,當每一個人碰到任何問題時,會用某種相對應的認知結構給予配對與處理,而這種認知結構稱之為「基模」(schema)。 理論上,基模的生成發展是當人類面臨問題時,人類會使用類比的能力來搜尋先前相類似基模,如果找到類似的基模,我們稱為同化(assimilation),並用新解決問題的經驗成功地與過去的經驗整合;但沒找到類似的基模,則會發展出一個新基模,此一基模再與已存在基模做再組織的動作,我們稱此過程為調適(accommodation)。 依據上述的說法,我們認為在程式寫作上也有所謂的基模,即我們程式教學上幫助學生發展一個合適的程式碼基模。因此我們設計一個程式碼基模發展系統(Code Schema Development, CSD),CSD是一個控制解題環境的系統。當使用CSD時,學生會被分派一些程式練習題,系統也會在學生解題的過程中給予幫助。一方面是希望學習者能夠積極尋找相關的解題提示,另一方面也提供暫時性的部份程式碼(scaffolding code)幫助來滿足學習者的請求,此一想法主要是為了讓學生使用系統的經驗來發展出一個正確的程式碼基模。 本系統主要的實驗教材設定在大一上學期計概課所學的基本迴圈問題,藉由基本程式問題基模及情境的轉換(如借錢,出售書,數投票,等等)。使用系統的對象全部為大一新生,並且用計概課實習的時間來使用CSD。學習者所有的動作及答題記錄都會被記錄在資料庫之中,這些記錄用來做隨後的檢查與分析。 再這篇論文中,我們提出程式碼基模發展生成的可信實例,並分析推導出四項結論:(1) 使用CSD系統,能夠發展出程式碼基模,其成功的比率約為3:2(即五位學生接受程式碼基模生成的訓練,有三位學生能夠發展成功)。(2) 發展出程式碼基模後,學習者只能應用在完全相似的問題上,並且他們能夠將解題基模成功地轉移到新面臨的問題上。(3) 我們比較兩組在前後測的信心狀況,發現使用CSD系統的學生在信心方面有大幅的增進,反之,在對照組方面則信心狀況較多為不變。(4) 至於在興趣方面則兩組的表現較無太大的差異,使用CSD系統的學習者並無增加對程式設計方面的興趣。
Abstract As humans, we are situated in an environment that is constantly changing. To adapt to this environment, we have to continuously develop the needed cognitive skills, and we base this cognitive development of ours on our ability to continuously learn from our past experiences. Whenever we in a situation, we try to retrieve what we have learned from past similar situations and apply that learned experience in the current situation via our analogical reasoning abilities. According to Piaget, humans continuously develop and re-organize internal cognitive structures and also apply the developed cognitive structures in “dealing with” the situations they are facing. Piaget calls these cognitive structures “schemas”. Theoretically, we may hypothesize that schemas are developed in the following way. Whenever an individual is faced with a problem to solve, the individual would use his/her analogical mapping abilities to try to retrieve a developed schema that is capable of “dealing with” this problem. If there is one such schema, it is called “assimilation”, and the new problem-solving experience is successfully “blended” with existing past experiences. But if there is no such schema, then the individual may have to develop one. If the development of the new schema(s) involves the re-organization of existing schemas, this process is called “accommodation”. From the above-described “Piagetian” point of view, it is natural to think that programming also involves the use of (code) schemas. Therefore, one way of teaching programming may be to help the learner (a prospective programmer) to develop appropriate code schemas. With this goal in mind, we constructed CSD (for Code Schema Development). CSD is a controlled problem-solving environment. When using CSD, the learner is continuously assigned some programming exercise, and the system would provide assistance in helping the learner solve the problem. On the one hand, it is hoped that the learner would actively look for useful information regarding the problem-to-solve. On the other hand, the system would also provide different levels of scaffolding for code constructions should the learner so requests. The main idea is to help the learner develop “correct” code schemas by abstracting from his/her experience of using the system. All programming exercises of CSD have to do with the use of loops, and the problems are given in various different contexts (money-borrowing, book-selling, vote-counting, etc.). The participants are all freshmen, and the use of CSD is considered part of class exercises of an introductory programming course. All learners’ actions and answers (including intermediate answers) are recorded in a database. These learner “tracks” are available for subsequent examinations and analysis. In this thesis, we present credible proofs for the development of code schemas. Our analysis leads to four findings. (1) With the use of CSD, novices can indeed develop code schemas, and the success rate is about 3 to 2 (i.e., out of five code schema development attempts, three would succeed). (2) After novices developed a code schema, they can only apply the developed schema in problem-solving situations that are a “perfect match”, and they still have problems (successfully) transferring their knowledge to similar problem-solving situations. (3) When compared to an alternative after-class programming exercise approach, the use of CSD is more effective in causing a raise of confidence (in programming). (4) When compared to the same alternative programming exercise approach, the use of CSD has the same effect in causing a raise of interest (in programming).