Integrated Exercises IV
(総合演習 IV)
Computing Practice I
15th lecture, July 20, 2017
http://www.sw.it.aoyama.ac.jp/2017/CP1/lecture15.html
Martin J. Dürst
© 2005-17 Martin
J. Dürst 青山学院大学
Today's Schedule
- Remaining Schedule
- Last week's
- About last week's exercises
- About Ruby
- Labowork
- Programming contest
- Summary of course
- Research questionaire
- Today's exercises
テストなし、ログイン不要
ログインした学生は授業開始前にサインオフすること
Remaining Schedule
- July 20: Integrated exercises IV
- July 27, 14:50-16:15:
Term final exam (85 minutes)
Last Week's Exam
- Maximum: 102 points
- Average: 54.53 points
- Best result: 95 points
- Worst result: 15 points
If you have less than 40 points, please think very seriously how you can
improve.
Exams will be handed back after this lecture.
Results of Previous Exercises
|
1401 |
1402 |
1403 |
1404 |
100 points |
71 |
14 |
13 |
2 |
60 points |
26 |
20 |
47 |
7 |
errors |
1 |
10 |
14 |
3 |
not submitted |
- |
55 |
25 |
87 |
Total of problems solved: 4 problems: 9 students, 3 problems: 12 students, 2
problems: 52 students, 1 problem: 24 students, 0 problems: 2 students
Number of students who did not complete a single problem before 18:30: 25
students
Beware of Rolling Pin Programming
Relationship between program length and ease of change
Length of program for automatic vending machine:
Longest: 7561 bytes
Shortest: 2128 bytes
Use of Functions
Handout: 1403variant.c
Design strategy:
- Use functions to abstract money handling
- No per-denomination loops in main program
- Objectify purse/wallet (preparation for C++)
Word Statistics (Problem 1404)
The example solution has 95 lines
The same program in Ruby is just 15
lines!
Ruby について
- 1993年からまつもとゆきひろ (松本行弘、Matz)
が開発開始
- 2000年から欧米でも人気
- 2004年から Ruby on Rails (Web
Application Framework) で更に注目
- 特徴:
簡単で強力な概念、短い記述、手軽な実行、入り口が広い、奥が深い
- Dürst 研究室で Ruby 本体の実装に貢献
(文字コード変換など)
後期のラボワーク:
Rails で Web アプリ作成
- Ruby の体験
- Web アプリの体験
- 開発効率が高いので、本格的なものが目させる
- Rails は他の多くのフレームワークの見本
- Rails では自然に良い設計
- 就活にも有利
Programming Contest
- Most famous student programming contest: ACM ICPC
(Association of Computing Machinery International Collegiate Programming
Contest)
- This year's Japanese preliminary
finished very recently
- Let's participate in next year's preliminary (and finals!)
(for example, start solving past problems in fall term)
Summary of this Course
- C is the bridge between software and hardware
- C has influenced a large number of programming languages
- Develop in small steps using tests
- Readability (intent, variable/function names,...) is important
- Rolling pin programming ⇒ DRY; program ⇒ data
Check how much you learned in the last 4 months!
Future Courses
- Fall of 2nd year: Data Structures and Algorithms
(データ構造とアルゴリズム)
- Fall of 2nd year: Labowork
- Spring of 3rd year: Language Theory and Compilers
(言語理論とコンパイラ)
- Spring of 3rd year: Seminar I (topic: programming/Ruby)
- Fall of 3rd year: Seminar II (topic: Web technology)
- 4th year: Graduate research (卒業研究)
実験アンケート
- 匿名で保存可能にするため、学籍番号・名前は切り取り可能
- 是非自由記述を大いに使ってください
応用課題演習 IV について
最低一問を授業中に完成、もう一問を宿題として完成
締切は7月23日 (日曜日); 質問の締切は 7月23日の14:00
問題は世界学生プログラミング選手権 (又は予選) から
- 1501: 正方形の配置
- 1502: 船にコンテナを積む
- 1503: Fibonacci Words
- 1504: 整数の集合の数
全ての問題に部分点
説明された入力以外の入力への対応が不要
入力例は複数あるが、プログラム実行ごと一個のみ
Hints をよく読んで、紙上で計画を検討
プログラムが比較的短いが、発想が必要
これからの作業
- 足りない演習問題を完成し、提出
- 復習、期末試験の準備
Q&A フォーラムでも質問歓迎 (7月25日 (火) まで)