0% found this document useful (0 votes)
37 views57 pages

Assignment 1

The document discusses computational thinking skills which are important for programming. It covers four key aspects - decomposition, pattern recognition, abstraction and algorithm design. Decomposition involves breaking down complex problems into smaller pieces. Pattern recognition identifies similarities between problems. Abstraction filters out unnecessary details. Algorithm design plans a set of instructions to solve a problem consistently.

Uploaded by

r37061168
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views57 pages

Assignment 1

The document discusses computational thinking skills which are important for programming. It covers four key aspects - decomposition, pattern recognition, abstraction and algorithm design. Decomposition involves breaking down complex problems into smaller pieces. Pattern recognition identifies similarities between problems. Abstraction filters out unnecessary details. Algorithm design plans a set of instructions to solve a problem consistently.

Uploaded by

r37061168
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 57

Programming

Assignment 1

Presented by Shoon Lae Won Eain


Level 3 Batch 14
Computational thinking skill

A skill of thinking like a programmer in investigating the problem and come


out with the formula/solution that human can understand and can instruct the
computer easily .
The importance of Computational Thinking in programming

• When developing software applications, these skills are used to analyze problems to
produce solutions for better development.

• Programmers need to think about how to complete the given tasks while
instructing the computer to be understood.

• To do this, computational thinking skill, including figuring out what the task is about
and how to get there is a must. This step comes beforehand the actual coding.
What if programmers are lack in computational thinking skill

• Programmer can be overwhelmed by a big and complex project.

• Make it harder when coding.

• Can increase the cost such as time of developing a program.

• The higher chance of getting inaccurately different result from desired result.
Four corner stones of computational thinking
Decomposition

The process of breaking big and complex problems or system down into
small and manageable pieces. The problem is structured as step by step
processes which is easier to understand.

Cleaning house

Cleaning room Other places

Bed Living hallway


garden
room room

bed closet chairs window plants ground stairs walls


• Decomposition is about creating sub-problems from the original big problem.

• Instead of solving the original problem directly, the simpler sub-problems are solved
firstly.

• After that, those solutions from sub-problems can be put together to solve the original
problem.
Usage problem

• When the task to too big to handle programmers have to use this skill.

• This skill helps programmers solve big and complex program in much convenience
way without overwhelming.

• For example- Let’s say we have to develop a gaming software, instead of thinking how
to develop the whole software, we can decompose the features and functions needed in
that software and then composing all of them would automatically form a gaming
software.
Analysis

• When building calculator programs, decomposition is commonly used.

• At the beginning, programmers list down what functions and features are needed in the
program.

• For example – a calculator must be able to used for adding, subtracting, multiplication,
division, finding squares and roots, and maybe other engineering functions.

• So the programmer will break it down into smaller task and will solve them one by one.

• Then, a complete calculator program would be built after solving all those small problems.
Analysis

• Some AI software can give the solution for a whole mathematic problem.

• (Eg. Photomath, Microsoft math solver)

• These softwares scan a problem and decompose the big problem into a smaller
steps where the program can manage to calculate.

• When giving the step by step explanation, the program again decompose the
answer into the steps where the user can understand easily.
Pattern recognition

Pattern recognition is spotting and detecting the similarities or characteristics


knowns as patterns between problems or systems.

Cleaning Cleaning Developing a • Calculator


• Use vacuum Developing
dusty dusty EFTPOS • Connect to
cleaner EFTPOS for a
places in places in software for printers, scanner,
• mopping convenience
living room bed room supermarket cards
store
• After decomposition is done we need to find is there any similarities ( for example
the approach manner)between problems.

• We recall the things that have done before and match with the current problem.

• Patterns can exist between same or different problems.


Usage problem

• Pattern recognition system is used in finger print recognition, speech recognition


and photo recognition.

• Pattern recognition can also be used in deciding whether the lines of code are
reusable or loop.

• When analyzing the big data, pattern recognition skills help to analyze and
organize the data better.
Analysis

• Pattern recognition system can be seen in some creative softwares


applications where the AI will find the celebrity look alike.

• In those programs, the patterns of the features of the celebrity face and
the user’s face is recognized.

• Then the program will choose a celebrity that has the closet pattern with
the user.
Analysis

• Another type of programming where pattern recognition can be clearly


seen is Rubik’s Cube scanner software.
• Those software will automatically give a solution to complete the
Rubik’s Cube.
• When users photograph the sides of Rubik’s Cube, the program will
analyze the color patterns of that cube.
• Then the program will give the solutions specifically for thoe patterns.
Analysis
• Facebook recommend the topics, people and pages to us by analyzing our
patterns.

• Those patterns are analyzed from the behaviors and characteristics of the user, its
friends, the people within the user’s area.

• Those behaviours includes the common topics those people are following and
interested in, the mutual friends they share, the user’s demographic and
geographic.
Abstraction

Abstraction means filtering out the unimportant or irrelevant information so that


we can focus on the main points. Generalization also take part in abstraction, it
generalizes the things without considering the details.

For example – The information “African kids like candy, Asian kids like candy, European kids like
candy” has too much unnecessary details. We can just abstract the information “Kids like candy” .
Abstraction is done by

• Forgetting or ignoring about the other unnecessary complex parts of a problem.

• Then taking care about the information and elements that is associated with the
problem and solution.

• Also understanding and looking the problem the whole as big picture.
Usage problem

• When programmers find a solution for a problem, abstracting things helps to


solve the problem more efficiently without getting distracted.

• Information which is not important for users is made private by the


programmers

• When giving explanation about the program, we can just left out complicated
details.
Analysis

• Abstraction can be seen in translating programs such as google translate.

• It means that the program try to translate the sentence user type into another
language, It choose the words the are relevant to the topic of the sentence.

• For example the word “like” can be used as “such as” or “enjoy”. But based on the
meaning of the user input, program ignore one definition and take the other one.
Analysis

• Some programs such as spreadsheet and database software allow us to sort the
data.

• These programs allow user to sort certain kind of data from bunch of data.

• That means programs hide all the other data, and only display necessary data.

• Thus, that kind of programs use abstraction technique.


Analysis

• In search engines that have plenty of resources (such as google, safari, bing),
those resources are abstracted to show only some resources to user.

• They filer out the resources which are not relevant with the user’s keywords.

• Then they choose the most relevant answers and display them

• So that user is not distracted by other topics and get to explore only the things
he/she searched.
Algorithm design

Algorithm design is planning the set of instructions in order which


is used to produce same outcome every time.

For example- when you want to make a phone call

Switch on the phone Enter the phone


Click phone app
number Click dial button
• Algorithm design is designing steps or rules to follow to solve the defined problem .

• Algorithm design are usually written as flow-chart or pseudocodes before coding.

• This algorithm design should be able to replicate and solve the problem every time.
Usage problem

• Algorithm design automates the solving process of that specific problem.

• This step by step process help instruct computer what to do.

• Programmers can get same result with any language they code by
following the algorithm design.
Analysis

• Back to the Rubik cube auto-solve programs, after it recognize the pattern,
it produces algorithm.

• Those algorithms are written by the programmer.

• That algorithm is designed to solve the specific stage of the cube and
produce the intended result every time.

• For example – in specific pattern, use this alogorithm (e.g. turn the right
side, turn the down side..), to solve a surface.
Analysis

• Back to the Rubik cube auto-solve programs, after it recognize the pattern,
it produces algorithm.

• Those algorithms are written by the programmer.

• That algorithm is designed to solve the specific stage of the cube and
produce the intended result every time.

• For example – in specific pattern, use this alogorithm (e.g. turn the right
side, turn the down side..), to solve a surface.
Analysis

• In mapping software (e.g. Google map, apple map), it can give a route with
shortest time to get to specific destination.

• This is done by using algorithms to check the available routes, check the
distance, check the traffic.

• Then the an algorithm again, it calculates the best way to get there .
Analysis

Algorithm is used in almost every programs including embedded systems, and robotics.
For example
• In self-driving cars , the set of instructions are written to perform every time the car is
started.
• The algorithm might include checking the route, starting the engine, adjusting the speed,
control the steering wheel, stop if it arrives the destination.
• In vacuum cleaner, the algorithm might be turning vacuuming mechanism on, checking
the obstacles with sensor, moving as the obstacles are sensed.
Evaluation

• In the case scenario, we can apply decomposition skill.


Write a POS system

Display Amount calculation


customer
information

Additional
email name address Sub amount charges

price quantity tax delivery discount

Figure : example of how problems in scenarios can be decomposed


Evaluation

• Many tasks and requirements are needed and given to develop a POS software
from scenario.

• Instead of thinking how to solve a problem in whole, we can solve breakdown


those requirements into small things.

• After this, we can solve a sub problem at a time.


Evaluation

• Calculation processes will be broken down starting from the simplest


step where the required inputs are requested.

• Before calculating the final total amount of all items, final amount of
an item will be calculated.

• Then sub calculation such as (sub amount, discount, tax, of a product)


will be taken before that final amount of all items.
Evaluation

• The main pros of using decomposition in this problem is that In this way, I will
not see it as a complicated problem to solve anymore.

• Another thing is if this problem were a real project, The decomposed steps can
be worked on by different people for example team members

• The workload is shared, thus it would be done faster, probably better, and more
efficiently.
Evaluation

• The only drawback of decomposition is the you have to understand the


concept properly.

• Otherwise, the problems can be disorganized or uncombinable.

• Also, if this project were working with a team, there should have great
communication and teamwork between teammates.
Evaluation

• Another skill that can be utilized for the case scenario is Abstraction.

• This POS system consists lots of input and output.

• Instead of considering every inputs and outputs, some of those can be


abstracted, in a specific situation.

• This would be applied after decomposition.


Evaluation

• For example inputs such as customer name, address, email is not necessary
in calculations.

• And in specific calculation, other charges or product information can


sometimes be ignored.

• For example – while calculating the final amount, we don’t need to think
about price and product name anymore, we just need sub amount, tax and
discount.
Evaluation

• There is another way that abstraction can applied, and that is we can
generalize things.

• When we are trying to get the general idea of our problem, we can
generalize things.

• That means for example, when trying to design the user interface of
software, we just have to think about how a POS system should look like.
Evaluation

Pros includes

• Abstracting inputs help me to clarify the things, thus among all


complexities, I can focus on the necessities.

• Generalizing the idea and not think about details in specific situation,
allows user to spend less time thinking and more time on action.
Evaluation

Pros includes

• Abstracting inputs help me to clarify the things, thus among all


complexities, I can focus on the necessities.

• Generalizing the idea and not think about details in specific situation,
allows user to spend less time thinking and more time on action.
Evaluation

• The only possible down side could be abstracting things ignorantly.

• Abstraction is about hiding UNNECESSARY details and not hiding all


details.

• So, if it is misconcepted, the important details can be left out.


What is software design?

Software designing is stating the functions, tasks and that a program needs to
perform and features and requirements that are needed in a software. (e.g.
flowcharts, pseudocode, UML diagrams)
How the software design impact the quality of software?

• Software design comes before the coding, and 70% of the thinking skills are
applied here.

• They act as a blueprint of a software to be developed and guide the


programmers in coding.
How the software design impact the quality of software?

• Programmers mostly just follow the design, so the software designers should include
desired outcomes in design.

• It is easy to look at bigger picture of the process with design.

• It is easier to fix and modify the design than the whole program.
The importance of computational thinking skill in software design

• Decomposition help programmers identifying the things to solve firstly in order


to achieve complete desired result.

• Pattern recognition helps programmers to speculate whether the previous


solutions can be repeated.

• Abstraction helps to understand the task as well, for example- what result does
the client need the program to output.

• When designing a software, the design should be algorithmic.


Mathematical logic

• Mathematics plays a huge part in programming.

• As there are rules when using mathematics, we should apply those


rules and logics in programming.

• We cannot ignore the steps, sequences and logics when using


mathematics.
Basic operations in programming

Addition +
Subtraction -
Division ( return quotient) /
Division( return remainder) %
Multiplication *
Equal ==
Not equal !=
Greater than >
Less than <
In flow chart, rectangle boxes are used to set
Ans= Num1+Num2
mathematical functions.

Usually, the steps after the math operation


Memorize the answer can be memorizing and displaying the
answer.

Display the Parallelogram is used in data


answer input/output processes like “Display”.
Iteration

• Also known as looping which repeats the group of tasks.

• The loop is given a condition where it should stop or it means instructing to


loop infinite times.

• Looping reduces the amount of works that is needed to be done to complete


a task.
Condition expression

• Also known as selection structure.

• It is telling program to perform different tasks in different events.

• If statements usually represents the conditions.

• Conditions are always differ from one another.


What are the things to be considered
to design a high quality software?
Efficiency/performance

• Using the resources efficiently minimize the uses of storage, cpu and run time of the
program.

• Performance means how fast and how smooth a program can function and response.

• Choosing a suitable programming language is an important factor.

• When using the resources, you should balance the cost and quality.
Maintainability

• Maintainability means a software should be easy to fix, repair and improve later.

• Most proportion of the budget is used in software maintenance.

• How long a software would last and useful depends on the maintenance of the
program.
Portability

• Portability is the ability of a software to be ran on different platforms and


environments.

• A program should also be consistence and stable while being portable.

• Portability means a program is accessible by wider range of audience.


Reliability

• Reliability is about how the program can operate without any failure in an
given environment and time frame.

• If software is not reliability, the decision made by it can be dangerous for


users.

• It is hard to measure and predict the reliability of the software.


Robustness

• Robustness is the ability of the software to handle the faults and errors.

• Software can deal with hardware faults, bugs and user mistakes.

• Some faults can be prevented in developing stage.

• This also includes giving warnings, reasonings, guides


Usability
• Usability is the ability of the software that allow user to fullfil its specified
objective with ease.

• A software should be easy to use and understand by targeted end users.

• The interface of the software should be well designed and navigational while
maximizing the user experience.

• This also includes giving warnings, reasonings, guides


References
1. https://www.twinkl.co.uk/teaching-wiki/computational-thinking
2. https://online.york.ac.uk/what-is-computational-thinking/
3. https://www.geeksforgeeks.org/what-is-decomposition-computational-thinking/
4. https://www.bbc.co.uk/bitesize/guides/zp92mp3/revision/1
5. https://edu.gcfglobal.org/en/computer-science/sequences-selections-and-loops/1/
6. https://www.bbc.co.uk/bitesize/guides/z433rwx/revision/1#:~:text=Sequence%20is%20the%20order%20in,
when%20a%20program%20is%20running
7. https://www.sealights.io/software-quality/software-maintainability-what-it-means-to-build-maintainable-soft
ware/
8. https://www.sciencedirect.com/science/article/abs/pii/S0065245808602995#:~:text=Software%20reliability
%20is%20the%20probability,is%20dynamic%20rather%20than%20static
.
9. https://binaryterms.com/software-robustness.html
10. https://www.parasoft.com/blog/what-is-robustness-testing/#:~:text=When%20robustness%20in%20software
%20testing,under%20normal%20or%20ordinary%20conditions
11. https://www.usability.gov/what-and-why/usability-evaluation.html#:~:text=Usability%20refers%20to%20the
%20quality,overall%20satisfaction%20of%20the%20user

You might also like