diff --git a/content/Attachments/lofi-prototypes/friends-1.JPG b/content/Attachments/lofi-prototypes/friends-1.JPG new file mode 100644 index 000000000..b49f63ddc Binary files /dev/null and b/content/Attachments/lofi-prototypes/friends-1.JPG differ diff --git a/content/Attachments/lofi-prototypes/general-1.JPG b/content/Attachments/lofi-prototypes/general-1.JPG new file mode 100644 index 000000000..c697aa783 Binary files /dev/null and b/content/Attachments/lofi-prototypes/general-1.JPG differ diff --git a/content/Attachments/lofi-prototypes/general-2.JPG b/content/Attachments/lofi-prototypes/general-2.JPG new file mode 100644 index 000000000..8e655b082 Binary files /dev/null and b/content/Attachments/lofi-prototypes/general-2.JPG differ diff --git a/content/Attachments/lofi-prototypes/general-3.JPG b/content/Attachments/lofi-prototypes/general-3.JPG new file mode 100644 index 000000000..9b9740de5 Binary files /dev/null and b/content/Attachments/lofi-prototypes/general-3.JPG differ diff --git a/content/Attachments/lofi-prototypes/general-4.JPG b/content/Attachments/lofi-prototypes/general-4.JPG new file mode 100644 index 000000000..49d0c8a02 Binary files /dev/null and b/content/Attachments/lofi-prototypes/general-4.JPG differ diff --git a/content/Attachments/lofi-prototypes/home-1.JPG b/content/Attachments/lofi-prototypes/home-1.JPG new file mode 100644 index 000000000..81279a60b Binary files /dev/null and b/content/Attachments/lofi-prototypes/home-1.JPG differ diff --git a/content/Attachments/lofi-prototypes/home-2.jpg b/content/Attachments/lofi-prototypes/home-2.jpg new file mode 100644 index 000000000..7d6fc7436 Binary files /dev/null and b/content/Attachments/lofi-prototypes/home-2.jpg differ diff --git a/content/Attachments/lofi-prototypes/home-3.jpg b/content/Attachments/lofi-prototypes/home-3.jpg new file mode 100644 index 000000000..effebe890 Binary files /dev/null and b/content/Attachments/lofi-prototypes/home-3.jpg differ diff --git a/content/Attachments/lofi-prototypes/navigation.JPG b/content/Attachments/lofi-prototypes/navigation.JPG new file mode 100644 index 000000000..135420bb0 Binary files /dev/null and b/content/Attachments/lofi-prototypes/navigation.JPG differ diff --git a/content/Attachments/lofi-prototypes/other-settings-1.JPG b/content/Attachments/lofi-prototypes/other-settings-1.JPG new file mode 100644 index 000000000..12023d31a Binary files /dev/null and b/content/Attachments/lofi-prototypes/other-settings-1.JPG differ diff --git a/content/Attachments/lofi-prototypes/schedule-1.JPG b/content/Attachments/lofi-prototypes/schedule-1.JPG new file mode 100644 index 000000000..6dd45dc9f Binary files /dev/null and b/content/Attachments/lofi-prototypes/schedule-1.JPG differ diff --git a/content/Attachments/lofi-prototypes/trick-options-1.JPG b/content/Attachments/lofi-prototypes/trick-options-1.JPG new file mode 100644 index 000000000..c215ae032 Binary files /dev/null and b/content/Attachments/lofi-prototypes/trick-options-1.JPG differ diff --git a/content/Attachments/lofi-prototypes/welcome-1.JPG b/content/Attachments/lofi-prototypes/welcome-1.JPG new file mode 100644 index 000000000..307bdd907 Binary files /dev/null and b/content/Attachments/lofi-prototypes/welcome-1.JPG differ diff --git a/content/Attachments/personas/kyle b/content/Attachments/personas/kyle new file mode 100644 index 000000000..69030ee31 Binary files /dev/null and b/content/Attachments/personas/kyle differ diff --git a/content/daily_notes/2022-05-11.md b/content/daily_notes/2022-05-11.md new file mode 100644 index 000000000..af2f69314 --- /dev/null +++ b/content/daily_notes/2022-05-11.md @@ -0,0 +1,31 @@ +[2022-05-10](daily_notes/2022-05-10) << [daily-notes](notes/daily-notes.md) >> [2022-05-12](daily_notes/2022-05-12) + +--- +# 11-05-22 +[Rising Above Bedlam - Jah Wobble's Invaders Of The Heart](spotify:album:2TXvjVOhfNjAYpRpODqmVb) +![OpenStreetMap was always pretty good but is also now *really* good? And Apple Maps's new zoomed-in design in certain cities like NYC and London is just gorgeous. It's cool how there are all these good maps now!](https://imgs.xkcd.com/comics/maps.png) + + +## Todos +- [ ] 12:00 Info201 Lab 8 +- [ ] Info201 Lecture 14 +- [ ] Info201 Lecture 18 +- [ ] info 202 api's lecture +- [ ] 11:00 Cosc202 Lecture +- [ ] 12:00 Cosc201 lab +- [ ] 10:00 Info203 Lecture +- [ ] 13:00 Info201 Lecture +- [ ] 14:00 Cosc202 Lab + +## Lecture/Labs +- [ ] 10:00 Info203 Lecture +- [ ] 16:00 Cosc201 Tutorial + +## Projects +- python ai weekly review +- spotify clone + +## Links +- [202 lab book](C:\Users\Jet%20Hughes\Documents\Personal\COSC202LabBook-2.pdf) +- [i201 cousework](https://isgb.otago.ac.nz/infosci/INFO201/labs_release/raw/master/output/info201_labs.html#) +- [i201 Assignments](https://open.spotify.com/album/23DJ3KNE5JXi61G31T2Kni?si=-zZEHXIxT2qOEN6_Ns5C5Ql) \ No newline at end of file diff --git a/content/daily_notes/2022-05-12.md b/content/daily_notes/2022-05-12.md new file mode 100644 index 000000000..ab0145e5f --- /dev/null +++ b/content/daily_notes/2022-05-12.md @@ -0,0 +1,34 @@ +[2022-05-11](daily_notes/2022-05-11) << [daily-notes](notes/daily-notes.md) >> [2022-05-13](daily_notes/2022-05-13) + +--- +# 12-05-22 +[Darklands - The Jesus And Mary Chain](spotify:album:1vtsYpapUeoDNMJOWRql9b) +![OpenStreetMap was always pretty good but is also now *really* good? And Apple Maps's new zoomed-in design in certain cities like NYC and London is just gorgeous. It's cool how there are all these good maps now!](https://imgs.xkcd.com/comics/maps.png) + +## Todos +- [ ] 12:00 Info201 Lab 8 +- [ ] Info201 Lecture 14 +- [x] Info201 Lecture 18 +- [ ] info 202 api's lecture +- [ ] 11:00 Cosc202 Lecture +- [ ] 12:00 Cosc201 lab +- [ ] 10:00 Info203 Lecture +- [ ] 13:00 Info201 Lecture +- [ ] 14:00 Cosc202 Lab +- [ ] 10:00 Info203 Lecture +- [ ] 16:00 Cosc201 Tutorial + +## Lecture/Labs +- [ ] 11:00 Cosc202 Lecture +- [ ] 12:00 Cosc201 Lab +- [ ] 12:00 Info203 Tutorial +- [ ] 16:00 Info201 Lecture + +## Projects +- python ai weekly review +- spotify clone + +## Links +- [202 lab book](C:\Users\Jet%20Hughes\Documents\Personal\COSC202LabBook-2.pdf) +- [i201 cousework](https://isgb.otago.ac.nz/infosci/INFO201/labs_release/raw/master/output/info201_labs.html#) +- [i201 Assignments](https://open.spotify.com/album/23DJ3KNE5JXi61G31T2Kni?si=-zZEHXIxT2qOEN6_Ns5C5Ql) \ No newline at end of file diff --git a/content/daily_notes/2022-05-13.md b/content/daily_notes/2022-05-13.md new file mode 100644 index 000000000..959c3a06a --- /dev/null +++ b/content/daily_notes/2022-05-13.md @@ -0,0 +1,37 @@ +[2022-05-12](daily_notes/2022-05-12) << [daily-notes](notes/daily-notes.md) >> [2022-05-14](daily_notes/2022-05-14) + +--- +# 13-05-22 +[Darkness on the Edge of Town - Bruce Springsteen](spotify:album:4KT6G8fj8EEIfsyr75hbgc) +![We carefully sampled the general population and found that most people are familiar with acquiescence bias.](https://imgs.xkcd.com/comics/selection_bias.png) + + +## Todos +- [ ] Cosc201 lab +- [ ] Cosc201 Lab +- [ ] Info203 Lecture +- [ ] Info203 Lecture +- [ ] Info201 Lab 8 +- [ ] Info201 Lecture +- [ ] Info201 Lecture 14 +- [ ] Info201 Lecture +- [x] Cosc202 Lecture +- [ ] cosc 202 api's lecture +- [ ] Cosc202 Lecture + +## Lecture/Labs +- [x] 09:00 Cosc202 Lab +- [ ] 11:00 Cosc201 Lecture +- [ ] 12:00 Info201 Lab + +## Projects +- python ai weekly review +- spotify clone + +## Links +- [202 lab book](C:\Users\Jet%20Hughes\Documents\Personal\COSC202LabBook-2.pdf) +- [i201 cousework](https://isgb.otago.ac.nz/infosci/INFO201/labs_release/raw/master/output/info201_labs.html#) +- [i201 Assignments](https://open.spotify.com/album/23DJ3KNE5JXi61G31T2Kni?si=-zZEHXIxT2qOEN6_Ns5C5Ql) + + + \ No newline at end of file diff --git a/content/daily_notes/2022-05-14.md b/content/daily_notes/2022-05-14.md new file mode 100644 index 000000000..95fce0a2b --- /dev/null +++ b/content/daily_notes/2022-05-14.md @@ -0,0 +1,33 @@ +[2022-05-13](daily_notes/2022-05-13) << [daily-notes](notes/daily-notes.md) >> [2022-05-15](daily_notes/2022-05-15) + +--- +# 14-05-22 +[The Who Sell Out - The Who](spotify:album:2nbxElNcpz1C8LudsOW3ZH) +![A medicine that makes you put two dots over your letters more often is a di�retic.](https://imgs.xkcd.com/comics/crepe.png) + + +## Todos +- [ ] Cosc201 lab +- [ ] Cosc201 Lab +- [ ] Info203 Lecture +- [ ] Info203 Lecture +- [ ] Info201 Lab 8 +- [ ] Info201 Lecture +- [ ] Info201 Lecture 14 +- [ ] Info201 Lecture +- [ ] cosc 202 api's lecture +- [ ] Cosc202 Lecture +- [ ] 11:00 Cosc201 Lecture +- [ ] 12:00 Info201 Lab + +## Lecture/Labs + + +## Projects +- python ai weekly review +- spotify clone + +## Links +- [202 lab book](C:\Users\Jet%20Hughes\Documents\Personal\COSC202LabBook-2.pdf) +- [i201 cousework](https://isgb.otago.ac.nz/infosci/INFO201/labs_release/raw/master/output/info201_labs.html#) +- [i201 Assignments](https://open.spotify.com/album/23DJ3KNE5JXi61G31T2Kni?si=-zZEHXIxT2qOEN6_Ns5C5Ql) \ No newline at end of file diff --git a/content/daily_notes/2022-05-15.md b/content/daily_notes/2022-05-15.md new file mode 100644 index 000000000..fde1ed244 --- /dev/null +++ b/content/daily_notes/2022-05-15.md @@ -0,0 +1,33 @@ +[2022-05-14](daily_notes/2022-05-14) << [daily-notes](notes/daily-notes.md) >> [2022-05-16](daily_notes/2022-05-16) + +--- +# 15-05-22 +[Rust Never Sleeps - Neil Young & Crazy Horse](spotify:album:5m2MQk77aAXPhwI6Ges8X5) +![A medicine that makes you put two dots over your letters more often is a di�retic.](https://imgs.xkcd.com/comics/crepe.png) + + +## Todos +- [ ] Cosc201 lab +- [ ] Cosc201 Lab +- [ ] Info203 Lecture +- [ ] Info203 Lecture +- [ ] Info201 Lab 8 +- [ ] Info201 Lecture +- [ ] Info201 Lecture 14 +- [ ] Info201 Lecture +- [ ] cosc 202 api's lecture +- [ ] Cosc202 Lecture +- [ ] 11:00 Cosc201 Lecture +- [ ] 12:00 Info201 Lab + +## Lecture/Labs + + +## Projects +- python ai weekly review +- spotify clone + +## Links +- [202 lab book](C:\Users\Jet%20Hughes\Documents\Personal\COSC202LabBook-2.pdf) +- [i201 cousework](https://isgb.otago.ac.nz/infosci/INFO201/labs_release/raw/master/output/info201_labs.html#) +- [i201 Assignments](https://open.spotify.com/album/23DJ3KNE5JXi61G31T2Kni?si=-zZEHXIxT2qOEN6_Ns5C5Ql) \ No newline at end of file diff --git a/content/daily_notes/2022-05-16.md b/content/daily_notes/2022-05-16.md new file mode 100644 index 000000000..b66aa2063 --- /dev/null +++ b/content/daily_notes/2022-05-16.md @@ -0,0 +1,44 @@ +[2022-05-15](daily_notes/2022-05-15) << [daily-notes](notes/daily-notes.md) >> [2022-05-17](daily_notes/2022-05-17) + +--- +# 16-05-22 +[The Specials - The Specials](spotify:album:7kHtInr7Es2tPk5QJO6y6c) +![A medicine that makes you put two dots over your letters more often is a di�retic.](https://imgs.xkcd.com/comics/crepe.png) + +## Today +- [x] Cosc201 lab 11 +- [x] 11:00 Cosc201 Lecture graphs +- [x] Info201 Lab 9 +- [x] Info201 Lab 8 +- [x] Info201 Lecture 19 sql part 2 +- [x] Info203 Lecture +- [x] Info203 Lecture +- [x] 1hr 203 work + +100% + +## Backlog +- [ ] Cosc201 Lab 12 +- [ ] Info201 Lab 3 +- [ ] Info201 Lab 4 +- [ ] Info201 Lab 7 +- [ ] Info201 Lab 10 +- [ ] Info201 Lab 11 +- [ ] Info201 Lecture 20 database +- [ ] Info201 Lecture 14 activity and state diagrams +- [ ] cosc 202 api's lecture +- [ ] Cosc202 Lecture +- [ ] Cosc202 Lab 19 + +## Lecture/Labs +- [ ] 11:00 Cosc202 Lecture +- [ ] 12:00 Cosc201 lab 13 + +## Projects +- python ai weekly review +- spotify clone + +## Links +- [202 lab book](C:\Users\Jet%20Hughes\Documents\Personal\COSC202LabBook-2.pdf) +- [i201 cousework](https://isgb.otago.ac.nz/infosci/INFO201/labs_release/raw/master/output/info201_labs.html#) +- [i201 Assignments](https://open.spotify.com/album/23DJ3KNE5JXi61G31T2Kni?si=-zZEHXIxT2qOEN6_Ns5C5Ql) \ No newline at end of file diff --git a/content/daily_notes/2022-05-17.md b/content/daily_notes/2022-05-17.md new file mode 100644 index 000000000..d1d050f6d --- /dev/null +++ b/content/daily_notes/2022-05-17.md @@ -0,0 +1,42 @@ +-[2022-05-16](daily_notes/2022-05-16) << [daily-notes](notes/daily-notes.md) >> [2022-05-18](daily_notes/2022-05-18) + +--- +# 17-05-22 +[Black Sabbath - Black Sabbath](spotify:album:2T6jeELx5BqH4GMLObBy10) +![A medicine that makes you put two dots over your letters more often is a di�retic.](https://imgs.xkcd.com/comics/crepe.png) + +## Today +- [ ] 10:00 Info203 Lecture +- [x] 1hr ass work +- [ ] 11:00 Cosc201 Lecture +- [ ] Cosc201 Lab 12 +- [x] Info201 Lecture 20 database +- [x] Info201 Lab 10 +- [x] Cosc202 Lecture +- [x] some 202 work + +# Review +```dataview +list from #lecture where sr-due = date(today) +``` + +## Backlog +- [ ] 13:00 Info201 Lecture +- [ ] 14:00 Cosc202 Lab +- [ ] Info201 Lab 3 +- [ ] Info201 Lab 4 +- [ ] Info201 Lab 7 +- [ ] Info201 Lab 11 +- [ ] Info201 Lecture 14 activity and state diagrams +- [ ] Cosc 202 api's lecture +- [ ] Cosc202 Lab 19 +- [ ] Cosc201 lab 13 + +## Projects +- python ai weekly review +- spotify clone + +## Links +- [202 lab book](C:\Users\Jet%20Hughes\Documents\Personal\COSC202LabBook-2.pdf) +- [i201 cousework](https://isgb.otago.ac.nz/infosci/INFO201/labs_release/raw/master/output/info201_labs.html#) +- [i201 Assignments](https://isgb.otago.ac.nz/info201/shared/assignments_release/raw/master/output/info201_assignments.html) diff --git a/content/daily_notes/2022-05-18.md b/content/daily_notes/2022-05-18.md new file mode 100644 index 000000000..e7d5900c1 --- /dev/null +++ b/content/daily_notes/2022-05-18.md @@ -0,0 +1,43 @@ +[2022-05-17](daily_notes/2022-05-17) << [daily-notes](notes/daily-notes.md) >> [2022-05-19](daily_notes/2022-05-19) + +--- +# 18-05-22 +[Floodland - Sisters Of Mercy](spotify:album:2I5WCmOZo17YkcEwjXbLvc) +![Donate now to help us find a cure for causality. No one should have to suffer through events because of other events.](https://imgs.xkcd.com/comics/health_data.png) + +## Today +- [ ] 10:00 Info203 Lecture +- [ ] 10:00 Info203 Lectur vc dbe +- [x] Cosc201 Lecture +- [ ] Cosc 202 api's lecture +- [x] Info201 Lab 3 +- [ ] 1hr ass work +- [x] review today +- [x] review extra + +# Review +```dataview +list from #lecture where sr-due = date(today) +``` + +## Backlog +- [ ] Cosc201 Lab 12 +- [ ] Cosc201 lab 13 +- [ ] 13:00 Info201 Lecture +- [ ] Info201 Lab 4 +- [ ] Info201 Lab 7 +- [ ] Info201 Lab 11 +- [ ] Info201 Lecture 14 activity and state diagrams +- [ ] 14:00 Cosc202 Lab +- [ ] Cosc202 Lab 19 + +## Projects +- python ai weekly review +- spotify clone +- weather api in daily note +- drop shipping site + +## Links +- [202 lab book](C:\Users\Jet%20Hughes\Documents\Personal\COSC202LabBook-2.pdf) +- [i201 cousework](https://isgb.otago.ac.nz/infosci/INFO201/labs_release/raw/master/output/info201_labs.html#) +- [i201 Assignments](https://open.spotify.com/album/23DJ3KNE5JXi61G31T2Kni?si=-zZEHXIxT2qOEN6_Ns5C5Ql) \ No newline at end of file diff --git a/content/daily_notes/2022-05-19.md b/content/daily_notes/2022-05-19.md new file mode 100644 index 000000000..761196937 --- /dev/null +++ b/content/daily_notes/2022-05-19.md @@ -0,0 +1,39 @@ +[2022-05-18](daily_notes/2022-05-18) << [daily-notes](notes/daily-notes.md) >> [2022-05-20](daily_notes/2022-05-20) + +--- +# 19-05-22 +[New York Dolls - New York Dolls](spotify:album:2xbTV0Awe4Qm5caUVuPbMr) +![Donate now to help us find a cure for causality. No one should have to suffer through events because of other events.](https://imgs.xkcd.com/comics/health_data.png) + +## Today +- [ ] 11:00 Cosc202 Lecture +- [ ] 12:00 Cosc201 Lab +- [x] Info201 Lecture 21 +- [x] Cosc 202 api's lecture +- [x] Info201 Lab 4 +- [ ] review +- [x] 202 work +- [x] 10:00 Info203 Lecture +- [x] 2 hr ass work + +# Review +```dataview +list from #lecture where sr-due = date(today) +``` + +## Backlog +- [ ] Info203 Lectures x2 +- [ ] Info201 Lecture 22 +- [ ] Cosc201 Lab 12 +- [ ] Info201 Lab 7 +- [ ] Info201 Lecture 14 activity and state diagrams +- [ ] Cosc202 Lab 19 + +## Projects +- python ai weekly review +- spotify clone + +## Links +- [202 lab book](C:\Users\Jet%20Hughes\Documents\Personal\COSC202LabBook-2.pdf) +- [i201 cousework](https://isgb.otago.ac.nz/infosci/INFO201/labs_release/raw/master/output/info201_labs.html#) +- [i201 Assignments](https://isgb.otago.ac.nz/info201/shared/assignments_release/raw/master/output/info201_assignments.html) \ No newline at end of file diff --git a/content/daily_notes/2022-05-20.md b/content/daily_notes/2022-05-20.md new file mode 100644 index 000000000..6dde9ae8e --- /dev/null +++ b/content/daily_notes/2022-05-20.md @@ -0,0 +1,42 @@ +[2022-05-19](daily_notes/2022-05-19) << [daily-notes](notes/daily-notes.md) >> [2022-05-21](daily_notes/2022-05-21) + +--- +# 20-05-22 +[Highway to Hell - AC/DC](spotify:album:10v912xgTZbjAtYfyKWJCS) +![Oh sure, I know Keira Knightly, from the first movie in that series by The Land Before Time producer. You know, the franchise with the guy from Jurassic Park and Ghostwriter, and script work by Billie Lourd's mom?](https://imgs.xkcd.com/comics/mainly_known_for.png) + +AAPL : 137.44 +SP500 : 3900.79 +TSLA : 709.42 + +## Today +- [ ] 09:00 Cosc202 Lab +- [ ] 11:00 Cosc201 Lecture +- [ ] 12:00 Info201 Lab +- [ ] review +- [ ] email about labs c201 + +# Review +```dataview +list from #lecture where sr-due = date(today) +``` + +## Backlog +- [ ] 11:00 Cosc202 Lecture +- [ ] 12:00 Cosc201 Lab +- [ ] review +- [ ] Info203 Lectures x2 +- [ ] Info201 Lecture 22 +- [ ] Cosc201 Lab 12 +- [ ] Info201 Lab 7 +- [ ] Info201 Lecture 14 activity and state diagrams +- [ ] Cosc202 Lab 19 + +## Projects +- python ai weekly review +- spotify clone + +## Links +- [202 lab book](C:\Users\Jet%20Hughes\Documents\Personal\COSC202LabBook-2.pdf) +- [i201 cousework](https://isgb.otago.ac.nz/infosci/INFO201/labs_release/raw/master/output/info201_labs.html#) +- [i201 Assignments](https://isgb.otago.ac.nz/info201/shared/assignments_release/raw/master/output/info201_assignments.html) \ No newline at end of file diff --git a/content/daily_notes/2022-05-21.md b/content/daily_notes/2022-05-21.md new file mode 100644 index 000000000..7c28036b4 --- /dev/null +++ b/content/daily_notes/2022-05-21.md @@ -0,0 +1,43 @@ +[2022-05-20](daily_notes/2022-05-20) << [daily-notes](notes/daily-notes.md) >> [2022-05-22](daily_notes/2022-05-22) + +--- +# 21-05-22 +[The Age Of The Understatement - The Last Shadow Puppets](spotify:album:2y3Rm0cT1xbf2NoTQwKv99) +![Thank you to Katie Mack for teaching me about this effect, and to Janelle Shane for describing redshifts as 'like galaxies sinking into a pool of dilute blood,' which is how I'll see them from now on.](https://imgs.xkcd.com/comics/angular_diameter_turnaround.png) + +AAPL : 137.64 +SP500 : 3901.36 +TSLA : 663.9 + +## Today + + +# Review +```dataview +list from #lecture where sr-due = date(today) +``` + +## Backlog +- [ ] 09:00 Cosc202 Lab +- [ ] 11:00 Cosc201 Lecture +- [ ] 12:00 Info201 Lab +- [ ] review +- [ ] email about labs c201 +- [ ] 11:00 Cosc202 Lecture +- [ ] 12:00 Cosc201 Lab +- [ ] review +- [ ] Info203 Lectures x2 +- [ ] Info201 Lecture 22 +- [ ] Cosc201 Lab 12 +- [ ] Info201 Lab 7 +- [ ] Info201 Lecture 14 activity and state diagrams +- [ ] Cosc202 Lab 19 + +## Projects +- python ai weekly review +- spotify clone + +## Links +- [202 lab book](C:\Users\Jet%20Hughes\Documents\Personal\COSC202LabBook-2.pdf) +- [i201 cousework](https://isgb.otago.ac.nz/infosci/INFO201/labs_release/raw/master/output/info201_labs.html#) +- [i201 Assignments](https://isgb.otago.ac.nz/info201/shared/assignments_release/raw/master/output/info201_assignments.html) \ No newline at end of file diff --git a/content/daily_notes/2022-05-22.md b/content/daily_notes/2022-05-22.md new file mode 100644 index 000000000..be885b81f --- /dev/null +++ b/content/daily_notes/2022-05-22.md @@ -0,0 +1,37 @@ +[2022-05-21](daily_notes/2022-05-21) << [daily-notes](notes/daily-notes.md) >> [2022-05-23](daily_notes/2022-05-23) + +--- +# 22-05-22 +[ - ](spotify:album:) +![Thank you to Katie Mack for teaching me about this effect, and to Janelle Shane for describing redshifts as 'like galaxies sinking into a pool of dilute blood,' which is how I'll see them from now on.](https://imgs.xkcd.com/comics/angular_diameter_turnaround.png) + +AAPL : 137.59 +SP500 : 3901.36 +TSLA : 663.9 + +## Today +- [x] Info203 Lectures x2 + + +# Review +```dataview +list from #lecture where sr-due = date(today) +``` + +## Backlog +- [ ] Cosc201 Lab 12 +- [ ] Cosc201 follow up email about labs +- [ ] Info201 Lecture 22 performance and security +- [ ] Info201 Lab 7 +- [ ] Info201 Lecture 14 activity and state diagrams +- [ ] Cosc202 Lecture 21 optimisation +- [ ] Cosc202 Lab 19 + +## Projects +- python ai weekly review +- spotify clone + +## Links +- [202 lab book](C:\Users\Jet%20Hughes\Documents\Personal\COSC202LabBook-2.pdf) +- [i201 cousework](https://isgb.otago.ac.nz/infosci/INFO201/labs_release/raw/master/output/info201_labs.html#) +- [i201 Assignments](https://isgb.otago.ac.nz/info201/shared/assignments_release/raw/master/output/info201_assignments.html) \ No newline at end of file diff --git a/content/daily_notes/2022-05-23.md b/content/daily_notes/2022-05-23.md new file mode 100644 index 000000000..102bd0c7e --- /dev/null +++ b/content/daily_notes/2022-05-23.md @@ -0,0 +1,37 @@ +[2022-05-22](daily_notes/2022-05-22) << [daily-notes](notes/daily-notes.md) >> [2022-05-24](daily_notes/2022-05-24) + +--- +# 23-05-22 +[Q: Are We Not Men? A: We Are Devo - Devo](spotify:album:1u2Qni8cVRptDTaA00fmBC) +![Thank you to Katie Mack for teaching me about this effect, and to Janelle Shane for describing redshifts as 'like galaxies sinking into a pool of dilute blood,' which is how I'll see them from now on.](https://imgs.xkcd.com/comics/angular_diameter_turnaround.png) + +AAPL : 137.59 +SP500 : 3901.36 +TSLA : 663.9 + +## Today +- [ ] 11:00 Cosc202 Lecture +- [ ] 12:00 Cosc201 lab + +# Review +```dataview +list from #lecture where sr-due = date(today) +``` + +## Backlog +- [ ] Cosc201 Lab 12 +- [ ] Cosc201 follow up email about labs +- [ ] Info201 Lecture 22 performance and security +- [ ] Info201 Lab 7 +- [ ] Info201 Lecture 14 activity and state diagrams +- [ ] Cosc202 Lecture 21 optimisation +- [ ] Cosc202 Lab 19 + +## Projects +- python ai weekly review +- spotify clone + +## Links +- [202 lab book](C:\Users\Jet%20Hughes\Documents\Personal\COSC202LabBook-2.pdf) +- [i201 cousework](https://isgb.otago.ac.nz/infosci/INFO201/labs_release/raw/master/output/info201_labs.html#) +- [i201 Assignments](https://isgb.otago.ac.nz/info201/shared/assignments_release/raw/master/output/info201_assignments.html) \ No newline at end of file diff --git a/content/daily_notes/2022-05-24.md b/content/daily_notes/2022-05-24.md new file mode 100644 index 000000000..98612a484 --- /dev/null +++ b/content/daily_notes/2022-05-24.md @@ -0,0 +1,41 @@ +[2022-05-23](daily_notes/2022-05-23) << [daily-notes](notes/daily-notes.md) >> [2022-05-25](daily_notes/2022-05-25) + +--- +# 24-05-22 +[Q: Are We Not Men? A: We Are Devo - Devo](spotify:album:1u2Qni8cVRptDTaA00fmBC) +![The film is set in 2018, but when Commander Bremberly chases the hologram through Times Square, there's a billboard for Avengers: Age of Ultron. Depending on the date, that billboard would have been advertising either Infinity War or this movie.](https://imgs.xkcd.com/comics/goofs.png) + +AAPL : 143.11 +SP500 : 3973.75 +TSLA : 674.9 + +## Today +- [x] 10:00 Info203 Lecture +- [ ] 11:00 Cosc201 Lecture +- [ ] 13:00 Info201 Lecture +- [ ] 14:00 Cosc202 Lab + +# Review +```dataview +list from #lecture where sr-due = date(today) +``` + +## Backlog +- [ ] 11:00 Cosc202 Lecture +- [ ] 12:00 Cosc201 lab +- [ ] Cosc201 Lab 12 +- [ ] Cosc201 follow up email about labs +- [ ] Info201 Lecture 22 performance and security +- [ ] Info201 Lab 7 +- [ ] Info201 Lecture 14 activity and state diagrams +- [ ] Cosc202 Lecture 21 optimisation +- [ ] Cosc202 Lab 19 + +## Projects +- python ai weekly review +- spotify clone + +## Links +- [202 lab book](C:\Users\Jet%20Hughes\Documents\Personal\COSC202LabBook-2.pdf) +- [i201 cousework](https://isgb.otago.ac.nz/infosci/INFO201/labs_release/raw/master/output/info201_labs.html#) +- [i201 Assignments](https://isgb.otago.ac.nz/info201/shared/assignments_release/raw/master/output/info201_assignments.html) \ No newline at end of file diff --git a/content/daily_notes/2022-05-25.md b/content/daily_notes/2022-05-25.md new file mode 100644 index 000000000..9cdde0713 --- /dev/null +++ b/content/daily_notes/2022-05-25.md @@ -0,0 +1,42 @@ +[2022-05-24](daily_notes/2022-05-24) << [daily-notes](notes/daily-notes.md) >> [2022-05-26](daily_notes/2022-05-26) + +--- +# 25-05-22 +[Playing With Fire - Spacemen 3](spotify:album:0Ju8YUtJB0RMw8NZXgXe6n) +![The film is set in 2018, but when Commander Bremberly chases the hologram through Times Square, there's a billboard for Avengers: Age of Ultron. Depending on the date, that billboard would have been advertising either Infinity War or this movie.](https://imgs.xkcd.com/comics/goofs.png) + +AAPL : 140.48 +SP500 : 3941.48 +TSLA : 628.16 + +## Today +- [x]] 10:00 Info203 Lecture +- [ ] 16:00 Cosc201 Tutorial + +# Review +```dataview +list from #lecture where sr-due = date(today) +``` + +## Backlog +- [ ] 11:00 Cosc201 Lecture +- [ ] 13:00 Info201 Lecture +- [ ] 14:00 Cosc202 Lab +- [ ] 11:00 Cosc202 Lecture +- [ ] 12:00 Cosc201 lab +- [ ] Cosc201 Lab 12 +- [ ] Cosc201 follow up email about labs +- [ ] Info201 Lecture 22 performance and security +- [ ] Info201 Lab 7 +- [ ] Info201 Lecture 14 activity and state diagrams +- [ ] Cosc202 Lecture 21 optimisation +- [ ] Cosc202 Lab 19 + +## Projects +- python ai weekly review +- spotify clone + +## Links +- [202 lab book](C:\Users\Jet%20Hughes\Documents\Personal\COSC202LabBook-2.pdf) +- [i201 cousework](https://isgb.otago.ac.nz/infosci/INFO201/labs_release/raw/master/output/info201_labs.html#) +- [i201 Assignments](https://isgb.otago.ac.nz/info201/shared/assignments_release/raw/master/output/info201_assignments.html) \ No newline at end of file diff --git a/content/daily_notes/2022-05-26.md b/content/daily_notes/2022-05-26.md new file mode 100644 index 000000000..f9e6d3ecb --- /dev/null +++ b/content/daily_notes/2022-05-26.md @@ -0,0 +1,47 @@ + + +[2022-05-25](daily_notes/2022-05-25) << [daily-notes](notes/daily-notes.md) >> [2022-05-27](daily_notes/2022-05-27) + +--- +# 26-05-22 +[Sweet Baby James - James Taylor](spotify:album:2NEQ5Q4sBbUHVVx3Wf8TEZ) +![Also, they're getting increasingly worried that someone will accidentally hit the 'retract' button, and that the end of the cable thrashing around as it winds up could devastate the Earth's surface.](https://imgs.xkcd.com/comics/voyager_wires.png) + +AAPL : 140.38 +SP500 : 3978.73 +TSLA : 658.8 + +## Today +- [ ] 11:00 Cosc202 Lecture +- [ ] 12:00 Cosc201 Lab +- [ ] 12:00 Info203 Tutorial +- [ ] 16:00 Info201 Lecture + +# Review +```dataview +list from #lecture where sr-due = date(today) +``` + +## Backlog +- [ ] 16:00 Cosc201 Tutorial +- [ ] 11:00 Cosc201 Lecture +- [ ] 13:00 Info201 Lecture +- [ ] 14:00 Cosc202 Lab +- [ ] 11:00 Cosc202 Lecture +- [ ] 12:00 Cosc201 lab +- [ ] Cosc201 Lab 12 +- [ ] Cosc201 follow up email about labs +- [ ] Info201 Lecture 22 performance and security +- [ ] Info201 Lab 7 +- [ ] Info201 Lecture 14 activity and state diagrams +- [ ] Cosc202 Lecture 21 optimisation +- [ ] Cosc202 Lab 19 + +## Projects +- python ai weekly review +- spotify clone + +## Links +- [202 lab book](C:\Users\Jet%20Hughes\Documents\Personal\COSC202LabBook-2.pdf) +- [i201 cousework](https://isgb.otago.ac.nz/infosci/INFO201/labs_release/raw/master/output/info201_labs.html#) +- [i201 Assignments](https://isgb.otago.ac.nz/info201/shared/assignments_release/raw/master/output/info201_assignments.html) diff --git a/content/daily_notes/2022-05-27.md b/content/daily_notes/2022-05-27.md new file mode 100644 index 000000000..cd43d2d2e --- /dev/null +++ b/content/daily_notes/2022-05-27.md @@ -0,0 +1,48 @@ +[2022-05-26](daily_notes/2022-05-26) << [daily-notes](notes/daily-notes.md) >> [2022-05-28](daily_notes/2022-05-28) + +--- +# 27-05-22 +[Exile On Main Street - The Rolling Stones](spotify:album:5dBQ20ppdPxo5bqkoeTKnN) +![Also, they're getting increasingly worried that someone will accidentally hit the 'retract' button, and that the end of the cable thrashing around as it winds up could devastate the Earth's surface.](https://imgs.xkcd.com/comics/voyager_wires.png) + +AAPL : 143.75 +SP500 : 4057.84 +TSLA : 707.73 + +## Today +- [ ] 09:00 Cosc202 Lab +- [ ] 11:00 Cosc201 Lecture +- [ ] 12:00 Info201 Lab + +# Review +```dataview +list from #lecture where sr-due = date(today) +``` + +## Backlog +- [ ] 11:00 Cosc202 Lecture +- [ ] 12:00 Cosc201 Lab +- [ ] 12:00 Info203 Tutorial +- [ ] 16:00 Info201 Lecture +- [ ] 16:00 Cosc201 Tutorial +- [ ] 11:00 Cosc201 Lecture +- [ ] 13:00 Info201 Lecture +- [ ] 14:00 Cosc202 Lab +- [ ] 11:00 Cosc202 Lecture +- [ ] 12:00 Cosc201 lab +- [ ] Cosc201 Lab 12 +- [ ] Cosc201 follow up email about labs +- [ ] Info201 Lecture 22 performance and security +- [ ] Info201 Lab 7 +- [ ] Info201 Lecture 14 activity and state diagrams +- [ ] Cosc202 Lecture 21 optimisation +- [ ] Cosc202 Lab 19 + +## Projects +- python ai weekly review +- spotify clone + +## Links +- [202 lab book](C:\Users\Jet%20Hughes\Documents\Personal\COSC202LabBook-2.pdf) +- [i201 cousework](https://isgb.otago.ac.nz/infosci/INFO201/labs_release/raw/master/output/info201_labs.html#) +- [i201 Assignments](https://isgb.otago.ac.nz/info201/shared/assignments_release/raw/master/output/info201_assignments.html) \ No newline at end of file diff --git a/content/notes/02-version-control-system.md b/content/notes/02-version-control-system.md new file mode 100644 index 000000000..81a625fbe --- /dev/null +++ b/content/notes/02-version-control-system.md @@ -0,0 +1,14 @@ +--- +title: "02-version-control-system" +aliases: +tags: +- info201 +- lecture +sr-due: 2022-05-29 +sr-interval: 9 +sr-ease: 250 +--- + +[git](notes/git.md) + +[VCS](notes/version-control-systems.md) diff --git a/content/notes/04-evaluation-methods-birth-of-hci.md b/content/notes/04-evaluation-methods-birth-of-hci.md index 0266e83cb..bfaa10288 100644 --- a/content/notes/04-evaluation-methods-birth-of-hci.md +++ b/content/notes/04-evaluation-methods-birth-of-hci.md @@ -1,7 +1,7 @@ --- title: "04-evaluation-methods-birth-of-hci" -sr-due: 2022-05-22 -sr-interval: 40 +sr-due: 2022-08-22 +sr-interval: 92 sr-ease: 230 aliases: tags: @@ -17,4 +17,4 @@ Possible exam questions - Difference User Experience - Usability - Describe applications where the subject’s satisfaction is of less importance than effectiveness and efficiency - Compare the advantages and disadvantages of a laboratory based and a field based evaluation of a user interface? -- Describe the different characteristics of quantitative and qualitative measurements in HCI! \ No newline at end of file +- Describe the different characteristics of quantitative and qualitative measurements in HCI! diff --git a/content/notes/06-business-functions-and-use-cases.md b/content/notes/06-business-functions-and-use-cases.md index 3d6d6ed9e..61980b03e 100644 --- a/content/notes/06-business-functions-and-use-cases.md +++ b/content/notes/06-business-functions-and-use-cases.md @@ -3,8 +3,8 @@ title: "06-business-functions-and-use-cases" tags: - info201 - lecture -sr-due: 2022-05-11 -sr-interval: 3 +sr-due: 2022-06-04 +sr-interval: 17 sr-ease: 270 --- @@ -12,12 +12,20 @@ sr-ease: 270 1. What are the two main approaches to systems development and how do they differ +- object oriented - system is a collection of objects +- tranditional - system is a collectin of processes + [business-functions](notes/business-functions.md) + 2. What are business functions +things that a business *ought* to be doing not who, how, structure, tech + 3. What is a use case +an interaction between a role and a system to achieve a goal 4. What is a use case diagram used for +a high level descruption of how people interact with a system [use-case-diagrams](notes/use-case-diagrams.md) diff --git a/content/notes/07-heuristic-evaluation-cont.md b/content/notes/07-heuristic-evaluation-cont.md index 783323c9e..747a1f213 100644 --- a/content/notes/07-heuristic-evaluation-cont.md +++ b/content/notes/07-heuristic-evaluation-cont.md @@ -3,8 +3,8 @@ title: "07-heuristic-evaluation-cont" tags: - info203 - lecture -sr-due: 2022-05-11 -sr-interval: 3 +sr-due: 2022-06-02 +sr-interval: 15 sr-ease: 250 --- diff --git a/content/notes/07-testing.md b/content/notes/07-testing.md index 4e01ce03d..5c6ced027 100644 --- a/content/notes/07-testing.md +++ b/content/notes/07-testing.md @@ -3,11 +3,11 @@ title: "07-testing" tags: - cosc202 - lecture -sr-due: 2022-05-18 -sr-interval: 8 + +sr-due: 2022-06-9 +sr-interval: 22 sr-ease: 270 --- - - [testing](notes/testing.md) - [test-driven-development](notes/test-driven-development.md) - [unit-testing](notes/unit-testing.md) @@ -18,3 +18,15 @@ sr-ease: 270 - explain how unit tests ar developed - indicate how languages integreate unit test support - apppreiciate limitation of software testing + +# Flash cards +## Testing +what are unit tests::Testing individual pieces of code +what are integration tests::tests checking that code works together +what are end-to-end tests::tests that check the behaviour of the while program +what is the halting problem::you cant fully analyse code using code + +## TDD +what is TDD::a software dev. methodology where tests are written before code + +## Unit testing diff --git a/content/notes/08-business-patterns.md b/content/notes/08-business-patterns.md index d43649346..f55ffb996 100644 --- a/content/notes/08-business-patterns.md +++ b/content/notes/08-business-patterns.md @@ -1,11 +1,11 @@ --- title: "08-business-patterns" -sr-due: 2022-05-19 -sr-interval: 37 +sr-due: 2022-08-27 +sr-interval: 100 sr-ease: 270 tags: - info201 - lecture --- -[entity-relationship-diagrams](notes/entity-relationship-diagrams.md) \ No newline at end of file +[entity-relationship-diagrams](notes/entity-relationship-diagrams.md) diff --git a/content/notes/08-debugging.md b/content/notes/08-debugging.md index 3391a4f20..17f656879 100644 --- a/content/notes/08-debugging.md +++ b/content/notes/08-debugging.md @@ -3,9 +3,10 @@ title: "08-debugging" tags: - cosc202 - lecture -sr-due: 2022-05-11 -sr-interval: 3 +sr-due: 2022-06-03 +sr-interval: 16 sr-ease: 250 --- [debugging](notes/debugging.md) + diff --git a/content/notes/09-data-modelling-and-normalisation.md b/content/notes/09-data-modelling-and-normalisation.md index 058252552..2ccd42f7e 100644 --- a/content/notes/09-data-modelling-and-normalisation.md +++ b/content/notes/09-data-modelling-and-normalisation.md @@ -3,11 +3,19 @@ title: "09-data-modelling-and-normalisation" tags: - info201 - lecture -sr-due: 2022-05-11 -sr-interval: 9 +sr-due: 2022-06-18 +sr-interval: 31 sr-ease: 250 --- - [redundancy-and-anomalies](notes/redundancy-and-anomalies.md) - [dependencies](notes/dependencies.md) + +wia functional dependecy::when some attribute has exactly one associated other attribute +wia transitive dependency:: A→B, B→C [Transitive dependency](notes/dependencies.md#Transitive%20dependency) +wia partial dependency:: when a subset of the left determines the right +wia multivalued dependency::when something has a set of associated values of another attribute + - [normalisation](notes/normalisation.md) + +what is normalisation::formal process of eliminanting unnecessary redundancy in relations by splitting relations into smaller chunks \ No newline at end of file diff --git a/content/notes/09-documentation.md b/content/notes/09-documentation.md index 14ba433f1..094e6a9aa 100644 --- a/content/notes/09-documentation.md +++ b/content/notes/09-documentation.md @@ -8,4 +8,4 @@ sr-interval: 28 sr-ease: 290 --- -[documentation](notes/documentation.md) \ No newline at end of file +[documentation](notes/documentation.md) diff --git a/content/notes/09-stacks-queues-heaps.md b/content/notes/09-stacks-queues-heaps.md index 74f300dbf..b37b0a4e9 100644 --- a/content/notes/09-stacks-queues-heaps.md +++ b/content/notes/09-stacks-queues-heaps.md @@ -3,11 +3,13 @@ title: "09-stacks-queues-heaps" tags: - cosc201 - lecture -sr-due: 2022-05-12 -sr-interval: 2 +sr-due: 2022-05-29 +sr-interval: 11 sr-ease: 210 --- -- [stacks-and-queues](notes/stacks-and-queues.md) +- [dynamic-linear-datatype](notes/dynamic-linear-datatype.md) + - [Stack](notes/dynamic-linear-datatype.md#Stack) + - [Queue](notes/dynamic-linear-datatype.md#Queue) - [priority-queue](notes/priority-queue.md) -- [heap](notes/heap.md) \ No newline at end of file +- [heap](notes/heap.md) diff --git a/content/notes/10-continuous-integration-1.md b/content/notes/10-continuous-integration-1.md index a96ac2c71..1b9226d15 100644 --- a/content/notes/10-continuous-integration-1.md +++ b/content/notes/10-continuous-integration-1.md @@ -16,4 +16,4 @@ sr-ease: 250 4. understand implications of CI running asynchronously 5. Exlplain how to manage output from CI jobs 6. describe role of stages and jobs within gitlab pipelines -7. indicate how CI specifications are stored \ No newline at end of file +7. indicate how CI specifications are stored diff --git a/content/notes/10-design-heuristics-1.md b/content/notes/10-design-heuristics-1.md index dcc48bc35..af72e1d9b 100644 --- a/content/notes/10-design-heuristics-1.md +++ b/content/notes/10-design-heuristics-1.md @@ -3,8 +3,8 @@ title: "10-design-heuristics-1" tags: - info203 - lecture -sr-due: 2022-05-11 -sr-interval: 3 +sr-due: 2022-06-03 +sr-interval: 16 sr-ease: 250 --- @@ -21,11 +21,10 @@ create multiple ideas in parallel rather than one after the other ![](https://i.imgur.com/zPrMKlz.png) ## Functional fixation - This is when you get tunnel vision about some design. This causes you to not consider other possible alternatives. For example with nail problem, almost nobody consider using the nails it the way that is needed. ![](https://i.imgur.com/h1c095B.png) ## 4 Design heuristics - +[design-heuristics](notes/design-heuristics.md) diff --git a/content/notes/10-heaps-and-heapsort.md b/content/notes/10-heaps-and-heapsort.md index c4db0e9c0..85a4400f3 100644 --- a/content/notes/10-heaps-and-heapsort.md +++ b/content/notes/10-heaps-and-heapsort.md @@ -98,4 +98,4 @@ Merge is preferred because extra memory cost of merge sort is negligible -∴ Merge sort is faster \ No newline at end of file +∴ Merge sort is faster diff --git a/content/notes/10-oop-concepts-and-uml.md b/content/notes/10-oop-concepts-and-uml.md index f4794be83..4e822fe43 100644 --- a/content/notes/10-oop-concepts-and-uml.md +++ b/content/notes/10-oop-concepts-and-uml.md @@ -3,8 +3,8 @@ title: "10-oop-concepts-and-uml" tags: - info201 - lecture -sr-due: 2022-05-11 -sr-interval: 3 +sr-due: 2022-06-05 +sr-interval: 18 sr-ease: 270 --- @@ -13,4 +13,4 @@ sr-ease: 270 3. give an example of how difference UML diagram types can be linked when modelling a system - [object](notes/object.md) -- [unified-modelling-language](notes/unified-modelling-language.md) \ No newline at end of file +- [unified-modelling-language](notes/unified-modelling-language.md) diff --git a/content/notes/11-class-diagrams.md b/content/notes/11-class-diagrams.md index f6d031fd5..7ccd64cdd 100644 --- a/content/notes/11-class-diagrams.md +++ b/content/notes/11-class-diagrams.md @@ -9,4 +9,4 @@ sr-interval: 75 sr-ease: 270 --- -[class-diagrams](notes/class-diagrams.md) \ No newline at end of file +[class-diagrams](notes/class-diagrams.md) diff --git a/content/notes/11-continuous-integration-2.md b/content/notes/11-continuous-integration-2.md index b8936d81f..dc6a3219f 100644 --- a/content/notes/11-continuous-integration-2.md +++ b/content/notes/11-continuous-integration-2.md @@ -15,4 +15,4 @@ tags: 5. Describe a way in which CI scripts scan handle secrets 6. Outline uses of local git hook scripts -[continuous integration](notes/continuous-integration.md) \ No newline at end of file +[continuous integration](notes/continuous-integration.md) diff --git a/content/notes/11-sets-maps-trees.md b/content/notes/11-sets-maps-trees.md index 5a2b9ae49..f4b720549 100644 --- a/content/notes/11-sets-maps-trees.md +++ b/content/notes/11-sets-maps-trees.md @@ -8,8 +8,8 @@ sr-interval: 33 sr-ease: 270 --- -A [set](notes/set.md) is :: a collection of elements with no repetition allowed +A [set](notes/set.md) is :: a collection of elements with no repetition allowed -A [hash-map](notes/hash-map.md) is :: a set of key value pairs +A [hash-map](notes/hash-map.md) is :: a set of key value pairs -A [tree](notes/tree.md) is :: a general concept of a way of organising data. +A [tree](notes/tree.md) is :: a general concept of a way of organising data. diff --git a/content/notes/12-automation.md b/content/notes/12-automation.md index 4507c787e..563039f84 100644 --- a/content/notes/12-automation.md +++ b/content/notes/12-automation.md @@ -104,4 +104,4 @@ Spreadsheets allow a mix of pattern (using formula) and exceptions (overriding f For example. each row is a command invocation. Columns build up command's invocation, including formulae. Then use concatenate function to join text from other columns. And copy and paste the rows into your shell -This is useful for idempotent commands. i.e., change happens once. As nothing bad will happen if a command is run twice \ No newline at end of file +This is useful for idempotent commands. i.e., change happens once. As nothing bad will happen if a command is run twice diff --git a/content/notes/12-binary-search-tree-operations.md b/content/notes/12-binary-search-tree-operations.md index 64bcf7f7b..4675d1925 100644 --- a/content/notes/12-binary-search-tree-operations.md +++ b/content/notes/12-binary-search-tree-operations.md @@ -10,4 +10,4 @@ sr-ease: 270 Recall [binary-search-tree](notes/binary-search-tree.md) -[binary search tree operations](notes/bst-operations.md) \ No newline at end of file +[binary search tree operations](notes/bst-operations.md) diff --git a/content/notes/12-design-heuristics-3.md b/content/notes/12-design-heuristics-3.md index b3ce31f4c..e5e6a7c50 100644 --- a/content/notes/12-design-heuristics-3.md +++ b/content/notes/12-design-heuristics-3.md @@ -3,8 +3,8 @@ title: "12-design-heuristics-3" tags: - info203 - lecture -sr-due: 2022-05-20 -sr-interval: 27 +sr-due: 2022-08-06 +sr-interval: 78 sr-ease: 290 --- diff --git a/content/notes/12-modelling-behaviour.md b/content/notes/12-modelling-behaviour.md index 89c4d9841..a82f0134a 100644 --- a/content/notes/12-modelling-behaviour.md +++ b/content/notes/12-modelling-behaviour.md @@ -17,9 +17,9 @@ sr-ease: 250 - compartmentalisation into "subsystems" 1. Compare and contrast the two typical approaches to inheriting behaviour in OO systems. -2. What does it mean to “program to an interface” and why is this important? -3. Compare and contrast “rich” versus “anaemic” domain models with regards to behaviour. -4. Give an example of a “processor” in the context of OO system design and explain why these are useful. +2. What does it mean to “program to an interface? and why is this important? +3. Compare and contrast “rich? versus “anaemic? domain models with regards to behaviour. +4. Give an example of a “processor? in the context of OO system design and explain why these are useful. @@ -64,7 +64,7 @@ e.g., - Search specifies a set of common behaviour. - public methods and constant fields only (no variable fields) - - effectively an “inheritable” public API (no implementation) ⇒ Catalogue must implement all Search methods + - effectively an “inheritable? public API (no implementation) ⇒ Catalogue must implement all Search methods - independent of inheritance via specialisation - a class can implement multiple interfaces - Things that know how to use Search will also accept Catalogue. @@ -82,7 +82,7 @@ e.g., - The public API defines what a class can do - e.g., read and write data, manage a list of items - - effectively a “promise” or “contract” to other classes that use it + - effectively a “promise? or “contract? to other classes that use it - should be as stable as possible - The private implementation defines how a class behaves @@ -142,7 +142,7 @@ Anything coded to work with Collection will accept *any* Java collection type. ( ## 3.1 Rich domain models -- True OO involves sending objects “native instructions” beyond basic getter/setter methods: +- True OO involves sending objects “native instructions? beyond basic getter/setter methods: - e.g., they can save, display, update, validate, etc., themselves - often requires communicating with other objects - Advantages: @@ -150,9 +150,9 @@ Anything coded to work with Collection will accept *any* Java collection type. ( - methods are highly cohesive (focused) - natural fit with programming to an interface - Disadvantages: - - many “chicken and egg” situations ⇒ harder to use + - many “chicken and egg? situations ⇒ harder to use - bordering on taking things too far (too much abstraction) - - well beyond comfort zone of many developers (“exotic”) + - well beyond comfort zone of many developers (“exotic?) ### 3.1.1 Rich domain example: Library system @@ -161,13 +161,13 @@ Anything coded to work with Collection will accept *any* Java collection type. ( ## 3.2 Contrast with anaemic domain models -- Objects have relatively little “native” behaviour: (if any) +- Objects have relatively little “native? behaviour: (if any) - mostly just state - don’t inherit from anything else (class or interface) - getters/setters don’t really encapsulate much - methods manipulate only internal state (no external communication) - generally referred to as JavaBeans in Java (also POJO) -- Require a lot of “plumbing” code to shift data into and out of objects so we can do something useful with it. +- Require a lot of “plumbing? code to shift data into and out of objects so we can do something useful with it. - De facto standard for most programmers/systems ![](https://i.imgur.com/snGpG4m.png) @@ -182,8 +182,8 @@ Anything coded to work with Collection will accept *any* Java collection type. ( - shipping (sub)system - inventory (sub)system - … -- “Processor objects” can encapsulate these interactions: - - effectively “(sub)system APIs” that group related behaviour +- “Processor objects? can encapsulate these interactions: + - effectively “(sub)system APIs? that group related behaviour - either classes or (Java) interfaces, as appropriate - methods take relevant domain objects as arguments - Third-party frameworks can reduce the amount of code you need to write even further. (see INFO 202) @@ -196,6 +196,6 @@ Anything coded to work with Collection will accept *any* Java collection type. ( - Behaviour can be inherited directly via specialisation, or indirectly by implementing an interface. - interfaces decouple public API from private implementation - programming to an interface -- Domain models can be “rich” or “anaemic”. +- Domain models can be “rich? or “anaemic?. - anaemic more common -- use “processors” to encapsulate “plumbing” code \ No newline at end of file +- use “processors? to encapsulate “plumbing? code diff --git a/content/notes/13-bst-traversals-and-balance.md b/content/notes/13-bst-traversals-and-balance.md index fb0630145..4ef78c515 100644 --- a/content/notes/13-bst-traversals-and-balance.md +++ b/content/notes/13-bst-traversals-and-balance.md @@ -4,129 +4,10 @@ aliases: tags: - cosc201 - lecture -sr-due: 2022-05-18 -sr-interval: 25 +sr-due: 20220725 +sr-interval: 68 sr-ease: 270 --- -# Traversals -- in any tree - - preorder --> visit the root, then for each child of the root, predorder teaverse the subtree rooted at that child - - postorder --> for each child of the root posrtorser traverse the subtreeet rooted at that child, then visit the root - - level order --> visit the root, then all its children , then all its granchildren -- in BSTs only: - - inorder --> inorder traverse the subtree rooted at the lefdt cyhild then visit the root, then inorder traverse the subtree rooted at the right child - -## code -- returns the perorder tracersal as an arraylist -- not usual, traversals are genrally ideas used in algorithms, not independent methods - -### pre post and in order traversal code -```java -public ArrayList order() { - ArrayList result = new Arraylist<>(); //set up the result - preorder(root, result); //preorder starting at the root - postorder(root, result); - inorder(root, result); - return result; -} - -//helper method for preorder traversal -//use r as working storage to preorder traverse the tree below n -private void preorder(Node n, ArrayList r){ - if(n==null) return; - r.add(n.key); //add this node the reults - preorder(n.left, r); //traverse the left subtree - preorder(r.right, r); //traverse the right subtree -} - -//helper method for preorder traversal -//use r as working storage to preorder traverse the tree below n -private void inorder(Node n, ArrayList r){ - if(n==null) return; - inorder(n.left, r); //traverse the left subtree - r.add(n.key); //add this node the reults - inorder(r.right, r); //traverse the right subtree -} - -//helper method for preorder traversal -//use r as working storage to preorder traverse the tree below n -private void postorder(Node n, ArrayList r){ - if(n==null) return; - postorder(n.left, r); //traverse the left subtree - postorder(r.right, r); //traverse the right subtree - r.add(n.key); //add this node the reults -} -``` - -![](https://i.imgur.com/vsZtkIp.png) - -### level order -- want to visit the root -- visit its children -- visit their children -- etc - -not recursive -maintain a queue of pending visits - -``` -if root = nil then return [] - -res <- [], q <- [root] -while q is not empty do - n <- q.remove() - res.add(n) - for c in n.children do - q.add(c) - end for -end while -return res -``` - -```java -public Arraylist levelorder() { - ArrayList result = new ArrayList<>(); - if(isEmpty()) return result; - ArrayDeque q = new ArrayDeque<>(); - q.add(root) - while (!q.isEmpty()) { - Node n = q.remove() - result.add(n.key); - if(n.left != null) q.add(n.left); - if(n.right != null) q.add(n.right); - } - return result; -} -``` - - -if we use a stack then its the same as preorder. - -# Balancing trees -long branches are a problem -the performance bounds for all BST operations are linear of the length of the longest branch of the tree - -ideal shape is a similar to a heap (wide and shallow). - -we want the longest branch to be $\theta(lg\ n)$ - - -one way is to do an iorder traversal and save to a sorted array. then construct a new tree by repeatedly bisecting the array. and recursively building the left and right subtrees - -need some local operation that helps to restore balance - -## Rotation operation - -suppose that in this bst there is a longer chain in e than else where - -![100](https://i.imgur.com/SmDsZd1.png) - -imagine twisting d to be the root - -![100](https://i.imgur.com/6MoYHX1.png) - -changes are -- b's right child is now c -- d's left child is not b -- b parent now points to d \ No newline at end of file +[tree-traversal](notes/tree-traversal.md) +[balancing-binary-search-trees](notes/balancing-binary-search-trees.md) \ No newline at end of file diff --git a/content/notes/13-code-librarires.md b/content/notes/13-code-librarires.md index e1ef196cb..f026b1f1c 100644 --- a/content/notes/13-code-librarires.md +++ b/content/notes/13-code-librarires.md @@ -1,101 +1,19 @@ --- title: "13-code-librarires" -aliases: code libraries, libraries, software library +aliases: tags: - cosc202 - lecture -sr-due: 2022-05-25 -sr-interval: 30 +sr-due: 2022-08-14 +sr-interval: 81 sr-ease: 270 --- -# what is a software library - -- collections of potentailly useful code. -- implement comon fuunctionality so you dont have to -- e.g., - - music processign - - game engines - - etc. - -- languages may include standard libraries -- *standard library* is one that is always available within a language - - e.g., Java standard library -- these make up only a small part of the broader available library functionality - - -# Pros and cons of libraries - -- utf-8 conversion tables and collation schemes - - e.g., for comparing equality of e.g., 'Māori' and 'Maori'. - - this equality depends on the 'collation' scheme that is being used - - conversion tables and collations are need for all known languages - - it is good to not have to rewite these for each piece of software - - just use a library - -- library code quality - - well written libraries can propogate great benefits - - econoomies of scale from reusilng good implementations - - somebody needs to pay for the develp ment of the library - - needs to be maintained - - There is a downside - code homogeneity - - all programs using the same library carry the same security bugs - - if you dont know the librar;y in detail you may not be able to fully utilise it - -- deep experience libraries - - intel creates libraries that utilise their CPUs the best - - they dont have to wait for library to be made that fully utilises their hardware - - - -# understand trasitive dependencies in libraries -https://xkcd.com/2347/ - -libraries rely on other libraries. These are called transitive dependencies. - -Software bill of materials enumerate what you depend on. -when one of the libraries you use is updates, you may need to update to . - -# how they are provided -- provided within language -- some OSs provide large amounts of functionality - - e.g., apple ecosystem - - co dev of language and OS - - microsoft windows ecosystem - - .net - -# your obligations from using libraries - -mulitple different ways to interact with libraries -- tight integration compiler builds library code into yours - - only uses parts of library that you included in your app - - but upgrading library requires rebuilding the app -- library is packed alongside you app - - may bloat youu app: includes unused library parts -- licencing of the library - - legal obligations - -# considerations when writing libraries -- must consider general use cases -- proper documentation -- future maintenance - - include abstractions to facilitate incremental updates -- version numbering is important for compatibility - - minor changes wont affect existing code - - major changes will affect existing code - -# features of Java standard libraries -- very large -- e.g., two flavours of I/O - - traditional - - async i.e., non-blocking (NIO) -- written in java - - portable across OSs - - thin layer of OS specific code - - this helped it to - -# FYI "Boost"ing C++ library support - -boost is a rich set of libraries for C++ - - +[software library](notes/libraries.md) +- Explain what a software library is +- Describe reasons for/against using libraries +- Understand transitive dependencies in libraries +- Appreciate your obligations from using libraries +- Outline considerations when writing libraries +- Highlight features of the Java standard libraries \ No newline at end of file diff --git a/content/notes/13-design-heuristics-4.md b/content/notes/13-design-heuristics-4.md index 096b76b3a..5fc9c2fb3 100644 --- a/content/notes/13-design-heuristics-4.md +++ b/content/notes/13-design-heuristics-4.md @@ -4,49 +4,12 @@ aliases: tags: - info203 - lecture -sr-due: 2022-05-11 -sr-interval: 3 +sr-due: 2022-06-01 +sr-interval: 14 sr-ease: 250 --- - -# aesthetic and minimalist -- signal to noise ratio -- what are you core functionality -- how can you best use your screen space - -recognise diagnore recover from errors -- make the problem clear -- e.g., username or password is wrong vs username is wrong -- provide a solution and inform users (treat the users as adults - -# help -- guide the way and show steps -- online help - - transition from built in help to links to online help - - sometimes users dont have an internet connection - - e.g., chrons app used all the data -- help clearly and transparently - - e.g., privacy and terms/conditions - -# anti design heuristics -[](https://i.imgur.com/BHJ5iQU.png) -[](https://i.imgur.com/DrqSSK5.png) -[](https://i.imgur.com/KPW6h19.png) - -## dark patterns -turniing patterns against the user. -all the dsign heuristics can be used against the user - -- [oxfam example](https://i.imgur.com/mn3oK05.png): defaults to a recurring payment -- [comet shop example](https://i.imgur.com/nGfdk7W.png): additional product is automatically included -- [complicated contract](https://i.imgur.com/mTJmqwa.png) -- [flight booking](https://i.imgur.com/6uwauOB.png) -- [amazon cancel prime](https://i.imgur.com/06htsKV.png) -- cancel facebook account -- [FOMO](https://i.imgur.com/Ikf0DiF.png) - -who is the customer of free products like tiktik, facebook, instagram. WE are not the customer, we are the animals in the zoo, the products - - - - +[aesthetic-and-minimalist-design](notes/aesthetic-and-minimalist-design.md) +[help-and-documentation](notes/help-and-documentation.md) +[recognise-and-recover-from-errors](notes/recognise-and-recover-from-errors.md) +[anti-design-heristics](notes/anti-design-heristics.md) +[dark-patterns](notes/dark-patterns.md) diff --git a/content/notes/14-apis.md b/content/notes/14-apis.md new file mode 100644 index 000000000..ba39e4d1b --- /dev/null +++ b/content/notes/14-apis.md @@ -0,0 +1,20 @@ +--- +title: "14-apis" +aliases: +tags: +- cosc202 +- lecture +sr-due: 2022-05-31 +sr-interval: 9 +sr-ease: 252 +--- + +- purpose of apis +- apis vs code libraries +- why web technologies assist API development +- REST +- apis in cloud mircoservices +- building APIs +- maintenance of APIs + +[application-programming-interface](notes/application-programming-interface.md) \ No newline at end of file diff --git a/content/notes/14-balancing-bsts.md b/content/notes/14-balancing-bsts.md index c7069b1d1..be247aecd 100644 --- a/content/notes/14-balancing-bsts.md +++ b/content/notes/14-balancing-bsts.md @@ -4,8 +4,8 @@ aliases: tags: - cosc201 - lecture -sr-due: 2022-05-13 -sr-interval: 11 +sr-due: 2022-06-10 +sr-interval: 28 sr-ease: 250 --- diff --git a/content/notes/14-direct-manipulation-and-mental-models.md b/content/notes/14-direct-manipulation-and-mental-models.md index f95ff05b9..985211965 100644 --- a/content/notes/14-direct-manipulation-and-mental-models.md +++ b/content/notes/14-direct-manipulation-and-mental-models.md @@ -27,7 +27,9 @@ the designer needs to create mapping from the real world unicers ofb objects and time to point to something depends on its size and distance: $$ MT = C1 + C2\ log_2(2A/W) -$$ where C1 and C2 are contstants that depend on the device. A is the distance that users have to move and W is the target size. +$$ + +where C1 and C2 are contstants that depend on the device. A is the distance that users have to move and W is the target size. - buttons and othe controls should be of reasonable size - things done more often should a assigned a larger button @@ -38,4 +40,4 @@ $$ where C1 and C2 are contstants that depend on the device. A is the distance t # Combining inputs -often multiple ways of doing one thing \ No newline at end of file +often multiple ways of doing one thing diff --git a/content/notes/15-dynamic-programming.md b/content/notes/15-dynamic-programming.md index f2a53294a..b000dbd72 100644 --- a/content/notes/15-dynamic-programming.md +++ b/content/notes/15-dynamic-programming.md @@ -4,119 +4,13 @@ aliases: tags: - lecture - cosc201 -sr-due: 2022-05-19 -sr-interval: 10 +sr-due: 2022-06-13 +sr-interval: 25 sr-ease: 250 --- -- [dynamic-programming](notes/dynamic-programming.md) -- [memoization](notes/memoization.md) +![dynamic-programming](notes/dynamic-programming.md) - - - - - - - -What is dynamic programming? - -Dynamic is just a name chosen so that it cannot be used ina bad way i.e., it cannot have bad connotations. - -Programming refers not the just compute programming. - -In three words: remembering useful answers -In more than three words: Trading space (remembering useful answers) for time (not having to recompute them later). - -# Fibonacci numbers example - -$f_{0}= f_{1}= 1, f_{n}=f_{n-1}+ f_{n-2}\ for\ n > 1$ - -the obvious recursive implementation requires exponential time becuase the recursive sub-problems -- compute $f_n-1$, and -- compute $f_n-2$ -overlap (the first generates an instance of the second in the next recurive call) - -DP says "since you know you're goinf to need the values later, remember them as you compute them", and (technically), does one more thing. "while youre at it, since you need to know all the values, you might as well compute from simplest to most complex (bottom up)" - -convert recursive algorithms to counter controlled for or while loops. - -```java -public long fibDP (int n) { - long[] f = new long[n+1]; - f[0] = 1; f[1] = 0; - for(int i = 2; i <= n; i++){ - f[i] = f[i-1] + f[i-2]; - } - return f[n]; -} -``` - -- initialise memorrt to store the answers for simpler problems -- work from bottom up -- return answer - -```java -static HashMap fib = new HashMap<>(); -public static long fibMEM(int n) { - if(n <= 1) return 1; - if(!fib.containsKey(n)) { - fib.put(n, fibMEM(n-1) + fibMEM(n-2)); - } - return fib.get(n); -} -``` -- this technique is called memoization (or caching) -- whenever you compute a result store it somewhere before returning it -- look it up(if you can) when needed -- supported automatically in some languages (e.g., Python's @functools.cache, and any symbolic programming language) - -# DP vs memoization -bottom typically compute *all* simpler versions of the problem. When this is neccessary then DP will be faster. However it only a small proportion of the previous case are actually needed it may be better to use memoization. sometimes we can reduct the storage need for DP too. e.g., in the following fibonacci example - -better fibonacci -```java -public long fibDP (int n) { - int a = 1, b = 1, c = 1; - for(int i = 2; i <= n; i++){ - c = a + b; - a = b; - b = c; - } - return c; -} -``` - -# DP vs Divide and conquer - -d and c is splitting into chunks with *no overlap*. So there's nothing to gain by remembering one part, since it cant help in solving any other part. - -DP or memozation should be used only when there is value added by remembering answers. - -# Route counting example - -![](https://i.imgur.com/AKl2fY5.png) - -Compute the number of routes from A to Z travelling only east or south. - -Number of routes to Z is the sum of the number of routes to Z's western and northern neighbors. This is true for all nodes except for the edges. - -The ideas to to fill the grid with numbers, where each node is the sum of its preceding neighbors. - -```java -public long count(int rows,int cols){ - long[][] counts = new long[rows][cols]; - //init edges to 1 - for (rows){ - for (cols){ - counts[r][c] = counts[r-1][c] + counts[r][c-1]; - } - } - return counts[rows-1][cols-1]; -} -``` - - -- since we can copute all the values in one row just from the preceding row, we could reduce the extra space requirement from rows x cols to just cols \ No newline at end of file +![memoization](notes/memoization.md) \ No newline at end of file diff --git a/content/notes/15-from-models-to-code-and-back.md b/content/notes/15-from-models-to-code-and-back.md index cdbd8ba06..621571164 100644 --- a/content/notes/15-from-models-to-code-and-back.md +++ b/content/notes/15-from-models-to-code-and-back.md @@ -4,29 +4,10 @@ aliases: tags: - info201 - lecture -sr-due: 2022-05-14 -sr-interval: 12 +sr-due: 2022-06-21 +sr-interval: 34 sr-ease: 250 --- - [UML to Java Foward Engineering](notes/uml-java-forward-engineering.md) -- [round-trip-engineering](notes/round-trip-engineering.md) - -# Round trip engineering - -going from models like UML to code, or ERD's to SQL - -the idea is to try and keep the diagrams and code semantivally equivalent - -foward - diagrams to code -reverse - code to diagrams - -former is more common, but both do occur. - -MDA (model driven architecture) is when code is comletely derived from the diagrams. However this is not that easy - -foward engineering can be used to create skeleton code much more easily - -fully representing code is UML is tricks as code is more difficult. It is hard to maintain consistency. This is easier with erds and sql than other types as these dont have to worry about behaviour. so the mappping is more simple. With uml and java is gets complex fast - -this idea sounds good but in practice is not practical. THere is an qgument hat code is part of the design anyway. Code is a detailed form of a model. \ No newline at end of file +- [round-trip-engineering](notes/round-trip-engineering.md) \ No newline at end of file diff --git a/content/notes/15-mental-models-representation-matters-distributing-cognition.md b/content/notes/15-mental-models-representation-matters-distributing-cognition.md index 235300cfe..7589f876b 100644 --- a/content/notes/15-mental-models-representation-matters-distributing-cognition.md +++ b/content/notes/15-mental-models-representation-matters-distributing-cognition.md @@ -4,12 +4,11 @@ aliases: tags: - info203 - lecture -sr-due: 2022-05-12 -sr-interval: 10 +sr-due: 2022-06-20 +sr-interval: 33 sr-ease: 250 --- - doors are simple. But they are still done wrong very often. Incorrect labelling can give the user a wrong mental model - widening the "gulf of execution". Signifiers like handles, can create a certain mental model making you pull it. These are easier to process than labels like push and pull. Our brains are lazy, we will choose the easiest option. Door is very simple compared to computer interface. Yet they are still done wrong. @@ -24,4 +23,4 @@ Door is very simple compared to computer interface. Yet they are still done wron # Representation Matters and Distributing cognition -[representation-and-distributing-cognition](notes/representation-and-distributing-cognition.md) \ No newline at end of file +[representation-and-distributing-cognition](notes/representation-and-distributing-cognition.md) diff --git a/content/notes/16-c201-archive.md b/content/notes/16-c201-archive.md new file mode 100644 index 000000000..0d88b19dc --- /dev/null +++ b/content/notes/16-c201-archive.md @@ -0,0 +1,91 @@ +--- +title: "16-c201-archive" +aliases: +tags: +- cosc201 +- archived-lecture +--- + +## In a perfect world +- keys from a class k, valuyes from a class v +- there are only 4000 possible keys +- each key, k, has a unique four digit identifier than we can obtain in constant time as `k.id();` + +```java +V[] map = new V[10000]; + +public V put(K key, V value){ + V old = map[k.id()]; + map[k.id()] = value; + return old; //to match java map interface +} + +public V get(K key){ + return map[k.id()]; +} + +public V remove(K key){ + V old = map[k.id()]; + map[k.id()] = null; + return old; +} +``` + +works but: +- we need to allocate 10000 spaces of storage +- require `k.id();` in constant time +- cannot store null values (key not present vs key is mapped to null) (we will need more storage) + +so: +- we should only require storage for what we need, not for all possible keys +- need to use `Array` for constant time add, remove, get. (we may need to resize the array sometimes) + +## Considering space +```java +V[] map = new V[53]; + +public V put(K key, V value){ + V old = map[k.id() % v.length]; + map[k.id() % v.length] = value; + return old; //to match java map interface +} + +public V get(K key){ + return map[k.id() % v.length]; +} + +public V remove(K key){ + V old = map[k.id() % v.length]; + map[k.id() % v.length] = null; + return old; +} + +``` + +Problem: +- some keys can be duplicated + +## Solving k.id() +- solution is to make one up. +- since collisions are inevitable, uniqueness is not required +- made up ID called a `hash code` +- a *hash function* take objects from a class as input and produces a value from a fixed finite set of values (in Java, an `int`) +- properites it should have + - should be fast to compute $O(1)$ + - shoud be uniform (even when we take modulo) + +This sounds hard, but for commonly used classes (e.g., strings) there are already good has functions. Good enough is usually good enough. IDE can usually suggest something that is good enough. A hashcode function will usually come with an equals function to distinguish between collions and actual equal values + + +## Collisions: Chaining/open addressing +- array elements are called buckets +- each bucket is a *list* of key-value pairs +- when a mapping is added, + - if empty add it (creating a new list if required) + - otherwise check to see if there is a collision or an actual equality with each item of the list + - If there is an equality -> change its value + - otherwise just add it to the list +- get and removing are handled similarly + +we need to keep the load factor (how full the map is) small so that the chains dont't get to long + diff --git a/content/notes/16-compilers.md b/content/notes/16-compilers.md index f892dc976..a052043be 100644 --- a/content/notes/16-compilers.md +++ b/content/notes/16-compilers.md @@ -4,8 +4,8 @@ aliases: tags: - cosc202 - lecture -sr-due: 2022-05-22 -sr-interval: 13 +sr-due: 2022-06-24 +sr-interval: 33 sr-ease: 250 --- @@ -21,7 +21,7 @@ sr-ease: 250 - [interpreter](notes/interpreter.md) # What is a compiler? -A [compiler](notes/compiler.md) is used to build stored programs. Things that are stored on the disk that you can run. They use source code in a **high level** language, and output machine code in a binary file. This file can be loaded and run by hardware. Example langauges include C, C++, Java (sorf of) +A [compiler](notes/compiler.md) is used to build stored programs. Things that are stored on the disk that you can run. They use source code in a **high level** language, and output machine code in a binary file which is then linked with a [linker](notes/linker.md). This file can be loaded and run by hardware. Example langauges include C, C++, Java (sorf of) An [interpreter](notes/interpreter.md) is more of an interactive tool. The interpreter program (e.g., python) runs of the CPU and execute your program. Interpreted laguages include (python, ruby, shell, R, js, PHP). diff --git a/content/notes/16-distributing-cognition-and-visual-design-typography.md b/content/notes/16-distributing-cognition-and-visual-design-typography.md index 497afbed7..3b4a96cb0 100644 --- a/content/notes/16-distributing-cognition-and-visual-design-typography.md +++ b/content/notes/16-distributing-cognition-and-visual-design-typography.md @@ -11,4 +11,4 @@ sr-ease: 250 - [representation-and-distributing-cognition](notes/representation-and-distributing-cognition.md) - [typography](notes/typography.md) -- [visual-design](notes/visual-design.md) \ No newline at end of file +- [visual-design](notes/visual-design.md) diff --git a/content/notes/16-hasing-maps-sets.md b/content/notes/16-hasing-maps-sets.md index 62f665834..c2bfd5ab8 100644 --- a/content/notes/16-hasing-maps-sets.md +++ b/content/notes/16-hasing-maps-sets.md @@ -4,98 +4,11 @@ aliases: tags: - cosc201 - lecture -sr-due: 2022-05-11 -sr-interval: 3 +sr-due: 2022-06-02 +sr-interval: 15 sr-ease: 250 --- -# Maps and Sets -I the compsci context a *map* contrains a *set* of *keys* each with an associated *value*. A map consists of a set of keys. A map can aslso store a set by igorning the values for each key. Thesre are three fundamental operations. -- `put(k, v)` : add the mapping from k to v either by adding k iff its not alreaady present or by changing the associated value -- `get(k)` : return the value associated iwht k if k is present -- `remove(k)` : remove the key k (and any associated value) - -[BST](notes/binary-search-tree.md) can provide us with a set or map implementation whre the cost of each operation is $O(lg\ n)$ . But his requires an underlying order on keys, which might not be needed. - -## In a perfect world -- keys from a class k, valuyes from a class v -- there are only 4000 possible keys -- each key, k, has a unique four digit identifier than we can obtain in constant time as `k.id();` - -```java -V[] map = new V[10000]; - -public V put(K key, V value){ - V old = map[k.id()]; - map[k.id()] = value; - return old; //to match java map interface -} - -public V get(K key){ - return map[k.id()]; -} - -public V remove(K key){ - V old = map[k.id()]; - map[k.id()] = null; - return old; -} -``` - -works but: -- we need to allocate 10000 spaces of storage -- require `k.id();` in constant time -- cannot store null values (key not present vs key is mapped to null) (we will need more storage) - -so: -- we should only require storage for what we need, not for all possible keys -- need to use `Array` for constant time add, remove, get. (we may need to resize the array sometimes) - -## Considering space -```java -V[] map = new V[53]; - -public V put(K key, V value){ - V old = map[k.id() % v.length]; - map[k.id() % v.length] = value; - return old; //to match java map interface -} - -public V get(K key){ - return map[k.id() % v.length]; -} - -public V remove(K key){ - V old = map[k.id() % v.length]; - map[k.id() % v.length] = null; - return old; -} - -``` - -Problem: -- some keys can be duplicated - -## Solving k.id() -- solution is to make one up. -- since collisions are inevitable, uniqueness is not required -- made up ID called a `hash code` -- a *hash function* take objects from a class as input and produces a value from a fixed finite set of values (in Java, an `int`) -- properites it should have - - should be fast to compute $O(1)$ - - shoud be uniform (even when we take modulo) - -This sounds hard, but for commonly used classes (e.g., strings) there are already good has functions. Good enough is usually good enough. IDE can usually suggest something that is good enough. A hashcode function will usually come with an equals function to distinguish between collions and actual equal values - - -## Collisions: Chaining/open addressing -- array elements are called buckets -- each bucket is a *list* of key-value pairs -- when a mapping is added, - - if empty add it (creating a new list if required) - - otherwise check to see if there is a collision or an actual equality with each item of the list - - If there is an equality -> change its value - - otherwise just add it to the list -- get and removing are handled similarly - -we need to keep the load factor (how full the map is) small so that the chains dont't get to long \ No newline at end of file +[Hash functions](notes/hash-map.md#Hash%20functions) +[Collisions Chaining open addressing](notes/hash-map.md#Collisions%20Chaining%20open%20addressing) +[basic implementation](notes/hash-map.md#basic%20implementation) diff --git a/content/notes/16-reverse engineering.md b/content/notes/16-reverse engineering.md index dd94c8dc5..0dff30fb0 100644 --- a/content/notes/16-reverse engineering.md +++ b/content/notes/16-reverse engineering.md @@ -4,19 +4,9 @@ aliases: tags: - info201 - lecture -sr-due: 2022-05-11 -sr-interval: 3 +sr-due: 2022-06-07 +sr-interval: 20 sr-ease: 270 --- - -# Java -> UML reverse engineering -reverse of [uml-java-forward-engineering](notes/uml-java-forward-engineering.md) - -- parse java doe and egenerate corresponding uml diagrams -- useful to generate models of existing systems -- code usually has more detail than can be represented in diagrams -- automated diagram layout likely to be ugly ⇒ manual clean up -- some language specific features may not translate - - +[uml-java-reverse-engineering](notes/uml-java-reverse-engineering.md) \ No newline at end of file diff --git a/content/notes/17-collision-resolution-probing.md b/content/notes/17-collision-resolution-probing.md index 2e78f8514..0a8e6c03f 100644 --- a/content/notes/17-collision-resolution-probing.md +++ b/content/notes/17-collision-resolution-probing.md @@ -4,47 +4,9 @@ aliases: tags: - cosc201 - lecture -sr-due: 2022-05-12 -sr-interval: 3 +sr-due: 2022-06-08 +sr-interval: 19 sr-ease: 250 --- -[animation demo](https://echo360.net.au/lesson/0e13f645-a91f-46c6-89d9-e3c31097b960/classroom#sortDirection=desc) - -Chaining (lists of k-v pairs in each bucket) breaks locailty of reference within the array and ay not be suitable for high-performance implementations. - -It works in java because objects are stored as references anyway, you need to look elsewhere in memory anyway. - -So the advantage of probing is negated. - -In C you know how many bytes of memory a k v pair will occupy. So you can store them as a continuous block of memory. Now you can take advatage of the locality of reference and the speed it provides. - -To do this the contents of bucket should not be a list. they should be null, or a single kv pair. - -each kv pair has a *home spot* it would like to go to: this is the modulo remainder from last lecture. - -# linear probing -- if a kv's home is already full, we move it into the next spot (wrapping to the beginning when we reach the end) in the array. -- frequency of collisions and time to find a new space are proportional to the *load factor* (percetage of occupied slots) -- the load factor is capped and the array is resized when the cap is exceeded - -## Insertion cost -proportional to the number of filled blocks we search before we find an empty one. As long as the load factor is not to high this is on average $O(1)$ - -## Search -Proportional to the number of cells we search before finding the one we want or an empty cell - -## Resize -Create a new table of (about double) the size and insert all the elements of the table into it. If we dont double, exactly, we "scamble" the modulo remainder a bit more to reduce collions. cost is $\theta(n)$. This can be *amortised* across those elements to give $O(1)$ is the amortised sense - -### Amortised cost -- the operations of a dynamic data structure have amortised cost $O(1)$, if - - there is constant $C>0$ such that, - - for every positive integer $k$, and - - any sequence of $k$ operations on the data structure (from initalisation), - - the average time per operation is less than $C$ - -## Deletion -we cant just empty cells as this will break search. We could: -1. we could replace it by a "tombstone" maker. This counts as "full" for search and load purposes, but empty for insertion. -2. we search foward form the element we're removing until we find something that belongs in that location or earlier - swap it back into this location and repeat until an empty cell is found. \ No newline at end of file +[linear-probing](notes/linear-probing.md) diff --git a/content/notes/17-data-access.md b/content/notes/17-data-access.md index 6882f2515..2f3dccc06 100644 --- a/content/notes/17-data-access.md +++ b/content/notes/17-data-access.md @@ -15,4 +15,4 @@ sr-ease: 250 - [file-based-storage](notes/file-based-storage.md) - [database-based-storage](notes/database-based-storage.md) - [data-access-object](notes/data-access-object.md) -- [java-database-connectibity](notes/java-database-connectibity.md) \ No newline at end of file +- [java-database-connectibity](notes/java-database-connectibity.md) diff --git a/content/notes/17-grids-grouping-alignment-reading-and-navigation.md b/content/notes/17-grids-grouping-alignment-reading-and-navigation.md index 753ae4998..fcddf085d 100644 --- a/content/notes/17-grids-grouping-alignment-reading-and-navigation.md +++ b/content/notes/17-grids-grouping-alignment-reading-and-navigation.md @@ -4,8 +4,8 @@ aliases: tags: - info203 - lecture -sr-due: 2022-05-20 -sr-interval: 11 +sr-due: 2022-06-16 +sr-interval: 27 sr-ease: 250 --- diff --git a/content/notes/17-linkers-and-loaders.md b/content/notes/17-linkers-and-loaders.md index 148c66d24..3c6d93d04 100644 --- a/content/notes/17-linkers-and-loaders.md +++ b/content/notes/17-linkers-and-loaders.md @@ -18,4 +18,4 @@ sr-ease: 250 - [operating-system](notes/operating-system.md) - [loader](notes/loader.md) -- [linker](notes/linker.md) \ No newline at end of file +- [linker](notes/linker.md) diff --git a/content/notes/18-advanced-sql-1.md b/content/notes/18-advanced-sql-1.md new file mode 100644 index 000000000..f26716d01 --- /dev/null +++ b/content/notes/18-advanced-sql-1.md @@ -0,0 +1,141 @@ +--- +title: "18-advanced-SQL" +aliases: +tags: +- info201 +- lecture +sr-due: 2022-05-15 +sr-interval: 3 +sr-ease: 250 +--- +![create table 2](https://i.imgur.com/sVoiVud.png) +![create table 2](https://i.imgur.com/AyzF1kR.png) + +varchar usually bigger than you think + +# CRUD +- insert adds a row ![](https://i.imgur.com/WLF64jn.png) +- select retrieves rows from the table![](https://i.imgur.com/yHhPL6L.png) + - ouput can be "saved" as a view![](https://i.imgur.com/iHtC4Vd.png) ![](https://i.imgur.com/NPqTeA1.png) + - changes to the underlying table also chagnes the view +- update modifies rows ![](https://i.imgur.com/aw74vlk.png) +- delete removes rows ![](https://i.imgur.com/DZyorFF.png) ![](https://i.imgur.com/IOKErzP.png) + - test as a select statement first + +# SQL DAO programming +We want to miniminse load on sql as connecting to database is expensive. + +Optimisations: +- prefer muultiple row operations +- connection pools (keep connections "alive") +- reuse prepared statements (reduce unnecessary SQL parsing) +- consider combining queries to reduce round trips +- batched requests + +Follow Optimistic approach +- assume operatios will succeed (no pre checking) +- handle errors with exception handling +- consider using merge if available + +## Merge +![](https://i.imgur.com/UUZWjyM.png) aka replace etc. + +- update if they exist other wise insert + +## JDBC +Java framework for interacting with sql databases. + +plaform and DBMS independent +- driver provided by DBMS vendors +- same Java code will work with any DBMC + +key concepts +- connections and connection pools +- sql strings and prepared statements +- result sets +- transactions +- batched requrests + +![typical jdbc](https://i.imgur.com/jLGbZWW.png) + + +## JDBI +- bette version of JDBI + - layered on top of [JDBC](#JDBC) + - better APIs + - less code +- simple class <-> table mapping +- flexible plugin architecture + +![typical jdbi (fluent)](https://i.imgur.com/SwmulpV.png) +![typical jdbi (declarative)](https://i.imgur.com/1uc2t47.png) + + +# Transactions +interaction between two entities +- follow explicit or implied forms +- usually involves exchange on resources +- may require several steps +- often considered a single unit + +## In data bases +- group of db operations is considered a *single logical unit* + - transfer (read and update) + - recieve shipement (update accounts) + - customer sale + +transactions are all or nothing. (commit vs rollback) + +## ACID +- Atomic + - all or nothing + - operations should be related +- Consistent + - transactions move dbs from one consistent state to another + - "consistent" ⇒ all integrity rules are satisfied + - db may be inconsistent during a transaction + - require defferable constraints +![atomc and consistent](https://i.imgur.com/tCqEEHy.png) +- Isolated + - concurrent transactios shouldn't interfere with each other + - ideally behave as if other transactions dont exist + - read committed isolation + - uncommited changes are visible to other transactions + - require some form of concrrency mangement (e.g., locking) + - ![improper isolation](https://i.imgur.com/IrZZDlW.png) +- Durability + - once a transaction is commited it is permanent + - uncommited transaction dont survive crashes + - auto rollback of uncommitted transaction + +## commit and rollback +- changes are made to "live" data +- commit makes database changes permanent +- rollback removes all changes since that transaction start + +## Transaction in Java +default to auto commit. +- each statement is a separate transaction +- if transaction has multiple statements + - disable auto commit + - you must manage commit and rollback yourself + +![JDBC explicit transactions](https://i.imgur.com/FJaINwD.png) +![JDBI explcit transaction (fluent)](https://i.imgur.com/KvtfZC0.png) +![JDBI explcit transaction (declarative)](https://i.imgur.com/BzGRpV4.png) + +# Select +- select <- wahat +- from <- from where +- where <- filter +- group <- aggregation +- order <- order + +distinct removes duplicate rows + +![distinct](https://i.imgur.com/RiOHBkM.png) + +![select](https://i.imgur.com/DWFUQYN.png) + +![from](https://i.imgur.com/it107cD.png) + diff --git a/content/notes/18-build-tools.md b/content/notes/18-build-tools.md index 96a57b432..2abe9eab5 100644 --- a/content/notes/18-build-tools.md +++ b/content/notes/18-build-tools.md @@ -4,8 +4,8 @@ aliases: tags: - cosc202 - lecture -sr-due: 2022-05-13 -sr-interval: 3 +sr-due: 2022-05-21 +sr-interval: 8 sr-ease: 252 --- @@ -16,85 +16,3 @@ sr-ease: 252 - appreciated that there are many build tools -# Build tools -Tools that automate the construction of software,. - -## C -if you recompile C you get an object file which can be linked. Automation tools will do the linking for you. - -what they do: -- run [compiler](notes/compiler.md) -- run [linker](notes/linker.md) -- automatically download depencies ([libraries](notes/13-code-librarires.md)) - - this can also be done using [containers](notes/containers.md) e.g., a docker container -- possibly some form of [testing](notes/testing.md) - -# History of build tools - -## Make -> check whether targets are older than sources - -Has: -- set of targets -- set of source files -- A list of commands that build the target from the source -- internal variables - - \$@ - the rules source(s) - - \$< - the rules tartet -- - -Build things in the correct order (*topologically*. e.g., will run compiler before linker if needed. - -Limitations -- doesn't handle subprojects -- doesn't handle directories - - when make look for changes, it usually only looks in the current dir - - big projects will have call make is sub projects, this can get complicated quick -- Internal variables do not match with typical shell variables - - use \$\$ to use make shell variables -- no real constraints or conventions: can \betaused for a lot of things - -## Java programs -dont really need the linking step: java can load class files on the fly. The java compiler is more flexible. - -Still needs some automation: -- cleaing uneeded .class files -- bulding Java archive files (JAR) - -## Ant -Written to handle build tasks, e.g., build a JAR, clean up files. Uses an XML file: build.xml. (XML sucks) - -improves upon make by -- better at scanning sub dirs -- calls javac on many files at once not one at a time - -## Maven -maven has conventions: -- e.g., file structure: - - main app as src/main/java - - support resources at src/main/resources - - test sources at src/test/java -- Support non java languages - -Still XML files: pom.xml - -Colour in output. - -## Gradle -speed and flexibility -- does not use xml -- has its own domain specific language -- more complex than maven -- faster than maven - - particularly in incremental build - - i.e. not re-building when it doesn't need to -- Support non java languages - -## Others -- rake - ruby's version of Make -- SCons - builds database about build state -- CMake - cross platorm building; uses existing tools/IDEs -- SBT scala -- languge built in tools - - go - Go build - - rust - Cargo \ No newline at end of file diff --git a/content/notes/18-ethics-in-hci.md b/content/notes/18-ethics-in-hci.md index a1ca18439..4853affcd 100644 --- a/content/notes/18-ethics-in-hci.md +++ b/content/notes/18-ethics-in-hci.md @@ -4,9 +4,9 @@ aliases: tags: - info203 - lecture -sr-due: 2022-05-25 -sr-interval: 16 +sr-due: 2022-07-07 +sr-interval: 43 sr-ease: 270 --- -[hci-ethics](notes/hci-ethics.md) \ No newline at end of file +[hci-ethics](notes/hci-ethics.md) diff --git a/content/notes/18-hash-examples.md b/content/notes/18-hash-examples.md index 980c232c6..9f334e72b 100644 --- a/content/notes/18-hash-examples.md +++ b/content/notes/18-hash-examples.md @@ -4,8 +4,8 @@ aliases: tags: - info203 - lecture -sr-due: 2022-05-13 -sr-interval: 3 -sr-ease: 250 +sr-due: 2022-06-19 +sr-interval: 28 +sr-ease: 270 --- diff --git a/content/notes/19-advanced-sql-2.md b/content/notes/19-advanced-sql-2.md new file mode 100644 index 000000000..3902a1333 --- /dev/null +++ b/content/notes/19-advanced-sql-2.md @@ -0,0 +1,172 @@ +--- +title: "19-advanced-sql-2" +aliases: +tags: +- info201 +- lecture +sr-due: 2022-05-26 +sr-interval: 7 +sr-ease: 250 +--- + + +# CASE +![case example](https://i.imgur.com/H0VjLAK.png) + +basically a switch statement + +- derived valye where calcyulation isnt simple +- standardising values e.g., booleans: t/f, y/n, 0/1 +- flipping between row and col orientation (*privoting*) + - all students vs all on one students papers + +# Set operators +relations are sets of tuples ⇒ we can use set operators + +combine rows of two table vertically + +source table must be compativble +- same set of columns +- same data types +- = same heading + +get new table with same headings as inputs + +identical rows deleted + +![set example 1](https://i.imgur.com/omk0DYv.png) + +union: all rows +- ![union](https://i.imgur.com/GfrjCLI.png) +- ![union result](https://i.imgur.com/OPsaTuu.png) + +intersect: rows that appear in both +- ![intersect](https://i.imgur.com/yKp8x6q.png) +- ![intersect results](https://i.imgur.com/VsrACMF.png) + +difference (except, minus): rows in top that arent in bottom +- ![diff](https://i.imgur.com/LEpaeeT.png) +- ![diff results](https://i.imgur.com/0I6BqOn.png) + +# Aggregation and grouping +![recall](https://i.imgur.com/AyBCAN3.png) + + ## group by +![](https://i.imgur.com/LxxyZaf.png) +- groups rows that have equal values across all the columns in \ +- always used with aggregate function(s) in select clause +- one row in the result for each differect combined value of the grouped columns + +![group example](https://i.imgur.com/ZYgqzlD.png) + +- all non computed columns in select clause must normally appear in group y, and vice versa + +### restricting by groups (having) +![](https://i.imgur.com/ylqvkU5.png) + +- similiar to where, restricts output of group by +- cant include aggregate functions (where can't); + +## Analytic functions (FYI) +![](https://i.imgur.com/L59hwEa.png) + +- enchancement of aggregation +- aggregate without reshaping the ouput +- many more functions avaiable +- sliding windows supported +- dont use when simple group by is sufficient + +# Select +![slide](https://i.imgur.com/4rsQ1B9.png) + +- select +- from +- where +- group by +- having +- order by + +order of evaluation +- from +- where +- group by +- having +- select +- order by + +# Joins +![recall](https://i.imgur.com/khcpBa0.png) +![recall join syntax](https://i.imgur.com/hQHotL3.png) + +inner join : matching rows only + +outer join: may include non-matching rows from the left table, right table, or both tables + +also, cross, and semi join + +## Cross join product +![cross join](https://i.imgur.com/CxGUhpu.png) +![cross join result](https://i.imgur.com/O3FxL5o.png) + +every possible combination of rows from two tables + +uses: +- cards + - suits table + - ranks table + - deck = suits cross join ranks +- timetable + - days table + - timeslots table + - timetable = days cross join timeslots + +## Semi join +output only trows from one table that match rows from the other + +![semijoin](https://i.imgur.com/bW4uVPQ.png) +![semijoin results](https://i.imgur.com/ts5hEf9.png) + +inverse is antijoin: ouput only rows from one table that dont match rows from the other + +# Subqueries +a select expression embedded inside another +- inselect clause to compute value using data from other tables +- in from: inline view +- in where clause with in, all, some , exists + +- can refer to data from "outer" expression (correlated subquery) +- tricky to write, so be careful. maybe stepwise +- can rewrite joins as subqueries, but not vice versa + +prefer joins to subqueries + +## how to develop +- identify components opf multi part query +- implement and test the components as separeate select statements +- combine into one query, nesting one within the other. + +![subquery part 1](https://i.imgur.com/yhOriER.png) +![subquery part 2](https://i.imgur.com/APZGzz5.png) + +# Inline views +a named subqueriy embedded in the from clause is effectively a temporary view + +visible within thescope of current select expression only + +![inline view](https://i.imgur.com/s3G8L7X.png) + +## saving sub queries (WITH) +- sometimes need to re-use same or very similar subquery severl times in the same query +- with saves named subqueries for later re-use (in the same query) +- visible iwthin scope of entire select statement + +![with](https://i.imgur.com/uQ5bn3B.png) + +# Scope in select +- row variable only exist inside the select expression that defines them +- a select expression can only directly refer to items declared in: + - its own select and from clause + - select and from clauses of any elclosing expressions + - any preceedin with expression +- particularly important for correlated subqueries + diff --git a/content/notes/19-graphs.md b/content/notes/19-graphs.md new file mode 100644 index 000000000..b09b61cc3 --- /dev/null +++ b/content/notes/19-graphs.md @@ -0,0 +1,12 @@ +--- +title: "19-graphs" +aliases: +tags: +- cosc201 +- lecture +sr-due: 2022-05-27 +sr-interval: 8 +sr-ease: 250 +--- + +[graphs](notes/graphs.md) \ No newline at end of file diff --git a/content/notes/19-security.md b/content/notes/19-security.md new file mode 100644 index 000000000..4139aad7d --- /dev/null +++ b/content/notes/19-security.md @@ -0,0 +1,105 @@ +--- +title: "19-security" +aliases: +tags: +- cosc202 +- lecture +sr-due: 2022-05-16 +sr-interval: 3 +sr-ease: 250 +--- + +- why cybersecurity is a growing concern +- sketch confidentiality, integrity, and avalability security +- appreciate that dependencies cause security risks +- explain risks from non-validation of user input +- outline how injection attack works + +# growing problem +- more software around +- more dependencies + - resuse of old code rather than starting from scratch +- more complex programs +- "surface area" of risk is growing +- speed of development has trumped security +- some languages are inherently more secure than other + - e.g., C can access any memory +- software systems involve large numbers of components + - large amounts of code is almost guaranteed to have bugs + +# Security in development +- - security isn't a single requiremtn you can tick off + - it needs consideration throughtout the whole system + - it is a cross-cutting concern + - it is hard to retrofit +- notion of security engineering is useful + - affects design descision fromt the outset + - changes how code is written and reviewed + - add a specific type of testing to include + - needs examination of how users interact with software + +# Threat model +- should character what you want to protect against +- writin standalone software to be used by one person + - typially dont have to worry about malicious attacks (on self) +- software on a multi-user operating system + - do need to think about cross-user data leaks + - all OSs are multi user +- software that has network availability + - your software can and likely will be attacked +- targeteted by state-sponsored teams? Good Luck... + +# Divide into three areas +- confidentiality - e.g., sensitive data is not visible +- integrity e.g., data is protected from modification +- avaliability e.g., services stay accessible + +## Confidentiality +- attacks on this involve stealing data +- protect using encrytion (unsecured network or disk) or isolation of processes (if you trust the OS) +- encrption does not necessarly work forever. + + +## Integrity +- attacks on data may aim to decieve users +- defence: apply checksums (e.g., check secure hash of data) +- attacks on code are often for *privilege esccalation* + - e.g., attacker moves from normal user to super user + - defence: avoid decisions being influenced by outside sources + +## Availability +- e.g., DDoS + - ditributed denial of service +- Defence: host services in multiple countries + - use CDNs (content delivery networks) for data objects + +## Key soft. dev. security area 1: dependencies +- vulnerabilities in dependencies affect your code too + - determine and examine your software bill of materials SBOM +- subscribe to security alerts for your key dependencies + - plan to rapidly rebuild and release you software at short notice +- use tools to scan software for know problems + - e.g., gitlab auto devOps scancs containers for vulnerabilites + +- doesn't mean dont use them + - use them if they are good +- e.g., + - dont implement crypto yourself + - use a secret manager for authentication + - XACML libray + - use libraries to parse data + +## Key soft. dev. security area 1: santise input +- treat user controlled inpuut to your code as malicious + - databases must prevent SQL injection +- many input sources + - user docs + - config files + - env variables + +# Injection attacks +- rough def$^n$ some structure is not contained properly +- ![](https://i.imgur.com/59pHOQK.png) + +# Resolving problems +![](https://i.imgur.com/8YBGRPq.png) diff --git a/content/notes/20-database-3.md b/content/notes/20-database-3.md new file mode 100644 index 000000000..1a5595dc2 --- /dev/null +++ b/content/notes/20-database-3.md @@ -0,0 +1,150 @@ +--- +title: "20-database-3" +aliases: +tags: +- info201 +- lecture +sr-due: 2022-05-20 +sr-interval: 3 +sr-ease: 250 +--- + +![review questions](https://i.imgur.com/P812tlT.png) + +# Data Integrity + +GIGO + +![recall integrity](https://i.imgur.com/KlL4bjE.png) + +Types of error +- ennecessary duplication of data +- missing information (expecially nulls) +- referential integrity problems: broken links, "orhpan" records (foreign keys) +- data entry errors: typos/keying errors, value in wrong field +- invalid/nonsensical data, e.g., nefative salary +- going against business rules/policy law + +## Validation +checking that entered values are plausible. +- values must make sens, be valid +- simple checks to block obvisously bogus data + +automated by constraints within the data base + +valid ≠ correct + +## Verification +Checking that correct value was entered e.g., +- double check input +- independent double entry +- independent triple entry (or more) for critical checks + +manual process invvolving human input and judgement + +valid + verified ≠ correct. +- malicious vandalism +- human psychology rtends to promote dertain kinds of error +- misread handwritten notes +- incorrect for fake information provided + +![validation and verification examples](https://i.imgur.com/I3EPWZO.png) +![student id check digit](https://i.imgur.com/JlQMPYZ.png) + +## Integrity constraints +machine readable conditions (true/false) + +checked when data is changed +- in oracle all existing data must conform +- in SQL erver, you havel to explicity tell it to check existing data + +ideally these are in the daabase. but some this is not possibe and must be implemented in code. + +### Defining constraints +col-level constraints +- specified in line in col defs +- can only refer to that column + +table level constraints +- are specified out of line alongside other columns +- can refer to any col inthe table + +constrainst should be named + +### Primary and foreign key constraints +![example](https://i.imgur.com/xh5jdPV.png) + +primary keys are not null and are unique + +some DBMSs support on delete and on update actios on foreign keys when a parent row is deleted or updated +- cascade: "child" rows inherit the same operation as "parent" row +- set null: "child" FK is set to null (if permitted) +- set default: "" + +### Unique values (other than primary keys) +![](https://i.imgur.com/QcoDPPq.png) + +## Check constrainsts +![](https://i.imgur.com/hBq0Rnp.png) + +for chcking if within list. use a lookup table +![](https://i.imgur.com/kHMqxM6.png) + +# Automation +## Sequences +generate integer values + +![sequence](https://i.imgur.com/oE9BGkt.png) +![sequences auto vs custome](https://i.imgur.com/msmxsgu.png) +![java accesing the sequence](https://i.imgur.com/psDNCrN.png) +![java accesing the sequence (fluent)](https://i.imgur.com/nbfAzca.png) + +![caution](https://i.imgur.com/l4fiErh.png) + +## Triggers +specific operation on table trigger other operations + +normally written in a "proper" language e.g., +- Oracle: PL/SQL, Java +- H2: java +- SQL server: transact-SQL +- PostgreSQL: most languages, e.g., python, ruby, perl, r, bash, java, php etc + +used when: +- as a last resort +- computed columns +- setting status values in reponse to updates +- maintaining refernetial integrity +- rewriting application input +- integrity constraints that involve multiple tables +- row based security policies +- domain specific auditing (beyond standard logging features) +- performing actions outside the DBMS + +specifications +- timing: before, after, instead of +- type of operation: insert update delete +- column affected (update only, optional) +- table affected +- other conditions (optional) + +triggered operation +- what to do +- trigger will activate only once unless you tell to to execute once for each row affectted by the activation conditions + +![H2 trigger](https://i.imgur.com/e4tqfH9.png) +![H2 trigger action](https://i.imgur.com/eSr8Lc4.png) + +## Stored procedure +programming code stored within the database + +why?: +- reduce or eliminate application/database round trips +- offload database-oriented processing to the DBMS +- encapsulate database code in the database for re use (DRY) +- encapsulate query details + +triggers often a special case +h2 lets you create aliases to java functions, but these aren't stored in the database + +![h2 function alias](https://i.imgur.com/TjUhVAO.png) diff --git a/content/notes/20-graphs-2.md b/content/notes/20-graphs-2.md new file mode 100644 index 000000000..f29e3d4ec --- /dev/null +++ b/content/notes/20-graphs-2.md @@ -0,0 +1,36 @@ +--- +title: "20-graphs-2" +aliases: +tags: +- cosc201 +- lecture +sr-due: 2022-05-21 +sr-interval: 3 +sr-ease: 250 +--- + +Graph drawing is its own problem. + +One easy way is to draw the vertices is clockwise order and draw edges between them + +[traversal examples](https://echo360.net.au/lesson/86c6c819-3257-424e-b8e6-d17f4e1e9170/classroom#sortDirection=desc) + +# recurisve depth first traversal +same but.. delay the pop of an item from the stack until all its neighbours have been processed, and we only push those one at a time. + +![code](https://i.imgur.com/kWm9REo.png) + +## topological sorting +In a *directed* graph we have edges from v to w which do not necessarily imply an edge from w to v. + +then is a neighbor of v but not (necessarily) vice versa. + +suppose edges indicate some dependency + +we want an order of vertices that finishes with v but never containes any vertex unless all the things that depend on it occur earlier + +this is a (reverse) *topological* sort + +for this to work the graph must be *acyclic*. i.e., we cannot have a depends on v which depends on w which depends on a + +it that condition is met a recursive depth first traversal can be used.3 diff --git a/content/notes/20-software-licensing.md b/content/notes/20-software-licensing.md new file mode 100644 index 000000000..70de5c9e7 --- /dev/null +++ b/content/notes/20-software-licensing.md @@ -0,0 +1,24 @@ +--- +title: "20-software-licensing" +aliases: +tags: +- cosc202 +- lecture +sr-due: 2022-05-30 +sr-interval: 10 +sr-ease: 250 +--- + +[pdf](https://cosc202.cspages.otago.ac.nz/lectures/L20-software-licensing.pdf) + +what does it mean for people to use your software. What responsitilities do you have + +- Understand the default protection of code +- Contrast ‘libre’ free and ‘gratis’ free +- Define what makes open source software +- Contrast copyleft and more permissive licences +- Appreciate that code can be multi-licensed +- Understand how to apply a license to code +- Appreciate licenses can be mutually incompatible + +[software-licensing](notes/software-licensing.md) \ No newline at end of file diff --git a/content/notes/21-software-architecture-and-templates.md b/content/notes/21-software-architecture-and-templates.md new file mode 100644 index 000000000..a3d5fa5a8 --- /dev/null +++ b/content/notes/21-software-architecture-and-templates.md @@ -0,0 +1,14 @@ +--- +title: "21-software-architecture-and-templates" +aliases: +tags: +- info201 +- lecture +sr-due: 2022-06-15 +sr-interval: 24 +sr-ease: 250 +--- + +[software-architectures](notes/software-architectures.md) + +[system-templates](notes/system-templates.md) \ No newline at end of file diff --git a/content/notes/22-trends-in-hci.md b/content/notes/22-trends-in-hci.md new file mode 100644 index 000000000..2b141f413 --- /dev/null +++ b/content/notes/22-trends-in-hci.md @@ -0,0 +1,77 @@ +--- +title: "22-trends-in-hci" +aliases: +tags: +- info203 +- lecture +--- + +[slides](https://blackboard.otago.ac.nz/bbcswebdav/pid-2827522-dt-content-rid-18612267_1/courses/INFO203_S1DNIE_2022/2022/INFO203_Lecture23.pdf +how the the methodology of HCI used.) + +Theory vs practice. There is a lot of work being done t improve the methodology + +# Bad style - HARKing and the replication crisis + +![scienfific process](https://i.imgur.com/m1HDqN3.png) + +# Publication bias +- Computing research validate research claims using statistical significance as the standard of evidence +- Statistical evidence usually assumes 95% confidence (p <= 0.05) +- analysis of 362 papers published found that 97% reject the null +- papers that were incorrecct are not published +- *Publication bias*: Papers supporting their hypotheses are accepted for publication at a much higher rate than those that do not. +- HARKing (Hypothesizing After the Results are Known) or known as ‘outcome switching’ + - Post-hoc reframing of experimental intentions to present a p-fished outcome as having been predicted from the start. +- p-hacking: Manipulation of experimental and analysis methods to produce statistically significant results. +- p-fishing: seeking statistically significant effects beyond the original hypothesis. + +A survey of over 2000 psychology researchers, John et al. examined the prevalence of questionable experimental practices (forms of HARKing): +1. Failing to report all dependent measures, which opens the door for selective reporting of favourable findings – 63.4%; +2. Deciding to collect additional data after checking if the effects were significant – 55.9%; +3. Failing to report all of the study’s conditions – 27.7%; +4. Stopping data collection early once the significant effect is found – 15.6%; +5. Rounding off a p value (e.g., reporting p = .05 when the actual value is p = .054) – 22.0%; +6. Selectively reporting studies that worked – 45.8%; +7. Excluding data after looking at the impact of doing so – 38.2%; +8. Reporting an unexpected finding as having been predicted – 27.0%; +9. Reporting a lack of effect of demographic variables (e.g., gender) without checking – 3.0%; +10. Falsifying data – 0.6% + +![](https://i.imgur.com/gro2KnF.png) + +File drawer effect: Null findings tend to be unpublished and therefore hidden from the scientific community. + +## Solutions + +Preregistration: Registries in which researchers preregister their intentions, hypotheses, and methods (including sample sizes and precise plans for the data analyses) for upcoming experiments + +Preregistered Reports: Papers (Reports) are submitted for review prior to conducting the experiment. Registered reports include the study motivation, related work, hypotheses, and detailed method; everything that might be expected in a traditional paper except for the results and their interpretation. + +• Redefine or abdandon statistical significance. • Create data repositories and support replication + +# Trends +## Wearable sensing and actuation +![springlets paper](https://i.imgur.com/QQMmEAk.png) + +![springlets prototypes](https://i.imgur.com/zbRefG0.png) +![more prototypes](https://i.imgur.com/dVmrJf9.png) + +applications +- vr haptics +- on the skin directions +- notifications +- more + +![evaluation](https://i.imgur.com/4edmUVX.png) + +## electodermis +![electro dermis paper](https://i.imgur.com/9MMLpOG.png) +focused more on the manufacturing of the stickers + +## earput +[earput paper](https://i.imgur.com/ZqfaHUt.png) +![earput evaluaion](https://i.imgur.com/97ZAqGv.png) + +## skin track +![](https://i.imgur.com/LlfFZki.png) diff --git a/content/notes/24-trends-in-hci-2.md b/content/notes/24-trends-in-hci-2.md new file mode 100644 index 000000000..266fea940 --- /dev/null +++ b/content/notes/24-trends-in-hci-2.md @@ -0,0 +1,47 @@ +--- +title: "24-trends-in-hci-2" +aliases: +tags: +- info203 +- lecture +sr-due: 2022-05-28 +sr-interval: 3 +sr-ease: 250 +--- + + +# Dark patterns +![dark cookies](https://i.imgur.com/VNpC265.png) +![cookies dark tricks](https://i.imgur.com/c9cuzVO.png) + +# Designing for elderlies +![wall-sized displays for dementia care](https://i.imgur.com/QHnOJJm.png) +![dementia care evaluation](https://i.imgur.com/7hcLDmb.png) + +the familiarity of local church in full size was good. + +# Digital fabrication +3d printing, interfaces which allow you to 3d print etc. + +## things +![lily pad arduino](https://i.imgur.com/IY8sc08.png) +![fabirc PCBs](https://i.imgur.com/kJ1ONYW.png) +![iron on embedded UIs](https://i.imgur.com/XjsHnn8.png) +![interactive design of wood joints](https://i.imgur.com/WoIjHJ3.png) +![wood joints evaluation](https://i.imgur.com/ZhMz1iB.png) +![pop-up-print](https://i.imgur.com/EKWT2Q5.png) +![pop-up evaluation](https://i.imgur.com/PwYWx4c.png) + +# Explinable AI HCI for AI, fairness of AI +![0](https://i.imgur.com/SZyxfay.png) +![map of AI papers](https://i.imgur.com/QtXnmWM.png) +![interactive AI design](https://i.imgur.com/YRdtUZQ.png) +![interactive AI design](https://i.imgur.com/c2qIUoa.png) +![interative transfer learning](https://i.imgur.com/G6XwmPg.png) +![interative transfer learning](https://i.imgur.com/tz9wVa7.png) + +Most people dont actually understand the AI they create. Finding new ways to create, and understand AI. + +# gaze and Eye tracking +![glasses](https://i.imgur.com/JDTAsSz.png) +![selection of objects in VR with eye tracking](https://i.imgur.com/x3Pa2Vn.png) diff --git a/content/notes/SQL.md b/content/notes/SQL.md new file mode 100644 index 000000000..b800a74a7 --- /dev/null +++ b/content/notes/SQL.md @@ -0,0 +1,12 @@ +--- +title: "SQL" +aliases: +tags: +- info201 +--- + +# Principles + +# Sytax + +# Interaction with code diff --git a/content/notes/aesthetic-and-minimalist-design.md b/content/notes/aesthetic-and-minimalist-design.md index 27eefa663..5cdaccfb3 100644 --- a/content/notes/aesthetic-and-minimalist-design.md +++ b/content/notes/aesthetic-and-minimalist-design.md @@ -13,4 +13,6 @@ signal to noise ![](https://i.imgur.com/6bLaHS6.png) ![](https://i.imgur.com/qF21SST.png) +- what are you core functionality +- how can you best use your screen space diff --git a/content/notes/analyzing-experiments.md b/content/notes/analyzing-experiments.md new file mode 100644 index 000000000..37c17741f --- /dev/null +++ b/content/notes/analyzing-experiments.md @@ -0,0 +1,62 @@ +--- +title: "analyzing-experiments" +aliases: +tags: +- info203 +- lecture +- scott-video +sr-due: 2022-06-01 +sr-interval: 7 +sr-ease: 250 +--- + +# 3 questions +- what does my data look like + - graphs, plots, differnent summary plots +- what are the overall numbers + - aggregate stats e.g., mean average std dev +- are the differences "real"? + - significance p-value + - likihood that results are due to chance + +## p value +pearsons chi-squared test. comparing rate of expected value vs observed value + +$$ +\chi^{2}=\frac{(observed-expected)^2}{expected} +$$ + +"normal" outcome variance follow normal/gaussian distribution. + +as chi squared gets bigger it is less likey that the coin is unbiased + +e.g., 20 tosses, we got 13 heads. at p<0.05 can we reject the null that the coin is unbiased + +![value = 1.8](https://i.imgur.com/SHKLk53.png) + +![](https://i.imgur.com/rxaswEP.png) + +degrees of freedom num possibilites n-1 = 2-1 = 1 + +we cannot reject the null + +![example 2 chi2 5.4](https://i.imgur.com/UnX2WbG.png) reject the null + +![click through rate example](https://i.imgur.com/JYFbgS2.png)\ + +formalieses: "were pretty sure". helps generalize from small samples + +for normal continiuous data +- t-tests (compare 2) +- annova (compare more than 2) + +data is not always normal. +- bi modal - 2 peaks +- skewed + - e.g., time: can be infiniely slow, but not infinitely fast + + +non-normal data +- knowing is half tha battle +- run A/A tests +- use randomised testing \ No newline at end of file diff --git a/content/notes/anti-design-heristics.md b/content/notes/anti-design-heristics.md new file mode 100644 index 000000000..4ff5638e0 --- /dev/null +++ b/content/notes/anti-design-heristics.md @@ -0,0 +1,10 @@ +--- +title: "anti-design-heristics" +aliases: +tags: +- info203 +--- + +![](https://i.imgur.com/BHJ5iQU.png) +![](https://i.imgur.com/DrqSSK5.png) +![](https://i.imgur.com/KPW6h19.png) \ No newline at end of file diff --git a/content/notes/application-programming-interface.md b/content/notes/application-programming-interface.md new file mode 100644 index 000000000..677477a82 --- /dev/null +++ b/content/notes/application-programming-interface.md @@ -0,0 +1,92 @@ +--- +title: "application-programming-interface" +aliases: API +tags: +- cosc202 +--- + +Allows code (and people) to interact with other people applications. They define interactions points (*endpoints*) within the code, where data is retrieved (GET) or inserted (POST). Each endpoint is accessed using a *URL* or URI through *HTTP*. + +# REST principles +> Representational state transfer. + +These principles describe the best practives for building APIs. + +Some of the main points are: +- decoupled + - not dependent of e.g., a specific browser +- stateless + - each interaction is self contained + - although sometimes this is not used + - e.g., authenticated "sessions" +- uniform interface. + - codifies principle of using HTTP methods on URLs + - internal representation of data id hidden + - interactions are based on resources + +REST principles were Co-developed with the web + +# Java REST APIs +java servelts are code blocks that handle requests. java.servlet.http library + +framworks like Spring support Java API development +- wraps an aplicationserver around you data classes +- can persist your data in a database +- also provides servers that can host API access to your data + +## Web technologies +- resources on the web are identified using URLs +- HTTP is the network protocol for data transfer in the web +- HTTP describes 'methods' to apply to URLs + - GET *read* a resource identified using a URL + - PUT *writes* to a resource identified using a URL + +# Cloud computing +Uses *mircoservices* + +apps built from intercommunicating microservice components/ each component can scale independently.components are loosely coupled. + +# Bulding an API +Use a [library](notes/libraries.md)/framework with: +- human readable documentation of functions +- ability to manually interact + +Some APIs will provide tools to interactively build snippets which can be copy pasted + +# Maintaining API +Similar to maintenance of code [libraries](notes/libraries.md) +- need to consider abstractions +- need to evolve +- future proof as much as possible +- avoid complete rewrites +- use versioning + + +# Other stuff +## Flask +small python web sever + +## code and data +APIs define interaction points within code. (Similar to visibilty of methods). +- also force a barrier between devs code + +need developer to understand data model +- this may appear explicitly in API calls +- may be that API calls manipulate unseen data + - need ndevs to be comfortable with you *mental model* + +Use of [libraries](notes/13-code-librarires.md) share many of these points + +## Overview +Allow code to interact with others applicatioins. + +can be used by people, not only code. + +API differ from libraries because they deal with the interactions between applications at runtime. + +APIs work accross different "distances" of interaction. e.g., intergrating software components within one server vs across the internet + +web technologies have positively impacteed api by +- simplfy development - provide base of technologies that can be used to gain access to data in a structure way +- normalised tools to using APIs + diff --git a/content/notes/approaches-to-systems-development.md b/content/notes/approaches-to-systems-development.md index b416768be..a24eb8f76 100644 --- a/content/notes/approaches-to-systems-development.md +++ b/content/notes/approaches-to-systems-development.md @@ -4,15 +4,15 @@ tags: - info201 --- -## 1 traditional -regardless of the approach, the conecpot of the model is import for analysis design and modelling parrasigms +regardless of the approach, the concept of the model is import for analysis, design, and modelling paradigms -### 1.1 system is a collection of process +# 1 traditional +*system is a collection of process* function programming processes interact with data processes accept inputs and produce ouputs -### 1.2 object oriented -system is a collection of objects +# 1 object oriented +*system is a collection of [objects](notes/object.md)* these objects interact with each other -and send and respond to messages +and send and respond to messages \ No newline at end of file diff --git a/content/notes/assigning-participants-video.md b/content/notes/assigning-participants-video.md new file mode 100644 index 000000000..754cb6f3c --- /dev/null +++ b/content/notes/assigning-participants-video.md @@ -0,0 +1,13 @@ +--- +title: "assigning-participants-video" +aliases: +tags: +- info203 +- lecture +- scott-video +sr-due: 2022-05-28 +sr-interval: 9 +sr-ease: 250 +--- + +[assigning-participants](notes/assigning-participants.md) \ No newline at end of file diff --git a/content/notes/assigning-participants.md b/content/notes/assigning-participants.md new file mode 100644 index 000000000..b679bbb4c --- /dev/null +++ b/content/notes/assigning-participants.md @@ -0,0 +1,84 @@ +--- +title: "assigning-participants" +aliases: +tags: +- info203 +--- + + +# Methods +## Between Subjects +The participants are split into equal groups, each which reviews one of the alternatives +## Within Subjects +The participants are split into two grops, one group review the first alternative first, the other review the seconds alternative first. +## Latin Square +![](https://i.imgur.com/ZORPvqk.png) + +order of each group is different +# Counterbalanced assignments +e.g., typing speed might affect interface usage +you can use a pretest to assign participants to that typing speed is roughly balanced + +many techniques: key is to have equal chance of each participant in each group + +## offline counterbalancing +pre-testing then forming matches pairs, which are split between groups] + +## online counterbalancing +- of ther is no pre-test pick a threshold that is likely to be about the middle +- as they come in + +- dont need to ensure even nubmer of high and low typers. +- do need to ensure the same number of high/low typers in a and b +## dangers +### regression: +- find heady coins +- first flip them all (pre-test) +- if they land heads more than half, call them heady +- "feed them a snack" +- does snacking increase the natural tendency of coins + +![coin flip example](https://i.imgur.com/Y2CWCRV.png) + +both regress towards the mean + +### how to avoid +if the pretest is used to counterbalance, and assignment is random, then the error goes away + + +# should every participant use every alternative +three major srategies + +- **Within** + - everyone tries all options + - good when not fussed about learning/practise/exposure isssues +- **between participants** + - each person tries only only of the options + - requires more people, and more attention to fair assignment + - has the benefit that each participant is uncorrupted + - most common forthings like web studies +- **Counterbalancing** + - + +# hawthorne effect +results are a result of the act of exmperimenting itself not as a resyult of the manupulations of the experiment + +can be avoided with random assignment + +# vaccum cleaner example +- manipulation + - vacuum type +- measures + - speed + - cleanliness + +- between subjects design: assign half the participants to each type. + - worried about individual differences +- within subjects design: everyone uses both interfaces: + - worried about ordering effects + +- half try one first, the other try the other first (counterbalancing) + - each of the tasks should be difference e.g., clean differnt buildings/rooms + +individual differnces: go based of intuition of if it will make a difference. +Random assignment is importantg \ No newline at end of file diff --git a/content/notes/assignment-02.md b/content/notes/assignment-02.md index 8a6439a79..fe6c8bf5b 100644 --- a/content/notes/assignment-02.md +++ b/content/notes/assignment-02.md @@ -1,9 +1,194 @@ --- -title: "assignment-02" +number headings: auto, first-level 1, max 6, 1.1 +title: "Assignment 02" +subtitle: "Jet Hughes, 9474308" aliases: tags: - cosc201 - assignment +header: +- \documentclass{article} +- \usepackage{multirow} --- +# 1 Introduction +## 1.1 Setup +This report will discuss various strategies for managing a *warehouse* . A warehouse will be simulated as follows: +- A warehouse is made up of a grid of *cells*. +- Each cell has a collection of *packets* +- Each packet has a *destination* cell. +- Each cell also has a *robot* +- In each step of the simulation a robot can deliver one packet to a robot in an adjacent cell. +- The simulation ends when each cell has arrived at its destination. + +## 1.2 Managers +The goal is to deliver all the packets to their desired destination as efficiently as possible. + +Efficiency is defined as the minimum number of steps required to deliver all the packets divided by the actual number of steps taken. + +The efficiency of the warehouse depends on the delivery scheme used by the robots. There are four managers I will be considering. These are: + +**Basic** +- Packets are stored in a FIFO queue +- Vertical movements are made before horizontal movements +- Received packets are always added to the queue + +**Load Aware** +- Packets are stored in a FIFO queue +- If its destination is in a straight line from the current location, it just sends it one step in the appropriate direction. +- Otherwise, moves to cells with fewer packets are preferred. +- In case of an equality, revert to the basic rule +- Only packets that need to keep moving are added to the queue + +**Priority** +- Packets are stored in a Priority queue +- Packets with further distance to their destination have higher priority +- If two packets have the same priority, revert to the load aware rule +- Only packets that need to keep moving are added to the queue + +**Min Load** [^1] +- Same as normal priority, but the priority is changed +- A Packet has two (logical) possible cells it could move to next. Its priority is found by checking the load at each of these two cells, and taking the lesser of the two. +- If two packets have the same priority, revert to the load aware rule. +- Only packets that need to keep moving are added to the queue + +## 1.3 Scenarios +There are a number of other factors that affect the efficiency of the warehouse. These are: + +- The total number of packets in the warehouse +- The initial distribution of the packets +- The distribution of the destination of the packets + +The plan is to analyze the efficiencies of the delivery schemes in a few different scenarios, with a few different map sizes. These scenarios are: + +- **1000 Random:** 1000 packets are added in random locations with random destinations +- **One Per Cell:** The number of packets and cells is the same. Each cell contains one packet to begin with, and has a random destination (different packets might have the same destination). +- **Chance Per Cell:** As the previous case, but each cell has only a 25% chance of containing a packet. +- **Upper Left:** The number of packets and cells is the same. All the packets start in the upper left corner, and each packet has a different destination. +- **Center:** The number of packets and cells is the same. All the packets start in center, and each packet has a different destination. + +# 2 Analysis +Each result is the average efficiency of 25 runs in that configuration + +## 2.1 N Random +$$ +\begin{tabular}{|c|c|c|c|c|c|c|c|} +\hline +Scenario&\multicolumn{6}{|c|}{Map Sizes} \\ +\hline +&5&10&20&40&80&100\\ +\hline +Basic&4.0\%&14.6\%&43.7\%&84.6\%&98.2\%&98.9\%\\ +Load Aware&4.9\%&17.5\%&47.0\%&84.3\%&98.0\%&98.6\%\\ +Priority&4.9\%&17.7\%&55.6\%&100.0\%&100.0\%&100.0\%\\ +Min Load&4.8\%&17.0\%&49.2\%&90.2\%&98.1\%&98.9\%\\ +\hline +\end{tabular} +$$ + +In this scenario. The efficiency of the mangers clearly increased proportionally to the size of the map. This is because the number of packets remained constant, so as the map size increased, the load on the managers decreased and Packets were able to move through the warehouse more quickly. + +At a map size of 100 all managers achieved close to 100% efficiency. However, the Priority manager was the only one able to achieve exactly 100%. In addition, it was about 5% better than the others in a 50x50 map. + +It is also worth noting the basic manager was significantly worse than the others in the very small maps. This is likely due to the high load on each of the managers, amplifying the need to keep them in balance. A since all the other managers have some form of load balancing, the Basic Manager is most affected. I could be interesting to try to create a manger that performs better here than the Basic manager without, using any load balancing. Possibly considering only priority based on distance to destination. + +The Min Load manager was very slightly better than the Load Aware Manager in the mid-sized maps. This implies that prioritizing nodes that can be easily balanced is better than, simply, sending nodes to the least loaded cell. + +The managers tend to perform similarly at the extreme ends of the map size spectrum, and differ most in the middle. + +## 2.2 One Per Cell +$$ +\begin{tabular}{|c|c|c|c|c|c|c|c|} +\hline +Scenario&\multicolumn{6}{|c|}{Map Sizes} \\ +\hline +&5&10&20&40&80&100\\ +\hline +Basic&73.8\%&76.2\%&72.9\%&73.7\%&74.4\%&73.3\%\\ +Load Aware&81.0\%&76.2\%&73.7\%&74.0\%&74.3\%&73.4\%\\ +Priority&88.5\%&97.7\%&99.5\%&100.0\%&100.0\%&100.0\%\\ +Min Load&85.0\%&81.0\%&83.1\%&82.7\%&81.8\%&83.0\%\\ +\hline +\end{tabular} +$$ + +In this scenario, overall efficiency was relatively high with the Basic, and Load Aware managers achieving about 70%, Min load achieving about 80%, and Priority manager about 100%. Since the number of packets is proportional to the size of the map, changing the size had little effect on the efficiency of the managers, except for the Priority manager, and to a lesser extent the Load Aware manager. + +The Priority manager significantly outperforms the other managers here. However, it was significantly less efficient (but still better than the other managers) in smaller map sizes. It decreased from 100% in 100x100 to 88.5% in 5x5. The Load Aware manager, on the other hand, *increased* from 73.4% in 100x100 to 81% in 5x5. Since I only have a small sample size of 25, this could be due to random chance. + +The Min Load Manager was consistently better than the Basic and Load Aware managers, but never better than the Priority manager. + +## 2.3 Chance Per Cell +Chance = 25% +$$ +\begin{tabular}{|c|c|c|c|c|c|c|c|} +\hline +Scenario&\multicolumn{6}{|c|}{Map Sizes} \\ +\hline +&5&10&20&40&80&100\\ +\hline +Basic&94.5\%&94.5\%&94.6\%&95.7\%&96.5\%&97.4\%\\ +Load Aware&95.8\%&94.2\%&94.1\%&95.6\%&96.2\%&96.1\%\\ +Priority&98.7\%&99.7\%&100.0\%&100.0\%&100.0\%&100.0\%\\ +Min Load&97.4\%&96.3\%&96.0\%&96.5\%&98.2\%&98.0\%\\ +\hline +\end{tabular} +$$ + +In this configuration, the efficiency was very high due to the low number of packets, low load-factor and subsequent fast movement of Packets. Hence, the variation in efficiencies was very small, as the need for balanced managers was diminished. + +Here, the Priority manager still performed the best, achieving 100% efficiency, although by a lesser margin than in the previous two scenarios. Once again, the Min Load manager was better than the Basic and Load Aware managers, but not the Priority manager. + +## 2.4 Upper Left +$$ +\begin{tabular}{|c|c|c|c|c|c|c|c|} +\hline +Scenario&\multicolumn{6}{|c|}{Map Sizes} \\ +\hline +&5&10&20&40&80&100\\ +\hline +Basic&26.3\%&15.8\%&8.9\%&4.7\%&2.4\%&1.9\%\\ +Load Aware&25.8\%&15.7\%&8.8\%&4.7\%&2.4\%&1.9\%\\ +Priority&30.7\%&17.5\%&9.4\%&4.8\%&2.5\%&2.0\%\\ +Min Load&26.6\%&16.0\%&8.8\%&4.7\%&2.4\%&1.9\%\\ +\hline +\end{tabular} +$$ + +This scenario had by far the lowest efficiency. This is because a single manger initially holds every node. Since most of the load at any given time is being handled by one manager, and most of the packets will wait a long time before getting offloaded to an adjacent cell, they will take longer to reach their destination. As the map size increases, the efficiency decreases rapidly, as the number of packets starting on the top left cell increased exponentially. + +There is little variation in the efficiency of the different managers, except for the Priority manager, which is slightly more efficient than the others. I think this is because by prioritizing packets that need to travel further, the concentration of packets in the corner is reduces faster. + +It would be interesting to know whether placing all the packets in the center of the map would be more efficient. I think it would be, as there are more directions for the packets to spread out, and the packets are on average would be closer to their destination (since destinations are uniformly distributed). + +## 2.5 Center +I decided to investigate the idea of starting all the packets in the center. These were the results. + +$$ +\begin{tabular}{|c|c|c|c|c|c|c|c|} +\hline +Scenario&\multicolumn{6}{|c|}{Map Sizes} \\ +\hline +&5&10&20&40&80&100\\ +\hline +Basic&14.8\%&9.0\%&4.8\%&2.4\%&1.2\%&1.0\%\\ +Load Aware&15.0\%&9.0\%&4.7\%&2.4\%&1.2\%&1.0\%\\ +Priority&16.0\%&9.7\%&4.9\%&2.5\%&1.2\%&1.0\%\\ +Min Load&14.9\%&9.3\%&4.8\%&2.4\%&1.2\%&1.0\%\\ +\hline +\end{tabular} +$$ + +Surprisingly, this was about half as efficient as starting is the corner. This is the opposite of what I expected. It's interesting that it reached exactly 1% efficiency in a 100x100 map. + +Aha! It's because the max distance a packet must travel is shorter (about half), so even with a similar number of steps, the efficiency will be twice as bad. This means that Center does not necessarily result in slower delivery, only higher consequences for slow deliveries. + +# 3 Summary +Priority managers was clearly the most efficient of the four managers, with the Min Load following. Configurations with extremely large or small amounts of packets per cell made the managers perform more similarly, and scenarios with medium amounts of packets per cell amplified the difference. + +I think the main reason Priority manager was consistently better than the other was because It spreads the load among more managers faster, and ensures that Packets with further destinations arrive about the same time as shorter ones. It effectively removes the advantage that packets closer to their destination have. + +I think Min Load performed better than Load Aware for one reason: It did a better job of distributing load. I think I could have made an even better manager by prioritizing based on a function of both load, and distance. + +[^1]: I couldn't think of a better name diff --git a/content/notes/aymptotic-notation.md b/content/notes/aymptotic-notation.md index 1c9ef1cf5..af0fc62f3 100644 --- a/content/notes/aymptotic-notation.md +++ b/content/notes/aymptotic-notation.md @@ -25,4 +25,4 @@ Big theta defines an *upper and a lower* bound for a the running time (or space) ## 2 Formal definition -$f(n) = \theta(g(n))$ if there are some constants $A$ and $B$ where $0 < B < A$ such that for all sufficiently large $n$, $B \times g(n) \geq f(n) \leq A \times g(n)$ \ No newline at end of file +$f(n) = \theta(g(n))$ if there are some constants $A$ and $B$ where $0 < B < A$ such that for all sufficiently large $n$, $B \times g(n) \geq f(n) \leq A \times g(n)$ diff --git a/content/notes/balancing-binary-search-trees.md b/content/notes/balancing-binary-search-trees.md index edc2c15c2..b8565721f 100644 --- a/content/notes/balancing-binary-search-trees.md +++ b/content/notes/balancing-binary-search-trees.md @@ -7,14 +7,38 @@ tags: the height of a [BST](notes/binary-search-tree.md) is the length of its longest chain. Most operations are $O(n)$ where n is the height of the tree. In an Ideal situation each layer of the tree is full. The height of the tree is logarithmic to the number of nodes. -When a tree is being used only occainsonally, we can afford to simply rebalance is periodically. However when it is in constant use we cannot afford this cost +When a tree is being used only occainsonally, we can afford to simply rebalance it periodically. However when it is in constant use we cannot afford this cost -# Rotations +long branches are a problem +the performance bounds for all BST operations are linear of the length of the longest branch of the tree +ideal shape is a similar to a [heap](notes/heap.md) (wide and shallow). + +we want the longest branch to be $\theta(lg\ n)$ + +one way is to do an [In order](notes/tree-traversal.md#In%20order) and save to a sorted array. then construct a new tree by repeatedly bisecting the array. and recursively building the left and right subtrees + +need some local operation that helps to restore balance + +# Rotation +## How +suppose that in this bst there is a longer chain in e than else where + +![100](https://i.imgur.com/SmDsZd1.png) + +imagine twisting d to be the root + +![100](https://i.imgur.com/6MoYHX1.png) + +changes are +- b's right child is now c +- d's left child is not b +- b parent now points to d + +## When ![](https://i.imgur.com/vjvMVM3.png) -sometimes two rotations are needed -## When to rotate and how to do them +sometimes two rotations are needed basic idea is to modify the add and delete operations fo the BST to be somewhat self-balancing. This does not need to be perfect diff --git a/content/notes/binary-search-tree.md b/content/notes/binary-search-tree.md index f406932e5..268d732e7 100644 --- a/content/notes/binary-search-tree.md +++ b/content/notes/binary-search-tree.md @@ -35,4 +35,4 @@ In this example: - n.p = root - n.key = emu - n.l = nil -- n.r.key = rat \ No newline at end of file +- n.r.key = rat diff --git a/content/notes/birth-of-hci.md b/content/notes/birth-of-hci.md index 1557536ea..e4f133700 100644 --- a/content/notes/birth-of-hci.md +++ b/content/notes/birth-of-hci.md @@ -35,24 +35,24 @@ Sutherland, Ivan Edward (January 1963). "Sketchpad: A man-machine graphical comm ![](https://i.imgur.com/PkQWnPU.png) -1968 - “The Sword of Damocles” Sutherland, Ivan Edward (1968), “A head-mounted three dimensional display” +1968 - “The Sword of Damocles? Sutherland, Ivan Edward (1968), “A head-mounted three dimensional display? ![](https://i.imgur.com/XPPjzNS.png) -1968 - “The Sword of Damocles” Sutherland, Ivan Edward (1968), “A head-mounted three dimensional display” +1968 - “The Sword of Damocles? Sutherland, Ivan Edward (1968), “A head-mounted three dimensional display? ![](https://i.imgur.com/cvhyx7u.png) -1968 - “The Sword of Damocles” Sutherland, Ivan Edward (1968), “A head-mounted three dimensional display” +1968 - “The Sword of Damocles? Sutherland, Ivan Edward (1968), “A head-mounted three dimensional display? ![](https://i.imgur.com/yYAxe2d.png) -“The Mother of All Demos”, presented by Douglas Engelbart (1968) at (ACM/IEEE) Computer Society's Fall Joint Computer Conference See full demo: https://www.youtube.com/watch?v=yJDv-zdhzMY +“The Mother of All Demos?, presented by Douglas Engelbart (1968) at (ACM/IEEE) Computer Society's Fall Joint Computer Conference See full demo: https://www.youtube.com/watch?v=yJDv-zdhzMY ![](https://i.imgur.com/u9McBxK.png) -“Dynabook” Alan C. Kay. (1972), “Personal Computer for Children of All Ages” +“Dynabook? Alan C. Kay. (1972), “Personal Computer for Children of All Ages? ![](https://i.imgur.com/8IlrB6e.png) @@ -60,11 +60,11 @@ Apple Newton (1993) and Apple iPad (2010) ![](https://i.imgur.com/cpLSLUm.png) -Graphical User Interface supporting “What You See Is What You Get” (WYSIWYG), the Desktop metaphor (files, folders, etc.), Xerox Parc/Xeroc Star +Graphical User Interface supporting “What You See Is What You Get? (WYSIWYG), the Desktop metaphor (files, folders, etc.), Xerox Parc/Xeroc Star ![](https://i.imgur.com/ccSlueJ.png) -Graphical User Interface supporting “What You See Is What You Get” (WYSIWYG), the Desktop metaphor (files, folders, etc.), Xerox Parc/Xeroc Star +Graphical User Interface supporting “What You See Is What You Get? (WYSIWYG), the Desktop metaphor (files, folders, etc.), Xerox Parc/Xeroc Star ![](https://i.imgur.com/GY8teow.png) @@ -76,7 +76,7 @@ Ramesh Raskar, Greg Welch, Matt Cutts, Adam Lake, Lev Stesin and Henry Fuchs (19 ![](https://i.imgur.com/7HLtUzS.png) -1981 - Steve Manns’s “Wearable Computing” Start of a series of prototypes for wearable computing, cyborgs, and mediated reality (-> Google Glass) www.wearcam.org, www.eyetap.org +1981 - Steve Manns’s “Wearable Computing? Start of a series of prototypes for wearable computing, cyborgs, and mediated reality (-> Google Glass) www.wearcam.org, www.eyetap.org ![](https://i.imgur.com/pJtEw93.png) diff --git a/content/notes/brainstorming.md b/content/notes/brainstorming.md index 971e4b1f2..77f8df9da 100644 --- a/content/notes/brainstorming.md +++ b/content/notes/brainstorming.md @@ -72,7 +72,7 @@ This will be a mobile app that snowboarders can use to automatically generate ra The first core feature of the app is the customisable trick generator. It should be very easy and quick to use. This presents an interesting problem as while snowboarding, users are wearing large mittens, and the air can be very cold for hands. It would be ideal if it could be used while wearing mittens. -The second core feature of the app is the Daily Trick. This means that users get a notification with a random trick from the trick generator. This feature could allows users to get the benefit of the trick generator without having to open the app on the mountain. However, the issue here is that most people don't snowboard everyday. To get around this, I could allows the users to schedule days on which to recieve a daily trick, or I could alert them whenever they are on a mountain by monitoring their altitude. Of course the second option has some privacy issues that will need to be considered. +The second core feature of the app is the Daily Trick. This means that users get a notification with a random trick from the trick generator. This feature could allows users to get the benefit of the trick generator without having to open the app on the mountain. However, the issue here is that most people don't snowboard everyday. To get around this, I could allow the users to schedule days on which to recieve a daily trick, or I could alert them whenever they are on a mountain by monitoring their altitude. Of course the second option has some privacy issues that will need to be considered. The third core feature of the app is the link with friends. This is a core feature because snowboarders will typically rider with a group of friends. Being able to join a 'trick group' means these groups can do the same trick and 'compete' against each other. @@ -113,4 +113,4 @@ Skate dice was one of the most intresting the apps I found. It had a very unique ## Skate tricks -This app is a much more fully featured solution. It is oriented towards learning skateboarding, and keeping track of you progress while doing it. It also has a built in trick generator, and game of skate. One of the most unique features it had that the other apps didn't was a trick of the day. This is one of the core features I want to include in my app. Another interesting feature it had was a page informing the user about injury prevention. \ No newline at end of file +This app is a much more fully featured solution. It is oriented towards learning skateboarding, and keeping track of you progress while doing it. It also has a built in trick generator, and game of skate. One of the most unique features it had that the other apps didn't was a trick of the day. This is one of the core features I want to include in my app. Another interesting feature it had was a page informing the user about injury prevention. diff --git a/content/notes/bst-operations.md b/content/notes/bst-operations.md index a818b281c..c2373721f 100644 --- a/content/notes/bst-operations.md +++ b/content/notes/bst-operations.md @@ -112,4 +112,4 @@ private void delete(Node n) { # Traversal -[tree-traversal](notes/tree-traversal.md) \ No newline at end of file +[tree-traversal](notes/tree-traversal.md) diff --git a/content/notes/bug-tracker.md b/content/notes/bug-tracker.md index 910342b44..34a10efb4 100644 --- a/content/notes/bug-tracker.md +++ b/content/notes/bug-tracker.md @@ -57,4 +57,4 @@ Should: - Dont start with a small program - Show the project to people - Show to recruiters - - Demo in interviews \ No newline at end of file + - Demo in interviews diff --git a/content/notes/build-tools.md b/content/notes/build-tools.md new file mode 100644 index 000000000..ecf5f17c2 --- /dev/null +++ b/content/notes/build-tools.md @@ -0,0 +1,89 @@ +--- +title: "build-tools" +aliases: build tools +tags: +- cosc202 +--- + +# Build tools +Tools that automate the construction of software,. + +## C +if you recompile C you get an object file which can be linked. Automation tools will do the linking for you. + +what they do: +- run [compiler](notes/compiler.md) +- run [linker](notes/linker.md) +- automatically download depencies ([libraries](notes/13-code-librarires.md)) + - this can also be done using [containers](notes/containers.md) e.g., a docker container +- possibly some form of [testing](notes/testing.md) + +# History of build tools + +## Make +> check whether targets are older than sources + +Has: +- set of targets +- set of source files +- A list of commands that build the target from the source +- internal variables + - \$@ - the rules source(s) + - \$< - the rules tartet +- + +Build things in the correct order (*topologically*. e.g., will run compiler before linker if needed. + +Limitations +- doesn't handle subprojects +- doesn't handle directories + - when make look for changes, it usually only looks in the current dir + - big projects will have call make is sub projects, this can get complicated quick +- Internal variables do not match with typical shell variables + - use \$\$ to use make shell variables +- no real constraints or conventions: can \betaused for a lot of things + +## Java programs +dont really need the linking step: java can load class files on the fly. The java compiler is more flexible. + +Still needs some automation: +- cleaing uneeded .class files +- bulding Java archive files (JAR) + +## Ant +Written to handle build tasks, e.g., build a JAR, clean up files. Uses an XML file: build.xml. (XML sucks) + +improves upon make by +- better at scanning sub dirs +- calls javac on many files at once not one at a time + +## Maven +maven has conventions: +- e.g., file structure: + - main app as src/main/java + - support resources at src/main/resources + - test sources at src/test/java +- Support non java languages + +Still XML files: pom.xml + +Colour in output. + +## Gradle +speed and flexibility +- does not use xml +- has its own domain specific language +- more complex than maven +- faster than maven + - particularly in incremental build + - i.e. not re-building when it doesn't need to +- Support non java languages + +## Others +- rake - ruby's version of Make +- SCons - builds database about build state +- CMake - cross platorm building; uses existing tools/IDEs +- SBT scala +- languge built in tools + - go - Go build + - rust - Cargo diff --git a/content/notes/business-process-model-and-notation.md b/content/notes/business-process-model-and-notation.md index cdcc7c619..2fce74254 100644 --- a/content/notes/business-process-model-and-notation.md +++ b/content/notes/business-process-model-and-notation.md @@ -28,4 +28,4 @@ identify the business role for each activity ## 2 Examples ![](https://i.imgur.com/Bu4kNWk.png) -![](https://i.imgur.com/kENP9iR.png) \ No newline at end of file +![](https://i.imgur.com/kENP9iR.png) diff --git a/content/notes/class-diagrams.md b/content/notes/class-diagrams.md index 7c02acf24..9affe08d4 100644 --- a/content/notes/class-diagrams.md +++ b/content/notes/class-diagrams.md @@ -136,4 +136,4 @@ can be at conceptual level or implementation level ## 5 System class model [system class model](https://i.imgur.com/KsQuCd5.png) -Models associations among domain objects and system components; implementation level only \ No newline at end of file +Models associations among domain objects and system components; implementation level only diff --git a/content/notes/color.md b/content/notes/color.md index 83701aee9..3e97b8e86 100644 --- a/content/notes/color.md +++ b/content/notes/color.md @@ -11,4 +11,4 @@ tags: - keep luminance values from grayscale when moving to color - use color harmonisers - ![](https://i.imgur.com/KdwaNzi.png) -- about 5-8% of men are colorblind (red-green, blue–yellow, total color blindness) \ No newline at end of file +- about 5-8% of men are colorblind (red-green, blue–yellow, total color blindness) diff --git a/content/notes/compiler.md b/content/notes/compiler.md index 202847558..60b898241 100644 --- a/content/notes/compiler.md +++ b/content/notes/compiler.md @@ -48,4 +48,4 @@ Compilers usually ouput *object code*. This contains machine code, but is not ye javac produces JVm bytecode. this bytecode was orginally run on `java` [Interpreter](notes/interpreter.md). This extra layer was initally created to help with porting java on new hardware. Now `java` recompiles to java hardware CPU. This is done 'just-in-time' in RAM and doesn't ouput machine code. The JIT compiler is triggered when code is first (or repeatedly used). # Compiler errors -Producing good error messages is important and difficult as the compiler doesn't usually know exactly where/what the error was. Errors can occur within expanded macros \ No newline at end of file +Producing good error messages is important and difficult as the compiler doesn't usually know exactly where/what the error was. Errors can occur within expanded macros diff --git a/content/notes/conceptual-vs-ipmlementation-models.md b/content/notes/conceptual-vs-ipmlementation-models.md index 1e2455956..2599f6d46 100644 --- a/content/notes/conceptual-vs-ipmlementation-models.md +++ b/content/notes/conceptual-vs-ipmlementation-models.md @@ -17,4 +17,4 @@ Models like ERDs are used to represent a high level conceptual overview of a sys - Useful in documenting and specifying structure (for devs etc) - Should be detailed and specific enough to allow a dev to implement it without having to guess at details - Should be tailored to the specific implementation technologies or systems -- \ No newline at end of file +- diff --git a/content/notes/consoles-terminals-shells.md b/content/notes/consoles-terminals-shells.md index b9a5f9171..db1718589 100644 --- a/content/notes/consoles-terminals-shells.md +++ b/content/notes/consoles-terminals-shells.md @@ -20,4 +20,4 @@ tags: 2. Then multiple terminals which allowed mulitple people to use one computer 3. Graphics support 4. Console + terminal merged -5. Virtual terminals -> no need for direct hardware control -> replaced by OS \ No newline at end of file +5. Virtual terminals -> no need for direct hardware control -> replaced by OS diff --git a/content/notes/containers.md b/content/notes/containers.md index 0597cbe8c..a6b9cc662 100644 --- a/content/notes/containers.md +++ b/content/notes/containers.md @@ -96,4 +96,4 @@ tags: - Can easily upgrade containers to include security fixes - Upgrading live containers may break applications - Common: whole container-based app is rebuilt & relaunched - - Container frameworks themselves also get hacked \ No newline at end of file + - Container frameworks themselves also get hacked diff --git a/content/notes/continuous-integration.md b/content/notes/continuous-integration.md index fbebb8679..9f016db76 100644 --- a/content/notes/continuous-integration.md +++ b/content/notes/continuous-integration.md @@ -20,7 +20,7 @@ Pipelines can also be run locally, and can be triggered, as you, commit, save, t Pipeline can produce several forms of asynchonous output such as email notifications, web badges, webhooks, etc. In addition, most VCS hosting platforms capture the terminal logs from the CI scripts. # 5 Runners -Runners are what run the CI jobs. They are hosted and run by your git [VCS](notes/version-control-system.md) hosting system. You can also elect to have your hosting system trigger run that run on your local machine if you want to test your software on certain harware. Runners run on isolated infrastructure that is set up as needed to handle load variation. +Runners are what run the CI jobs. They are hosted and run by your git [VCS](notes/02-version-control-system.md) hosting system. You can also elect to have your hosting system trigger run that run on your local machine if you want to test your software on certain harware. Runners run on isolated infrastructure that is set up as needed to handle load variation. This is the basic gitlab infrastructure which uses google cloud ![300](https://i.imgur.com/HTWz2mQ.png) ![300](https://i.imgur.com/V87CeQY.png) diff --git a/content/notes/cosc-201.md b/content/notes/cosc-201.md index 2e1ed6e66..258623bb4 100644 --- a/content/notes/cosc-201.md +++ b/content/notes/cosc-201.md @@ -6,7 +6,6 @@ tags: - course - cosc201 --- -links: [_index](_index.md) # Assignments - [[notes/assignment-01]] @@ -21,25 +20,32 @@ links: [_index](_index.md) - [divide-and-conquer](notes/divide-and-conquer.md) - [unite-and-conquer](notes/unite-and-conquer.md) - [dynamic-programming](notes/dynamic-programming.md) -- [memoization](notes/memoization.md) + - [memoization](notes/memoization.md) # Data Structues - [union-find](notes/union-find.md) - [priority-queue](notes/priority-queue.md) -- [stacks-and-queues](notes/stacks-and-queues.md) +- [dynamic-linear-datatype](notes/dynamic-linear-datatype.md) + - [Stack](notes/dynamic-linear-datatype.md#Stack) + - [Queue](notes/dynamic-linear-datatype.md#Queue) - [heap](notes/heap.md) - [treap](notes/treap.md) - [hash-map](notes/hash-map.md) + - [linear-probing](notes/linear-probing.md) - [set](notes/set.md) - [tree](notes/tree.md) - - [avl-tree](notes/avl-tree.md) + - [binary-search-tree](notes/binary-search-tree.md) + - [balancing-binary-search-trees](notes/balancing-binary-search-trees.md) - [red-black-tree](notes/red-black-tree.md) + - [avl-tree](notes/avl-tree.md) + - [bst-operations](notes/bst-operations.md) + - [tree-traversal](notes/tree-traversal.md) +- [graphs](notes/graphs.md) # Algorithms - [mergesort](notes/mergesort.md) - [heapsort](notes/heapsort.md) - [[quicksort](notes/quicksort.md)] -- [balancing-binary-search-trees](notes/balancing-binary-search-trees.md) # Lectures - [07-mergesort-1](notes/07-mergesort-1.md) @@ -53,4 +59,6 @@ links: [_index](_index.md) - [15-dynamic-programming](notes/15-dynamic-programming.md) - [16-hasing-maps-sets](notes/16-hasing-maps-sets.md) - [17-collision-resolution-probing](notes/17-collision-resolution-probing.md) -- [18-hash-examples](notes/18-hash-examples.md) \ No newline at end of file +- [18-hash-examples](notes/18-hash-examples.md) +- [19-graphs](notes/19-graphs.md) +- [20-graphs-2](notes/20-graphs-2.md) diff --git a/content/notes/cosc-202.md b/content/notes/cosc-202.md index 82c3b14ab..f32da52f2 100644 --- a/content/notes/cosc-202.md +++ b/content/notes/cosc-202.md @@ -8,6 +8,10 @@ tags: --- links: [_index](_index.md) +# Assignment +- [reflective-statement-plan](notes/reflective-statement-plan.md) +- [reflective-statement](notes/reflective-statement.md) + # Outline - [consoles-terminals-shells](notes/consoles-terminals-shells.md) - [git](notes/git.md) @@ -18,13 +22,17 @@ links: [_index](_index.md) - [test-driven-development](notes/test-driven-development.md) - [unit-testing](notes/unit-testing.md) - [debugging](notes/debugging.md) + - [imperative programming](notes/imperative-programming-language.md) - [documentation](notes/documentation.md) - [continuous-integration](notes/continuous-integration.md) - [automation](notes/automation.md) +- [software library](notes/libraries.md) - [containers](notes/containers.md) - [linker](notes/linker.md) -- [loader](notes/loader.md) +- [loader](notes/loader.md)s - [operating-system](notes/operating-system.md) +- [software-licensing](notes/software-licensing.md) +- [application-programming-interface](notes/application-programming-interface.md) # Lectures - [07-testing](notes/07-testing.md) @@ -34,7 +42,10 @@ links: [_index](_index.md) - [11-continuous-integration-2](notes/11-continuous-integration-2.md) - [12-automation](notes/12-automation) - [13-code-librarires](notes/13-code-librarires.md) -* +* [14-apis](notes/14-apis.md) - [15-containers](notes/15-containers.md) - [16-compilers](notes/16-compilers.md) -- [17-linkers-and-loaders](notes/17-linkers-and-loaders.md) \ No newline at end of file +- [17-linkers-and-loaders](notes/17-linkers-and-loaders.md) +- [18-build-tools](notes/18-build-tools.md) +- [19-security](notes/19-security.md) +- [20-software-licensing](notes/20-software-licensing.md) diff --git a/content/notes/dark-patterns.md b/content/notes/dark-patterns.md new file mode 100644 index 000000000..bfa172227 --- /dev/null +++ b/content/notes/dark-patterns.md @@ -0,0 +1,19 @@ +--- +title: "dark-patterns" +aliases: dark patterns, dark design +tags: +- info203 +--- + +turniing patterns against the user. +all the dsign heuristics can be used against the user + +- ![oxfam example](https://i.imgur.com/mn3oK05.png): defaults to a recurring payment +- ![comet shop example](https://i.imgur.com/nGfdk7W.png): additional product is automatically included +- ![complicated contract](https://i.imgur.com/mTJmqwa.png) +- ![flight booking](https://i.imgur.com/6uwauOB.png) +- ![amazon cancel prime](https://i.imgur.com/06htsKV.png) +- hard to cancel facebook account +- ![FOMO](https://i.imgur.com/Ikf0DiF.png) + +who is the customer of free products like tiktik, facebook, instagram. WE are not the customer, we are the animals in the zoo, the products \ No newline at end of file diff --git a/content/notes/data-access.md b/content/notes/data-access.md index b773e9091..471424d56 100644 --- a/content/notes/data-access.md +++ b/content/notes/data-access.md @@ -24,4 +24,4 @@ There are three main approaches: - encapsulates all access to persistent data # JDBC -[JDBC](notes/java-database-connectibity.md) is a Framework for working with (SQL) databases in Java. It was designed to be independent of the DBMS you are using. The same java code *should* work on all SQL DBMSs (*just* change the driver) \ No newline at end of file +[JDBC](notes/java-database-connectibity.md) is a Framework for working with (SQL) databases in Java. It was designed to be independent of the DBMS you are using. The same java code *should* work on all SQL DBMSs (*just* change the driver) diff --git a/content/notes/database-based-storage.md b/content/notes/database-based-storage.md index 24162b730..e3bcfcb38 100644 --- a/content/notes/database-based-storage.md +++ b/content/notes/database-based-storage.md @@ -29,4 +29,4 @@ APIs #unfinished - JDBC java - DB-API python - PDO php - - DBI perl \ No newline at end of file + - DBI perl diff --git a/content/notes/debugging.md b/content/notes/debugging.md index 1c97f9e1b..e153aafc7 100644 --- a/content/notes/debugging.md +++ b/content/notes/debugging.md @@ -27,7 +27,7 @@ debuggers are tools to help debugging - stack trace of stopped program can be analysed ## 3 Imperative languages -These are language that are executed in a step-wise, sequentail manner. +These are languages that are executed in a step-wise, sequentail manner using the [imperative programming](notes/imperative-programming-language.md) paradigm - debug symbols - e.g., method named, variable named @@ -44,9 +44,9 @@ These are language that are executed in a step-wise, sequentail manner. - continue --> go back to running code continuously ### 4.2 controlling debugger execution -Can run normally --> debugger wil run when program crashes +Can run normally --> debugger will run when program crashes -Set Breakpoint --> debugger will stop program when/if that line is reached +Breakpoint --> debugger will stop program when/if that line is reached - conditional breakpoints only suspend if a condition is true Watch point --> program is suspended when some data changes (e.g., variables) diff --git a/content/notes/dependencies.md b/content/notes/dependencies.md index 744fd6e31..9c0755e3f 100644 --- a/content/notes/dependencies.md +++ b/content/notes/dependencies.md @@ -5,10 +5,10 @@ tags: - info201 --- -# 1 Functional Depenencies (FDs) -For any given value of attribute A there is _exactly one_ associated value of attribute B, then A _functionally determines_ B (loosely) +# Functional Depenencies (FDs) +If for any given value of attribute A there is _exactly one_ associated value of attribute B, then A _functionally determines_ B (loosely) -This is the theoretical basis for normalisation, and uniqueness property of PK (A is unique with respect to B) +This is the theoretical basis for [normalisation](notes/normalisation.md), and uniqueness property of PK (A is unique with respect to B) - one to one - Written as: A --> B @@ -16,13 +16,13 @@ This is the theoretical basis for normalisation, and uniqueness property of PK ( - Within a single relation only - every attribute functionally dependent of primary key (PK) -## 1.1 Example 1 +## Example 1 - consdier a specific student ID e.g., 123346 - this student ID is alwasys associated witha single studnet name (e.g., jane smith) - even it the students name changes, that student ID will still be asociated with the name of only that on student -- _The value of studnet id dtermines the value of student name_ +- *The value of student id determines the value of student name* -## 1.2 Other examples +## Other examples - student ID --> student name (but not vice versa) - car registration --> car owner (but not vice versa) - rego --> VIN @@ -32,7 +32,7 @@ This is the theoretical basis for normalisation, and uniqueness property of PK ( - IRD number + year --> tax payable - product ID + order no --> quantity ordered -## 1.3 Anti examples +## Anti examples - student ID + name --> birth date (overkill, partial dependency) - home address --> student name - name --> birth date @@ -42,7 +42,7 @@ e.g., ![](https://i.imgur.com/EMSOMmC.png) -## 1.4 Using Functional dependencies +## Using Functional dependencies To determine them: - need detailed knowledge of thebusiness rules - examine existing data sets @@ -54,23 +54,22 @@ Bottom up approach - ERD is "top-down" - FD best used as a design validation tool -## 1.5 Types of functional dependencies -### 1.5.1 Dependencies on more that one attribute +## Types of functional dependencies +### Dependencies on more that one attribute non primary attributes that are dependent on two or more attributes always arise with composite PKs e.g., ![](https://i.imgur.com/d4fUeRD.png) -### 1.5.2 Partial Dependency +### Partial Dependency Subset of left hand side determines right hand side "extra attributes" e.g., ![](https://i.imgur.com/clpV0eU.png) -![Uploading file...mfewm]() -### 1.5.3 Transitive dependency +### Transitive dependency e.g., - part num determines supplier number - supplier number determines supplier name @@ -80,7 +79,7 @@ BUT 3 is already implied by 1 & 2 --> redundant supplier names ![](https://i.imgur.com/VZbxVff.png) ![](https://i.imgur.com/df0D7Lc.png) -### 1.5.4 Multivalued dependencies (MVDs) +### Multivalued dependencies (MVDs) if for any given value of attribute A there is a _set_ of associated values of attribute S, the a _Multidetermines_ S (loosely) - one to many @@ -89,5 +88,4 @@ if for any given value of attribute A there is a _set_ of associated values of a - Generalistion of FDs: all FDs are MVDs, but not vice versa - A is still unique with respect to S -## 1.6 Examples -![](https://i.imgur.com/938t9Kd.png) \ No newline at end of file +![](https://i.imgur.com/938t9Kd.png) diff --git a/content/notes/design-heuristics.md b/content/notes/design-heuristics.md index 8084833d8..dd9a2af3a 100644 --- a/content/notes/design-heuristics.md +++ b/content/notes/design-heuristics.md @@ -13,4 +13,8 @@ tags: - [recognition-over-recall](notes/recognition-over-recall.md) - [flexibility-and-efficiency](notes/flexibility-and-efficiency.md) - [aesthetic-and-minimalist-design](notes/aesthetic-and-minimalist-design.md) -- +- [help-and-documentation](notes/help-and-documentation.md) +- [recognise-and-recover-from-errors](notes/recognise-and-recover-from-errors.md) + +[anti-design-heristics](notes/anti-design-heristics.md) +[dark-patterns](notes/dark-patterns.md) \ No newline at end of file diff --git a/content/notes/designing-studies-video.md b/content/notes/designing-studies-video.md new file mode 100644 index 000000000..93206cff9 --- /dev/null +++ b/content/notes/designing-studies-video.md @@ -0,0 +1,13 @@ +--- +title: "designing-studies-video" +aliases: +tags: +- info203 +- scott-video +- lecture +sr-due: 2022-05-26 +sr-interval: 7 +sr-ease: 250 +--- + +[designing-studies](notes/designing-studies.md) \ No newline at end of file diff --git a/content/notes/designing-studies.md b/content/notes/designing-studies.md new file mode 100644 index 000000000..26364339d --- /dev/null +++ b/content/notes/designing-studies.md @@ -0,0 +1,52 @@ +--- +title: "designing-studies" +aliases: +tags: +- info203 +--- + +Need to be more specific than "Do you like my interface". Need to avoid experimenter bias + +# Terms +- **Comparison:** What is good + - "Yark stick" +- **Baserate:** how often does Y occur + - requires measurin Y +- **Correlation:** Do X and Y co-vary + - Requires measuring X and Y +- **Causes:** Does X cause Y + - Requires measuring X and Y and manipulating X +- **Manipulations:** Indepenedent variables +- **Measures:** Dependent variables + - e.g., task completion time, recall, accuracy, emotional response +- **Precision:** Internal Validity + - remove confounding factors + - large sample size +- **Generlisability:** External Validity + - does this apply in the real world + +# Strategies for fairer comparisons +Two main things differ between prototype and Production: Fidelity (how "polished the design is", Approach (the actual design) + +- insert your new approach into the production setting +- recreate the production approach in you new setting +- scale down so youre just looking at a piece of a larger system +- when expertise is relevant, train people up + +## Bad example +![iphone keyboard study](https://i.imgur.com/Gmski8F.png) + +manipulation: input style +measure: words per minute +external validity: not so much + +benefits and drawbacks +- not a fair example: novices vs experts +- are the results significant + +## Good example +manipulation: input style +measure: words per minute and error rate + +![speed](https://i.imgur.com/RvBVWt2.png) +![errors](https://i.imgur.com/GwYZOIA.png) diff --git a/content/notes/dotnet.md b/content/notes/dotnet.md index fe5f58a04..86d19e058 100644 --- a/content/notes/dotnet.md +++ b/content/notes/dotnet.md @@ -21,4 +21,4 @@ on: - .NET Standard --> the shared set of libraries for the above. -ASP.NET is an open source web framework for building webapps within .NET. It is cross platform \ No newline at end of file +ASP.NET is an open source web framework for building webapps within .NET. It is cross platform diff --git a/content/notes/dynamic-linear-datatype.md b/content/notes/dynamic-linear-datatype.md new file mode 100644 index 000000000..ea68fc99e --- /dev/null +++ b/content/notes/dynamic-linear-datatype.md @@ -0,0 +1,26 @@ +--- +title: "dynamic-linear-datatype" +tags: +- cosc201 +- datastructure +--- + +Both are Dynamic linear data types (interface) + +An abstraction of a collection of data organised "in a line" which supprts addition of new elements and the removal of (some) old elements +- representation + - array (preffered because of memory management) + - linked list (seems more natural) + - and others + +# Stack +LIFO Last in first out + +Can be used using javas `ArrayDeque` `push` and `pop` methods + +# Queue +FIFO First in first out + +Can be used using javas `ArrayDeque` `add` and `remove` methods + +e.g., [priority-queue](notes/priority-queue.md) diff --git a/content/notes/dynamic-programming.md b/content/notes/dynamic-programming.md index 63317b9c8..e82062bf4 100644 --- a/content/notes/dynamic-programming.md +++ b/content/notes/dynamic-programming.md @@ -65,4 +65,47 @@ public long count(int rows,int cols){ } ``` -- since we can copute all the values in one row just from the preceding row, we could reduce the extra space requirement from rows x cols to just cols \ No newline at end of file +- since we can copute all the values in one row just from the preceding row, we could reduce the extra space requirement from rows x cols to just cols + +# Fibonacci numbers example + +$f_{0}= f_{1}= 1, f_{n}=f_{n-1}+ f_{n-2}\ for\ n > 1$ + +the obvious recursive implementation requires exponential time becuase the recursive sub-problems +- compute $f_n-1$, and +- compute $f_n-2$ +overlap (the first generates an instance of the second in the next recurive call) + +DP says "since you know you're goinf to need the values later, remember them as you compute them", and (technically), does one more thing. "while youre at it, since you need to know all the values, you might as well compute from simplest to most complex (bottom up)" + +convert recursive algorithms to counter controlled for or while loops. + +```java +public long fibDP (int n) { + long[] f = new long[n+1]; + f[0] = 1; f[1] = 0; + for(int i = 2; i <= n; i++){ + f[i] = f[i-1] + f[i-2]; + } + return f[n]; +} +``` + +- initialise memorrt to store the answers for simpler problems +- work from bottom up +- return answer + +```java +static HashMap fib = new HashMap<>(); +public static long fibMEM(int n) { + if(n <= 1) return 1; + if(!fib.containsKey(n)) { + fib.put(n, fibMEM(n-1) + fibMEM(n-2)); + } + return fib.get(n); +} +``` +- this technique is called memoization (or caching) +- whenever you compute a result store it somewhere before returning it +- look it up(if you can) when needed +- supported automatically in some languages (e.g., Python's @functools.cache, and any symbolic programming language) diff --git a/content/notes/entity-relationship-diagrams.md b/content/notes/entity-relationship-diagrams.md index 4f32d5890..fa6db182d 100644 --- a/content/notes/entity-relationship-diagrams.md +++ b/content/notes/entity-relationship-diagrams.md @@ -14,7 +14,7 @@ labels are important - but not always needed associative entity => changes many to many relationship with additional relationship -## 0.1 subtypes +# subtypes ![](https://i.imgur.com/5sgPCxO.png) ![](https://i.imgur.com/Q0jMI3b.png) @@ -22,7 +22,7 @@ uses: - model mutual exclusivity - better for modelling not for implementation -## 0.2 parallel relationship +# parallel relationship ![](https://i.imgur.com/UJXPI1l.png) could model as separate relationships via staff subtypes @@ -32,12 +32,12 @@ not very common also an example of recursive many-to-many relationships -## 0.3 recursive relationship +# recursive relationship labels are critical usually 1:M can be 1:1 or M:M ![](https://i.imgur.com/CaEgEkp.png) -## 0.4 dealing with data history +# dealing with data history ![](https://i.imgur.com/cohxggK.png) could be many to many relationships:![](https://i.imgur.com/g4ynsh2.png) @@ -46,4 +46,4 @@ so associative relationship: ![](https://i.imgur.com/NXxsJRl.png) what do we require: - for the current point in time -- an histroical record how ⇒ must be selecetive to not use up to much space \ No newline at end of file +- an histroical record how ⇒ must be selecetive to not use up to much space diff --git a/content/notes/evaluating-designs.md b/content/notes/evaluating-designs.md index a622fa4e8..dd6e5221a 100644 --- a/content/notes/evaluating-designs.md +++ b/content/notes/evaluating-designs.md @@ -11,7 +11,7 @@ Why to evaluate using 'outside' people: - designer/developers are not 'fresh' -> they already have experience with the product - designer/developers don't know what real users will do -## 0.1 Issues to consider +# Issues to consider - Reliability/precision - how accurate is your study? - Is is reproducible -> if it was repeated, would you get the same result @@ -25,7 +25,7 @@ Why to evaluate using 'outside' people: - work involved/efficiency - How cost efficient are your methods -## 0.2 Factors to consider when choosing an evaluation method +# Factors to consider when choosing an evaluation method - Stage in the cycle at which the evaluation is carried out -> (design / implementation) - Style of evaluation -> (lab / field) - Level of subjectivity or objectivity @@ -35,8 +35,8 @@ Why to evaluate using 'outside' people: - Level of interference implied -> (intrusiveness) - Resources required -> (equipment, time, money, subjects, expertise, context) -## 0.3 Styles of evaluation -##### 0.3.1.1.1 Laboratory Studies +# Styles of evaluation +## Laboratory Studies - 1st step: Designer evaluates his/her UI - Specialised equipment for testing available - Undisturbed (can be a good or bad thing) @@ -44,7 +44,7 @@ Why to evaluate using 'outside' people: - Substitute for dangerous or remote real-world locations - Variations in manipulations possible / alternatives -##### 0.3.1.1.2 Field Studies +## Field Studies - Within the actual user’s working environment - Observe the system in action - Disturbance / interruptions (+/-) @@ -52,8 +52,8 @@ Why to evaluate using 'outside' people: - Bias: presence of observer and equipment - Needs support / disturbs real workflow -## 0.4 Quantitative vs Qualitative methods -##### 0.4.1.1.1 Quantitative Measures +# Quantitative vs Qualitative methods +## Quantitative Measures - Usually numeric - E.g. # of errors, time to complete a certain task, questionnaire with scales - Can be (easily) analysed using statistical techniques @@ -62,7 +62,7 @@ Why to evaluate using 'outside' people: - Test hypotheses - Confirm designs -##### 0.4.1.1.2 Qualitative Measures +## Qualitative Measures - Non-numeric - E.g. survey, interview, informal observation, heuristic evaluation - Difficult to analyse, demands interpretation @@ -71,27 +71,27 @@ Why to evaluate using 'outside' people: - Generate hypotheses - Find flaws -## 0.5 Stage in cycle -##### 0.5.1.1.1 Design Stage +# Stage in cycle +## Design Stage - Only concept (even if very detailed) exists - More experts, less users involved - Greatest pay-off: early error detection saves a lot of development money - Rather qualitative measures (exceptions: detail alternatives; fundamental questions, ...) -##### 0.5.1.1.2 Implementation +## Implementation - Artefact exists, sth. concrete to be tested - More users, less experts involved - Assures quality of product before or after deployment; bug detection - Rather quantitative measures (exceptions: overall satisfaction, appeal, ...) -## 0.6 Methods -### 0.6.1 Usability studies +# Methods +## Usability studies - Bringing people in to test Product - Usage setting is not ecologically valid - usage in real world can be different - can have tester bias - testers are not the same as real users - cant compare interfaces - requires physical contact -### 0.6.2 Surveys and focus groups +## Surveys and focus groups + quicly get feedback from large number of responses + auto tally ressults + easy to compare different products @@ -103,14 +103,14 @@ Why to evaluate using 'outside' people: * gathering groups of people to discuss an interface * group setting can help or hinder -### 0.6.3 Feedback from experts +## Feedback from experts - Peer critique - Dogfooding - Using tools yourself - [heuristic-evaluation](notes/heuristic-evaluation.md) - structured feedback -### 0.6.4 Comparative experiments +## Comparative experiments - in lab, field, online - short or long duration - which option is better? @@ -118,20 +118,20 @@ Why to evaluate using 'outside' people: - can see real usage - more actionable -### 0.6.5 Participant observation +## Participant observation - observe what people do in the actual evironment - usually more long term - find things not present in short term studies - [observation](notes/participant-observation.md) -### 0.6.6 Simulation and formal models +## Simulation and formal models - more mathmatical quantitative - useful if you have a theory to test - often used for input techniques - can test multiple alternatives quickly - typically simulation is used in conjugtion with monte carlo optimisation -## 0.7 Query techniques +# Query techniques - [interviewing](notes/interviewing.md) - questionnaires - less flexible @@ -145,7 +145,7 @@ Why to evaluate using 'outside' people: - multiple choice - ranking -## 0.8 Users +# Users - users can come up with great ideas - lead user -> need specific soluton that does not exist -> often make up their own solution - extreme user -> use existing solution for it's intended purpose to an extreme degree diff --git a/content/notes/finite-state-machine.md b/content/notes/finite-state-machine.md index 3f406d61b..bd2c7bbf0 100644 --- a/content/notes/finite-state-machine.md +++ b/content/notes/finite-state-machine.md @@ -8,4 +8,4 @@ A finite state machine is a program which has a number of states called nodes wi This can be implemented as a large switch block. However, this results code which is not suited for readability. It may be useful to define the program using some higher order structure, and create it programmatically via [2 1 Using code to create code](notes/12-automation#2%201%20Using%20code%20to%20create%20code) -For example something like a phone machine could be implemented as a finite state machine \ No newline at end of file +For example something like a phone machine could be implemented as a finite state machine diff --git a/content/notes/full-assignment.md b/content/notes/full-assignment.md new file mode 100644 index 000000000..f50b86dc2 --- /dev/null +++ b/content/notes/full-assignment.md @@ -0,0 +1,325 @@ +# Brain Storming +## Concept 1 - Snowboard trick generator. +This will be a mobile app that snowboarders can use to automatically generate random tricks. This app will be useful because snowboarders (riders) often get tunnel vision on a certain style of tricks or even a single trick. Using a algorithm to generate tricks provides a way for them to escape this focus. It can also be used when playing a game of SNOW, which is similar to a game of SKATE. + +## Initial Ideas +- customisable trick generator + - trick lists --> users can create lists for the generator to choose a trick from + - some built in lists + - share lists with friends + - options + - trick types + - jump + - rail + - pipe + - butters + - flips + - spins + - grabs + - spin direction + - bring back or not + - stance + - regular + - goofy +- daily trick + - same for all users? + - auto notification + - schedule + - weekly + - custom + - auto when at an altitude +- App widget with daily trick? +- search for tricks + - options similar to generator + - save tricks to a list for generator +- link with other users + - methods + - qr code + - url/link + - contact + - social media + - people + - friends + - coach + - parents + - features + - daily/sheduled trick group + - how would this work with altitude detector + - share trick lists + - community section for trick lists + - like spotify playlists + - users can share tutorials +- Ease of use - (hard to use with gloves) + - voice controls + - gesture controls +- goals tracking + - goal lists + - daily/weekly/yearly goals + - trick generator can choose a trick from goals + - share (or keep private) with coach and friends + - trick tutorials + +## Final Choices +Core features: +- customisable generator + - all options no trick lists +- daily trick + - Notification + - able to set a schedule or have it go when at an altitude +- links with friends + - Do same tricks + - link with QR code or url + +The first core feature of the app is the customisable trick generator. It should be very easy and quick to use. This presents an interesting problem as while snowboarding, users are wearing large mittens, and the air can be very cold for hands. It would be ideal if it could be used while wearing mittens. + +The second core feature of the app is the Daily Trick. This means that users get a notification with a random trick from the trick generator. This feature could allows users to get the benefit of the trick generator without having to open the app on the mountain. However, the issue here is that most people don't snowboard everyday. To get around this, I could allow the users to schedule days on which to recieve a daily trick, or I could alert them whenever they are on a mountain by monitoring their altitude. Of course the second option has some privacy issues that will need to be considered. + +The third core feature of the app is the link with friends. This is a core feature because snowboarders will typically rider with a group of friends. Being able to join a 'trick group' means these groups can do the same trick and 'compete' against each other. + +## Existing Apps +Similar Apps I found: + +- For skateboarding: + - [getatrick.com](https://getatrick.com) + - skate gen mobile app + - Skate Tricks + - Skateboard tricks + - Skate Dice +- Freestyle Generator for inline skating, tramp and skiing +- Scooter trick generator + +I was able to find only 7 apps with similar functionality to what I am planning. Of these none 5 were for skateboarding 2 for other sports and zero for snowboarding. + +These 7 apps all had varying degreee of complexity. Some were just simple customizable trick generators, while others were fully fledged coaching and goal tracking apps with community features and other extras. Although I am not planning to make large complicated app, I can still draw from them for guidance as most of them did have a trick generator. + +### Skate Dice +Skate dice was one of the most intresting the apps I found. It had a very unique approach using a "shake the phone" gesture to "roll" the dice. However it has a paywall for premium features such as more tricks, settings, and a "tricktionary". From what I was able to use I think is was the most simple and intuitive apps. It also had an aesthetic that fit the culture of the sport. All these features combined made it very enjoyable to use. + +Takeaways: +- Keep design simple +- Maybe incorporate some gestures +- Consider using an aesthetic wich matches the culture/sport + +![100](Attachments/screenshots/skatedice/Screenshot_20220409-192630_Skate%20Dice.jpg) + +### Skate tricks +This app is a much more fully featured solution. It is oriented towards learning skateboarding, and keeping track of you progress while doing it. It also has a built in trick generator, and game of skate. One of the most unique features it had that the other apps didn't was a trick of the day. This is one of the core features I want to include in my app. Another interesting feature it had was a page informing the user about injury prevention. + +# Personas and Scenarios +## Inital Ideas +- kyle the casual (primary maybe secondary) + - age 23 + - skill advanced + - focus: tricks +- aaron the coach (seconday maybe primary) + - age 30 + - skill used to be pro, now advanced + - focus teaching tricks +- logan the learner (seconday persona) + - age 16 + - skill intermediate + - focus not sure yet, beginning to experiement with tricks +- mac the professional (seconday persona) + - age 20 + - skill pro + - focus tricks, uses the app occaionaly with friends +- karen the parent (negative persona) + - age 45 + - skill intermediate + - focus, groomed runs, some backcountry +- phil the powder hound (supplementary persona) + - age 40 + - skill advanced (not with tricks just in general) + - focus off piste/backcountry, sometimes goes into park with friends/kids + + ## Primary: Casual Kyle + +![](https://i.imgur.com/116a3bj.png) + +- Age: 23 +- Gender: Male +- Skill Level: Advanced (Not proffessional) +- Focus: Terrian Park + +### Goals +#### Experience goals +- wants a quick easy, no hassle, minimal effort experience. +- does not want to appear to be a "nerd" or "try hard" + +#### End goals +- wants to find new interesting tricks that he may not have thought of himself +- wants to progress his level of snowboarding +- wants to show off new cool tricks to his friends + +#### Life goals +- wants to be a "cool snowboarder" +- wants to have as much fun as possible + +### Behaviour +#### Activities +- He is a snowboader. He rides at a least a few days every week +- has a day job, barely enough money for season pass, rides up the mountain, and equipment +- mostly rides in the terrain park + +#### Attitudes +- Likes using social apps + +#### Aptidudes/skills +- has advanced knowledge of the snowboarding tricks, grabs, and variations +- considers himself an advanced snowboarder +- rides all the advanced features in the park. +- can do at least a 540 +- can do a good frontboard, maybe some 270s +- has fun in the pipe but not his favourite thing + +#### Motivations +- wants to find new interesting tricks that he may not have thought of himself, to improve his skills by expanding his "set" of tricks. + +#### Scenario +Kyle wakes up in the morning at 6:45 to go snowboarding with his friends. He sees he has a notification from the trick generator app. The trick for today is a switch back lip. Kyle is excited to try the trick. Kyles friends have also seen the daily trick on their phones. When they meet up on the mountain they all learn the trick and have fun. After they have all done a switch back lip. They decide they want to try another trick. Kyle his phone out of his pocket, opens the app, which loads almost instantly, and generates a trick with only one tap. + +## Secondary: Logan the learner + +![](https://i.imgur.com/EIKju2f.png) + +- Age:13 +- Skill: intermediate +- Focus not sure yet, beginning to experiement with tricks + +### Goals +#### Experience goals +- wants a quick easy, no hassle, minimal effort experience. +- feels excited when using the app +- also feels a little nervous about trying something new + +#### End goals +- wants to find new tricks that he can learn with his friends, since he doesn't know many +- wants to stay motivated to learn a new trick each day/week + +#### Life goals +- Wants to have fun on the weekend +- Wants to get excersise + +### Behaviour +#### Activities +- Snowboarder +- lives in a town near a skifield where it is common to snowboard. +- rides a few times a fortnight, with friends and/or family. maybe in a school program (like they have in wanaka schools) + +#### Attitudes +- Likes using technology + +#### Aptidudes/skills +- has been riding mostly on the groomed runs, is now getting good enough to try the terrian park. +- has been doing some 180s maybe on sidehits. + +#### Motivations +- wants to find new tricks that he can learn with his friends, since he doesn't know many + +#### Scenario +Logan is snowboarding on the mountain with a group of his friends. Logan and his friends decide to go into the terrian park and try some tricks. None of his friends know what tricks to try. Logan takes his phone out of his pocket and without removing his gloves, unlocks it with face ID, and looks at the widget which is showing random trick. Logan then puts his phone back in his pocket, tells his friends the trick, and all him and his friends have fun racing to do the trick first. + +# Low-Fi Prototypes +## Inital Designs +### Navigation +The first thing I wanted to was get a clear picture of how each screen should interact with the others. Identified three main screens: Home, Friends, and Schedule. I also identified some supplementary screens: Trick options, other settings, and welcome, and some more optional screens: Trick lists, trick dictionary. + +I also listed some things that each screen should contain +![300](Attachments/lofi-prototypes/navigation.JPG) + +### General protoypes +Next I started to get down down general ideas about all of the screens. The main goal of this step for was to figure out the general flow of the app, and to get a general idea of how each screen should look. + +This first two pages I was experimenting mostly with the home screen. I tried three different layouts: Top tabs, Bottom tabs, and floating bottom buttons. I also started to explore ways for the user to navigate from the home screen to the trick options screen, and the schedule screen. + +![300](Attachments/lofi-prototypes/general-1.JPG) +![300](Attachments/lofi-prototypes/general-4.JPG) + +The second page I explored a some variations on the floating button design. And begin experimenting with the navigation and layout of the friends screen. + +![300](Attachments/lofi-prototypes/general-2.JPG) + +On the third page I kept experimenting with the friends page. + +![300](Attachments/lofi-prototypes/general-3.JPG) + +## In depth prototypes +### Home screen +I wanted to keep the layout mostly based on googles material design. This will help with four design heuristics: Familiar metaphors and language, consistency and standards, recognition over recall, and minimalist design. + +I started with creating an partly new design that combined the floating buttons, and the swipe feature for trick options. I decided against this as within material design it is not reccomended to have multiple floating buttons. I decided instead to use bottom tabs as they are the most logical, and familiar design for users. + +I also decided against the swipe feature to show tricks, and opted instead for a button which opened another screen. + +I also tried out some other designs features a black background and round buttons. +![500](Attachments/lofi-prototypes/home-2.jpg) ![300](Attachments/lofi-prototypes/home-3.jpg)![300](Attachments/lofi-prototypes/home-1.JPG) + +### Other settings +![300](Attachments/lofi-prototypes/other-settings-1.JPG) + +### Trick Options +For the trick Options I considered a few three main designs: the swipe/scroll, the modal, and the full screen. +![800](Attachments/lofi-prototypes/trick-options-1.JPG) + +### Welcome +![300](Attachments/lofi-prototypes/welcome-1.JPG) + +### Schedule +![300](Attachments/lofi-prototypes/schedule-1.JPG) + +## Refinement +Firstly I converted the lo-fi prototypes into Adobe XD designs. + +![](https://i.imgur.com/syq2HfK.png) + +I decided I wanted to make some chagnes to the design here so I saved this as version 1. + +### Schedule changes + +I wanted to chagne the way the schedule/altude options worked. My first rough redesign was this: +![](https://i.imgur.com/CeYtNuP.png) + +I thought I could remove the separation and combine the two screens. But this didn't work so well. However, I think the ability to switch between meters and feet was good as this improves **user control and freedom**. Also the use of the spinner for time and altitude selection will be familiar to most users. This improves use of **consistency and standards**, and **recognitiona over recall** + +I then decided to try a "switch" type design, where the user is forced to chooose between the schedule and the altitude. + +![](https://i.imgur.com/564G5o9.png) + +I think think this works much better as it **shows the system status** clearly. And has a less cluttered more **miniml, aesthetic design**. I kept the weekday selection on both screens as the might only want use the altitude system on certain days. This improves, **user control and freedom**. + +I also thought it might not be super what the funcitons of the two options were, especially the altitude option. So decided to add a closable info card with some information. This improves **help and documentation** + +![](https://i.imgur.com/KEeEbNm.png) + +I thought the info symbol might have looked like a button so I changed it: + +![](https://i.imgur.com/BIyh7Fr.png) + +I also changed the alignment of the weekday selection buttons. And the altitude selector + +![](https://i.imgur.com/QzAfEaD.png) + + +### Trick options Changes +I decied to change the way this worked. Instead of have the save cancel buttons I wanted the settings change to have immediate effect, so the user didn't have to save. This was the first redesign: + +![](https://i.imgur.com/0SMHkUX.png) +![](https://i.imgur.com/aX0NUZd.png) + + +This is largely the same, except I added a head with back button and remove the bottom save and cancel buttons. Next I changed the dropdown for each of the trick types to individual screens with the commonly used right chevron icon. + +![](https://i.imgur.com/0amkHJG.png) + +### "Color" scheme changes + +After I had mostly finished the Layout. I changed the look to match the snowboarding "aesthetic", by making the app primarily black + +![](https://i.imgur.com/QgPjM5S.png) + +### More layout changes +I decided to add the home row navigation back to the trick options screens to improve **user control and freedom** +![](https://i.imgur.com/474XINO.png) + +# Hi-Fi Prototypes +# \ No newline at end of file diff --git a/content/notes/git.md b/content/notes/git.md index 33c050a01..17cf2e221 100644 --- a/content/notes/git.md +++ b/content/notes/git.md @@ -5,7 +5,7 @@ tags: --- - Git is a tool to track changes to sets of file -- It is the most commonly used [[notes/version-control-system]] +- It is the most commonly used [[notes/02-version-control-system]] ## 1 Team git protocols @@ -74,7 +74,7 @@ can be conceptualised as a graph - edges record how nodes emerged over time - arrows can be read as "is derived from" -git is a [[notes/version-control-system#4 3 Distributed Centralised]] +git is a [[notes/02-version-control-system#4 3 Distributed Centralised]] - every team members has their own local copy of the repo - git repos are often syned with a server: github, gitlab,etc diff --git a/content/notes/graphs.md b/content/notes/graphs.md new file mode 100644 index 000000000..f85a5501d --- /dev/null +++ b/content/notes/graphs.md @@ -0,0 +1,78 @@ +--- +title: "graphs" +aliases: +tags: +- cosc201 +- datastructure +--- + +Represents a set of things with relationships between them. + +- a set of *vertices* +- some *edges* between them +- edges on some graphs have *weights* +- edges on some graphs are *directed* + +Some graphs are named e.g, ![Q3](https://i.imgur.com/Mfd1Vzm.png) + +# Implementation +should: +- be static +- say if two vertices are connected in $O(1)$ +- say what the neighbors of a vertice are in $O(1)$ + +## Hashset +array wwith element to each verttex, and each element of the array is a *TreeSet* of its neighbors. + +graph is built up by specifying size, then edges. + +```java +add edge(int v, int w){ + neighbors[v].add(w); + neighbors[w].add(v); +} +``` + +we could also define a vertex class and use a `HashSet\` + +There are many options + +# Traversals +## Breadth first traversal +![](https://i.imgur.com/iQ3TMCb.png) +Stating from v, initialise an empty queue a, and add a marker to each vertex (or make a set of seen vertices). + +1. add the start vertex to a queue and mark it as seen +2. while the queue is not empty +3. visit the first ellemnet of a qeue removing ti +4. do someting with it (line 3.5) +5. unseen neighbors neighbors are added to the queue marking them as seen +6. repeat + +## Depth first +init empty *stack*, s, and add a marker to each vertex (or make a set of seen vertices) +![](https://i.imgur.com/x916lrw.png) + +1. add the start vertex to a stack and mark it as seen +2. while the stack is not empty +3. visit the first ellemnet of a qeue removing ti +4. do someting with it (line 3.5) +5. unseen neighbors neighbors are added to the stack marking them as seen +6. repeat + +## Cost of traversal +we measure complexity both in terms of veritces V and edges E. + +for each vertex +- it occurs in some neghbor list ofot he first time at which point it is added to the list, and marked as seen +- then at soome point it is removed +- so $O(1)$ per vertice so $O(V)$ + +for each edge: +- edge arise implicityly in the neihbor list +- each one appreas twice, once per endpoint +- when one appreas is causes a constant amount of work +- also $O(1)$ per edge so $O(E)$ + +so $O(V + E)$ + diff --git a/content/notes/grouping.md b/content/notes/grouping.md index da1767aa9..c61c1256b 100644 --- a/content/notes/grouping.md +++ b/content/notes/grouping.md @@ -6,7 +6,7 @@ tags: - visual-design --- -Gestaltkriterien “Gestalt Principles” - Law of Proximity +Gestaltkriterien “Gestalt Principles? - Law of Proximity Our brain is trying to help us understand the world. For example we look for eye contact. Our brain is looking with our eyes for contrast, parrallel lines, etc. Criteria that help us understand the world. diff --git a/content/notes/hash-map.md b/content/notes/hash-map.md index 2a87d7c6e..19e24fe53 100644 --- a/content/notes/hash-map.md +++ b/content/notes/hash-map.md @@ -1,16 +1,73 @@ --- -title: "hah-map" -aliases: map, hash map, hash set +title: "hash-map" +aliases: hash map tags: - cosmc201 - datastructure --- -In compsci a map is a comprised of a set of keys and values. (``). For example `` +In compsci a map is a comprised of a [set](notes/set.md) of keys and values. (``). For example `` So sets are a prerequisite for maps +A hash set is just a hash map where the key is the values hash code. + +# Operations The fundamental map operations are: - `Put(k, v)` --> Add the this key-value pair to the map. If the present: update the key - `Get(k)` --> returns the value associated with `` is present -- `Remove(k)` --> Removes the key `k` \ No newline at end of file +- `Remove(k)` --> Removes the key `k` + +[BST](notes/binary-search-tree.md) can provide us with a set or map implementation whre the cost of each operation is $O(lg\ n)$ . But his requires an underlying order on keys, which might not be needed. + +# Hash functions +a *hash function* takes objects from a class as input and produces a value from a fixed finite set of values (in Java, an `int`). + +This sounds hard, but for commonly used classes (e.g., strings) there are already good has functions. Good enough is usually good enough. IDE can usually suggest something that is good enough. A hashcode function will usually come with an equals function to distinguish between collions and actual equal values + +## Collisions: Chaining/open addressing +- array elements are called buckets +- each bucket is a *list* of key-value pairs +- when a mapping is added, + - if empty add it (creating a new list if required) + - otherwise check to see if there is a collision or an actual equality with each item of the list + - If there is an equality -> change its value + - otherwise just add it to the list +- get and removing are handled similarly + +we need to keep the load factor (how full the map is) small so that the chains dont't get to long + +# Probing +Chaining (lists of k-v pairs in each bucket) breaks locailty of reference within the array and may not be suitable for high-performance implementations. + +It works in java because objects are stored as references anyway, you need to look elsewhere in memory anyway. + +So the advantage of probing is negated. + +In C you know how many bytes of memory a k v pair will occupy. So you can store them as a continuous block of memory. Now you can take advatage of the locality of reference and the speed it provides. + +To do this the contents of bucket should not be a list. they should be null, or a single kv pair. + +each kv pair has a *home spot* it would like to go to: this is the modulo remainder from last lecture. we can use [linear-probing](notes/linear-probing.md) to ensure the kv remains close to its home spot. + +# basic implementation +```java +V[] map = new V[53]; + +public V put(K key, V value){ + V old = map[k.id() % v.length]; + map[k.id() % v.length] = value; + return old; //to match java map interface +} + +public V get(K key){ + return map[k.id() % v.length]; +} + +public V remove(K key){ + V old = map[k.id() % v.length]; + map[k.id() % v.length] = null; + return old; +} + +``` \ No newline at end of file diff --git a/content/notes/heapsort.md b/content/notes/heapsort.md index 504e238b9..167464d5d 100644 --- a/content/notes/heapsort.md +++ b/content/notes/heapsort.md @@ -25,4 +25,4 @@ Merge is preferred because extra memory cost of merge sort is negligible -∴ Merge sort is faster \ No newline at end of file +∴ Merge sort is faster diff --git a/content/notes/help-and-documentation.md b/content/notes/help-and-documentation.md new file mode 100644 index 000000000..3017ca1fa --- /dev/null +++ b/content/notes/help-and-documentation.md @@ -0,0 +1,14 @@ +--- +title: "help-and-documentation" +aliases: +tags: +- info203 +--- + +- guide the way and show steps +- online help + - transition from built in help to links to online help + - sometimes users dont have an internet connection + - e.g., chrons app used all the data +- help clearly and transparently + - e.g., privacy and terms/conditions \ No newline at end of file diff --git a/content/notes/heuristic-evaluation.md b/content/notes/heuristic-evaluation.md index 77974acc3..1332e27da 100644 --- a/content/notes/heuristic-evaluation.md +++ b/content/notes/heuristic-evaluation.md @@ -8,33 +8,25 @@ tags: >"Heuristics are strategies derived from previous experiences with similar problems" jacob nielsen and rolf molich -help find usability problems -small set of 3-5 evaluators examine UI -independently check for compliance with usability principles -different evaluators will find different problems -evaluators only communicate afterwaards -findings are aggregated at the end +- help find usability problems +- small set of 3-5 evaluators examine UI +- independently check for compliance with usability principles +- different evaluators will find different problems +- evaluators only communicate afterwaards +- findings are aggregated at the end -![](https://i.imgur.com/DfmaHlI.png) +![example heuristic report](https://i.imgur.com/DfmaHlI.png) -## 1 when? +# when? - as part of need finding -> use experts to critique existing solutions - before user testing -> identify minor issues before user testing - before redesigning -> learn what works and what should change - when you know there are problems but you need evidence -> "provide you with ammunition for design" - before release -> smooth off rough edges -## 2 What -### 2.1 Process -#### 2.1.1 Overview -Helps find problems in design -- 3-4 evaluators examine UI - - independent reviewers check for compliance with usability principles - - each evaluator will find different problems - - evaluators only communicate afterwards and the findings are aggregated -can perform on working UI or sketches - -#### 2.1.2 Phases +# What +## Process +### Phases 1. pre evaluation training ⇒ give evaluators needed domain knowledge and information on the scenario 2. evaluation ⇒ individuals evaluate then aggregate result 1. first as individuals @@ -42,7 +34,7 @@ can perform on working UI or sketches 3. Severity rating ⇒ determine how severe each problem is (priority). Can do first individually and then as a group 4. Debriefing ⇒ review with design team -#### 2.1.3 Individual +### Individual dont look search for heuristics individually just go through the app (like a user). If we find issues, we assign them to categories @@ -61,7 +53,7 @@ use violations for redesign/fix problems multiple evaluators because no one finds everything some will always find more than others (Rule of thumb 5 evaluators find ~75% of problems) -#### 2.1.4 Severity rating +### Severity rating - independently estimate after viewing - allocate resources to fix problems - estimate need for more usability tests @@ -72,26 +64,27 @@ some will always find more than others (Rule of thumb 5 evaluators find ~75% of 3. major 4. catastrophe -#### 2.1.5 Debreifing +### Debreifing - with evaluators observers and dev team - discuss general characteristics of UI - suggest potential imporvements - dev team estimate effort to fix - brainstorm solutions -### 2.2 Nielsen's ten heuristics -visibility of system status -match between system and world -user control and freedom -consistency and standards -error prevention -recognition rather than recall -flexibility and efficiency of use -aesthetic and minimalist design -help users recognize, diagnose, and recover from errors -help and documentation +# Nielsen's ten heuristics +[design-heuristics](notes/design-heuristics.md) +- visibility of system status +- match between system and world +- user control and freedom +- consistency and standards +- error prevention +- recognition rather than recall +- flexibility and efficiency of use +- aesthetic and minimalist design +- help users recognize, diagnose, and recover from errors +- help and documentation -### 2.3 Heuristic evaluation vs user testting +# Heuristic evaluation vs user testting heuristics | user testing ----------------- | -------------- @@ -107,7 +100,7 @@ value to alternate methods ![](https://i.imgur.com/YgGkBqg.png) -### 2.4 Extra tips how to individual +# Extra tips how to individual - at least two passes each - first get get feel for flow - second to focus on specific elements diff --git a/content/notes/hi-fi-development.md b/content/notes/hi-fi-development.md new file mode 100644 index 000000000..b6e82e528 --- /dev/null +++ b/content/notes/hi-fi-development.md @@ -0,0 +1,59 @@ +--- +title: "hi-fi-development" +aliases: +tags: +- assignment/mobile-app +--- +# +Firstly I converted the lo-fi prototypes into Adobe XD designs. + +![](https://i.imgur.com/syq2HfK.png) + +I decided I wanted to make some chagnes to the design here so I saved this as version 1. + +### Schedule changes + +I wanted to chagne the way the schedule/altude options worked. My first rough redesign was this: +![](https://i.imgur.com/CeYtNuP.png) + +I thought I could remove the separation and combine the two screens. But this didn't work so well. However, I think the ability to switch between meters and feet was good as this improves **user control and freedom**. Also the use of the spinner for time and altitude selection will be familiar to most users. This improves use of **consistency and standards**, and **recognitiona over recall** + +I then decided to try a "switch" type design, where the user is forced to chooose between the schedule and the altitude. + +![](https://i.imgur.com/564G5o9.png) + +I think think this works much better as it **shows the system status** clearly. And has a less cluttered more **miniml, aesthetic design**. I kept the weekday selection on both screens as the might only want use the altitude system on certain days. This improves, **user control and freedom**. + +I also thought it might not be super what the funcitons of the two options were, especially the altitude option. So decided to add a closable info card with some information. This improves **help and documentation** + +![](https://i.imgur.com/KEeEbNm.png) + +I thought the info symbol might have looked like a button so I changed it: + +![](https://i.imgur.com/BIyh7Fr.png) + +I also changed the alignment of the weekday selection buttons. And the altitude selector + +![](https://i.imgur.com/QzAfEaD.png) + + +### Trick options Changes +I decied to change the way this worked. Instead of have the save cancel buttons I wanted the settings change to have immediate effect, so the user didn't have to save. This was the first redesign: + +![](https://i.imgur.com/0SMHkUX.png) +![](https://i.imgur.com/aX0NUZd.png) + + +This is largely the same, except I added a head with back button and remove the bottom save and cancel buttons. Next I changed the dropdown for each of the trick types to individual screens with the commonly used right chevron icon. + +![](https://i.imgur.com/0amkHJG.png) + +### "Color" scheme changes + +After I had mostly finished the Layout. I changed the look to match the snowboarding "aesthetic", by making the app primarily black + +![](https://i.imgur.com/QgPjM5S.png) + +### More layout changes +I decided to add the home row navigation back to the trick options screens to improve **user control and freedom** +![](https://i.imgur.com/474XINO.png) diff --git a/content/notes/idea.md b/content/notes/idea.md index e1343af64..349cfed88 100644 --- a/content/notes/idea.md +++ b/content/notes/idea.md @@ -3,4 +3,4 @@ 2. daily/manual/weekly trick generator 3. 2. Album of the day generator - 1. from besteveralbums.com \ No newline at end of file + 1. from besteveralbums.com diff --git a/content/notes/imperative-programming-language.md b/content/notes/imperative-programming-language.md new file mode 100644 index 000000000..855c39049 --- /dev/null +++ b/content/notes/imperative-programming-language.md @@ -0,0 +1,10 @@ +--- +title: "imperative-programming" +aliases: imperative programming +tags: +- cosc202 +- paradigm +--- +[wikipedia article](https://en.wikipedia.org/wiki/Imperative_programming) + +Imperative programming is a paradigm in which code specifiec a series of *commands* which a computer executes to change a programs *state* diff --git a/content/notes/info-201.md b/content/notes/info-201.md index 1b086442e..38b1e89f2 100644 --- a/content/notes/info-201.md +++ b/content/notes/info-201.md @@ -12,8 +12,20 @@ links: [_index](_index.md) - [assignments tiddlywiki](https://isgb.otago.ac.nz/info201/shared/assignments_release/raw/master/output/info201_assignments.html) - [labs folder](file:///"C:/Users/Jet%20Hughes/Documents/Personal/courses/info-201/Labs") +# Labs Checklist +- [x] 2 +- [x] 3 +- [x] 4 +- [x] 5 +- [x] 6 +- [ ] 7 +- [x] 8 +- [x] 9 +- [x] 10 +- [x] 11 + # Outline -- [version-control-system](notes/version-control-system.md) +- [version control system](notes/version-control-systems.md) - [stakeholders](notes/stakeholders.md) - [business-analyst](notes/business-analyst.md) - [developer](notes/developer.md) @@ -52,6 +64,7 @@ links: [_index](_index.md) - [java-database-connectibity](notes/java-database-connectibity.md) # Lectures +- [02-version-control-system](notes/02-version-control-system.md) - [04-requirements](notes/04-requirements) - [06-business-functions-and-use-cases](notes/06-business-functions-and-use-cases.md) - [07-business-process-modelling](notes/07-business-process-modelling.md) @@ -65,3 +78,7 @@ links: [_index](_index.md) - [15-from-models-to-code-and-back](notes/15-from-models-to-code-and-back.md) - [16-reverse engineering](notes/16-reverse%20engineering.md) - [17-data-access](notes/17-data-access.md) +- [18-advanced-sql-1](notes/18-advanced-sql-1.md) +- [19-advanced-sql-2](notes/19-advanced-sql-2.md) +- [20-database-3](notes/20-database-3.md) +- [21-software-architecture-and-templates](notes/21-software-architecture-and-templates.md) diff --git a/content/notes/info-203.md b/content/notes/info-203.md index c681ea92f..3ab614154 100644 --- a/content/notes/info-203.md +++ b/content/notes/info-203.md @@ -10,7 +10,12 @@ links:[_index](_index.md) - [mobile-app-ass-03](notes/mobile-app-ass-03.md) # Assignments -[mobile-app-ass-03](notes/mobile-app-ass-03.md) +## Mobile App +- [pdf](https://blackboard.otago.ac.nz/bbcswebdav/pid-2827493-dt-content-rid-18385743_1/courses/INFO203_S1DNIE_2022/Assignment3.pdf) +- [idea](notes/idea.md) +- [brainstorming](notes/brainstorming.md) +- [personas-final](notes/personas-final.md) +- [mood-board](notes/mood-board) # Outline - [big-picture](notes/big-picture.md) @@ -20,6 +25,7 @@ links:[_index](_index.md) - [prototyping](notes/prototyping.md) - [evaluating-designs](notes/evaluating-designs.md) - [Design Heuristics](notes/design-heuristics.md) + - [help-and-documentation](notes/help-and-documentation.md) - [error-prevention](notes/error-prevention.md) - [flexibility-and-efficiency](notes/flexibility-and-efficiency.md) - [aesthetic-and-minimalist-design](notes/aesthetic-and-minimalist-design.md) @@ -28,6 +34,8 @@ links:[_index](_index.md) - [user-freedom-and-control](notes/user-freedom-and-control.md) - [familiar-metaphors-and-language](notes/familiar-metaphors-and-language.md) - [show-system-status](notes/show-system-status.md) + - [recognise-and-recover-from-errors](notes/recognise-and-recover-from-errors.md) + - [anti-design-heristics](notes/anti-design-heristics.md) - [needfinding](notes/needfinding.md) - [participant-observation](notes/participant-observation.md) - [interviewing](notes/interviewing.md) @@ -44,6 +52,8 @@ links:[_index](_index.md) - [color](notes/color.md) - [reading-and-navigating](notes/reading-and-navigating.md) - [hci-ethics](notes/hci-ethics.md) +- [designing-studies](notes/designing-studies.md) +- [assigning-participants](notes/assigning-participants.md) # Videos - [heuristic-evaluation](notes/heuristic-evaluation.md) @@ -52,8 +62,12 @@ links:[_index](_index.md) - [video-prototyping](notes/video-prototyping.md) - [direct-manipulation-video](notes/direct-manipulation-video.md) - [mental-models-video](notes/mental-models-video.md) -* [visual-design-video](notes/visual-design-video.md) - +- [visual-design-video](notes/visual-design-video.md) +- [designing-studies-video](notes/designing-studies-video.md) +- [assigning-participants-video](notes/assigning-participants-video.md) +- [running-in-person-experiments](notes/running-in-person-experiments.md) +- [running-web-experiments](notes/running-web-experiments.md) +- [analyzing-experiments](notes/analyzing-experiments.md) # Lectures - [04-evaluation-methods-birth-of-hci](notes/04-evaluation-methods-birth-of-hci.md) - [07-heuristic-evaluation-cont](notes/07-heuristic-evaluation-cont.md) @@ -67,4 +81,5 @@ links:[_index](_index.md) - [15-mental-models-representation-matters-distributing-cognition](notes/15-mental-models-representation-matters-distributing-cognition.md) - [16-distributing-cognition-and-visual-design-typography](notes/16-distributing-cognition-and-visual-design-typography.md) - [17-grids-grouping-alignment-reading-and-navigation](notes/17-grids-grouping-alignment-reading-and-navigation.md) -- [18-ethics-in-hci](notes/18-ethics-in-hci.md) \ No newline at end of file +- [18-ethics-in-hci](notes/18-ethics-in-hci.md) +- diff --git a/content/notes/libraries.md b/content/notes/libraries.md new file mode 100644 index 000000000..e2643a3e6 --- /dev/null +++ b/content/notes/libraries.md @@ -0,0 +1,98 @@ +--- +title: "libraries" +aliases: code libraries, libraries, software library +tags: +- cosc202 +--- + + +# what is a software library + +- collections of potentailly useful code. +- implement comon fuunctionality so you dont have to +- e.g., + - music processign + - game engines + - etc. + +- languages may include standard libraries +- *standard library* is one that is always available within a language + - e.g., Java standard library +- these make up only a small part of the broader available library functionality + + +# Pros and cons of libraries + +- utf-8 conversion tables and collation schemes + - e.g., for comparing equality of e.g., 'M�?ori' and 'Maori'. + - this equality depends on the 'collation' scheme that is being used + - conversion tables and collations are need for all known languages + - it is good to not have to rewite these for each piece of software + - just use a library + +- library code quality + - well written libraries can propogate great benefits + - econoomies of scale from reusilng good implementations + - somebody needs to pay for the develp ment of the library + - needs to be maintained + - There is a downside - code homogeneity + - all programs using the same library carry the same security bugs + - if you dont know the librar;y in detail you may not be able to fully utilise it + +- deep experience libraries + - intel creates libraries that utilise their CPUs the best + - they dont have to wait for library to be made that fully utilises their hardware + - + +# understand trasitive dependencies in libraries +https://xkcd.com/2347/ + +libraries rely on other libraries. These are called transitive dependencies. + +Software bill of materials enumerate what you depend on. +when one of the libraries you use is updates, you may need to update to . + +# how they are provided +- provided within language +- some OSs provide large amounts of functionality + - e.g., apple ecosystem + - co dev of language and OS + - microsoft windows ecosystem + - .net + +# your obligations from using libraries + +mulitple different ways to interact with libraries +- tight integration compiler builds library code into yours + - only uses parts of library that you included in your app + - but upgrading library requires rebuilding the app +- library is packed alongside you app + - may bloat youu app: includes unused library parts +- licencing of the library + - legal obligations + +# considerations when writing libraries +- must consider general use cases +- proper documentation +- future maintenance + - include abstractions to facilitate incremental updates +- version numbering is important for compatibility + - minor changes wont affect existing code + - major changes will affect existing code + +# features of Java standard libraries +- very large +- e.g., two flavours of I/O + - traditional + - async i.e., non-blocking (NIO) +- written in java + - portable across OSs + - thin layer of OS specific code + - this helped it to + +# FYI "Boost"ing C++ library support + +boost is a rich set of libraries for C++ + + + diff --git a/content/notes/linear-probing.md b/content/notes/linear-probing.md new file mode 100644 index 000000000..f7a641b03 --- /dev/null +++ b/content/notes/linear-probing.md @@ -0,0 +1,31 @@ +--- +title: "linear-probing" +aliases: linear probing +tags: +- cosc201 +- algorithm +--- + +[animation demo](https://echo360.net.au/lesson/0e13f645-a91f-46c6-89d9-e3c31097b960/classroom#sortDirection=desc) + +A method of collision resolution for [hash-maps](notes/hash-map.md). In this scheme, each cell of the map contains a single key-value pair. If there is collision a key to be added maps to a cell that is already filled, to moves to the next cell *linearly* . + +In C you know how many bytes of memory a k v pair will occupy. So you can store them as a continuous block of memory. Now you can take advatage of the locality of reference and the speed it provides. + +Rules: +- if a kv's home is already full, we move it into the next spot (wrapping to the beginning when we reach the end) in the array. +- the load factor is capped and the array is resized when the cap is exceeded + +# Costs +Frequency of collisions and time to find a new space are proportional to the *load factor* (percetage of occupied slots). +- **Insertion:** $O(1)$ ⇒ proportional to the number of filled blocks we search before we find an empty one. As long as the load factor is not to high this is on average +- **Search:** $O(1)$ ⇒ Proportional to the number of cells we search before finding the one we want or an empty cell +- **Resize**: $\theta(n)$ amortised[^1] to $O(1)$ ⇒ Need to copy all elements to array of about[^2] double the size. + +# Deletion +we cant just empty cells as this will break search. We could: +1. we could replace it by a "tombstone" maker. This counts as "full" for search and load purposes, but empty for insertion. +2. we search foward form the element we're removing until we find something that belongs in that location or earlier - swap it back into this location and repeat until an empty cell is found. + +[^1]: Since we are able to do about n operation before we need to resize, we can spread this cost among those operation. +[^2]: By not doubling exactly, the modulo remainder is "scrambled" a bit thus reducing collions. diff --git a/content/notes/linker.md b/content/notes/linker.md index 713771e4f..dce5ad7e7 100644 --- a/content/notes/linker.md +++ b/content/notes/linker.md @@ -48,4 +48,4 @@ tags: - if so, increase reference count by one - Uninstaller decreases reference count: deletes if at zero - But your reference counting needs to be reliable - - ... unlike early Windows OSs: so called ‘DLL hell’ \ No newline at end of file + - ... unlike early Windows OSs: so called ‘DLL hell’ diff --git a/content/notes/loader.md b/content/notes/loader.md index 5bde64bb2..0a69940da 100644 --- a/content/notes/loader.md +++ b/content/notes/loader.md @@ -24,4 +24,4 @@ Java was designed to be portable, and minimose effort to port to another OS. Jav - .NET is similar - Web application programming - stacks offer page templating, business rules, databases -- Cloud native application \ No newline at end of file +- Cloud native application diff --git a/content/notes/low-fidelity-prototypes.md b/content/notes/low-fidelity-prototypes.md new file mode 100644 index 000000000..fc5274c8e --- /dev/null +++ b/content/notes/low-fidelity-prototypes.md @@ -0,0 +1,53 @@ +--- +title: "low-fidelity-prototypes" +aliases: +tags: +- assessment/mobile-app/prototypes +--- + +# Inital Designs +## Navigation +The first thing I wanted to was get a clear picture of how each screen should interact with the others. Identified three main screens: Home, Friends, and Schedule. I also identified some supplementary screens: Trick options, other settings, and welcome, and some more optional screens: Trick lists, trick dictionary. + +I also listed some things that each screen should contain +![300](Attachments/lofi-prototypes/navigation.JPG) + +## General protoypes +Next I started to get down down general ideas about all of the screens. The main goal of this step for was to figure out the general flow of the app, and to get a general idea of how each screen should look. + +This first two pages I was experimenting mostly with the home screen. I tried three different layouts: Top tabs, Bottom tabs, and floating bottom buttons. I also started to explore ways for the user to navigate from the home screen to the trick options screen, and the schedule screen. + +![300](Attachments/lofi-prototypes/general-1.JPG) +![300](Attachments/lofi-prototypes/general-4.JPG) + +The second page I explored a some variations on the floating button design. And begin experimenting with the navigation and layout of the friends screen. + +![300](Attachments/lofi-prototypes/general-2.JPG) + +On the third page I kept experimenting with the friends page. + +![300](Attachments/lofi-prototypes/general-3.JPG) + +# In depth prototypes +## Home screen +I wanted to keep the layout mostly based on googles material design. This will help with four design heuristics: Familiar metaphors and language, consistency and standards, recognition over recall, and minimalist design. + +I started with creating an partly new design that combined the floating buttons, and the swipe feature for trick options. I decided against this as within material design it is not reccomended to have multiple floating buttons. I decided instead to use bottom tabs as they are the most logical, and familiar design for users. + +I also decided against the swipe feature to show tricks, and opted instead for a button which opened another screen. + +I also tried out some other designs features a black background and round buttons. +![500](Attachments/lofi-prototypes/home-2.jpg) ![300](Attachments/lofi-prototypes/home-3.jpg)![300](Attachments/lofi-prototypes/home-1.JPG) + +## Other settings +![300](Attachments/lofi-prototypes/other-settings-1.JPG) + +## Trick Options +For the trick Options I considered a few three main designs: the swipe/scroll, the modal, and the full screen. +![800](Attachments/lofi-prototypes/trick-options-1.JPG) + +## Welcome +![300](Attachments/lofi-prototypes/welcome-1.JPG) + +## Schedule +![300](Attachments/lofi-prototypes/schedule-1.JPG) \ No newline at end of file diff --git a/content/notes/memoization.md b/content/notes/memoization.md index 8439c7ee6..f44eb8bfd 100644 --- a/content/notes/memoization.md +++ b/content/notes/memoization.md @@ -3,6 +3,7 @@ title: "memoization" aliases: caching tags: - cosc201 +- paradigm --- A method of designing algorithms which is similar to dynamic programming in that previously calculated answers are stored in memory @@ -21,4 +22,4 @@ public static long fibMEM(int n) { } return fib.get(n); } -``` \ No newline at end of file +``` diff --git a/content/notes/mobile-app-ass-03.md b/content/notes/mobile-app-ass-03.md index ae94c96b2..4779fee54 100644 --- a/content/notes/mobile-app-ass-03.md +++ b/content/notes/mobile-app-ass-03.md @@ -2,23 +2,35 @@ title: "mobile-app-ass-03" aliases: tags: -- assignment -- cosc203 +- assignment/mobile-app +- info203 --- [pdf](https://blackboard.otago.ac.nz/bbcswebdav/pid-2827493-dt-content-rid-18385743_1/courses/INFO203_S1DNIE_2022/Assignment3.pdf) [idea](notes/idea.md) [brainstorming](notes/brainstorming.md) -[mobile-app-personas-and-scenarios](notes/mobile-app-personas-and-scenarios.md) +[personas-development](notes/personas-development.md) +[personas-final](notes/personas-final.md) + +- [x] brainstorming [brainstorming](notes/brainstorming.md) +- [x] Personas and scenarios + - [x] Development [personas-development](notes/personas-development.md) + - [x] Primary [Primary Casual Kyle](notes/personas-final.md#Primary%20Casual%20Kyle) + - [x] Secondary [Secondary Logan the learner](notes/personas-final.md#Secondary%20Logan%20the%20learner) +- [ ] Storyboard +- [x] Low-fi Prototypes [low-fidelity-prototypes](notes/low-fidelity-prototypes.md) + - [x] drawings stage 1 + - [ ] drawing stage 2 + - [ ] more alternatives for navigation diagram + - [ ] more intial designs + - [ ] document + - [ ] add references to design heuristics +- [x] Hi-fi Prototype +- [ ] Presentation + + ---- -Initial UI designs -Storyboard -Low Fidelity Prototypes -Design Descisions / informal evaluation -High fidelity prototype -Submission diff --git a/content/notes/mobile-app-personas-and-scenarios.md b/content/notes/mobile-app-personas-and-scenarios.md deleted file mode 100644 index 9326ac2ca..000000000 --- a/content/notes/mobile-app-personas-and-scenarios.md +++ /dev/null @@ -1,28 +0,0 @@ -# Primary Persona - -## Kyle the Casual Snowboarder - -Goals -- Wants to find new challenging and interesting tricks to learn -- wants to have fun -### Anxieties and Motivations -- Motivated by the idea of learning new tricks -- Anxious about nothing, he is fearless -### Frustrations and Concerns -- Cant think of new tricks -- Tired of doing the same old tricks - -### Needs and Expectations -- Wants an app that can think for him (he is not very smart) -- Wants to put in minimal effort to use the app - -### Scenario -Kyle wakes up in the morning at 6:45 to go snowboarding with his friends. He sees he has a notification from the trick generator app. The trick for today is a switch back lip. Kyle is excited to try the trick. Kyles friends have also seen the daily trick on their phones. When they meet up on the mountain they all learn the trick and have fun. After they have all done a switch back lip. They decide they want to try another trick. Kyle his phone out of his pocket, opens the app, which loads almost instantly, and generates a trick with only one tap.`12` - -## Users -- coaches -- parents -- snowboarders - - beginners - - casual riders - - competitive \ No newline at end of file diff --git a/content/notes/modelling-behaviour.md b/content/notes/modelling-behaviour.md index 34ce50460..c5c12b8c2 100644 --- a/content/notes/modelling-behaviour.md +++ b/content/notes/modelling-behaviour.md @@ -21,7 +21,7 @@ Inheritance via specialisation is when something is subclass of something else. ## 1.2 Via Interface An interface is a class that specifies a set of common behaviour. - public methods and constant fields only (no variable fields) -- effectively an “inheritable” public API (no implementation) ⇒ Catalogue must implement all Search methods +- effectively an “inheritable? public API (no implementation) ⇒ Catalogue must implement all Search methods - independent of inheritance via specialisation - a class can implement multiple interfaces @@ -37,7 +37,7 @@ in Java: ## 1.3 Public vs Private - The public API defines what a class can do - e.g., read and write data, manage a list of items - - effectively a “promise” or “contract” to other classes that use it + - effectively a “promise? or “contract? to other classes that use it - should be as stable as possible - The private implementation defines how a class behaves @@ -81,4 +81,4 @@ This means that the behaviour of the domain models is encapsulated within them -#unfinished \ No newline at end of file +#unfinished diff --git a/content/notes/mood-board.md b/content/notes/mood-board.md new file mode 100644 index 000000000..43739fc1d --- /dev/null +++ b/content/notes/mood-board.md @@ -0,0 +1,30 @@ +- Black and white maybe an accent color +- sharp edges +- capital letters +- minimal +- bold +- dynamic +- harsh +- dark background +- image background? + + +- https://stabmag.com + - ![](https://i.imgur.com/zAt30SM.png) +- https://www.pleasuremag.com + - ![](https://i.imgur.com/tLJFAp9.png) +- https://www.snowboarder.com + - ![](https://i.imgur.com/TOY6gHL.png) +- https://www.thrashermagazine.com + - ![](https://i.imgur.com/KfWhHcC.png) +- https://ridesnowboards.com/en-nz + - ![](https://i.imgur.com/EPmwnVv.png) + - ![](https://i.imgur.com/4MvjlyZ.png) +- https://romesnowboards.com + - ![](https://i.imgur.com/w4YTDM2.png) +- https://www.burton.com/us/en/home + - ![](https://i.imgur.com/ruTBXvQ.png) +- https://unionbindingcompany.com + - ![](https://i.imgur.com/pRNjDed.png) +- https://thirtytwo.com + - ![](https://i.imgur.com/GMUsPkq.png) diff --git a/content/notes/needfinding.md b/content/notes/needfinding.md index f12d1db71..8cc0bdf33 100644 --- a/content/notes/needfinding.md +++ b/content/notes/needfinding.md @@ -55,4 +55,4 @@ needdfinding tries to identify issues, often through observational studies (qual - use txt, phone calls , calendars, notifications to recieve feeback or actively remind people - choose interval depending on study context - \ No newline at end of file + diff --git a/content/notes/networks.md b/content/notes/networks.md index 84d5a75e7..b5b93b139 100644 --- a/content/notes/networks.md +++ b/content/notes/networks.md @@ -7,4 +7,4 @@ tags: - [docker-containers](notes/docker-containers.md) - [virtual-machines](notes/virtual-machines.md) -- [SSH](notes/ssh.md) \ No newline at end of file +- [SSH](notes/ssh.md) diff --git a/content/notes/normalisation.md b/content/notes/normalisation.md index ca99b83bb..e0987d453 100644 --- a/content/notes/normalisation.md +++ b/content/notes/normalisation.md @@ -13,7 +13,7 @@ bottom up approach - use normalisation to verify your logical design - to ensure you haven't missed anything -# 1 Pros ans cons +# 1 Pros and cons + frees from anomalies + separates data the belong to different entities diff --git a/content/notes/operating-system.md b/content/notes/operating-system.md index 55413aa18..36d03a99b 100644 --- a/content/notes/operating-system.md +++ b/content/notes/operating-system.md @@ -13,4 +13,4 @@ This is where applications run. Computer resources are isolated in compute and d - cannot occupy all of the CPUs time on one application # Kernal -"all seeing and all powerful" The kernel sits below the userspace and manages resource allocation and directly controls harware. Usuallly you dont directly interact with the kernel when developing software. You do interact indirectly with the kernel, it permits your interactions with the environment (input/output from/to files, network, and terminals). The standard library usually insulates you from the OS kernel, may abstract over different OSs, and do operations in an OS-agnostic way. \ No newline at end of file +"all seeing and all powerful" The kernel sits below the userspace and manages resource allocation and directly controls harware. Usuallly you dont directly interact with the kernel when developing software. You do interact indirectly with the kernel, it permits your interactions with the environment (input/output from/to files, network, and terminals). The standard library usually insulates you from the OS kernel, may abstract over different OSs, and do operations in an OS-agnostic way. diff --git a/content/notes/participant-observation.md b/content/notes/participant-observation.md index f216c066a..ab0a43d8d 100644 --- a/content/notes/participant-observation.md +++ b/content/notes/participant-observation.md @@ -25,4 +25,4 @@ tags: ## 3 Use Cases [needfinding](notes/needfinding.md) [evaluating-designs](notes/evaluating-designs.md) -[requirements-elicitation](notes/requirements-elicitation.md) \ No newline at end of file +[requirements-elicitation](notes/requirements-elicitation.md) diff --git a/content/notes/personas-and-scenarios.md b/content/notes/personas-and-scenarios.md index 4cad0a9a5..8152ba4de 100644 --- a/content/notes/personas-and-scenarios.md +++ b/content/notes/personas-and-scenarios.md @@ -31,7 +31,6 @@ Why they want to accomplish end goals /long term desires/self-image ### 1.1.2 Behavioural variables - - activities ⇒ what the user does, frequency and volume - attitudes ⇒ how the uers thinks about the product domian and knowledge - aptitudes ⇒ what education and training the user has diff --git a/content/notes/personas-development.md b/content/notes/personas-development.md new file mode 100644 index 000000000..8fd9190e3 --- /dev/null +++ b/content/notes/personas-development.md @@ -0,0 +1,37 @@ +--- +title: "personas-development" +aliases: +tags: +- assignment/mobile-app +- info203 +--- + +## Inital Ideas +- kyle the casual (primary maybe secondary) + - age 23 + - skill advanced + - focus: tricks +- aaron the coach (seconday maybe primary) + - age 30 + - skill used to be pro, now advanced + - focus teaching tricks +- logan the learner (seconday persona) + - age 16 + - skill intermediate + - focus not sure yet, beginning to experiement with tricks +- mac the professional (seconday persona) + - age 20 + - skill pro + - focus tricks, uses the app occaionaly with friends +- karen the parent (negative persona) + - age 45 + - skill intermediate + - focus, groomed runs, some backcountry +- phil the powder hound (supplementary persona) + - age 40 + - skill advanced (not with tricks just in general) + - focus off piste/backcountry, sometimes goes into park with friends/kids + +# Final choices +**Primary:** Kyle the casual +**Secondary:** Logan the learner \ No newline at end of file diff --git a/content/notes/personas-final.md b/content/notes/personas-final.md new file mode 100644 index 000000000..666d76aef --- /dev/null +++ b/content/notes/personas-final.md @@ -0,0 +1,83 @@ +--- +title: "personas-final" +aliases: +tags: +- assignment/mobile-app +- info203 +--- + +# Primary: Casual Kyle +- Age: 23 +- Gender: Male +- Skill Level: Advanced (Not proffessional) +- Focus: Terrian Park + +## Goals +### Experience goals +- wants a quick easy, no hassle, minimal effort experience. +- does not want to appear to be a "nerd" or "try hard" + +### End goals +- wants to find new interesting tricks that he may not have thought of himself +- wants to progress his level of snowboarding +- wants to show off new cool tricks to his friends + +### Life goals +- wants to be a "cool snowboarder" +- wants to have as much fun as possible + +## Behaviour +### Activities +- He is a snowboader. He rides at a least a few days every week +- has a day job, barely enough money for season pass, rides up the mountain, and equipment +- mostly rides in the terrain park + +### Aptidudes/skills +- has advanced knowledge of the snowboarding tricks, grabs, and variations +- considers himself an advanced snowboarder +- rides all the advanced features in the part. +- can do at least a 540 +- can do a good frontboard, maybe some 270s +- has fun in the pipe but not his favourite thing + +### Motivations +- wants to find new interesting tricks that he may not have thought of himself, to improve his skills by expanding his "set" of tricks. + +### Scenario +Kyle wakes up in the morning at 6:45 to go snowboarding with his friends. He sees he has a notification from the trick generator app. The trick for today is a switch back lip. Kyle is excited to try the trick. Kyles friends have also seen the daily trick on their phones. When they meet up on the mountain they all learn the trick and have fun. After they have all done a switch back lip. They decide they want to try another trick. Kyle his phone out of his pocket, opens the app, which loads almost instantly, and generates a trick with only one tap. + +# Secondary: Logan the learner +- Age:13 +- Gender: Any +- Skill: intermediate +- Focus not sure yet, beginning to experiement with tricks + +## Goals +### Experience goals +- wants a quick easy, no hassle, minimal effort experience. +- feels excited when using the app +- also feels a little nervous about trying something new + +### End goals +- wants to find new tricks that he can learn with his friends, since he doesn't know many +- wants to stay motivated to learn a new trick each day/week + +### Life goals +- Wants to have fun on the weekend +- Wants get excersise + +## Behaviour +### Activities +- Snowboarder +- lives in a town near a skifield where it is common to snowboard. +- rides a few times a fortnight, with friends and/or family. maybe in a school program (like they have in wanaka schools) + +### Aptidudes/skills +- has been riding mostly on the groomed runs, is now getting good enough to try the terrian park. +- has been doing some 180s maybe on sidehits. + +### Motivations +- wants to find new tricks that he can learn with his friends, since he doesn't know many + +### Scenario +Logan is snowboarding on the mountain with a group of his friends. Logan and his friends decide to go into the terrian park and try some tricks. None of his friends know what tricks to try. Logan takes his phone out of his pocket and without removing his gloves, unlocks it with face ID, and looks at the widget which is showing random trick. Logan then puts his phone back in his pocket, tells his friends the trick, and all him and his friends have fun racing to do the trick first. \ No newline at end of file diff --git a/content/notes/priority-queue.md b/content/notes/priority-queue.md index 41d128bc2..a05af5520 100644 --- a/content/notes/priority-queue.md +++ b/content/notes/priority-queue.md @@ -10,7 +10,7 @@ tags: - removal returns the item with the greatest priority # Implementation - -1. stoes items and priorities in an array. Add at the end ϴ(1), remove by finding the maximum and exchaning with the end element ϴ(n) +1. stores items and priorities in an array. Add at the end ϴ(1), remove by finding the maximum and exchaning with the end element ϴ(n) 2. stores items and their priorities in an array (or list) in sorted order. now removal is ϴ(1) bu addition in Ο(n) +can be implemented using a [priority-queue](notes/priority-queue.md) \ No newline at end of file diff --git a/content/notes/recognise-and-recover-from-errors.md b/content/notes/recognise-and-recover-from-errors.md new file mode 100644 index 000000000..9f954beac --- /dev/null +++ b/content/notes/recognise-and-recover-from-errors.md @@ -0,0 +1,11 @@ +--- +title: "recognise-and-recover-from-errors" +aliases: +tags: +- info203 +--- + + +- make the problem clear +- e.g., username or password is wrong vs username is wrong +- provide a solution and inform users (treat the users as adults diff --git a/content/notes/red-black-tree.md b/content/notes/red-black-tree.md index 9e463f5e3..eb0479fc9 100644 --- a/content/notes/red-black-tree.md +++ b/content/notes/red-black-tree.md @@ -30,4 +30,4 @@ Operations that mnodify the tree require in the worst case $O(lg\ n)$ recolourin ## Strategy - do an insertio and color the node red. - recolor and rotate nodes to fix violation -- there are four scenarios \ No newline at end of file +- there are four scenarios diff --git a/content/notes/reflective-statement-plan.md b/content/notes/reflective-statement-plan.md new file mode 100644 index 000000000..7b32b2913 --- /dev/null +++ b/content/notes/reflective-statement-plan.md @@ -0,0 +1,39 @@ +--- +title: "reflective-statement" +aliases: +tags: +- cosc202 +--- + +# 202 Reflective statement + +Intro +- What is the project +- who was the team +- Overall of: + - Communication + - Time/Project Mangement + - Main Issues + - Main Non-Issues +- Conclusion + +Communication/Division of tasks +- Discord + - Notes/resources + - Webhooks + +Project/Time Mangement +- Division of tasks +- Use of trello +- Wished for use of issues + +Main Issues +- slow commenting +- lack of testing +- sick teamates + +Non-Issues +- K-means +- Convoluter + +Concusion \ No newline at end of file diff --git a/content/notes/reflective-statement.md b/content/notes/reflective-statement.md new file mode 100644 index 000000000..42824250c --- /dev/null +++ b/content/notes/reflective-statement.md @@ -0,0 +1,7 @@ +--- +title: "reflective-statement" +aliases: +tags: +- cosc202 +--- + diff --git a/content/notes/representation-and-distributing-cognition.md b/content/notes/representation-and-distributing-cognition.md index d4b5ee552..90aa22831 100644 --- a/content/notes/representation-and-distributing-cognition.md +++ b/content/notes/representation-and-distributing-cognition.md @@ -13,15 +13,13 @@ memory games make finding pairs hard by introducing rules. This often happens in depeding on how you represent a problem, you can make is easy or hard. -## Working memory +# Working memory users have a working memory (2±2 limit). You shouldn't require users to remember anything that you could put on a screen. If something takes a lot of time. You wil get distracted, and forget something. - -## Naturalness principle +# Naturalness principle - experiemental cognition is raised when the properties of the representation match the properties of the thing being represented -- # Dist cognition when interfaces help people disribute cognition it can @@ -38,4 +36,4 @@ good representation shows only relevant information and enables: - exploration - problem solving -deep vs shallow interface \ No newline at end of file +deep vs shallow interface diff --git a/content/notes/requirements-document.md b/content/notes/requirements-document.md index 74baf9f9b..b6b58878a 100644 --- a/content/notes/requirements-document.md +++ b/content/notes/requirements-document.md @@ -14,4 +14,4 @@ The requirements document should include: - The system's environment including related systems - Application domain information - Constraints on the development process - - e.g., [agile-development](notes/agile-development.md) \ No newline at end of file + - e.g., [agile-development](notes/agile-development.md) diff --git a/content/notes/requirements-engineering.md b/content/notes/requirements-engineering.md index ce7d66835..457d595c9 100644 --- a/content/notes/requirements-engineering.md +++ b/content/notes/requirements-engineering.md @@ -4,7 +4,7 @@ tags: - info201 --- -> “…to cover all of the activities involved in discovering, documenting, and maintaining a set of requirements for a computer-based system.” - Kotonya and Sommerville, 2001, p. 8 +> “…to cover all of the activities involved in discovering, documenting, and maintaining a set of requirements for a computer-based system.? - Kotonya and Sommerville, 2001, p. 8 Requirements engineering is a robust methodology for the development of requirements. It is made up of three main steps. @@ -25,4 +25,4 @@ This is where the requirements are specified and refined, and models and documen This occurs throughout development and is primarly focuses on managing changes in the environment of the system. -It important to manage what is being discovered and documented. This allows you to keep the client updated and manage scope creep. \ No newline at end of file +It important to manage what is being discovered and documented. This allows you to keep the client updated and manage scope creep. diff --git a/content/notes/requirements-guidelines.md b/content/notes/requirements-guidelines.md index 235846457..f171c90ba 100644 --- a/content/notes/requirements-guidelines.md +++ b/content/notes/requirements-guidelines.md @@ -11,4 +11,4 @@ tags: - consistent. i.e., They should not contradict each toher - unambiguous. i.e., There should be only one one possible interpretation - also - - precise, concise, cohesive, feasible, relevant, up to date, testable, traceable \ No newline at end of file + - precise, concise, cohesive, feasible, relevant, up to date, testable, traceable diff --git a/content/notes/requirements.md b/content/notes/requirements.md index a619070be..d1f75a5f1 100644 --- a/content/notes/requirements.md +++ b/content/notes/requirements.md @@ -6,9 +6,9 @@ tags: # 1 What are they -> “…descriptions of how the system should behave, application domain information, constraints on the system’s operation, or specifications of a system property or attribute.” - Kotonya and Sommerville, 2001, p. 6 +> “…descriptions of how the system should behave, application domain information, constraints on the system’s operation, or specifications of a system property or attribute.? - Kotonya and Sommerville, 2001, p. 6 -> “…a statement of need, something that some class of user or other stakeholder wants.” - Alexander and Stevens, 2002, p. 8 +> “…a statement of need, something that some class of user or other stakeholder wants.? - Alexander and Stevens, 2002, p. 8 Requirements are something an information system should do, or some constraint it should adhere to @@ -32,4 +32,4 @@ Every development process has a different apporach to guidelines. ... #unfinishe - domain and/or problem not well understood - misnderstandings -- continually evolving or incomplete/abmiguous/inconsistent/overlapping/unimplementable requirements \ No newline at end of file +- continually evolving or incomplete/abmiguous/inconsistent/overlapping/unimplementable requirements diff --git a/content/notes/round-trip-engineering.md b/content/notes/round-trip-engineering.md index 3ba414a34..84bf27532 100644 --- a/content/notes/round-trip-engineering.md +++ b/content/notes/round-trip-engineering.md @@ -7,10 +7,10 @@ tags: This is the process of translating models into code, or vice versa. For example, ERDs to SQL, or UML to Java. The main idea is to keep the code and the diagrams sematically equivalent -Converting diagrams to code is more common than the opposite, but both do occur. +Converting diagrams to code is more common than the opposite, but both do occur. This is [reverse engineering](notes/uml-java-reverse-engineering.md) A [model driven architecture]() is when the code is completely derived from diagrams. This tends to be quite difficult. A much easier approach is only using foward engineering to generate skeleton code. -Foward engineering is easier with SQL and ERDs than other types as these don't consider behaviour, so the mapping is more simple than with UML and Java. +[uml-java-forward-engineering](notes/uml-java-forward-engineering.md) is easier with SQL and ERDs than other types as these don't consider behaviour, so the mapping is more simple than with UML and Java. Although this idea sounds good, it is not practical. The main argument is that code is part of the design anyway - Code is just a detailed form of a model. diff --git a/content/notes/running-in-person-experiments.md b/content/notes/running-in-person-experiments.md new file mode 100644 index 000000000..e02ca138e --- /dev/null +++ b/content/notes/running-in-person-experiments.md @@ -0,0 +1,117 @@ +--- +title: "running-in-person-experiments" +aliases: +tags: +- info203 +- scott-video +- lecture +sr-due: 2022-06-01 +sr-interval: 7 +sr-ease: 250 +--- + +in person +- planning +- execution +- analyzing + +higher "bandwitdh" of engagement + +# Make clear goals +- scope +- purpose + - what you hope to learn +- hypothesis + - make a prediction +- schedule and location + - use an approprate and relevant location +- participants +- scenarios + +# Plan out steps +- questions +- data to be collected +- set up +- roles + - e.g., facilitator, recorder + +# Create concrete tasks +write them down + +e.g., ![example 1](https://i.imgur.com/FLApe7z.png) ![example 2](https://i.imgur.com/vsEOKjt.png) + +# Ethical considerations +participants can feel pressured + +get informed consent + +remind them that your testing the site.. not them + +paticipants feel good about finding issues, not bad about not being able to do something + +# Experiement details +- order + - e.g., start simple, shuffle order +- training + - depends on how th real system will be used +- DNF + - set a time limit + - maybe provide help if needed +- pilot + - iron out the kinks in the study design + - can also find very obvious issues that should be addressed so the actual participants aren't "wasted" + +# capturing results +- note down critical incidents + - aha moments, stores to share, big problems +- record video + - lets to grab moments easily and share them +- screen recording + - depends if you are interested on their expressions or th interface +- interupptions + - yes/no + - provide help in necessary + - think aloud + - need to know what users are thinking not just what they are doing + - ask users to talk while performing tasks + - what they are; + - thinking + - trying to do + - any questions as they work + - reading + - record or take notes + - prompt them to keep talking + - decide ahead of time about which things to help with + - keep track of things you helped with + - will thinking alout give the right answers + - not always + - avoid specific questions + - if you ask a question, people with always give an answer even it it has nothing to do with the facts + - talking while doing the tasks may change how you do the task + +# Greeting participants +welcome, explain setup, scenarios, + +# collecting data +- process data + - observations (qualittative) +- bottom line data + - numbers + - i.e., dependent variables + +# measuring bottom line usability +useful: +- time requirements +- success/fail + - define in advance what this is +- compare speed or # of errors + +dont combine with think aloud + +# debrief +tell them what you goals are. + +learn more holistically what they are thinking + + + diff --git a/content/notes/running-web-experiments.md b/content/notes/running-web-experiments.md new file mode 100644 index 000000000..03842dbc9 --- /dev/null +++ b/content/notes/running-web-experiments.md @@ -0,0 +1,53 @@ +--- +title: "running-web-experiments" +aliases: +tags: +- info203 +- scott-video +- lecture +--- + +randomly split traffic to website between two versions. + +then collection metrics about each version + +web makes it easier to try out something new, and test if it is effective. + + +small changes can have a significant effect. +![example changes](https://i.imgur.com/fhmWtbh.png) + +application for more than just websites. + +our expectations are often wrong. +small chagnes (e.g., wording on a button) can have large impacts + +# Effective principles +- run experiments 50 50 + - novice experimenters run 1% eperiments + - to detect an effect you need to expose a certain number of users to the treatment (baed on power calculations) + - fastest to run 50 50 +- ramp up and auto abort + - start at 0% + - design may be disastrous + - bugs, other issues + - slowly increase until 50% +- pick a meaningful yardstick + - avoid measures things because they are easy to measure +- run it for long enough + - sometimes first use is not the same as what people are familiar with +- rules for random assignment + - consistent - same person should see same interface + - durable - truly and compelely random + - independent +- challenges and opportunities + - larger theories are still hard + - i.e., interpretation + - using multiple methods together helps + - whole is greater than sum of parts + - combine iwth eg. in person studies +- role on designer in online age + - creating alternatives + - people are often to sure of themselves + - rapid experimentation means the first release is (sometimes) less important + - fail fast \ No newline at end of file diff --git a/content/notes/scan.class b/content/notes/scan.class new file mode 100644 index 000000000..f3bf16715 Binary files /dev/null and b/content/notes/scan.class differ diff --git a/content/notes/scan.java b/content/notes/scan.java new file mode 100644 index 000000000..41c29c398 --- /dev/null +++ b/content/notes/scan.java @@ -0,0 +1,39 @@ +package notes; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.IOException; + +public class scan { + public static void main(String[] args) { + StringBuffer inputBuffer = new StringBuffer(); + try { + BufferedReader file = new BufferedReader(new FileReader(args[0])); + String line; + + while ((line = file.readLine()) != null) { + if(line.startsWith("sr-due")){ + line = "sr-due: " + (line.substring(8, 12)) + "-" + (line.substring(12, 14)) + "-" + (line.substring(14, 16)); + } + inputBuffer.append(line); + inputBuffer.append('\n'); + } + file.close(); + try { + // write the new string with the replaced line OVER the same file + FileOutputStream fileOut = new FileOutputStream(args[0]); + fileOut.write(inputBuffer.toString().getBytes()); + fileOut.close(); + } catch (FileNotFoundException e) { + System.out.println("error writing"); + } + } catch (FileNotFoundException e) { + System.out.println(e.getMessage()); + } catch (IOException e) { + System.out.println("io exception"); + } + + } +} diff --git a/content/notes/selenium.md b/content/notes/selenium.md index c4f4428b3..f5e054ac1 100644 --- a/content/notes/selenium.md +++ b/content/notes/selenium.md @@ -8,4 +8,4 @@ Webdriver: implements web based tests IDE: record/playback interactions with web browsers -You can mix automated and interactive options. \ No newline at end of file +You can mix automated and interactive options. diff --git a/content/notes/set.md b/content/notes/set.md index ccaf96559..9210f67b4 100644 --- a/content/notes/set.md +++ b/content/notes/set.md @@ -58,4 +58,4 @@ This is fine if we dont expect to use the dynamic operations a lot. Another approach might be to maintain a `main` array and a subsidary `add` and `remove` arrays and only periodically do the updates to the main array. but this gets complicated very quickly -A better way of doing this is using a [binary search tree](notes/binary-search-tree.md) \ No newline at end of file +A better way of doing this is using a [binary search tree](notes/binary-search-tree.md) diff --git a/content/notes/show-system-status.md b/content/notes/show-system-status.md index 9c0ef063e..b4f79f11c 100644 --- a/content/notes/show-system-status.md +++ b/content/notes/show-system-status.md @@ -23,4 +23,4 @@ when: - next steps --> user input required - completion --> some task has finished -![](https://i.imgur.com/QzHRh9Z.png) \ No newline at end of file +![](https://i.imgur.com/QzHRh9Z.png) diff --git a/content/notes/software-architectures.md b/content/notes/software-architectures.md new file mode 100644 index 000000000..c7a88f84f --- /dev/null +++ b/content/notes/software-architectures.md @@ -0,0 +1,103 @@ +--- +title: "software-architectures" +aliases: +tags: +- info201 +--- + + +\# of pieces? +- one integrated piece +- a few distinct components +- many distict components + +does it run: +- on one machine +- spread across multiple machines +- in the cloud + +these consdier ations dtermine the structure of the software we create + +these have changed over time. from monolithic to distributed ![changes of distribution](https://i.imgur.com/QAxVwgn.png) + +## Monolithic architecture +system includes all relevant code in one executable +- e.g., UI, business logic, data management +- self-contained +- no significant separation of reponsibilities + +easy to deploy, awkward to upgrade. +- widely spaced "big bang releases" +usually only seen in legacy systems now + +## Separation of reponsibilities +partition systems into logically separated parts. e.g., UI, business rules, data access, utilities + +easier to upgrade + +each part can be deployed ina different location + +each part is more cohesive +- related code all in one place +- unrelated code cleanly separated +- well definec interactions between parts +- easier to design, devleop and maintain + +can have "fake data" etc for development + +## Generic (old) info sys architecture +![front middle back end](https://i.imgur.com/oPPMVfz.png) +![client server](https://i.imgur.com/46LHAyw.png) + +this is limiting and old. based more of hardware than software. + +## modern system example +![modern system](https://i.imgur.com/uLVaVbQ.png) + +## Microservices +everything is a service +- APIs that can be called over the internet +- e.g. product service, customer service + +small cohesive units of code +- performs a single function +- each with their "own" data + - not necessarily its own database +- as autonomous as possible +- independent and effectively disposable + - very scalable + - auto matic load management +- can run many redundant instances concurrently + + +A system is a collection of services + +most common implementation architecture for modern distributed information systems and web apps + +## serverless computing +tradtional web app deployment usually still involves one or more identifiable servers +- includes microservice baed aps +- server may be virtualised +- generally require per sserver configuration + +serverless eliminates the "server" concept +- just deploy code into the cloud +- no server config needed +- a form of *utility computing* +- e.g., google app engine + +## Function as a service + +logical extreme of serverless computing + +deploy individual functions into the cloud +- no real concept of a "app" +- fits well with microservice acrchitecture +- very lightwright - fast and scalable +- application logic only ⇒ dont store any data + +componentised highly distributed software + +ideal for on-demand computing + +e.g., AWS lambda, google cloud functions, microsoft azure functions etc diff --git a/content/notes/software-licensing.md b/content/notes/software-licensing.md new file mode 100644 index 000000000..e1ac2d07d --- /dev/null +++ b/content/notes/software-licensing.md @@ -0,0 +1,106 @@ +--- +title: "software-licensing" +aliases: +tags: +- cosc202 +--- + +What does it mean for people to use your software. What responsitilities do you have + +common perception: open source versus commercial + +- cost of aquiring source code +- avalability of softrwares source code +- restrictions on use of software source code + +commercial software is often closed source +- nothing stops paid for software having visible source + +# Why add them +- to choose how you code can be used + - deny open permission for other to reuse you code + - ensure that those using your code credit you + - controlling commercial use +- protect yourself from legal risks + - licensing will make your intentions specific +- code with no license: author's copyright holds! + - recall this default discussed in academic integrity policy + +# Free +- Free as in freedom + - reffered to as 'free as in speech' + - often less ambiguous term 'libre' is used +- Free as in no cost + - also referred to as 'free as in beer' + - less ambiguous term 'gratis' +- "Free software" potentially means either or both + +# copyleft +copyleft licences add their requirements to derivatives + +first was GNU general public license (GPL) +- four freedoms: run, study, share, and modify software +- using of GPL software requires your softwarw to be GPLed too +- FYI linux and the GNU Compiler Collection are GPLed + +lesser GPL: can be used in closed source +- but modified LGPL components must be released LGPL + +# Creative commons +allow selection of facets +- all CC licences include attribution of author -**BY** +- athors can choose to disallow commercial use -**NC** +- derivative works allowed unless marked no-derivatives-**ND** +- derivatives allows? can require (viral) share alike-**SA** + +Also CC0 "no rights reserved" release to public domain + +CC-licenced content you may have used recently +- code of track exchange sites licenced by CC BY-SA +- cosc202 lecture notes are released by CC BY-NC-SA + +# use unambiguous open source teminology +avoid just saying 'free open source software'. potentially unclear what notion of 'free' is in use + +- FLOSS - free libre open source software + - clear in covering both types of 'free' + +viral licencing - may not be interpreted 'libre' free. The licences impose restrictions on use. even if those restrictions are net beneficial + +# software dist. without source code +- freeware - software is free +- adware - software is supported by advertising +- shareware - software requires eventual payment +- retail software - software required up-front payment + +if selling software apply a licence +- need to think about consumer protection laws +- likely can get 'cookie-cutter' lcences that you can customise +- seek legal advice + +# dual licensing +free, libre, open source can be multiply licenced +- e.g., FLOSS for non-commercial use +- but commercially licenced otherwise + +open source approaches have benefits: +- potentially many eyes on code checking for security flaws +- avoid lock-in to opaque commercial implementations + +can licence different software components differently +- e.g., closed source MacOS runs over open source Darwin + +# How to add licences into code +project should include complete lcence text: add file LICENSE in top-level project directory + +safest to also add short licence comments to every file +- better survives files being copied to othe projects +- e.g., should the license file get lost accidentally + +Git Hub and simiar bring licencing into the main UI. THey assist lifting licence informatio as searchable metadata. search engines like google iamges can scan for licences + +# Incompatibility +consider developiing software that combines two FLOSS code based that have differnce code licences. It may be impossible to satisfy both licences simultaneously. In these cases the licences are said to be incompatible. + +# software patents +generally 'no'. these create headaches. NZ does not permit them diff --git a/content/notes/ssh.md b/content/notes/ssh.md index d58ecb919..efb95b642 100644 --- a/content/notes/ssh.md +++ b/content/notes/ssh.md @@ -23,4 +23,4 @@ While users access a server by TLS or HTTP(S), admins access a server using SSH It can also be used for automated operations. Usually this will also invole file transfer using SCP for SFTP -0 juyt \ No newline at end of file +0 juyt diff --git a/content/notes/stacks-and-queues.md b/content/notes/stacks-and-queues.md deleted file mode 100644 index 83139303f..000000000 --- a/content/notes/stacks-and-queues.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: "stacks-and-queues" -tags: -- cosc201 ---- - -Dynamic linear data types (interface) - -- an abstraction of a collection of data organised "in a line" which supprts addition of new elements and the removal of (some) old elements -- e.g., stacks and queues -- the difference in the removal operation - - stacks ⇒ (pop) LIFO - - queues ⇒ (remove, offer, pull) FIFO -- representation - - array (preffered because of memory management) - - linked list (seems more natural) diff --git a/content/notes/storyboards.md b/content/notes/storyboards.md index 55b12bde4..ec04ed10c 100644 --- a/content/notes/storyboards.md +++ b/content/notes/storyboards.md @@ -57,4 +57,4 @@ simplify and develop vocabulary/your own style using tracing and templates -![](https://i.imgur.com/wwf7ab3.png) \ No newline at end of file +![](https://i.imgur.com/wwf7ab3.png) diff --git a/content/notes/system-templates.md b/content/notes/system-templates.md new file mode 100644 index 000000000..e4efa2489 --- /dev/null +++ b/content/notes/system-templates.md @@ -0,0 +1,70 @@ +--- +title: "system-templates" +aliases: +tags: +- info201 +--- + +<% tp.file.cursor(4) %> +# System templates +some standard patterns is system design + +especially with respect to structural requirements +- database +- domain classes +- names of entites/classes may vary but pattern is the same + +broadly similar structures for similar problem domains +- e.g., retaiol, scheduling, HR +- main difference mostly is small details + +## the heirarchy +![hierarchy](https://i.imgur.com/uGcao6S.png) + +represents a chian of "containment" relationships + +child and parent entities linked by FK (often composite) + +examples +- division, department, employee +- student, programme enrolment, paper enrollment, assessment result + +## the associative entity +![associative entity example](https://i.imgur.com/JQM0LTd.png) + +resolution of a many-to-many relationship + +associative entiteis may or may not have additional attributes. + +## Headers/lines +![header line example](https://i.imgur.com/MH7mRRi.png) + +![more examples](https://i.imgur.com/aHGKqV7.png) + +head is associative with one or more other entities. + +line is associated with only one thing + +### parallel header lines +![parallel header/lines](https://i.imgur.com/CDPLeXG.png) +![other examples](https://i.imgur.com/rG5Jr49.png) + +second example has more direct association between sale and shipment. + +## general systems +![Point of sale ERD](https://i.imgur.com/S7YhvAa.png) +dont always need all of the things +![booking system ERD](https://i.imgur.com/AOjrHkC.png) +![inventory system ERD](https://i.imgur.com/vdEjRh7.png) + +many more e.g., payroll, scheduling/timetabling, tracking + +![more examples possibly dated](http://www.databaseanswers.org/data_models/index.html) + +# summary +dont always need to create data model from scratch, need to adapt any template to suit your scenario + +dont deinveltht the wheel + +![revision questions](https://i.imgur.com/LKRU7lh.png) + diff --git a/content/notes/template-testing.md b/content/notes/template-testing.md new file mode 100644 index 000000000..e69de29bb diff --git a/content/notes/templates.md b/content/notes/templates.md index 96b57729c..d8f7b33ec 100644 --- a/content/notes/templates.md +++ b/content/notes/templates.md @@ -10,4 +10,4 @@ tags: - [[templates/post]] - [date-day](private/templates/date-day.md) - [DailyTemplate](private/templates/DailyTemplate.md) -- [induction-proof-template](private/templates/induction-proof-template.md) \ No newline at end of file +- [induction-proof-template](private/templates/induction-proof-template.md) diff --git a/content/notes/treap.md b/content/notes/treap.md index b84c5d90b..67add26f7 100644 --- a/content/notes/treap.md +++ b/content/notes/treap.md @@ -15,4 +15,4 @@ a treap (portmanteau of tree and heap) is designed to achieve this even in the e when we add an element, we give it a random priority. Then after doing normal BST insertion we perform a series of rotations to fix the heap-ordering issues -the effect is that the elements look as if they were inserted in decending order of priority. SInce the priorities were randomly chosen, that means that at any time we see a BST which "thinks" that is elements were added in random ord \ No newline at end of file +the effect is that the elements look as if they were inserted in decending order of priority. SInce the priorities were randomly chosen, that means that at any time we see a BST which "thinks" that is elements were added in random ord diff --git a/content/notes/tree-traversal.md b/content/notes/tree-traversal.md index 11561ea08..64b68752f 100644 --- a/content/notes/tree-traversal.md +++ b/content/notes/tree-traversal.md @@ -7,24 +7,62 @@ tags: Visit each node in the tree once. So we need to visit n, all the nodes in L, and all the nodes in R. We can do this in four different ways -preorder -- visit n -- traverse L -- traverse R +- **Preorder:** Root, left, right +- **Postorder:** Left, right, root +- **Inorder:** Left, Root Right (produces ordered list in a [BST](notes/binary-search-tree.md)) +- **Level order:** root, all the roots children, all their children, etc -Inorder. -- traverse L -- visit n -- traverse R -Creating an BST from an array using the add operation then doing an inorder traversal is effectively a [quicksort](notes/quicksort) +[examples](https://i.imgur.com/vsZtkIp.png) -postorder -- traverse L -- traverse R -- visit n +Creating an BST from an array using the [Add Operation](notes/bst-operations.md#Add%20Operation) operation then doing an inorder traversal is effectively a [quicksort](notes/quicksort) -level order -- vist the root -- visit the roots children -- visit their children -- etc +# Code +Usually traversals ideas used in algorithms, not independent methods +## Pre order +```java +private void preorder(Node n, ArrayList r){ + if(n==null) return; + r.add(n.key); //add this node the reults + preorder(n.left, r); //traverse the left subtree + preorder(r.right, r); //traverse the right subtree +} +``` + +## Post order +```java +private void postorder(Node n, ArrayList r){ + if(n==null) return; + postorder(n.left, r); //traverse the left subtree + postorder(r.right, r); //traverse the right subtree + r.add(n.key); //add this node the reults +} +``` + +## In order +```java +private void inorder(Node n, ArrayList r){ + if(n==null) return; + inorder(n.left, r); //traverse the left subtree + r.add(n.key); //add this node the reults + inorder(r.right, r); //traverse the right subtree +} +``` + +## Level order +Only traversal that is not naturally recursive. Maintains a [queue](notes/dynamic-linear-datatype.md) of pending visits. Using a [stack](notes/dynamic-linear-datatype.md) with this methods produces a preorder + +```java +public Arraylist levelorder() { + ArrayList result = new ArrayList<>(); + if(isEmpty()) return result; + ArrayDeque q = new ArrayDeque<>(); + q.add(root) + while (!q.isEmpty()) { + Node n = q.remove() + result.add(n.key); + if(n.left != null) q.add(n.left); + if(n.right != null) q.add(n.right); + } + return result; +} +``` \ No newline at end of file diff --git a/content/notes/tree.md b/content/notes/tree.md index 6664fc34b..0ad934fa4 100644 --- a/content/notes/tree.md +++ b/content/notes/tree.md @@ -33,4 +33,4 @@ We need to specify whether this makes them different or not. In computer science Sometimes there are fixed slots for the children e.g., -[binary-search-tree](notes/binary-search-tree.md) \ No newline at end of file +[binary-search-tree](notes/binary-search-tree.md) diff --git a/content/notes/uml-java-forward-engineering.md b/content/notes/uml-java-forward-engineering.md index 96f54dd36..01ed24387 100644 --- a/content/notes/uml-java-forward-engineering.md +++ b/content/notes/uml-java-forward-engineering.md @@ -30,11 +30,11 @@ custom methods cannot be generated automatically. things like getters and setter 6. add public getter and setter methods (trivial, can be auto generated) 7. add remaining public or private methods (includilng implemented interfaces) -## aside on visibilty -![](https://i.imgur.com/0xM09La.png) +## Visibility of fields and methods +![visibility of fields and methods](https://i.imgur.com/0xM09La.png) ## use case diagrams - +[use-case-diagrams](notes/use-case-diagrams.md) each use case represents a feature. often items in a menu. sub cases can be sub menu items (extnd, include, require) (sometimes). actors *can* correspond to domain classes. @@ -42,7 +42,6 @@ actors *can* correspond to domain classes. one use case might require/use several classes. e.g., UI, processor, or data classes. ## other behavioural diagrams - **sequence: - could be used for looping and branching **activity: @@ -62,44 +61,40 @@ one use case might require/use several classes. e.g., UI, processor, or data cla - once this code is generated is hard to fix manually - better to just change the diagam and regenerate the code - ## subclasses -[employe diagram example](https://i.imgur.com/EAiVEkt.png) -[eployee code example](https://i.imgur.com/bighWWJ.png) -[code continued](https://i.imgur.com/Hxcho66.png) +![employe diagram example](https://i.imgur.com/EAiVEkt.png) +![eployee code example](https://i.imgur.com/bighWWJ.png) +![code continued](https://i.imgur.com/Hxcho66.png) - this example is contrived - -- salariedemployee and wagedemployee inherit all public and protected methods of employee (including getters and setters, not including constructors) +- salariedemployee and waged employee inherit all public and protected methods of employee (including getters and setters, not including constructors) - salariedEmpoyee and waged employee each have thier own computePay method ## Interfaces -[diagram](https://i.imgur.com/pN660p0.png) -[code](https://i.imgur.com/iDyoeSE.png) +![diagram](https://i.imgur.com/pN660p0.png) +![code](https://i.imgur.com/iDyoeSE.png) - generally preffered to subclasses - both salaried and waged employees must implement the computePay method # Domain class model vs ERD structure - - erd are about long term storage. data persistence - domain models are about application process, temporary storage. - database and class structures dont need to be the same - but you do need to be able to map between them -[domain class model vs erd structure](https://i.imgur.com/feN6a9W.png) +![domain class model vs erd structure](https://i.imgur.com/feN6a9W.png) # Example: Library system - e.g., -[library example uml diagram](https://i.imgur.com/u4CNXOb.png) +![library example uml diagram](https://i.imgur.com/u4CNXOb.png) the five horizontal items could be meny items. there will be some kind of authorisation for senior librarians. we probably wouldn't make seniour and junior librarian as differnce classes. there is not really any benefit, doing this would be overkill. We should use a single librarian class with `type` field. this field can be used for authorisation. The apply fine use case is an optional sub task. It could be implemented in many ways: checkbox on return form, sub menu item, automatic. shelve item is a differnt, its more of a business process. only thing need in the code it the change the status of the item. ![class diagram](https://i.imgur.com/VjyvYPe.png) -[code part 1 Loan class](https://i.imgur.com/6VoV54C.png) -[code part 2 Loan class 2](https://i.imgur.com/Q8yptdE.png) -[code part 2 Loan class 3](https://i.imgur.com/4Xst3ys.png) +![code part 1 Loan class](https://i.imgur.com/6VoV54C.png) +![code part 2 Loan class 2](https://i.imgur.com/Q8yptdE.png) +![code part 2 Loan class 3](https://i.imgur.com/4Xst3ys.png) ## Multiplicity @@ -111,6 +106,6 @@ min multiplicity 1 ⇒ must provide associated Loan instand when creating a Loan 1. create loan and loanItem then use LoanItem.setLoan() 2. use a custom LoanItem constructor to pass Loan object -[multiplicity code ](https://i.imgur.com/RKa9NBy.png) +![multiplicity code ](https://i.imgur.com/RKa9NBy.png) -unidirectional association are preffered as here we need to link things birdirectionally. this example is contrived, in real life it would not be done this way. \ No newline at end of file +unidirectional association are preffered as here we need to link things birdirectionally. this example is contrived, in real life it would not be done this way. diff --git a/content/notes/uml-java-reverse-engineering.md b/content/notes/uml-java-reverse-engineering.md new file mode 100644 index 000000000..d6fb0d9bd --- /dev/null +++ b/content/notes/uml-java-reverse-engineering.md @@ -0,0 +1,16 @@ +--- +title: "uml-java-reverse-engineering" +aliases: reverse engineering +tags: +- info201 +--- + + +# Java -> UML reverse engineering +reverse of [uml-java-forward-engineering](notes/uml-java-forward-engineering.md) + +- parse java doe and generate corresponding uml diagrams +- useful to generate models of existing systems +- code usually has more detail than can be represented in diagrams +- automated diagram layout likely to be ugly ⇒ manual clean up +- some language specific features may not translate diff --git a/content/notes/unit-testing.md b/content/notes/unit-testing.md index 04ec572d0..0a64afc6a 100644 --- a/content/notes/unit-testing.md +++ b/content/notes/unit-testing.md @@ -83,4 +83,4 @@ based off JUnit and fixes some it it's problems - data driven testing - also - integration testing - - end to end testing \ No newline at end of file + - end to end testing diff --git a/content/notes/version-control-system.md b/content/notes/version-control-systems.md similarity index 98% rename from content/notes/version-control-system.md rename to content/notes/version-control-systems.md index cdfc6f164..bbb1b2e3a 100644 --- a/content/notes/version-control-system.md +++ b/content/notes/version-control-systems.md @@ -1,5 +1,5 @@ --- -title: "version-control-system" +title: "version-control-systems" aliases: VCS, version control system tags: - info201 diff --git a/content/notes/virtual-machines.md b/content/notes/virtual-machines.md index c9156eb5e..7d708be65 100644 --- a/content/notes/virtual-machines.md +++ b/content/notes/virtual-machines.md @@ -24,4 +24,4 @@ Installed on a "host OS". Vitual machines use "guest" OSs. # Why would you want a hyper visor - safe and secure for learning hacking - to learn different operating systems -- to try breaking stuff \ No newline at end of file +- to try breaking stuff diff --git a/content/private/templates/DailyTemplate.md b/content/private/templates/DailyTemplate.md index 43a35932f..e31d89a81 100644 --- a/content/private/templates/DailyTemplate.md +++ b/content/private/templates/DailyTemplate.md @@ -5,10 +5,11 @@ <% tp.user.album() %> <% tp.user.xkdc() %> +<% tp.user.stocks({a:"AAPL"}) %> +<% tp.user.yahoo({a:"SP500"}) %> +<% tp.user.yahoo({a:"TSLA"}) %> -## Todos - -## Lecture/Labs +## Today <%* const d = new Date().getDay() switch(d){ @@ -32,6 +33,13 @@ switch(d){ } %> +# Review +```dataview +list from #lecture where sr-due = date(today) +``` + +## Backlog + ## Projects - python ai weekly review - spotify clone @@ -39,4 +47,4 @@ switch(d){ ## Links - [202 lab book](C:\Users\Jet%20Hughes\Documents\Personal\COSC202LabBook-2.pdf) - [i201 cousework](https://isgb.otago.ac.nz/infosci/INFO201/labs_release/raw/master/output/info201_labs.html#) -- [i201 Assignments](https://open.spotify.com/album/23DJ3KNE5JXi61G31T2Kni?si=-zZEHXIxT2qOEN6_Ns5C5Ql) \ No newline at end of file +- [i201 Assignments](https://isgb.otago.ac.nz/info201/shared/assignments_release/raw/master/output/info201_assignments.html) \ No newline at end of file