Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
Boggle (#5)
Browse files Browse the repository at this point in the history
* replace exercise

* ready for 2nd workshop
  • Loading branch information
msaunby authored Apr 16, 2024
1 parent 68e011e commit f607283
Show file tree
Hide file tree
Showing 12 changed files with 75 additions and 20 deletions.
Binary file added reveal.js/fig/boggle-box.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added reveal.js/fig/boggle-right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added reveal.js/fig/boggle-wrong.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added reveal.js/fig/hammersmith-line-2024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added reveal.js/fig/tube-geography.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added reveal.js/fig/tube-map.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion reveal.js/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@
<section data-background-gradient="linear-gradient(to bottom, #FFFFFF, #FFFFFF)"><img src="fig/Slide1.jpg"></section>
<section data-background-gradient="linear-gradient(to bottom, #FFFFFF, #FFFFFF)"><img src="fig/Slide2.jpg"></section>
<section data-markdown="md/05b_schedule.md" data-background-gradient="linear-gradient(to bottom, #555555, #888888)" data-separator="^\n\n\n" data-separator-vertical="^\n\n"></section>
<section data-markdown="md/05c_recap.md" data-background-gradient="linear-gradient(to bottom, #555555, #888888)" data-separator="^\n\n\n" data-separator-vertical="^\n\n"></section>
<section data-markdown="md/06_abstraction.md" data-background-gradient="linear-gradient(to bottom, #555555, #888888)" data-separator="^\n\n\n" data-separator-vertical="^\n\n"></section>
<section data-markdown="md/07_alignment.md" data-background-gradient="linear-gradient(to bottom, #555555, #888888)" data-separator="^\n\n\n" data-separator-vertical="^\n\n"></section>
<section data-markdown="md/08_sudoku_task.md" data-background-gradient="linear-gradient(to bottom, #555555, #888888)" data-separator="^\n\n\n" data-separator-vertical="^\n\n"></section>
<section data-markdown="md/08_boggle_task.md" data-background-gradient="linear-gradient(to bottom, #555555, #888888)" data-separator="^\n\n\n" data-separator-vertical="^\n\n"></section>
<section data-markdown="md/09_wrapup.md" data-background-gradient="linear-gradient(to bottom, #555555, #888888)" data-separator="^\n\n\n" data-separator-vertical="^\n\n"></section>
<section data-background-gradient="linear-gradient(to bottom, #FFFFFF, #FFFFFF)"><img src="fig/Slide3.jpg"></section>
</div>
Expand Down
23 changes: 23 additions & 0 deletions reveal.js/md/05c_recap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## What is computational thinking?

![four pillars](../images/fourpillars.jpg)


## Algorithms

1. Reproducibility - a standardized process ensures the same steps on every execution
2. Efficiency - identify repetitive processes and optimize, remove unnecessary steps
3. Scalability - a clearly defined process can be extended to run on larger datasets
4. Sharable - efficient way to share a process with others
5. Automation - once a repeatable solution has be defined it can be automated


## Decomposition

Break the problem into smaller parts - sub-problems


## Pattern recognition

Look for opportunities to repeat, or re-use, existing fragments

20 changes: 15 additions & 5 deletions reveal.js/md/06_abstraction.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

Abstraction is about simplifying problems, making them easier to solve. The idea is to identify and then ignore information that is not essential.

## Relation to programming

Abstraction is an approach that helps solve problems. A core component of programming is about creating and composing abstractions, using objects and functions to represent and define the solution.

Abstraction works by establishing a level of complexity at which a person interacts with a system, suppressing the more complex details below the current level. Abstraction allows programmers to define objects and functions that can interact with each other in a predictable way without having to understand the underlying details of their implementation.

When you see a simple interface covering a more complex implementation, this is abstraction.


## Example - the London tube map

Expand All @@ -14,16 +22,18 @@ The problem the tube map is designed to solve is to help people navigate the und
5. which stations have onward connections to other transport modes (e.g. National Rail)
6. which stations have step free access

Information that is not essential to this problem is the geographical relativity of each station to each other. This information has been deliberately excluded, as it does not help solve the specific problem of how to navigate London by tube. The tube map would not be appropriate to navigate between the stations above ground by foot, bike or road.

<img src="fig/tube-geography.jpg" height=500>

## Relation to programming
Information that is not essential to this problem is the precise location of each station. So it is removed...

Abstraction is an approach that helps solve problems. A core component of programming is about creating and composing abstractions, using objects and functions to represent and define the solution.

Abstraction works by establishing a level of complexity at which a person interacts with a system, suppressing the more complex details below the current level. Abstraction allows programmers to define objects and functions that can interact with each other in a predictable way without having to understand the underlying details of their implementation.
<img src="fig/tube-map.jpg" height=600>

When you see a simple interface covering a more complex implementation, this is abstraction.

When on a particular line, even less information is required...

<img src="fig/hammersmith-line-2024.png" height=400>


## Example - motor car
Expand Down
34 changes: 34 additions & 0 deletions reveal.js/md/08_boggle_task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

# Boggle

We are now going to put together everything we know to design a software model of a popular English language word game.

<div class="container">
<div class="reveal col">

### Understanding the game

#### Equipment
The equipment includes sixteen letter cubes, a shaker-tray and a timer.

#### Object
The object is to list, within the time limit, as many correct words as possible. Words are formed from the assortment of letters arranged in the cube tray.

</div>
<div class="reveal col">
<img alt="boggle box" src="fig/boggle-box.png" height="440">
</div>
</div>


### Rules
Words are formed by the use of adjoining letters. Letters must join in the proper sequence to spell a word. They may join horizontally, vertically or diagonally, to the left, right or up and down. But no one letter cube may be used more than once within a single word.

<img alt="boggle right" src="fig/boggle-right.png" height="410">
<img alt="boggle wrong" src="fig/boggle-wrong.png" height="250">


You might prefer to design your software in a visual style, perhaps as flow charts, or you could write pseudo-code, or an outline in a coding language such as R or Python.

The aim is not to create a working program, but rather to express the key design decisions in a way that can be discussed and shared.

14 changes: 0 additions & 14 deletions reveal.js/md/08_sudoku_task.md

This file was deleted.

1 change: 1 addition & 0 deletions reveal.js/md/09_wrapup.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ We are grateful to the workshop leaders and helpers for supporting the delivery.

If you have benefited in any way from this course and want to support its long term sustainability then please take the time to complete our feedback survey, recommend it to your colleagues, and enthuse about it to your senior leadership team. The programme and workshops are under constant evolution, and we are grateful for your feedback which is a core component of this process.


## Follow up

Course notes and resources are available all year round for you to revisit and share as you need.
Expand Down

0 comments on commit f607283

Please sign in to comment.