Download presentation
Presentation is loading. Please wait.
1
Programming Techniques :: Computational Thinking
Last modified: 28th June 2019
2
www.drfrostmaths.com ? Everything is completely free.
Why not register? Registering on the DrFrostMaths platform allows you to save all the code and progress in the various Computer Science mini-tasks. It also gives you access to the maths platform allowing you to practise GCSE and A Level questions from Edexcel, OCR and AQA. With Computer Science questions by: Your code on any mini-tasks will be preserved. Note: The Tiffin/DFM Computer Science course uses JavaScript as its core language. Most code examples are therefore in JavaScript. Using these slides: Green question boxes can be clicked while in Presentation mode to reveal. Slides are intentionally designed to double up as revision notes for students, while being optimised for classroom usage. The Mini-Tasks on the DFM platform are purposely ordered to correspond to these slides, giving your flexibility over your lesson structure. ?
3
Designing Computer Systems
Designing a new computer system is somewhat different to solving a mathematical problem: while there is some overarching aims in terms of what we want to get out of the system, but exactly how we solve that problem can vary significantly depending on design considerations, what compromises we make, what inputs are available, the level of automation/user interaction and so on. There’s a degree of artistry involved! Back in my PhD days I worked with a bunch of engineers, including teams from Freiburg (Germany) and ETH Zurich (Switzerland). The latter were working on vision algorithms for tracking pedestrians using the live video stream from a pedestrian robot…
4
Computational Thinking
Designing Computer Systems When we design a system, we can break down our thought process into the following three things: Computational Thinking Decomposition Abstraction Algorithmic Thinking ! Breaking down the problem into smaller ones which we might solve individually. !Thinking about what information/data is important in the problem, and what details we should ignore. ! The logical process of getting from the problem to the solution. The steps needed to build the required algorithms. How do we deal with the fact the robot is moving? How do we identify the pedestrians from the image feed? How do work out the person’s 3D position so we can work out their path over time? We’re interested in the trajectory of each pedestrian, but not what they look like/gender. We want to represent their positions in 3D space. We assume there is some ‘ground plane’, i.e. a floor people are walking on. Designing the algorithm that detects the pedestrians from the image data. The algorithm that ‘localises’ the robot, i.e. works out what the robot is based on the evolving environment in the image data. Application to pedestrian tracking system:
5
Computational Thinking
Another Case Study One early design consideration on DrFrostMaths was how to choose questions for students to do when they selected certain topics… Computational Thinking Decomposition Abstraction Algorithmic Thinking ! Breaking down the problem into smaller ones which we might solve individually. !Thinking about what information/data is important in the problem, and what details we should ignore. ! The logical process of getting from the problem to the solution. The steps needed to build the required algorithms. How do we have a suitable scoring metric to rate each possible question’s suitability for the student? (e.g. try to mix topics, pick question of appropriate difficulty) How do we determine if the student’s answer is correct? In particular, is their algebraic answer equivalent to the correct answer? Allowing written feedback from the student to their teacher. Representing user’s ‘ability level’ at each skill. Interested in user’s past performance which can be modelled as Boolean values (correct/incorrect) for the last 10 questions on that skill. This is used to calculate their new skill level. Unconcerned with the date/time of when past questions were answered or what the past answers actually were. Database access to get student’s last 10 answers for questions of same skill. Designing algorithm which marks answer and detects algebraic equivalence. Implement the mathematical function which computes user’s new skill level for the skills involved in the question. Produce algorithm which selects the next most suitable question for the user. Application to to DrFrostMaths Live game
6
DrFrostMaths question choosing/answering study
I developed an algebraic to determine if two mathematical expressions/equations are effectively the same. I worked on this algorithm in isolation, and used unit testing for a large variety of expressions/equations. Even this involved decomposing the problem further. How do we ‘parse’ the expression (i.e. understanding the structure of the expression, e.g. using BIDMAS). What does it mean for two expressions to be equivalent? Try it out: * Unit testing is testing a part of your system in isolation by providing example inputs with the expected outputs. Decomposition Abstraction Algorithmic Thinking I isolated the problem of determining algebraic equivalence. We care about the mathematical structure of the expression – we are not doing string comparison and hence ignore things like space characters. Use of numerical methods and operations on tree structures to determine equivalence.
7
DrFrostMaths question choosing/answering study
function pickQuestion(assessment, user) { } Abstraction: Student knowledge represented as a set of skill identifiers. Not concerned at this stage with exact questions they’ve done. Step 1: Work out all the skills (e.g. ‘Pythagoras’) that the student might know, based on school schemes of work, what questions students have previously encountered, etc. Step 2: Get all the questions from the database which match these skills Abstraction: A list of last 20 questions and whether they got each right or wrong. Unconcerned what their answer actually was. Step 3: Retrieve student’s history of questions on these skills. Step 4: Give a score to each question, e.g. Give a good score to question if difficulty matches their current ability level. Give bonus if the question combines skills within the student’s selection. Penalise depending on how recently the student has seen the question. Where student has selected multiple skills, penalise questions in such a way that they don’t keep getting the same topic. Abstraction: Questions ultimately given numerical score – no other contextual comments. Step 5: Randomly shuffle questions within each group of questions with the same score. Select first question of those with highest score.
8
Abstraction Mini-Exercise
Exam questions might ask you to define abstraction, provide a detail you might focus on and a detail you might choose to ignore. Complete for the following scenarios: Scenario Details the system might focus on Detail irrelevant to the system Online shopping basket What items the user has ordered, quantity of each. Reviews of the products. File uploading service The file name and size The nature of the contents of the file (other than as a stream of characters) Complete a bank payment. Sender account details, recipient account, amount paid, time. Account payment history, spending habits of either person. ? ? ? ? ? ?
9
Decomposition Mini-Exercise
Exam questions might ask you to define decomposition, and provide details of subproblems that we might focus on. Scenario Potential tasks we need to consider Online shopping basket How payment details are entered and checked. Allowing users to add to, modify and delete from their shopping basket. File uploading service Allowing the user to select the file. Transferring the file data to a suitable destination, e.g. an online server. Complete a bank payment. Interface to allow the user to enter payment amount and selecting the recipient account (e.g. suggest previous accounts they have paid to in the past?) Logging transactions for audit purposes. The process of making the physical transfer from one account to another. ? ? ?
10
Review ? ? ? What are the three stages of computational thinking?
Decomposition, abstract and algorithmic thinking What is decomposition? Breaking down the problem into smaller ones which we might solve individually. What is abstraction? Thinking about what information/data is important in the problem, and what details we should ignore. ? ? ?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.