---
# System prepended metadata

title: COMP0233 - Day 3 (20th October 2021)
tags: [teaching, class, COMP0233]

---

# COMP0233 - Day 3 (20th October 2021)

:::info
## :tada: Welcome to the third day! First day of :snake:

### Today
Today we will
- Review the preparation homework reading and quizzes.
- Model friendship networks using standard python data structures.
- Discuss data structure solutions and review other group's solutions. 
:::

:::danger
Remember to `rename` yourself by clicking on your zoom name (in the participants list) and change it to:
`SXXX` where XXX is the room number (105, 121 or 406) or 000 for the online attendees.

If you disconnect and connect again, please rename yourself again.
:::

⏯ [streaming - youtube](https://www.youtube.com/watch?v=Rl7vBFr6Ez8)

### Review from last week 

- Merging when collaborators both work on the same file (no conflict)
- Forking of repositories (working on code that isn't yours)
- Branches
- Conflicts
- :movie_camera:
    - [Pull requests homework](https://moodle.ucl.ac.uk/mod/lti/view.php?id=4462919), 
    - [Pull requests review](https://moodle.ucl.ac.uk/mod/lti/view.php?id=4462920) and
    - [Collaborate using VS Code LiveShare](https://moodle.ucl.ac.uk/mod/lti/view.php?id=4462921)
- You will get your PR for the travel guide reviewed in the coming days!
- Fully flipped learning from now on
    - Pre-lesson work
    - In class, group work, discussions, screen sharing

#### Feedback results

- 38% filled it
- &gt; 90% was positive on most of the questions.
    - 16% are unsure of the assesment. :eyes: [Moodle assesment's section](https://moodle.ucl.ac.uk/course/view.php?id=1361&section=4)
    - 24% are unsure of the expectations on a flipped classroom.:eyes: [Moodle Week 3 section](https://moodle.ucl.ac.uk/course/view.php?id=1361&section=7)
- Comments
    - **Too much admin time at the start**: That should be reduced from now on
    - Some comments about **prefering face-to-face vs hybrid/hydra teaching**:
        - Why are we teaching this way? We explored different options, like an instructor leading each session or having us teaching multiple days a week. This was the most sustainable and with the flipped nature of our classes should not depend much of the main instructor.
        - **Zoom**: can't see the screen in the room? [Log into](/PM2TRw1xS3ac3rNMPxeXbQ) one of the desktop in the classroom and join from there to the call. It's not perfect. We are also today experimenting streaming on youtube (so you can move back/forward if you missed a step) - they will be deleted from youtube at the end of each class.
        - **Class setup**: Was faster today?
    - Comments about material:
        - **Videos for the preparation**: Videos are hard to make with a quality as good as the notes. They are also harder to update. For the user perspective, they are difficult to search for content (though you can search the subtitles and fancy new tech)
        - **Solutions to problems**: They will be provided during the days before the following class.
        - **Git diagrams shown in class**: Sure, [they are in Moodle](https://moodle.ucl.ac.uk/mod/folder/view.php?id=4523271&section=6 "Git diagrams") now!
        - **Git Cheatsheet**: Sure! [Atlassian has a very good git cheatsheet](https://wac-cdn.atlassian.com/dam/jcr:e7e22f25-bba2-4ef1-a197-53f46b6df4a5/SWTM-2088_Atlassian-Git-Cheatsheet.pdf?cdnVersion=597)
        - **Upload code to moodle**: In the last two classes we were running commands on the terminal, as they were they couldn't be converted into scripts (and mixing terminal commands with gui actions would make the history of my commands useless by itself). Most of it is shown in the HackMD and/or the notes. The videos will be available soon after the class. We are experimenting with youtube this week! 
        - **Unclear moodle instructions/notes and class links**: We are always happy to improve our pages, let us know what ideas you've got. At the moment each week has at least two parts: preparation + class. Sometimes another section is added with homework and solutions. The preparation contains the link to the material you need to go through before the class, the class section contains the links to the hackmd/zoom/lecturecast. The hackmd links to all that's for that class. We are working to improve the usability of the notes.
    - Class interaction:
        - **fixed groups would be easier to interact**: Groups will be fixed from week 6. For now work with the people next to you. We will make sure you get a pair.
     


#### What was discussed during the week :newspaper: 

- inbox flooding
- IPython magics `%`. They don't work in python!
- `type('Python'.upper)`
- What is the advantage to have `#!/usr/bin/env python` on a python script?
- Empty containers (`""`, `{}`, `[]`, `()`, `set()`), `0` and `None` are all `False`!
    - Useful (and at times confussing) when looking at odd/even numbers!
- `my_list.extend(another_list)` is very useful on `for` loops. (You can also use `+=`)
- Sneaky `.`! Sometimes a simple `.` can have a lot of effects! 
- Function sides effects:
    - Compare [using `vec[:]`](https://pythontutor.com/render.html#code=def%20double_inplace%28vec%29%3A%0A%20%20%20%20vec%5B%3A%5D%20%3D%20%5Belement%20*%202%20for%20element%20in%20vec%5D%0A%0Az%20%3D%20list%28range%284%29%29%0Adouble_inplace%28z%29%0Aprint%28z%29&cumulative=false&curInstr=12&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=3&rawInputLstJSON=%5B%5D&textReferences=false)
      with [using `vec`](https://pythontutor.com/render.html#code=def%20double_inplace%28vec%29%3A%0A%20%20%20%20vec%20%3D%20%5Belement%20*%202%20for%20element%20in%20vec%5D%0A%0Az%20%3D%20list%28range%284%29%29%0Adouble_inplace%28z%29%0Aprint%28z%29&cumulative=false&curInstr=13&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=3&rawInputLstJSON=%5B%5D&textReferences=false)
      **Note** that the function doesn't `return`.
- unpacking tuples... what's the output?
  ```python
  a, *b, c = (1, 2, 3, 4)
  [type(x) for x in (a, b, c)]
  ```
- Notebooks... or not? the notes say we are using notebooks, but that's not true :wink: 


### Groups :handshake: 

Got your pair? [menti.com](https://www.menti.com/alecgmc7ceap) code: 4158 4376
    - 🙋 if you haven't.

:::warning
:question: Name one thing you learned about Python in the class preparation and why do you think it's useful? :snake: 
:::

### Preparation check

Confidence check: [menti.com](https://www.menti.com/alecgmc7ceap) code: 4158 4376
Questions from preparation:

### Small group work: Mapping friend networks

:::info

Working in pairs or small groups, design a data structure that contains information about a network of friends. Then populate the data structure with the information given. 
classwork repo: [:hash::nine:][friends]
<br>
:::spoiler Remote? Call for help from your breakout room
If you need help, you can ask for us to drop in click "Ask for Help" :grey_question: button in the meeting controls.
If you don't find it, [watch this video showing where it is](https://www.youtube.com/watch?v=yIOMPRLQIHA).
:::



### Notes on discussion of the excercise

[example solution](https://gist.github.com/arc-teaching/319092a656d95648d49c01d5672b52be) (this isn't the only solution)

In your groups with the groups next to you, discuss the excercise - what you found tricky or straight forward. Anything you'd do differently? Choose one person from the group to add notes below. 

**Push any unfinished work and create a PR as the issue asks you to do!**


- .
- .
- setting up the environment (i.e. cloning instead of using remote). Getting the correct sequence of pulling, cloning, committing etc.
- .
- .
- . acessing/visualising nested data structures, using git (cloning and pull request)
- .
- linking the issue on git
- Different levels of skill in git/python (especially git)
- 
- . 
- . 
- .
- .Using different ways to solve the task ( list of dictionaries or dictionary of dictionarries) + hwo to print info with list comprehension
- . 
- .
- .
- .
- .
- .
- .
- .
- .
- .
- .
- .
- .
- .
- .
- .
- .
- .
- .
- .
- .
- .
- .
- .
- .
- .
- Keeping Track of all the Pull/Push functions. Having to fork, then pull, then branch, then merg back to it. A lot of stuff had to be dn
- .
- .
- .
- .
- .
- .
- .
- .


### Pairs work: review two other group's solutions

[An example solution](https://gist.github.com/arc-teaching/319092a656d95648d49c01d5672b52be)

1. Push any unfinished work and create a PR as the issue asks you to do!
1. Choose one person to share their screen
1. Pick someone else's PR from the list that appears at the bottom of [the issue][friends], click on it, and see what they have done (look at the "Files changed" tab on that PR's page to see the actual code changes).
1. Review that PR: leave some comments about things that you find good, or unclear, or any suggestions you have. See [these instructions](https://help.github.com/en/articles/reviewing-proposed-changes-in-a-pull-request) for more details about the interface.

:::spoiler problems in breakout room?
If you need help, you can ask for us to drop in click "Ask for Help" :grey_question: button in the meeting controls.
If you don't find it, [watch this video showing where it is](https://www.youtube.com/watch?v=yIOMPRLQIHA).
:::

### End of class feedback

Confidence check: [menti.com](https://www.menti.com/alecgmc7ceap) code: 4158 4376


### Homework 

- Work complete RSE-Classwork repo issue: [:hash::one::one:][homework]
- Preparation for week 4

# Questions

:::info
Feel free to add any question below. Remember the syntax:
```
- Example question
  - [name=student_a] Example answer
  - [name=TA_1] Example answer
```
:::




###### tags: `COMP0233` `teaching` `class`

<!-- links -->
[friends]: https://github.com/UCL-COMP0233-22-23/RSE-Classwork/issues/9
[homework]: https://github.com/UCL-COMP0233-22-23/RSE-Classwork/issues/11