MCS-170 The Nature of Computer Science
Alice Lecture 1
1. Introduction to Programming in Alice
- Overview
- Traditional Problem Solving in CS
- Problem Solving in Alice
- Programming
- Traditional Problem Solving in CS
- Understand fully the problem or task specification
- Sort a list of numbers into nondecreasing order
- Design an algorithm to find the solution
- Implement this algorithm in code
- Write the steps in a language like Javascript
- Test the code
- Revise the code, if needed
- Plusses:
Good strategy for solving problems of all types
- Minuses: Code
implementation is almost always textual,
punctuation and syntax can be a real nuisance
- Problem Solving in Alice
Tasks are
specific: develop scenarios (stories) about characters
Solution
is a storyboard: a sequence of instructions for how
characters interact
- Implementation of storyboard is done through visual
programming,
by dragging commands and objects around on the screen - No Typing!
We
test our solution by playing the scene, like we would play a movie.
Programming
- Distinguish between algorithms and programs
- Algorithm: General description of a series of
steps in a solution to a problem or task
- Program: Specific sequence of instructions
in a language that a computer can understand and carry out
- Alice
- Algorithm: Storyboard of characters and actions in
a scene
- Program:
Characters (Objects) in the scene and the actions
(Methods) they carry out
- Why is the study of programming important?
- Jobs $$
- Understanding how technology works (computers, movies,
ipods,etc)
- Learning a new way of thinking, of problem-solving
- Fun!!
- Demo of how Alice works
- Start up Alice, explain Class window, Method window, Terrain
Screen, adding objects (add a bunny)
- Develop simple storyboard for bunny and another character, then
implement it with two actions
- Review Do in order vs Do tegether constructions
- Discuss first homework assignment