28
Software Development

Software Development. Software Development Loop Design Programmers need a solid foundation before they start coding anything Understand the task

Embed Size (px)

Citation preview

Page 1: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

Software Development

Page 2: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

Software Development Loop

Page 3: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

Design Programmers need a solid foundation before they

start coding anything Understand the task that the program must perform Determine all the steps necessary in order to perform

the task

Page 4: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

Understanding the Task Most programming projects begin with an interview

with the end user Programmers must ask lots of questions and get as

many details as possible about the task Follow up meetings are usually required After an interview, a programmer generally

constructs a “software requirement” document This amounts to an agreement between the end

user and the programmer on what the program should actually do

Page 5: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

What can happen …

Page 6: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

Determining the Steps Next, we need to break down the task into a series

of concrete steps that can be followed (like a recipe) Remember that computers need each step to be

broken down into minute detail They don’t have the ability to infer intermediate

steps or make educated guesses like we can!

Page 7: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

Boiling a pot of water

Page 8: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

Boiling a pot of water Find a measuring cup Pick up measuring cup Find a sink Walk to sink Turn on water Fill the measuring cup

with 2 cups of water Turn off water Find a pot Pick up the pot

Find a stove Walk to stove Place the pot on the stove Pour the water into the pot Put measuring cup down on

countertop Turn the heat on the stove

to medium-high Wait until the water begins

to rapidly bubble Turn off stove

Page 9: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

Algorithms A series of well-defined, logical steps that must be

taken in order to perform a task Algorithms serve as a necessary intermediate step

between understanding the task at hand and translating it into computer code

Page 10: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

Pseudocode (aka “fake” code) A useful technique for breaking down an algorithm

into meaningful chunks and aligning them with the toolset of a language

In pseudocode, we don’t have to worry about syntax or spelling, this is for the user

Page 11: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

Example – Instagram 1. Start program.

2. Display photos/videos from user’s friends, starting with the most recent.

3. Allow user to scroll up and down through news feed.

4. Automatically playback videos and repeat. Allow users to click on videos in order to play sound.

5. Allow user to “like” photos by double clicking.

Page 12: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

Flowcharts A graphical model

that helps programmers visualize the task at hand

Like a decision tree

Page 13: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task
Page 14: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

Software Development Loop

Page 15: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

When writing programs … It is very important that you know what your

computer is capable of and what is already accessible to you (types of commands, previously written programs, “packages”, memory capacity, etc.)

Page 16: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

What can it do? Most computers can really only do a handful of

things Read information from memory Add, subtract, multiply, divide numbers Compare numbers Move data to memory or permanent storage

Page 17: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

What can it do? Processors can only perform a few simple tasks Each processor has it’s own fixed set of capabilities,

known as it’s “instruction set”

Page 18: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

Programs In order for a program to be meaningful, it needs a LOT of

instructions, we’re talking millions, maybe even billions Programs are generally stored on external devices but

they must be copied into memory for it to be accessible to the computer (like copying down a set of instructions)

Once it is stored in memory, the CPU can go to work: Fetch Decode Execute Store

Page 19: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

So, are you ready to write millions and billions of code … Say “no” …

Page 20: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

What’s the solution … ?

Page 21: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

High Level Languages Allows users to communicate with

computers in a language more closely related to the English language

Independent of particular computer that is being used

Further away from basic communication with computer, almost like a translator

Examples: Python. C++, C#, objective C, COBOL, BASIC, LISP, Pascal, MATLab, etc.

Page 22: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

High Level Languages

JAVA System.out.println (“Hello, World!”);

Hello, World!

PYTHON print (“Hello, World!”)

Hello, World!

Page 23: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

Programming Language Structure: Key Words Defined list of words that

make up the language, command codes

These are sometimes called “reserved words”

and as assert break class continue def del elif else except exec

finally for from global if import in is lambda not or pass

print

raise

return

try

while

with

yield

Page 24: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

Programming Language Structure: Operators Special symbols that perform

certain actions on pieces of data

Doesn’t always have to be on numbers

answer = 5 + 2 name = “Donald” + “Seok”

average = 250 / 300 remain = 7 % 2 powers = 4 ** 2

Page 25: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

Programming Language Structure: Syntax Set of rules that must be followed when writing a program Comparable to English language grammar

ENGLISH

I runs five miles yesterday.

PYTHON

if name = “donald”:

print (“You’re the bombdotcom!)

else

print(You’re not the bombdotcom!)

ENGLISH

I ran five miles yesterday.

PYTHON

if name == “donald”:

print (“You’re the bombdotcom!”)

else:

print(“You’re not the bombdotcom!”)

Page 26: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

Programming Language Structure: Statements Instructions that you write, which consists of

keywords, operators, etc. All statements you write while programming is

referred to as “code” or “source code”

Page 27: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

Programming Language Structure: Comments The user can input comments into their code These comments are for the user to communicate

to another human who might be reading through their code

This does not effect the program # First, I will ask the user for their name

# I will then store it in a variable called “x”

x = input (“What is your name?”)

# Now, I will print the name of the user

print (x)

Page 28: Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task

Python Languages are interchangeable in concept,

different words, just like our human languages This year, we will be learning a language called

Python It is a high-level interpreted language Used often as a teaching language, but still very

powerful and used as a production language as well Two modes:

Interactive

Script

IDLE (Integrated Development Environment)