Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task."— Presentation transcript:

1 Software Development

2 Software Development Loop

3 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

4 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

5 What can happen …

6 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!

7 Boiling a pot of water

8  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

9 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

10 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

11 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.

12 Flowcharts  A graphical model that helps programmers visualize the task at hand  Like a decision tree

13

14 Software Development Loop

15 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.)

16 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

17 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”

18 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

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

20 What’s the solution … ?

21 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.

22 High Level Languages JAVA System.out.println (“Hello, World!”); Hello, World! PYTHON print (“Hello, World!”) Hello, World!

23 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

24 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

25 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!”)

26 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”

27 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)

28 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)


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

Similar presentations


Ads by Google