Unit 1
Programming Concepts
- Computer Coordinate System
- Definition: A system with an X and Y axis. X is horizontal and Y is vertical.
- Examples: In TouchDevelop, setting the robot's position with robot -> set pos(100, 350).
- Conditionals
- Definition: Makes descisions based on whether something is true or false.
- Examples: An if statement.
- Events
- Definition: Things that happen outside the program.
- Examples: Clicking a mouse or keyboard button.
- Functions
- Definition: Makes things happen to objects.
- Examples: game -> set life(3) in TouchDevelop.
- Parameters
- Definition: Pieces of information given to functions.
- Examples: The colour that you give in set colour()
- Loop
- Definition: A block of code that can be run multiple times in a row.
- Examples: A for or while loop.
- Objects
- Definition: Things you can do stuff with. "Nouns" of programming.
- Examples: The game and/or board.
- Properties
- Definition: Details of objects.
- Examples: X, Y, width, height, colour.
- Syntax
- Definition: The grammar of the code. Slightly different for each language.
- Examples: In Java, if(true) thing.do(something); is correct but If(True) thing->do(something) isn't
- Variables
- Definition: A single value.
- Examples: A number or a character.
- Components
- Definition: The different parts that make up a computer program.
- Examples:
- Behaviour
- Definition: The way that programs do things.
- Examples: A temperature converter's behaviour is different from a video game's.
- Event Handlers
- Definition: Objects that register and process events.
- Examples: A KeyListener or MouseListener
- Event Types
- Definition: The different types of events that can be detected.
- Examples: A KeyEvent or MouseEvent
- App Inventor Conditional Blocks
- Definition: Makes descisions based on whether or not something is true.
- Examples: Similar to an if statement.
- App Inventor Repeat Blocks
- Definition: Repeats code a set number of times.
- Examples: Similar to a loop.
- Variables vs. Persistant Data
- Definition: Variables are local values that can be used in one part of the program. Persistant data is independant of the program.
- Examples: An integer in JavaScript and a value stored in a SQL database.
What I Did for Robotics
During week 2, I worked on some robotics code. I worked on the following:
List of Tasks Completed
- A turnLeft(int degrees) and turnRight(int degrees) method for the robot
- Fixing the drive train
- Creating a drive(double inches, double speed) method for the robot
- Moving code to the new laptop
- Re-working the ball unloading system
- Creating and testing basic autonomous code