s5cs21 algorithm development techniques
In this section, we look at the big picture of programming. Tying together all the work we have done so far on programming and looking also towards more advanced topics that we have yet to meet.

We are learning ...
#- To recognise each part of the big programming picture
#- About standard programming concepts
#- How to draw flowcharts and represent algorithms in other ways
#- About professional code structure
#- How to check that your algorithm is running correctly.
#- How to become a good programmer!
So that we can ...
#- Consider each part of the 'big picture' when we are preparing to code
#- Use the standard coding constructs with confidence
#- Communicate algorithms to other people / programmers
#- Code in a professional and clear manner
#- Be confident that any algorithm we develop will run correctly.
#- Become a good programmer!

This is all you need to know!

Activity 1
The BIG Picture!
The image shows most of the software development tools which you will use during your time as a fledgling computer programmer. You should see some of the things we've learnt about before plus some new stuff.

Task 1.1 RAGtime!
Spend 10 minutes, silently reviewing / reading / watching this diagram. You should use Red, Orange and Green highlighter pens to 'RAG' the diagram to focus you on some areas which you will need to find out more about in the future.
Now use your course textbook to research your RED areas. Work in groups if you wish - it will help to discuss the concepts laid out here. DO NOT use the computers to do this. Use the textbook.
OUTCOME Considerably highlighted picture plus a list of areas which are green, a list which is orange and a list which is red (these are the really important ones for you to focus on!)


Activity 2
Standard programming concepts

Note that these are general constructs - they may NOT be available or look like this in the programming language you have been learning ...

Click to view

Task 2.1 Push your limits
It's interesting to see where you are now so that you can plan where you are going to go next.



Activity 3
What is an algorithm?

Click to view
An algorithm is a set of unambiguous instructions forming a precise, step-by-step method for converting inputs into outputs in order to solve some problem.
#1 A particular set of input values must produce the same output each time the algorithm is run;
#2 The answer for any particular input must be correct;
#3 The algorithm must stop/halt after a finite number of steps;
#4 The amount of memory used must be minimal (space complexity).
#5 The amount of time used must be minimal (time complexity).
Without these qualities, an algorithm simply will not do.

Task 3.1 Researching algorithms

Click to view
Play this game with a friend and, when you are satisfied that you understand how it works, research 5 programmed solutions using the Rosetta Code website. For each programmed solution, you should try to identify how each part of the programmed solution relates to the algorithm itself.

One Algorithm : Many Solutions
OUTCOME : 5 different programmed solutions to FizzBuzz plus an analysis of each program to identify how it represents each part of the algorithm. You should present your analysis in an inventive way.

Question we must ask at this stage are ...


Activity 4
Communicating algorithms
Structured English
#- A limited highly restricted subset of English language statements
#- No mathematical operators!
#- Represents logic, not mechanics
Pseudocode
#- Similar to structured English
#- Mathematical symbols abound!
Flowcharts
#- Diagramatic representation of an algorithm
#- Common shapes and well known meanings
#- Restricted set of 'operations' encourages deep thinking

Task 4.1 Structured English and Pseudocode
Answer the questions in your notebooks.
OUTCOME : Questions answered in your notebooks, correctly.

Flowcharts are a visual way of representing algorithms. You've met them before, so there is little point in teaching you how to suck eggs, however ...

Task 4.2 Flowchart exercises
OUTCOME : Satisfaction!

There is a great piece of software that you can use if you wish to experiment with flowcharting in more depth ...

Activity 5
Coding style

Click to engage

Task 5.1 To Do List
OUTCOME : To-do list


Activity 6
AFK!

Task 6.1 Desk Checking
Outcome: Completed examples of desk checking.

Extension Activities
How about these?#- Download and complete the What's the question activity. Hand it into your teacher for checking.
#- Read this PDF file which outlines a real algorithm for making the perfect cup of tea. Read this and be amazed that people take tea comparison that seriously!
#- Download, extract and inspect this zip file which contains lots of Raptor exercises and example flowcharts. Work through these and see how far you get.
#- Algorithms are not the same as computer programs. Discuss.
#- ISBN Number: What is the structure of an ISBN number? How is the check digit calculated? You might wish to look at the Wikipedia article (which also has Python code for a solution!)
#- Right Angle Triangle: The following problem has been set. A right-angled triangle has sides a, b and c. Pythagoras’ theorem states that a2 = b2 + c2. The problem is to create a process that will find and output the length of side a for any given inputs b and c. Express the solution to this problem in a) structured English and b) Pseudocode. Create a program flowchart in Raptor or yEd for this algorithm and print out the flowchart for your assessment books.
#- Standard, well known algorithms: Have a quick look at this list of algorithms and take note (in your brain) of the sheer number of ‘standard’ algorithms.
What's next?
Before you hand your book in for checking, make sure you have completed all the work required and that your book is tidy and organised. Your book will be checked to make sure it is complete and you will be given a spicy grade for effort.END OF TOPIC ASSESSMENT
Last modified: February 14th, 2024