# <span class="fa-stack"><i class="fa-solid fa-circle fa-stack-2x"></i><i class="fa-solid fa-graduation-cap fa-stack-1x fa-inverse"></i><i class="fa fa-slash fa-stack-2x fa-inverse"></i></span> Non-Goals
- :fa fa-circle-xmark: Learn a PL similar to one you already know
- :fa fa-circle-check: Instead, learn concepts to facilitate quick assimilation of new PLs as they appear
* :fa fa-circle-xmark: Learn an IDE
* :fa fa-circle-check: Instead, become familiar with a range of tools and build systems
---
## Asking Questions
- For non-personal messages use D2L
- "I think there is a mistake with grading of Question 3 of Homework 2." - **direct message/email to instructor**
- "I cannot run program `foo`. I have tried running it from the command line on OS X. See below for a transcript of what I typed and the error message I received. Could you please help?" - **ask in D2L discussion forum**
# <span class="fa-stack"><i class="fa-solid fa-circle fa-stack-2x"></i><i class="fa-solid fa-question fa-stack-1x fa-inverse"></i></span> Asking Questions
- Include name, student number, and class in messages directly to the instructor
- Include enough context to answer your question:
* "program `foo` doesn't work." - _starts discussion_
* "program `foo` fails with output pasted below" - _good_
* "program `foo` fails with input and output pasted below" - _better_
* "program `foo` fails with input and output pasted below; using OS X; I have run extra commands to show current working directory, the version of `foo` in use, and other relevant information" - _best_
---
:fa fa-question-circle: What are different ways of expressing computations?
<div class="grid grid-cols-2 gap-3">
<div>
* **Programming paradigms and styles:**
- functional vs object-oriented
- mutability vs immutability
- iteration vs recursion
- pattern matching vs visitor pattern
</div>
<div>
* **Concepts:** lexical and dynamic scope; stack layout; inheritance and dynamic dispatch; nested structures (functions or objects); dynamic vs static type checking; subtyping; parametric polymorphism
</div>
</div>
# <span class="fa-stack"><i class="fa-solid fa-circle fa-stack-2x"></i><i class="fa-solid fa-robot fa-stack-1x fa-inverse"></i></span> Program a Robot in a Grid World
<div class="grid grid-cols-3 gap-4">
<div class="groupblock">
<img src="img/gridworld.png" alt="Grid World" width="100%"/>
</div>
<div class="col-span-2">
## Move Robot according to Instructions
- Mark the robot's initial position on the grid
- Mark a goal on the grid
- Create instructions to express how the robot moves
- Move the robot according to your instructions: fill in the _sequential_ blue arrow instruction list
</div>
</div>
---
# <span class="fa-stack"><i class="fa-solid fa-circle fa-stack-2x"></i><i class="fa-solid fa-robot fa-stack-1x fa-inverse"></i></span> Program a Robot in a Grid World
<div class="grid grid-cols-3 gap-4">
<div class="groupblock">
<img src="img/gridworld.png" alt="Grid World" width="100%"/>
</div>
<div class="col-span-2">
## Move Robot along the Perimeter
- Place the robot in a corner
- Use your instructions to express your program
- The loop :fa fa-rotate-right: has 4 slots for instructions that repeat forever
- Place your elementary instructions into the slots
- Move the robot according to your instructions
</div>
</div>
---