Uploaded by jamie.o.bevan

7 AD & PS - Program development life cycle

advertisement
Keywords
Algorithm
Abstraction
Y10 - Mr. Bevan
06/10/2023
Algorithm design
& problem solving
LO: Understand
how a problem
can be simplified
using abstraction
Starter: What does abstraction mean?
(2 minutes)
Answers Starter: Abstraction is the idea of taking something real or physical and
breaking it down into its most important ideas or elements.
Abstract art is defined by the Tate gallery as ‘artworks that do not attempt
to represent an accurate depiction of a visual reality, but instead use
shapes, colours, forms and gestural marks to achieve its effect’.
Today we will be looking at an overview of the program development lifecycle is and
how to remove unnecessary elements from programs so that they are easier to
define.
We will start with an example of when abstraction was used in the 1930s to create a
simplified map.
Q1. Does anyone
know what this is
a map of?
Q1. The London Underground subway in the 1920s.
In the 1920s the underground was
expanding at a fast rate and more
routes were getting added year by year.
The problem was, the map that was
designed was getting a bit too difficult
to read. The stations were quite far
apart and it was difficult to read those
in the centre.
It was also not an efficient design. There
were large areas (highlighted in green)
that were not really needed.
So, in 1926, a map-maker was employed in order to make the map simpler to read.
He removed the unnecessary areas,
and put regular spacing between the
stations to make it look nicer.
While this meant that it could not be
superimposed on a map, they found
that overall customers were more
interested in:
- Getting from one station to
another in the simplest way
- Seeing all available routes easily
This is the version introduced in 1936 by Harry Beck. Not much has changed since then.
So, what has this got to do with
computer science? Well:
- Unnecessary elements were
removed that were not relevant
or distracted from more
important elements
This is what abstraction is in
computer science.
Write this definition down into your glossary document.
Task 1: Write the definition for “abstraction”
down into your glossary document.
So, what is the program
development life cycle?
Well, it looks like this.
For this specification, we are
not worried about
maintenance though. So, do
not worry about that. Just:
- Analysis
- Design
- Implementation/testing
- Planning
Analysis
The analysis stage is also called the
‘requirements specification’ stage.
It is where the problem is clearly defined.
In software engineering, this is called the:
- Software Requirements Specification
(SRS)
During this phase, tools such as
decomposition and abstraction are used to
perform the analysis. The next slide shows
an example of a SRS.
General
More detailed
Q2. Can you think of any reasons why it is very
important to have a clearly defined SRS?
A2. See below for the main ones.
- Before a project is started, everything is clear for all parties.
E.g. The company performing the work understands what is required of them, and the
client (the person requesting work) understands what the company will deliver. This
means everyone is happy and knows exactly what is expected before the work
commences.
- There is minimal chance of people getting annoyed
The more transparent the SRS, the less likely each party will get annoyed with what is
delivered.
Again, so long as the SRS is checked and validated thoroughly before any work
commences, it will lead to good outcomes for both parties.
Decomposition
Even everyday tasks can be broken down into their constituent parts.
For example, just the process of putting your clothes on can be broken down into quite a
few steps that you may not have thought of!:
- Select clothes to wear
- Remove any clothes currently on
- Put on clothes in correct order!
You may think that these are easy decisions to
make, but some people know the effects of
making too many decisions.
There have been many books produced about the
effect of this.
For instance, for some people they would rather not think about step number 1 at all ‘Select clothes to wear’.
Q3. Why do some successful people choose
to wear the same clothes every day?
Q3. Because every extra decision you
make contributes to a phenomenon
known as ‘decision fatigue’.
If you have to make too many decisions each day
then you are more likely to suffer from something
called ‘decision fatigue’.
This is where the quality of your decisions
deteriorates throughout the day.
This is the reason why big companies often have
their most important meetings in the morning,
while everyone has still got a ‘clear’ mind!
(Don’t worry, this will not be assessed in your
Computer Science exam).
This is a great book
that explains
decision fatigue in a
bit more detaill.
https://www.rightattitude
s.com/2020/01/20/avoiddecision-fatigue/
Write this definition down into your glossary document.
Task 3: Write the definition for “decomposition”
down into your glossary document.
That is it for the analysis stage for now.
Let’s write this definition down too.
Task 4: Write the definition for “analysis”
down into your glossary document.
Design
In the design stage the requirements
from the analysis stage are looked at in
more detail.
From the requirements, a plan is
constructed that involves how to
achieve these requirements.
This often involves the use of structure
charts, flowcharts and pseudocode.
Let’s have a look at these in a bit more
detail.
Structure charts/diagrams
This is an example of a structure
chart.
Structure charts come in many
different types depending on the
type of product to be developed.
Notice they typically just use
rectangle boxes.
Often they are heirarchical,
meaning that they typically start
at the top and branch down.
Task 5: Write the definition for “structure
diagram” down into your glossary document.
Flowcharts
This is an example of a
flowchart.
Q4. Can you see one difference
between a structure diagram
and a flowchart?
A4. Flowcharts use different symbols
depending on the type of task.
This is an example of a flowchart from a past
paper question.
Notice the different types of boxes used.
Let’s see a quick overview of what the
symbols mean.
We will discuss them more in a future lesson
though.
Pseudocode
Q5. Does anyone know what pseudocode is?
A5. Pseudocode is a general language that we can use to design software. Although it
is not an actual language that we can write into a computer and test, it is useful since
it can be understood by everyone, regardless of their background.
You will need to understand how to write pseudocode in order to do well in the
assessment. Although you can never test it, like by writing Python into a computer, you
will soon understand its syntax and use.
Task 6: Write the definition for “pseudocode”
down into your glossary document.
Implementation/testing
In this spec the third stage is called
testing.
This is where the software is tested
using a process known as iteration.
Q6. Does anyone know
what iteration is?
A5. The process of testing and
retesting until you get closer and closer
to a required goal.
For example, in AI models, lots of data
is collected through different channels.
In the example to the right, someone is
trying to train an AI to beat his score at
Trackmania. He starts by giving the
software a reward, just like a human.
The software then tries all the possible
combinations and iterations until it
finds the optimum path. The software
beats his score in the end!
https://www.youtube.com/watch?v=Dw3BZ6O_8LY
Testing also includes not just iteration,
but user input too.
If you are designing for example a
website, you may want to ask as many
people as possible to try using the
website for a period of time.
You would ask them to inform the
company if you experience any issues
along the way. If something needs
changing
Last glossary term!
Task 7: Write the definition for “testing”
down into your glossary document.
Download