alice programming language
BRIEF HISTORY OF ALICE
CREATOR: Randy Pausch ( Computer Science Professor
- Was named after the book written by Lewis Carroll: Alice's Adventures in Wonderland
- Created as a means to teach younger generations a more visual form of Java programming
- Has been used as statistical analysis with children
LANGUAGE CATEGORY: Object-Oriented , Imperative (Sequence), Compiling (built-in)
- Textbooks : Exploring Wonderland, Starting out with Alice, Programming with Alice and Java....
BRIEF HISTORY
versions and dialect: Alice
VERSIONS & DIALECT:
Alice 99: a 3D System for novices
- Was named Alice 99 since it was created in 1999
- Created to support research in VR
- Created to make programming less intimidating
- Block-based coding system
versions
&
dialect
VERSIONS AND DIALECT
Alice 2: Learning to Program with Alice
- Created in 2004
- Added new features to make a more modern version of Alice
- Became a distinct educational platform for young programmers
- Learning to Program with Alice textbook created by Wanda Dann & Stephen Cooper
versions
Story Telling Alice and Looking Glass
- A varieant of Alice 2 created by Caitlyn Kelleher for her PhD dissertations
- 3 distinguishing features were:
- High-level animations that enables users to program social interactions between characters
- A story-based tutorial that introduces users to program through building a story
- A gallery of 3D characters and scenery with custom animations designed to spark story ideas
- Was used in a study to compare middle school girl's experiences with a story telling Alice vs a generic Alice without story telling abilities
- No longer supported by the official Alice website
versions
alice 3 & netbeans plugin
- Created in 2010 with new upcoming features
- Can be used with VR so users can interact with their creations
- Drag and Drop coding instructions
- Model Import: You can now import your own character designs instead of using the built in avatars
- Compatible with NetBeans: The Alice team has created a NetBeans library that allows you to develop or extend Alice worlds directly in the NetBeans environment. This allows you to load saved worlds developed in the Alice 3 platform and continue to modify them directly in the Java code.
versions
programming enviornment
- Object-Oriented
- Scripted animations or stories
- Interactive Narratives
- Creation of Worlds
- Games with win/lose situations
- User interactions
PROGRAMMING
ENVIORNMENTS
advantages/disadvantages & real world applications
REAL WORLD
APPLICATIONS
Advantages:
- Easy to understand
- Very interactive
- Compatible with Netbeans and VR
- Object Oriented with many features to create stories
- Visualizes how commands work
- Learn programming concepts
- Focuses on Logic rather than Syntax
Disadvantages:
- Absence of Syntax
- Sometimes lags
- Out of date graphics ( like super ugly)
- Older versions are rendered obsolete and their information is basically erased
- Not suited for programming that solves problems in real world situations
- Does most of the work for you ( Drag and Drop)
evaluation of alice
EVALUATION
Readability: Super easy to read & understand
Writability: Built in command blocks; there's a few things you could write, but they're within the range of the built in commands ( choosing size, color etc). Super easy to create the programs
Reliability: It's all built-in so it's pretty reliable- little to no chance of error. Built in compiler will notify you of error and how to fix it
Cost: Low cost. Even children can learn to use and create programs with Alice. It mainly caters to children
Syntax in alice
SYNTAX
Java-like Syntax is available.
- It's a bit like Java but tailored to the Alice commands
- Alice could be used in 2 ways: Alice programming which is stricly object oriented( drag and drop) or with the Java-like programing language.
- Option 1 is mostly for children and getting a feel of how object oriented languages may look like
- Option 2 is to somewhat represent what Java could look like if certain commands were implemented ( you can't edit the code on Alice)
java vs alice programming language
- In Java we use System.out.println("hello");
- In Alice: this.alien.say("Hello"); // because it's referring to the alien avatar and they want it to say something
- If you want a more accurate Java experience, download your code to NETBEANS so you can modify it since you can't change the code in ALICE
java
vs
alice
data types
- Help the program understand how the data will be employed
- Each data type is stored differently
- Operations on each type of data type are pre-defined
DATA
TYPES
Standard Data Types
Standard
Data Types
(primitive)
1. Double: Holds real values. These numbers have a decimal or fractional part to them.
2. Integer: Holds integer values. These numbers have no decimal or fractional part to them.
3. Boolean: Holds true or false.
4. String: Sequence or characters such as letters, digits, and/or special symbols
Unique Data types
Unique Data
Types
(Non-Primitive)
1. Joint – orientation data
2. Paint – color data
3. Color – digital color data
4. Move – orientation data
5. Turn – orientation data
6. Roll – orientation data
7. Key – keystroke data
8. Audio File – audio file data
Reference
Reference
- Because Alice is written in Java, passing a variable by reference is not allowed.
- You might have heard “All java variables are passed by value”, which holds in Alice as well.
Arrays
Arrays
1. All items in array must be of the same data type
2. Access items from [0] to [n-1] with n being the number of items
3. When initializing an array, you must explicitly state the data type and size of the array (cannot alter size of array once declared)
Objects
- Objects can be created using predefined gallery classes
Objects
Scope
SCope
1. Local Variables: Exists only inside the method in which it is defined.
2. Parameter Variables: Allows an object or variable to access a method
3. Class Variables: Exists inside the class in which it is defined
4. World Variables: Exist inside the entire world and can be accessed from anywhere
precedence & Associativity of Operators
precedence
Order of Precedence
1.
2.
3.
4.
5.
6.
7.
Operators
NOT
* / %
+ -
< > <= >=
== !=
AND
OR
Description
Logical NOT
Multiplication, Division, Modulus
Addition, Subtraction
Less than, Greater than, ...
Is equal to, Is not equal to
Logical AND
Logical OR
syntax and rules
- Because language is built almost like a blocks program, syntax rules are easy to follow
- Alice assumes binary expression (operand, operator, operand) when creating arithmetic expressions
- Can string expressions
syntax
&
rules
Control structures
CONTROL
STRUCTURES
- DO in Order(SEQUENTIAL): ALICE will follow the list of statements in the EXACT order you see them. Do this-> then this -> then this (like a recipe)
- DO Together & Each In_Together(CONCURRENT) : Control block that can allow various statements to be executed at the same time.
- If_ else_(Conditional): If a condition is met, then we can execute the code blocks, otherwise another code block will execute
- Count_ For Each In_ & While_(Repetition): Loops to repeat certain control statements
- Nesting Control Statements: Control block within a control block with various statements
DO IN ORDER:
- LIST OF STATEMENTS WILL EXECUTE IN THE ORDER THEY ARE IN
DO TOGETHER
- CONTROL BLOCK: Statements inside this block will be done at the same time
- Can change the sequence of the statements along with the timing
- Choose the Do Together Block and drag the statements inside it
each in_together
- CONTROL BLOCK: Use of an array. Will execute statements at the same time for all the elements in the array
- Can be used to have Avatars do the same action at the same time
nesting control structure
- Combination of Do Together and Do in Order
- Control Structure inside another Control Structure
- Sets of instructions are executed together
if-else statements
- if a certain condition is met, then a set of instructions will occur
- otherwise, another set of instructions will occur
- You could also have Nested if statements to have more actions executed
looping: count, for each and while
- Count Loop: count_ will execute a method as many times as you define it
- For Loop: for each in_ will execute repeatedly for each element you define in the array
- While Loop: while_ will execute the program until the condition is met
nested code blocks: loop statements and control statemetns
- You can put control structures inside other control statements
- Allows for synchronization of events, characters, actions etc.
sub programs
SUB-
PROGRAMS
- Code Editor: Camera view, Methods Panel, Editor & Control Panel
- Methods: Set of codes with instructions for the program
- Procedures: Built-in; chooses actions for avatars/characters
- Objects: They're attached to procedures and execute what the procedure commands
- Parameters: Informs/details what the method will do
- The Alice Player: Executes the entire Program (compiler)
Summary of Alice programming language
SUMMARY &
REFERENCES
- Easy to learn
- Mainly Object Oriented
- Used mainly in Classrooms
- Supports Java-like programming
- Control Structures
- Allows Looping statements
- Drag and Drop
- No coding necessary ( side by side Java like coding shown)
- Outdated
references
references
https://archive.org/details/alice99/alice99-first-world.png
https://www.wikiwand.com/en/Alice_(software)
https://source.sheridancollege.ca/cgi/viewcontent.cgi?article=1007&context=fast_appl_publ
http://www.alice.org/wp-content/uploads/2017/04/MediatedTransfer.pdf
http://www.alice.org/wp-content/uploads/2017/05/Alice-3-HowToGuide-Part5.pdf
Language Innovations:
- Alice can now be used with Netbeans
- Is compatible with VR
Main Applications:
- Classrooms for Children
- Statistical Research
- 3D visuals for learning programming concepts
REVIEW
QUESTIONS
Review questions !
Review
questions
1) What is a pro and con of Alice ?
2) What Language Category does it fall under? ( logical, scripting..etc)
3) What similar keywords does Alice use that can be found in C++, Java and Python ?
4) Who is Alice mainly catered to?
5) Name a version of Alice that has been released in the past