Debugging - PowerPoint PPT Presentation

1 / 58
About This Presentation
Title:

Debugging

Description:

???? ?? ???????? ????? ?????? ????? ????? ?????? ???? ????? ?????? ... ???? ????? ???? ?????? ??????? ??????? (?? ?? ??? ????? ????? ... on: Mullet, D. ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 59
Provided by: eduTech
Category:
Tags: debugging | mullet

less

Transcript and Presenter's Notes

Title: Debugging


1
???? ?????? ???-????? ????? ?? ???? ??????
????? ????? ?????? ???? ?????
  • ????? ???
  • ?????? ?????? ?????????? ???????
  • 21.10.2003

2
???? ?????? ???-????? ????? ?? ???? ??????
????? ????? ?????? ???? ?????
  • ???? ?? ???????? ????? ?????? ????? ????? ??????
    ???? ????? ?????? ?????.
  • 3 ???????
  • Debugging
  • Reducing abstraction
  • ????? ????????? ?? ??????????? ????? ?????
  • 3 ????? ???? ?????? ?? ??? ???

3
?????
  • ????' ???? ?????
  • ?"? ????? ????
  • ????' ???? ???????
  • ???????? ???????

4
Take Home Lessons
  • Take home lesson 1
  • ???? ????? ???? ?????? ??????? ???????
  • (?? ?? ??? ????? ????? ?? ???? ????)
  • Take home lesson 2
  • ????? ??? ??????? ?? ??????

5
???? ?????? ???-????? ????? ?? ???? ??????
????? ????? ?????? ???? ?????
  • ???? ????? ?????? ???? ????? ?????? ????? ?????
  • ???? ?????? ????? ??? ???? ???? ?????
  • ?????? ???????? ????? ??????? ???? ???????
  • ???? ?? ???????? ????? ?????? ????? ????? ??????
    ???? ????? ?????? ?????

6
Debugging
7
Debugging - Background
  • ?????? ?? ?"? ????? ????
  • ????? ????????? ???? ??? ?????? ????? ?????
    (????? ?', ???"?)
  • ??? ?????????
  • ???? ???? ???????? ?????? ??? ???? ??????
  • ????? ????

8
??????
  • ?? (????, ?? ????) ____________________
  • ????? ??????? ________ ?????? ________
  • ??? ? / ?
  • ????? ????? ???? "???? ????? ?????"?
  • ?' ???"? ?' ???"? ?' ???"?
    ????-??

9
?????? (????)
  • ?????? ????? ??? ??????? ????? ?? ????? ??????
    ?? ??? ???????? ?? ???? ????? ?????.
  • ?. ?? ?? "???? ?????" ??????
  • ?. ???, ?????, 3 ??????? ??????? ????? ?????
    ??????
  • ?. ???, ?????, 3 ????????? ???????? ???????
    ????? ??????? ????? ??????
  • ?. ??? 3 ?"?????" ????? ????? ??????? ?????
  • ?. ??? 3 ?"?????" ????? ????? ????? ?????? ?????

10
?????? (????)
  • ?. ???, ?????, ????? ???????? ???????? ??? ??????
    ????? ?????? ????? ??????
  • ?. ??? ???? ?? ?? ???? ?????? ???? ?????? ??
    ?????? ?? ?? ??? ????? ??? ??? ????? ???? ?????
    ??? ???? ?? ?? ???? ????? ?????? ??????? ?????,
    ??? ????/? ????? ?? ?????? ??????? ?????? ??????
    ??????? ?????.

11
?????? (????)
  • ?. ???? ??????? ???? ??????. ???? ?? ??? ??? ??
    ?????? ??? ??? ???? ?? ?? ("??? ???? ????" ??
    "??? ?? ???? ????") ????? ????.
  • ????? ??????
  • ????????
  • Abstract data types
  • ???? ????????? (?????????, ????????)
  • ?? ????? ???
  • Top down design
  • ???????

12
?????? - ?????
  • Three perspectives
  • Conceptual perspective Students conceive of
    computer science to be more than just the
    computer
  • Affective perspective Students are discouraged
    by the debugging process
  • Social perspective Students are unfamiliar with
    software failure but are aware of software power

13
??? 3 ?"?????" ????? ????? ????? ?????? ?????
  • ?????? ?????? debugging (21 ???? 71 ????????)
  • ?????? ????? ???? ??????? (9 ????????)
  • Debugging ?????? ?????? ?????? ?????? ?????

14
2 characteristics of debugging
  • Debugging is a sporadic process
  • Francel and Rugaber (2001) No best method for
    debugging programs is known.
  • After about 50 years of software development.
  • Debugging is disruptive activity
  • ??????? ?????? ?????
  • ???? ?????? ?"? ???????? ?????? ????? ?????????
    ?????? ?????

15
Why do students dislike debugging?
  • Debugging is a sporadic process
  • Students are taught to solve problems
    systematically.
  • Problems they are asked to solve have an
    algorithm for solving them.
  • In mathematics education "students feel very
    strongly that mathematics always gives a rule to
    follow to solve problems." (Carpenter, Lindquist,
    Matthews and Silver, 1983, p. 656-657).

16
Why do students dislike debugging?
  • Debugging is a sporadic process
  • These mathematical habits are borrowed to
    computing
  • There is no ONE process for debugging
  • There is a lot of uncertainty in the debugging
    process

17
Why do students dislike debugging?
  • Debugging is disruptive activity
  • In contrast to code writing, the debugging
    process does not lead one to his/her target.

18
Why do students dislike debugging?
  • Debugging is disruptive activity
  • Polya 4 stages of problem solving.
  • First, we have to understand the problem .
    Second, we have to see how the various items are
    connected, how the unknown is linked to the data,
    in order to make a plan. Third, we carry out
    our plan. Fourth, we look back at the completed
    solution, we review it and discuss it. (pp. 5-6,
    italics in the original).

19
Why do students dislike debugging?
  • Debugging is disruptive activity
  • Polya about looking back
  • even fairly good students, when they have
    obtained the solution of the problem and written
    down neatly the argument, shut their books and
    look for something else. Doing so, they miss an
    important and instructive phase of the work. By
    looking back at the completed solution, by
    reconsidering and reexamining the result of the
    path that led to it, they could consolidate their
    knowledge and develop their ability to solve
    problems. (p. 14-15).

20
Why do students dislike debugging?
  • Debugging is disruptive activity
  • Based on other questions freshmen recognize the
    importance of Polyas first three stages
  • understanding the problem
  • planning the solution (design)
  • and carrying it out (coding)

21
Why do students dislike debugging?
  • Debugging is a sporadic process
  • Debugging is disruptive activity

22
Why do students dislike debugging?
  • Schoenfeld (Mathematical Problem Solving)
  • A theory of knowledge and behavior necessary for
    an adequate characterization of mathematical
    problem-solving performance.
  • The framework consists of four elements
  • Resources
  • Heuristics
  • Control
  • Belief Systems

23
Why do students dislike debugging?
  • Schoenfeld (Mathematical Problem Solving)
  • ???? ????? ?? ?????? ?? ?????? ?????? ?????? ????
    ???????? ???????? ?? ????? ?- debugging.
  • Belief system Freshmen dislike debugging because

24
????? debugging
  • ??????? ?????? ?????
  • ????? ??????? ?????? ?????? ????? ?????????
    ?????? ?????

25
????? ??? ?????
26
????? ??? ????? Reducing Abstraction
  • ?????? ???????
  • ????? ?????????, Grounded theory
  • Reducing abstraction (????? ??? ?????)
  • ???????? ??????? ?? ??? ??????
  • ?????? ?????? ????? ??? ?????? ??????? ???????
  • ?????? ????? ?? ???? ?????? ???? ?????? ?
    ????????, ??????? ????????????, School
    Mathematics.

27
????? ??? ????? Reducing Abstraction
  • 3 ????? ?????? ??? ?????? (????? ?? ????)
  • Abstraction level as the quality of the
    relationships between the object of thought and
    the thinking person
  • Abstraction level as the degree of complexity of
    the concept of thought
  • Abstraction level as reflection of the
    process-object duality (will be illustrated)

28
????? ??? ????? Reducing Abstraction
  • Abstraction level as reflection of the
    process-object duality
  • Theories which mainly distinguish between a
    process conception and a object conception.
    (Breidenbach et al, 1992 Douady, 1985 Dubinsky,
    1991 Dubinsky et al, 1994 Sfard, 1991, 1992)
  • Process conception of a mathematical entity
    reflects a lower abstraction level than its
    conception as an object. (Beth Piaget, 66).

29
????? ??? ????? Reducing Abstraction
  • Abstraction level as reflection of the
    process-object duality
  • ????? ??????? ??? ???? ????? ?????? ?????????
    ?????? ????????? ??????
  • ?????? ????? "???????" ?????? ??? ????? ?? ?????.
  • ?????? ????? ????? ?? ??????.
  • ????????? ??????? ?????? ????? ????? ???? ????
    ?????? ?? ?????? (??????), ??? ????? ?????? ?"?
    ????????? ???????.
  • ????? ?????? ?????? ?????? ???? ?????? ?????????.
  • The level of abstraction is reduced

30
????? ??? ????? Reducing Abstraction
  • Abstraction level as reflection of the
    process-object duality
  • ????? ??????? ??????? ????? ?? ???????? ????? ??
    ????????? ??????? ?? ???? ??????? ??????? ??????
    ??????.

31
????? ??? ????? Reducing Abstraction
  • ??? ???? ????? ????? ?? ???? ??????? ??????
    "???, ?? ???? ??????? ?????? ?????? ?? ??????
    ??????? ????. ... ?????? ?? ???? ??? ?????
    ??????? ?????? ?? ??????? ?????? ?? ?.... ??????
    ?? ?????? ???????. ??? ?????? ???? ???? ????
    ??????? ????. ?? ???? ???? ?? ???? ?????'".

32
????? ??? ????? Reducing Abstraction
  • ???, ???? ??? ????? ????? ?????? ?? ??-?????
    ?????? ???????, ??? ???? ?? ???? ???????? ???
    ????? ??-?? ???????? ??????.
  • ???? ????? ???? ?? ??????? ?? ??-??????
  • 1, 2, 4?- Z7-0 ???? ???? ?????? 7, ???
    ???? ?? ????? ?? ?? ??? ???? ????? ??????. ??
    ???? ??? ???? ?? ?? ??? ?????? ????? ??? ????
    ???? ?? ?????.

33
????? ??? ????? Reducing Abstraction
  • ????? ????? ???? ?????? ????? ????????? ??????.
  • ????? ????? ???? ???? ????? ??????.
  • ??? ?? ??? ?? ??? ????????? ?????? ??
    ???????????. ?????? ????? ????? ?? ????.
  • ????? ??? ??????.

34
????? ??? ????? Reducing Abstraction
  • Abstraction level as reflection of the
    process-object duality
  • ????? ????? ?????????
  • ?????, ???? ???????
  • ????? ????' ???? ???????
  • ??????
  • ????? ??? ??"? ?????? ????????? ?? ????? ???
    ????? ??? ????? ?? ??? ???.

35
????? ??? ????? Reducing Abstraction
  • ???? ???? ?????, 4 ?????, ?? ??? ?????? ?- 2
    ?????. ??? ??? 12.5 ??????.
  • ?????? 4 ????. ???? ?? ??? ?? ?????? ???
  • a)      Is Li ? R?
  • b)      Is Li ? RE?
  • ??????? ?? ?????.

36
Some Computability Theory
  • A recursive (decidable) language L is a language
    for which a Turing machine that accepts it and
    halts on all inputs, exists If w ? L then the
    Turing machine halts in state qaccept if w ? L
    then the Turing machine halts in state qreject.
  • A language L is a recursively enumerable (r.e.)
    language if a Turing machine that accepts it,
    exists For all w ? L, the Turing machine halts
    in qaccept for all w ? L the Turing machine
    either halts in state qreject or never halts.

37
Some Computability Theory (Cont.)
  • Using set terminology
  • R L L is decidable
  • RE L A Turing machine that accepts L,
    exists.
  • For determining whether a language belongs to R
    or to RE, one has to understand the nature of the
    language.
  • The better one understands the nature of a given
    language, the better one may determine to what
    category it belongs. Then, based on this
    analysis, one has to choose a method for proving
    ones claim.

38
Show strong need for canonical procedures
  • Three main methods for solving the exam
  • Constructing a Turing machine that accepts L (to
    show that L ? RE) or a Turing machine that
    accepts L and halts on all inputs (to show that L
    ? R).
  • Using Rice theorem Rice theorem provides
    criteria for concluding for a given language L of
    a certain form that L ? R , RE.
  • Defining a reduction between two languages L and
    L, for one of which it is known that it is or
    it is not in R or in RE. (a reduction from L to
    L indicates that L is at least as hard as
    L.)

39
Rice Theorem
  • Let S be a non-trivial property of languages
    in RE.
  • Then Ls ltMgt L(M) ? S ? R.
  • If ? ? S then Ls ? RE.

40
Show strong need for canonical procedures
  • L3 ltMgt ? M, ltMgt ? L(M) ? L(M) ? ?
  • L3 ? RE \ R
  • For proving that L3 ? R students could
  • use Rice theorem or
  • define of a reduction from a language which is
    not in R
  • A comparison of the details involved in these
    solutions indicates that relying on Rice theorem
    should be a simpler and shorter process.
  • Similar to the case of Abstract Algebra.

41
Solving Question 3AStudents prefer building a
reduction over using Rice theorem
  • No. of students who used Rice theorem 36.
  • No. of students who built a reduction 72.
  • The students used different languages as the
    source language of the reduction.
  • HP 45 students
  • L(?) or (L?) 12 (Note The symbol
    represents set complement.)
  • Ld 12
  • Lu 3

42
Show strong need for canonical procedures
  • ??????????? ?? HP ????? ????????
  • ???? ????? ???????? ????? ????? ?? ????????.
  • ???? ????
  • ????? ???????? ?????? ????? ?????? ???? ?????
    ??????? ?- HP.
  • ???? ????? ?? ???????? ?????? ??????? ???? ????
    ??????.

43
Show strong need for canonical procedures
  • ???? "????? ???? ??????? ?- HP ??? ???? ?? ?????
    ??? ????, ???? ??? ????? ????? ??? ?? ?????.
    ... ????? ???? ????? ????? ????? ????? ??????,
    ????? ???? ?? ??????, ??????? ?????? ??? ????? ??
    ?????????? ?? ???? ?- RE ??? ?????? ????? ????),
    ??? ???? ???? ??????? ?- HP".
  • ??????????? "???? ????? ??????? ?- HP ?????
    ??????? ???? ??????? ??????? ???? ??????."
  • ????? ???????? ?????? ????? ????? ?????? ?????
    ??? ?????.

44
????? ??? ????? Reducing Abstraction
  • ?????
  • ????? ?? ????? ???????? ?????? ????? ?????? ????
    ?????? ??????? (?????? ???????) ?????? ????
    ?????? ????? ????? (???? ????????).

45
????? ????????? ?? ?????????? ????? ?????
46
????? ????????? ?? ?????????? ????? ?????
  • ????? ?????
  • ??????? ????? ?????
  • ????? ????? ?? ?????? ?????????? ??? ??????
    ??????.

47
???????? ????? ??????
  • 75 ?????? ?????? ??????? ??????? ??????? ??????
    ??????? ?? ????? ?????? ??? ?? ????? ???????
    ??????? ???????.
  • Based on Mullet, D. (July, 1999). The
    Software Crisis, Benchmarks Online - a monthly
    publication of Academic Computing Services 2(7).
  • ???? ?????? ?? ????? ?????? ????"? ????? ??? ???
    ?- 59.5??????
  • The National Institute of Standards and
    Technology (NIST), New Release of June 28, 2002.
  • ??????? ?- Q2 ?? 2003 ?????? ????"? ?????? 200
    ??????

48
Why is software complex?
  • many of the things we make with software today
    are more complex than most buildings and, as in
    building design, software design embraces many
    aspects function, safety, human interface,
    ergonomics, graphics, algorithms, data structure,
    program structure, protocol, and application
    interface, among others. (Singer, 1994).

49
??????????? ????? ?????
  • Heavyweight Methodologies
  • Agile Software Development Methodologies
  • SCRUM, Feature Driven Development, DSDM
  • http//agilemanifesto.org/
  • Individuals and interactions over processes and
    tools
  • Working software over comprehensive documentation
  • Customer collaboration over contract negotiation
  • Responding to change over following a plan
  • eXtreme Programming The most accepted agile SDMs

50
Why XP?
  • Survey
  • 31 XP/Agile-methods early adopter projects
  • 14 firms
  • Findings
  • Cost reduction 5-7 on average
  • Time to market compression 25-50 reduction

51
Why XP?
  • big companies using XP in at least some capacity
  • Ford Motor, Chrysler, IBM, HP
  • smaller software houses
  • Mayford Technologies
  • RoleModel Software
  • tutorials Industrial Logic, Object Mentor

52
Why XP?
  • ???? ????????? ?????? XP
  • ???? ?????????????? ?? XP
  • ???? ???? ????? ????? ????? ??? ????? ????? XP
    ????? ?????? ???? ??.
  • ?????????????
  • ??????? ??????? ?????? ?????
  • ??? ??? ???? ?????? ?? ???? ?????? ??????, ?"?
    ????? ?????? ????? ???????? ??????

53
What is XP?
  • Differences from traditional methodologies
  • Emphasis on people vs. development activities
    schedule
  • XP specifies how to behave still leaves freedom.
  • 12 practices
  • 4 values feedback, simplicity, communication,
    courage

54
XP Practices
55
????? ????????? ?? XP
  • ????? 4 ???? 12 ?????????? ?? XP ??? ???????
    ?????????????????.
  • ????? ?????????? ??? ?????? ????? ??????? ??
    ????? ??????.

56
XP practices - Cognitive analysis
  • Small releases
  • Gradual process of knowledge construction re
    requirements
  • Refactoring
  • Gradual process of knowledge construction re
    code's structure and readability
  • Test driven development
  • Metaphor

57
?????
  • ????? ?????? ?? ????? ????? ???????? ??????
    ?????? ?- debugging.
  • ????? ?? ??????? ?????? ?????? ???? ??????
    ??????? ??????? ?????? ???? ?????? ?????
    ?????????.
  • ????? ?? ??????? ?????????? ????? ?????? (?????)
    ????? ??????? ?????? ?????.

58
?????
  • Take home lesson 1
  • ??? ??? ???? ?????? ??????? ?????
  • Take home lesson 2
  • ???? ????? ???? ?????? ?????? ???????
  • Take home lesson 3
  • ????? ??? ??????? ?? ??????
  • Take home lesson 4
  • ????? ????? ?? ?????? ??????? ???????? ?????

59
?????
  • ???? ????? ??? ???????? ???? ?? ?? ??? ????????
  • ?????? ??? ?????? ?????
  • Special Issue on Import/Export Relationships to
    Computer Science Education Research
Write a Comment
User Comments (0)
About PowerShow.com