This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at:
https://youtu.be/KcFCcCsn6mM
Java Programming - Java is a general-purpose computer-programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible.
How do we document code? A good solution is to create self-explanatory code; this somewhat eliminates the need to document the code. We still need some very basic documentation. Code comments are one form of documentation, that is often misused. This talk is about self-explanatory code, the documentation we need and code comment patterns and anti-patterns.
Capability Building for Cyber Defense: Software Walk through and Screening Maven Logix
Dr. Fahim Arif who is the Director R&D at MCS, principal investigator and GHQ authorized consultant for Nexsource Pak (Pvt) Ltd) discussed the capability of building cyber defense in the Data Protection and Cyber Security event that was hosted recently by Maven Logix. In his session he gave the audience valuable information about the life cycle of a cyber-threat discussing what and how to take measures by performing formal code reviews, code inspections. He discussed essential elements of code review, paired programming and alternatives to treat and tackle cyber-threat
Java Programming - Java is a general-purpose computer-programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible.
How do we document code? A good solution is to create self-explanatory code; this somewhat eliminates the need to document the code. We still need some very basic documentation. Code comments are one form of documentation, that is often misused. This talk is about self-explanatory code, the documentation we need and code comment patterns and anti-patterns.
Capability Building for Cyber Defense: Software Walk through and Screening Maven Logix
Dr. Fahim Arif who is the Director R&D at MCS, principal investigator and GHQ authorized consultant for Nexsource Pak (Pvt) Ltd) discussed the capability of building cyber defense in the Data Protection and Cyber Security event that was hosted recently by Maven Logix. In his session he gave the audience valuable information about the life cycle of a cyber-threat discussing what and how to take measures by performing formal code reviews, code inspections. He discussed essential elements of code review, paired programming and alternatives to treat and tackle cyber-threat
Software coding & testing, software engineeringRupesh Vaishnav
Coding Standard and coding Guidelines, Code Review, Software Documentation, Testing Strategies, Testing Techniques and Test Case, Test Suites Design, Testing Conventional
Applications, Testing Object Oriented Applications, Testing Web and Mobile Applications, Testing Tools (Win runner, Load runner).
xTreme Programming by Sejo Ćesić and Enis ZeherovićBosnia Agile
Introduction to eXtreme Programming (XP) with interactive and practical examples of one of its main practices: Test Driven Development (TDD).
In the first part, we will lead you through the practices of XP and make you understand why XP has been revolutionary for the software development.
After that, we will provide a more in-depth view of TDD. By sharing the best practices we will give you concrete guidelines on how to apply TDD on your projects. The session is expected to be highly interactive, you are all welcome to bring your own ideas, questions and suggestions.
Good quality code is an essential property of a software because it could lead to financial losses or waste of time needed for further maintenance, modification or adjustments if code quality is not good enough.
Traditionally, DSLs have been targeted at "specialized programmers" or at least at people with a strong technical background such as engineers, mathematicians or scientists. However, DSLs can also be very useful for people who work in fields that are less technical, and more on the business side of the universe.
In this session we discuss our experiences in building DSLs for business people, i.e. non-IT people who know their respective domain well. These people are not necessarily experienced in structured (or even formal) representation of their expert knowledge, and might not even be experts in computer usage.
Over the last few years, Markus, Jos & Bernd have gained some valuable experience into the kinds of domains, people, languages, and notations that make this approach feasible. It turns out that the requirements for DSLs and the tools used can be quite different for business users. The goal of this session is to present this experience and start a discussion about how to move the field forward.
The experiences are taken from Bernd's and Markus's work with Intentional and Achmea Insurance, Jos's work for an insurance company in Porto, and Markus's and Bernd's work on the requirements language in mbeddr.
Generic Tools - Specific Languages (PhD Defense Slides)Markus Voelter
Generic Tools, Specific Languages (GTSL) is an approach for developing tools and applications in a way that supports easier and more meaningful adaptation to specific domains. To achieve this goal, GTSL generalizes programming language IDEs to domains traditionally not addressed by languages and IDEs. At its core, GTSL represents applications as documents/programs/models expressed with suitable languages. Application functionality is provided through an IDE that is aware of the languages and their semantics. The IDE provides editing support, and also directly integrates domain-specific analyses and execution services. Applications and their languages can be adapted to increasingly specific domains using language engineering; this includes developing incremental extensions to existing languages or creating additional, tightly integrated languages. Language workbenches act as the foundation on which such applications are built.
Tried putting things in the deck that I learnt about Extreme programming in XP Conference held in Bangalore. I have tried to keep it at very high level added with light moments, so that it doesn't getting boring and makes sense for most of us
This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at: https://www.youtube.com/watch?feature=player_embedded&v=_LxfIQuFALY
This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at:
http://youtu.be/6R8pZ5c82Uw
http://youtu.be/a2YtKMBfVgg
Software coding & testing, software engineeringRupesh Vaishnav
Coding Standard and coding Guidelines, Code Review, Software Documentation, Testing Strategies, Testing Techniques and Test Case, Test Suites Design, Testing Conventional
Applications, Testing Object Oriented Applications, Testing Web and Mobile Applications, Testing Tools (Win runner, Load runner).
xTreme Programming by Sejo Ćesić and Enis ZeherovićBosnia Agile
Introduction to eXtreme Programming (XP) with interactive and practical examples of one of its main practices: Test Driven Development (TDD).
In the first part, we will lead you through the practices of XP and make you understand why XP has been revolutionary for the software development.
After that, we will provide a more in-depth view of TDD. By sharing the best practices we will give you concrete guidelines on how to apply TDD on your projects. The session is expected to be highly interactive, you are all welcome to bring your own ideas, questions and suggestions.
Good quality code is an essential property of a software because it could lead to financial losses or waste of time needed for further maintenance, modification or adjustments if code quality is not good enough.
Traditionally, DSLs have been targeted at "specialized programmers" or at least at people with a strong technical background such as engineers, mathematicians or scientists. However, DSLs can also be very useful for people who work in fields that are less technical, and more on the business side of the universe.
In this session we discuss our experiences in building DSLs for business people, i.e. non-IT people who know their respective domain well. These people are not necessarily experienced in structured (or even formal) representation of their expert knowledge, and might not even be experts in computer usage.
Over the last few years, Markus, Jos & Bernd have gained some valuable experience into the kinds of domains, people, languages, and notations that make this approach feasible. It turns out that the requirements for DSLs and the tools used can be quite different for business users. The goal of this session is to present this experience and start a discussion about how to move the field forward.
The experiences are taken from Bernd's and Markus's work with Intentional and Achmea Insurance, Jos's work for an insurance company in Porto, and Markus's and Bernd's work on the requirements language in mbeddr.
Generic Tools - Specific Languages (PhD Defense Slides)Markus Voelter
Generic Tools, Specific Languages (GTSL) is an approach for developing tools and applications in a way that supports easier and more meaningful adaptation to specific domains. To achieve this goal, GTSL generalizes programming language IDEs to domains traditionally not addressed by languages and IDEs. At its core, GTSL represents applications as documents/programs/models expressed with suitable languages. Application functionality is provided through an IDE that is aware of the languages and their semantics. The IDE provides editing support, and also directly integrates domain-specific analyses and execution services. Applications and their languages can be adapted to increasingly specific domains using language engineering; this includes developing incremental extensions to existing languages or creating additional, tightly integrated languages. Language workbenches act as the foundation on which such applications are built.
Tried putting things in the deck that I learnt about Extreme programming in XP Conference held in Bangalore. I have tried to keep it at very high level added with light moments, so that it doesn't getting boring and makes sense for most of us
This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at: https://www.youtube.com/watch?feature=player_embedded&v=_LxfIQuFALY
This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at:
http://youtu.be/6R8pZ5c82Uw
http://youtu.be/a2YtKMBfVgg
This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at:
https://youtu.be/0ji1hOgcl44
This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at:
http://youtu.be/b9xJ_CIvgAU
This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at:
http://youtu.be/XWz0oIbzIpY
An Introduction To Software Development - Software Support and MaintenanceBlue Elephant Consulting
This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at:
This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at:
https://www.youtube.com/watch?v=AOchqjVB_1o
http://youtu.be/4EaTej-aH0M
This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at:
http://youtu.be/IjSCUIFJ2co
http://youtu.be/ffTdp1FQj_s
This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at:
http://youtu.be/1KYqw70gk5M
This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at:
https://www.youtube.com/watch?feature=player_embedded&v=ffTdp1FQj_s
An Introduction To Software Development - Architecture & Detailed DesignBlue Elephant Consulting
This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at:
https://youtu.be/PXYATve92zU
This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at:https://www.youtube.com/watch?feature=player_embedded&v=_fdNoErxjBw
This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at:
http://youtu.be/h2MMJYQy0bw
This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at:
https://www.youtube.com/watch?feature=player_embedded&x-yt-cl=84503534&v=wj41FZyHIbk&x-yt-ts=1421914688
This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at:
http://youtu.be/YD5Yk6cNsdE
This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at:
https://youtu.be/MamtCCdLnP4
This presentation is a part of the COP2271C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce Freshmen students to both the process of software development and to the Python language.
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A video of Dr. Anderson using these slides is available on YouTube at: https://www.youtube.com/watch?v=c2CTDm19Lpg
Basic concept on Systems/Software Analysis, Design & Development, how software engineering, large projects are done, collaborated, best practices & standards.
fundamentals of software engineering.this unit covers all the aspects of software engineering coding standards and naming them and code inspectionna an d various testing methods and
Developers spend up to 20% of their time writing repetitive code that machines could generate more reliably. This presentation explores the problem of duplicated source code that stems from manual implementation of patterns and reveals how to automate the boring side of programming and get a 19x ROI.
The presentation provides insight into:
- the problem of manual implementation of patterns, resulting in boilerplate code
- the cost of boilerplate for companies
- existing technologies for pattern automation
- the key reasons to consider pattern-aware compiler extensions
The white paper was written for CTOs, software architects and senior developers in software-driven organizations—specifically in financial, insurance, healthcare, energy and IT industries that typically write a lot of repetitive code.
Amanda Cinnamon - Treat Your Code Like the Valuable Software It IsRehgan Avon
2018 Women in Analytics Conference
https://www.womeninanalytics.org/
Data analysts create millions of lines of elegant, powerful code every year. However, because software development is not seen as their primary role, best practices of software engineering often fall to the wayside. Many data analysts are self-taught programmers who haven’t been exposed to tools like version control software, unit testing suites, and System Development Life Cycle (SDLC) processes. Popular software engineering concepts such as Don’t Repeat Yourself (DRY), design patterns, and modularization can vastly improve the quality and efficiency of analytics projects. This talk will provide a high-level introduction to these topics, and will focus on providing resources for additional learning.
softwaresoftware design is very crusial thing to manage therfore software software design is very crusial thing to manage therfore software software design is very crusial thing to manage therfore software software design is very crusial thing to manage therfore software
Scripting experts from Inductive Automation cover general best practices that will help you add flexibility and customization to HMI, SCADA, IIoT, and other industrial applications. Some specific tips about using scripting in the Ignition platform will be included as well.
In this webinar, learn more about:
• Common scripting pitfalls and how to avoid them
• The best programming languages to use
• Things to consider before using scripting
• How scripting environments work
• Scripting timesavers
• And more
Similar to An Introduction To Software Development - Implementation (20)
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
The Indian economy is classified into different sectors to simplify the analysis and understanding of economic activities. For Class 10, it's essential to grasp the sectors of the Indian economy, understand their characteristics, and recognize their importance. This guide will provide detailed notes on the Sectors of the Indian Economy Class 10, using specific long-tail keywords to enhance comprehension.
For more information, visit-www.vavaclasses.com
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
An Introduction To Software Development - Implementation
1. An Introduction To Software
Development Using Python
Spring Semester, 2015
Class #23:
Implementation
2. So What’s The Goal?
• The goal of any software development effort is to deliver
working software.
• “Implementation” happens when we transform a detailed
design into a valid program.
• This has to do with more than just writing code:
– Tested
– Debugged
– Compiled
– Built into a complete executable product
Image Credit: www.fotosearch.com
3. What Makes A Good
Implementation?
• Readability – can be easily read an understood by other programmers
• Maintainability – code can be easily modified and maintained
• Performance – the code should run as fast as possible
• Traceability – all code needs to be able to be traced back to a user story
• Correctness – the code needs to do what it is supposed to do
• Completeness – all system requirements must be met
Note that each of these requires a trade off. Performance optimization may
decrease the code’s readability and maintainability…
Image Credit: www.dreamstime.com
4. Programming Style &
Coding Guidelines
• Pretty much every software organization will have its own
coding guidelines.
• Guidelines cover such topics as naming, indentation, and
commenting styles. Many development tools can be
programmed to implement these styles.
• Most of these are not very important – it’s just a matter of
getting used to a given style. The goal is to be consistent in
order to help others later on avoid confusion when debugging
or maintaining the code.
Image Credit: www.dreamstime.com
5. Programming Style &
Coding Guidelines
• Guidelines should cover error messages. You want your error
messages to be clear to users but to also contain information
that programmers can use while debugging to find out where
the error message came from.
• Banning parts of a language that have been found to cause
lots of problems is also common (e.g. multiple inheritance).
Depreciated language features are also banned. Code must
compile with no warnings.
• Your goals for maintaining a good coding style are to be
consistent and to try to highlight the meaning of your code.
Image Credit: www.clipartpanda.com
6. Coding Style Recommendations
• Naming: one of the most important issues in
improving readability and maintainability.
– Bad names will require additional comments and may
mislead the reader
– Good names == good understanding
– Use long names for global variables and short names for
local variables
– Consistency is king: use the same word for a given concept
(“patient” not “customer”)
– Multicultural / multi-language teams may have special
challenges
Image Credit: www.clipartpanda.com
7. Coding Style Recommendations
• Separating Words & Capitalization: since
spaces can’t be used to separate words that
make up a variable name, different
programming languages have different
conventions
– C: lowercase with underscores: patient_name
– Java: no separation with capitalization:
patientName
Image Credit: www.clipartpanda.com
8. Coding Style Recommendations
• Indentation & Spacing: adding horizontal space
before a line in order to better reflect the structure
of the code
– Indentation affects both readability and maintainability
– A common style should be defined and all programmers
should follow it.
– The most important issue is consistency
– Most languages have a defacto indentation style that is
defined in the primary language reference
Image Credit: www.clipartpanda.com
9. Coding Style Recommendations
• Function Size: studies have shown that larger
functions are more error prone than smaller
functions
– Being able to look at an entire function at one
time helps with readability and maintainability
– Limit the size of a function to around 50 lines of
code
– This helps a function fit onto a single page
Image Credit: www.clipartbest.com
10. Coding Style Recommendations
• Unique Language Features: Different
languages support different features which
can be misused and need special precautions.
– Example: GOTO and multiple inheritance
– In Python, exceptions handling using TRY
EXCEPTION and FINALLY might be one such
situation.
Image Credit: www.clipartbest.com
11. Comments
• Comments are important
• Comments can help or hurt program readability and
maintainability.
• Two main problem with comments:
– They may distract from the code and make a section more difficult to
read
– They may be wrong
• Comments may become outdated as the code changes.
• Comments may be wrong from the start because they are
never executed/tested.
Image Credit: www.clipartpanda.com
12. 6 Different Types Of Comments
• Repeat of the code – done by new programmers and should be avoided.
These comments waste effort and distract the user
(e.g. “increment index by 1”)
• Explanation of the code – explain what complex code does in human
language. Code that is this complex should probably be rewritten.
• Marker in the code – markers in the code indicate incomplete items,
opportunities for improvement, etc. Must be removed before production.
• Summary of the code – Comments that summarize what the code does
are helpful, but they need to be kept up-to-date
• Description of the code intent – most valuable. They describe what the
code should do, not what it does.
• External references – link code to external entities Image Credit: www.liveattherock.com
13. Comments Are A Trade-Off
• We need to recognize the trade-off that comments represent.
• Comments can help to clarify code and relate it to other
sources.
• They also represent some level of duplication of the code.
• It takes time to both create them and then to maintain them.
• Comment errors can be very hard to both find and correct.
Image Credit: www.fotosearch.com
14. Comment Dangers!
• Comments can be used to justify bad coding practices
• Programmers may be tempted to create code that is too
complicated or too hard to maintain and then add comments
to it instead of rewriting it to better coding standards.
• An alternative: code that is so well written that it documents
itself (“self documenting code”).
• Good goal, but comments still have a place in capturing the
programmer’s intent.
Image Credit: www.clipartof.com
15. Debugging
• Debugging is all about locating and fixing
errors in the code.
• Generally errors are found by testing, but they
can also be reported by users or code
inspections.
• Debugging is a highly iterative process.
Image Credit: www.clker.com
16. 4 Phases In The Debugging Process
• Reproduction: Be able to reproduce the error
in a given configuration. Find out the
conditions that lead to the error by
constructing a minimal test case. Don’t care
about the code.
• May find some cases where code works
correctly.
• Always try to write simpler tests that still fail.
Image Credit: www.clker.com
17. 4 Phases In The Debugging Process
• Localization: Finding the sections of the code
that lead to the error.
• Generally, this is the hardest part to do.
• If the reproduction phase shows a very simple
test case, then this may easier to do.
Image Credit: driverlayer.com
18. 4 Phases In The Debugging Process
• Correction: Changing the code to fix the error.
• If you truly understand what is causing the
error, you have a good chance of being able to
fix it.
• Common mistake – trying to fix the problem
when you don’t know what it is or where it is.
– Leads to random changes
– Results in more errors
Image Credit: www.iconseeker.com
19. 4 Phases In The Debugging Process
• Verification: Making sure that the error is
fixed.
• Make sure that no new errors were introduced
into the code.
• All too often the fix does not fix the problem,
but does cause other problems.
Image Credit: tech-kid.com
20. Two Types Of Errors In Programs
• Syntax Errors
– Found by the complier
– Compiler tells you what their source is
• Logic Errors
– Harder to find
– Need to understand what the code is both trying
to do and is actually doing
Image Credit: www.clker.com
21. Debugging Tools
• Source code comparators – show you what changed
• Extended checkers – find errors with syntax, logic, or
style
• Interactive debuggers – let you step through code
and inspect variables
• Specialty Libraries – provide extra safeguards to
detect and prevent errors
• Profiler Tools - describe pre and post conditions
Image Credit: www.clipartsfree.net
22. Assertions &
Defensive Programming
• Precondition – something that your code
needs in order to create correct results
• Postcondition – a condition that should hold
true after executing your code
• Assertions - statements that check a condition
and product an error if the condition is not
met (e.g. a checking account balance)
Image Credit: www.easyvectors.com
23. Performance Optimization
• Performance for any program is important, but…
• Optimizing for performance almost always affects code maintainability
and readability for the worse.
• Real-time systems are the exception – they are all about performance.
• Programmers often make the mistake of worrying about performance too
early in the development cycle.
– Get the code to work first and make it easy to maintain
– If the performance is unsatisfactory, then you can optimize performance – most times
this won’t be an issue.
– Most code is only executed a few times and does not impact performance
– Only a few pieces of code will have to be optimized for performance
Image Credit: www.istockphoto.com
24. How To Optimize Performance
• Start with a profiler tool
– Runs the program and calculates how much time is spent in each part.
– Helps you to find bottlenecks and to determine what code needs to be
optimized
• Now review and optimize only those modules that will have
an impact on performance
• After making changes, run the profiler again to determine
impact and to ensure changes actually boosted performance.
Image Credit: www.dreamstime.com
25. The Cost Of Optimization
• A cost / benefit analysis should be done before
performing any performance optimization.
• A programmer’s time is more expensive than
computer time – it may be cheaper to just buy faster
hardware.
• You need to weigh the increase in performance
against the decrease in maintainability and the
possibility of introducing errors.
Image Credit: www.clipartpanda.com
26. Refactoring
• Just like a novel can be made better by rewriting parts, so to
can your code be made better by refactoring parts of it.
• Refactoring refers to improving your code style without
altering its behavior.
• Refactoring is one of the most powerful techniques for
producing good code.
• Reasons to refactor:
– Duplicated code
– Excessively large or long functions
– Etc.
Image Credit: publicdomainvectors.org
27. What Do You Do When You
Refactor?
• Turn a code fragment in to a standalone function
with its own name and calls to it.
• Replace the body of a function with a new algorithm
that is clearer and which returns the same results.
• Move an algorithm from one function to another
where it makes more sense
• Divide a function into two functions.
Image Credit: publicdomainvectors.org
29. What We’ll Be Covering Next Time
1. Software Support and
Maintenance
Image Credit: http://merchantblog.thefind.com/2011/01/merchant-newsletter/resolve-to-take-advantage-of-these-5-e-commerce-trends/attachment/crystal-ball-fullsize/
Editor's Notes
New name for the class
I know what this means
Technical professionals are who get hired
This means much more than just having a narrow vertical knowledge of some subject area.
It means that you know how to produce an outcome that I value.
I’m willing to pay you to do that.