Enviar búsqueda
Cargar
Week10style
•
0 recomendaciones
•
179 vistas
hccit
Seguir
Tecnología
Denunciar
Compartir
Denunciar
Compartir
1 de 16
Descargar ahora
Descargar para leer sin conexión
Recomendados
Writing Clean Code (Recommendations by Robert Martin)
Writing Clean Code (Recommendations by Robert Martin)
Shirish Bari
Python Programming language
Python Programming language
HadeelAlbedah
DIG1108 Lesson 7
DIG1108 Lesson 7
vc-dig1108-fall-2013
Git branching policy and review comment's prefix
Git branching policy and review comment's prefix
Kumaresh Chandra Baruri
Code review
Code review
dqpi
Introduction to Python Programming
Introduction to Python Programming
Akhil Kaushik
Functional programming
Functional programming
PiumiPerera7
Solid principles
Solid principles
Kumaresh Chandra Baruri
Recomendados
Writing Clean Code (Recommendations by Robert Martin)
Writing Clean Code (Recommendations by Robert Martin)
Shirish Bari
Python Programming language
Python Programming language
HadeelAlbedah
DIG1108 Lesson 7
DIG1108 Lesson 7
vc-dig1108-fall-2013
Git branching policy and review comment's prefix
Git branching policy and review comment's prefix
Kumaresh Chandra Baruri
Code review
Code review
dqpi
Introduction to Python Programming
Introduction to Python Programming
Akhil Kaushik
Functional programming
Functional programming
PiumiPerera7
Solid principles
Solid principles
Kumaresh Chandra Baruri
Code Inspection
Code Inspection
Fáber D. Giraldo
Code Review
Code Review
Divante
Unit tests benefits
Unit tests benefits
Kate Semizhon
Microservices
Microservices
Đức Giang Nguyễn
Diffy : Automatic Testing of Microservices @ Twitter
Diffy : Automatic Testing of Microservices @ Twitter
Puneet Khanduri
YAGNI Principle and Clean Code
YAGNI Principle and Clean Code
Luan Reffatti
Coding standards
Coding standards
Mimoh Ojha
Introduction to Pseudocode
Introduction to Pseudocode
SabahtHussein
PART 10 - Python Tutorial | Functions In Python With Examples
PART 10 - Python Tutorial | Functions In Python With Examples
Shivam Mitra
Code Review
Code Review
Lukas Rypl
Chapter 7 review questions
Chapter 7 review questions
loayshabaneh
Code Review
Code Review
R M Shahidul Islam Shahed
Chapter 8 review questions
Chapter 8 review questions
loayshabaneh
Best Practices of Software Development
Best Practices of Software Development
Folio3 Software
PART 0 - Python Tutorial | Why should you learn python
PART 0 - Python Tutorial | Why should you learn python
Shivam Mitra
Unit testing in PHP
Unit testing in PHP
Chonlasith Jucksriporn
Clean code - Getting your R&D on board
Clean code - Getting your R&D on board
Ruth Sperer
Code Review
Code Review
Mikalai Alimenkou
Python programming introduction
Python programming introduction
Siddique Ibrahim
An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1
Blue Elephant Consulting
Ddp pp1
Ddp pp1
Zac Rossman
Tipos de educación
Tipos de educación
Obed Chavez
Más contenido relacionado
La actualidad más candente
Code Inspection
Code Inspection
Fáber D. Giraldo
Code Review
Code Review
Divante
Unit tests benefits
Unit tests benefits
Kate Semizhon
Microservices
Microservices
Đức Giang Nguyễn
Diffy : Automatic Testing of Microservices @ Twitter
Diffy : Automatic Testing of Microservices @ Twitter
Puneet Khanduri
YAGNI Principle and Clean Code
YAGNI Principle and Clean Code
Luan Reffatti
Coding standards
Coding standards
Mimoh Ojha
Introduction to Pseudocode
Introduction to Pseudocode
SabahtHussein
PART 10 - Python Tutorial | Functions In Python With Examples
PART 10 - Python Tutorial | Functions In Python With Examples
Shivam Mitra
Code Review
Code Review
Lukas Rypl
Chapter 7 review questions
Chapter 7 review questions
loayshabaneh
Code Review
Code Review
R M Shahidul Islam Shahed
Chapter 8 review questions
Chapter 8 review questions
loayshabaneh
Best Practices of Software Development
Best Practices of Software Development
Folio3 Software
PART 0 - Python Tutorial | Why should you learn python
PART 0 - Python Tutorial | Why should you learn python
Shivam Mitra
Unit testing in PHP
Unit testing in PHP
Chonlasith Jucksriporn
Clean code - Getting your R&D on board
Clean code - Getting your R&D on board
Ruth Sperer
Code Review
Code Review
Mikalai Alimenkou
Python programming introduction
Python programming introduction
Siddique Ibrahim
An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1
Blue Elephant Consulting
La actualidad más candente
(20)
Code Inspection
Code Inspection
Code Review
Code Review
Unit tests benefits
Unit tests benefits
Microservices
Microservices
Diffy : Automatic Testing of Microservices @ Twitter
Diffy : Automatic Testing of Microservices @ Twitter
YAGNI Principle and Clean Code
YAGNI Principle and Clean Code
Coding standards
Coding standards
Introduction to Pseudocode
Introduction to Pseudocode
PART 10 - Python Tutorial | Functions In Python With Examples
PART 10 - Python Tutorial | Functions In Python With Examples
Code Review
Code Review
Chapter 7 review questions
Chapter 7 review questions
Code Review
Code Review
Chapter 8 review questions
Chapter 8 review questions
Best Practices of Software Development
Best Practices of Software Development
PART 0 - Python Tutorial | Why should you learn python
PART 0 - Python Tutorial | Why should you learn python
Unit testing in PHP
Unit testing in PHP
Clean code - Getting your R&D on board
Clean code - Getting your R&D on board
Code Review
Code Review
Python programming introduction
Python programming introduction
An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1
Destacado
Ddp pp1
Ddp pp1
Zac Rossman
Tipos de educación
Tipos de educación
Obed Chavez
Diário Oficial de Guarujá
Diário Oficial de Guarujá
prefeituraguaruja
En la esquina
En la esquina
Laura Castrillon
Week09
Week09
hccit
Week06
Week06
hccit
Desafio de ser docente
Desafio de ser docente
Mauricio Enrique Crespin Lopez
English workout visual
English workout visual
joneskyr
Q7
Q7
JNLMARIE
C has zemli_2013_dlja_shkol
C has zemli_2013_dlja_shkol
Городской методический центр ЗАО г.Москвы
Entorno de trabajo de power point,,alejandra lara suñiga
Entorno de trabajo de power point,,alejandra lara suñiga
alejandralara1996
Sdec boletin febrero 2013
Sdec boletin febrero 2013
difusion_LEF_BINE
Ags,anticuerpos,hla 11
Ags,anticuerpos,hla 11
elvis treminio
pengertian, objek kajian, tujuan dan manfaat studi Masail fiqhiyah
pengertian, objek kajian, tujuan dan manfaat studi Masail fiqhiyah
Diyach Ashfye
Is your buidling an asset alan trauger
Is your buidling an asset alan trauger
Alan Trauger
Abr13 boletin del cepails
Abr13 boletin del cepails
Guillermo Martínez Belloni
Fdi ch.7
Fdi ch.7
Somil Gupta
Social realism
Social realism
Jessika Anderson
Week07
Week07
hccit
Week08
Week08
hccit
Destacado
(20)
Ddp pp1
Ddp pp1
Tipos de educación
Tipos de educación
Diário Oficial de Guarujá
Diário Oficial de Guarujá
En la esquina
En la esquina
Week09
Week09
Week06
Week06
Desafio de ser docente
Desafio de ser docente
English workout visual
English workout visual
Q7
Q7
C has zemli_2013_dlja_shkol
C has zemli_2013_dlja_shkol
Entorno de trabajo de power point,,alejandra lara suñiga
Entorno de trabajo de power point,,alejandra lara suñiga
Sdec boletin febrero 2013
Sdec boletin febrero 2013
Ags,anticuerpos,hla 11
Ags,anticuerpos,hla 11
pengertian, objek kajian, tujuan dan manfaat studi Masail fiqhiyah
pengertian, objek kajian, tujuan dan manfaat studi Masail fiqhiyah
Is your buidling an asset alan trauger
Is your buidling an asset alan trauger
Abr13 boletin del cepails
Abr13 boletin del cepails
Fdi ch.7
Fdi ch.7
Social realism
Social realism
Week07
Week07
Week08
Week08
Similar a Week10style
Week12
Week12
hccit
Week05
Week05
hccit
Slides chapters 13-14
Slides chapters 13-14
Priyanka Shetty
Software testing
Software testing
Enamul Haque
How to Actually DO High-volume Automated Testing
How to Actually DO High-volume Automated Testing
TechWell
Software testing
Software testing
Bala Ganesh
Automation Testing theory notes.pptx
Automation Testing theory notes.pptx
NileshBorkar12
Introduction of Software Engineering
Introduction of Software Engineering
Zafar Ayub
Engineering Software Products: 9. testing
Engineering Software Products: 9. testing
software-engineering-book
SE - Lecture 8 - Software Testing State Diagram.pptx
SE - Lecture 8 - Software Testing State Diagram.pptx
TangZhiSiang
Indy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-mule
ikram_ahamed
How to Test PowerShell Code Using Pester
How to Test PowerShell Code Using Pester
Chris Wahl
Test What Matters Most
Test What Matters Most
Remedy IT
Dev buchan 30 proven tips
Dev buchan 30 proven tips
Bill Buchan
DSR Testing (Part 1)
DSR Testing (Part 1)
Steve Upton
lab1.ppt
lab1.ppt
NaveenKumar934092
Six simple steps to unit testing happiness
Six simple steps to unit testing happiness
Steven Feuerstein
Unit Testing
Unit Testing
Anuj Arora
Transferring Software Testing Tools to Practice
Transferring Software Testing Tools to Practice
Tao Xie
The Professional Programmer
The Professional Programmer
Dave Cross
Similar a Week10style
(20)
Week12
Week12
Week05
Week05
Slides chapters 13-14
Slides chapters 13-14
Software testing
Software testing
How to Actually DO High-volume Automated Testing
How to Actually DO High-volume Automated Testing
Software testing
Software testing
Automation Testing theory notes.pptx
Automation Testing theory notes.pptx
Introduction of Software Engineering
Introduction of Software Engineering
Engineering Software Products: 9. testing
Engineering Software Products: 9. testing
SE - Lecture 8 - Software Testing State Diagram.pptx
SE - Lecture 8 - Software Testing State Diagram.pptx
Indy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-mule
How to Test PowerShell Code Using Pester
How to Test PowerShell Code Using Pester
Test What Matters Most
Test What Matters Most
Dev buchan 30 proven tips
Dev buchan 30 proven tips
DSR Testing (Part 1)
DSR Testing (Part 1)
lab1.ppt
lab1.ppt
Six simple steps to unit testing happiness
Six simple steps to unit testing happiness
Unit Testing
Unit Testing
Transferring Software Testing Tools to Practice
Transferring Software Testing Tools to Practice
The Professional Programmer
The Professional Programmer
Más de hccit
Snr ipt 10_syll
Snr ipt 10_syll
hccit
Snr ipt 10_guide
Snr ipt 10_guide
hccit
3 d modelling_task_sheet_2014_yr12
3 d modelling_task_sheet_2014_yr12
hccit
3 d modelling_task_sheet_2014_yr11
3 d modelling_task_sheet_2014_yr11
hccit
10 ict photoshop_proj_2014
10 ict photoshop_proj_2014
hccit
Photoshop
Photoshop
hccit
Flash
Flash
hccit
University partnerships programs email
University partnerships programs email
hccit
Griffith sciences pathway programs overview
Griffith sciences pathway programs overview
hccit
Griffith info tech brochure
Griffith info tech brochure
hccit
Pm sql exercises
Pm sql exercises
hccit
Repairs questions
Repairs questions
hccit
Movies questions
Movies questions
hccit
Australian birds questions
Australian birds questions
hccit
Section b
Section b
hccit
B
B
hccit
A
A
hccit
Section a
Section a
hccit
Ask manual rev5
Ask manual rev5
hccit
Case study report mj
Case study report mj
hccit
Más de hccit
(20)
Snr ipt 10_syll
Snr ipt 10_syll
Snr ipt 10_guide
Snr ipt 10_guide
3 d modelling_task_sheet_2014_yr12
3 d modelling_task_sheet_2014_yr12
3 d modelling_task_sheet_2014_yr11
3 d modelling_task_sheet_2014_yr11
10 ict photoshop_proj_2014
10 ict photoshop_proj_2014
Photoshop
Photoshop
Flash
Flash
University partnerships programs email
University partnerships programs email
Griffith sciences pathway programs overview
Griffith sciences pathway programs overview
Griffith info tech brochure
Griffith info tech brochure
Pm sql exercises
Pm sql exercises
Repairs questions
Repairs questions
Movies questions
Movies questions
Australian birds questions
Australian birds questions
Section b
Section b
B
B
A
A
Section a
Section a
Ask manual rev5
Ask manual rev5
Case study report mj
Case study report mj
Último
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
LoriGlavin3
2024 April Patch Tuesday
2024 April Patch Tuesday
Ivanti
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
Mydbops
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
fnnc6jmgwh
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
Nathaniel Shimoni
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
Wes McKinney
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Pim van der Noll
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
Pixlogix Infotech
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
TopCSSGallery
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
Hiroshi SHIBATA
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
Inflectra
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Nikki Chapple
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
panagenda
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
ThousandEyes
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
IES VE
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
Knoldus Inc.
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
Pixlogix Infotech
A Framework for Development in the AI Age
A Framework for Development in the AI Age
Cprime
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
Kari Kakkonen
Último
(20)
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
2024 April Patch Tuesday
2024 April Patch Tuesday
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
A Framework for Development in the AI Age
A Framework for Development in the AI Age
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
Week10style
1.
Week 10 Tracing, Testing, Debugging,
API Design
2.
© 2004 Pearson
Addison-Wesley. All rights reserved 5-2 Copyright Warning COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been copied and communicated to you by or on behalf of Bond University pursuant to Part VB of the Copyright Act 1968 (the Act). The material in this communication may be subject to copyright under the Act. Any further copying or communication of this material by you may be the subject of copyright protection under the Act.
3.
© 2004 Pearson
Addison-Wesley. All rights reserved 5-3 Robust Programs • We have seen that our programs can be fragile • Programs also need to be read by humans so they can be fixed and extended • This week we are looking at techniques to make our programs more robust, and more easily understood by other programmers • We will be looking at: – Tracing, debugging and unit testing – Good API design
4.
© 2004 Pearson
Addison-Wesley. All rights reserved 5-4 Why Do Programs Have Bugs? • Programs have bugs for several reasons: – Computers DWIS not DWIM – Inputs can have any or all possible values – We don't understand the language subtleties – Our understanding of the interfaces between the modules in our program, and with external modules, is wrong • Let's look at some ways of combatting these problems
5.
© 2004 Pearson
Addison-Wesley. All rights reserved 5-5 Tracing Programs • We don't think like a computer, but to write good programs we need to. • Tracing a program means to step through some code, by hand, and track all the variable values and decisions made, to ensure that the code is doing exactly what it should be doing. • If we don't understand our own code, we can fall into the trap of shotgun debugging: making random changes in the hope that any problems will disappear.
6.
© 2004 Pearson
Addison-Wesley. All rights reserved 5-6 Tracing Programs • Trace the following code when it is given the input “Paul McCartney” public static String changeString(String s) { String x = ""; for (int i=0; i < s.length(); i += 2) { if (s.charAt(i) < 'M') x = x + "."; x = x + Character.toUpperCase( s.charAt(i) ); } return(x); }
7.
© 2004 Pearson
Addison-Wesley. All rights reserved 5-7 Tracing Programs • Why tracing? • It forces us to read each line of code, think about what it is doing, why it is there, and what side effects each line has • It also makes us do things slowly • We will focus more deeply on the code • Sometimes, we also reflect on questions such as the quality of the code, could it be done better etc.
8.
© 2004 Pearson
Addison-Wesley. All rights reserved 5-8 Debugging Programs • Debugging is like tracing but the computer looks after the display of variables and the stepping through the code • Don't start at main(). Try to identify where the bug is, and debug from just before the bug • Learn how to: – Set up breakpoints (stop signs) – Step over lines of code – Visualise the variables' values – Step over, and into, methods
9.
© 2004 Pearson
Addison-Wesley. All rights reserved 5-9 Debugging Programs • Find the bug(s) in this method: // Return the position of the first ch in the String, // or return -1 if ch is not in the String. public static int findLetter(String str, char ch) { for (int i=0; i <= str.length(); i++) if (str.charAt(i) == ch) return(i); return(-1); }
10.
© 2004 Pearson
Addison-Wesley. All rights reserved 5-10 Methods and Inputs • Every method has a declaration, which is its contract: if you give me this input, I promise to return this value • Inputs, regardless of where they come from, are problematic • If an input is of type X, any valid X value may come in as input: int: zero, negative values, large values floats: 0.0, INFINITY, very small values Strings: empty String, null char: non-printable chars, non-English chars
11.
© 2004 Pearson
Addison-Wesley. All rights reserved 5-11 Unit Testing • All large programs have bugs: usual estimate is 1 bug per 100 lines of code • Most bugs are logic bugs: the programmer thinks it works, but the code does something different • It's nearly impossible to tell if a program is 100% bug-free • Implication: programs should be tested thorougly to give assurance there are no bugs • Unit testing: test a method with a large set of inputs, to ensure that it produces the correct output • The test set is designed to stress the method as much as possible
12.
© 2004 Pearson
Addison-Wesley. All rights reserved 5-12 Unit Testing • You should design the method interface first • THEN, construct a suitable test set for it Include good and bad inputs • ONLY THEN, write the actual method code • Once you think you have written the method, you can then test the method with the unit tests • “Coding isn't complete until all the unit tests pass” • ALWAYS generate the tests by hand. Don't use a program to generate the test set. Why not? • Bluej provides a framework to construct unit tests. • You will see it in the labs, and you will be assessed on unit testing
13.
© 2004 Pearson
Addison-Wesley. All rights reserved 5-13 Unit Test Example • Design the declaration of a method isATriangle() • Given 3 side lengths, return true if they represent a triangle, false otherwise • Create a set of unit tests (inputs, output) that you can use to test the method. • In BlueJ, write the method to always return false So we can write the unit tests, which will fail • Now go and write the code. • Once all the unit tests pass, you now have confidence that the code works
14.
© 2004 Pearson
Addison-Wesley. All rights reserved 5-14 API Design • A method provides an interface: name, inputs, output • A Java class provides a set of interfaces, known as an API: application program interface • APIs can be designed well, or extremely bad • Here are some tips on good API design • Names mean everything. Choose wisely • Methods perform actions. Use action names, e.g. getUserName() not UserName() • Make it obvious if a method is a getter or a setter • Boolean methods: use “Is”, e.g. isEnrolled()
15.
© 2004 Pearson
Addison-Wesley. All rights reserved 5-15 API Design • Method arguments: keep consistent order across the methods in the API, e.g. (hroom, wroom) in Assignment 2. • Make it hard for user to get wrong, easy to get right e.g if method takes 2 ints and a char, make it method(int, char, int), so hard to get the ints the wrong way around • Encapsulation: private data, public methods, public constants, private helper methods
16.
© 2004 Pearson
Addison-Wesley. All rights reserved 5-16 API Design • A method provides an interface: name, inputs, output • Clear and concise documentation at the top of each method tells the user what it does, and how it deals with input errors. • Design a clear description of the isATriangle() method
Descargar ahora