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/SPW-wRmjoZ8
3. Homework #1: Fred Johnson
Johnson,Fred,N,2763 Filibuster Drive,Lakeland,FL,37643,M,05/27/1935,Y,164-55-0726,1234567890
4. Homework #1: Betty Williams
Williams,Betty,L,701 Collage Avenue,Orlando,FL,31234,F,11/27/1971,N,948-44-1038
5. Homework #1: Hector Ling
Ling,Hector,X,1500 Raceway Lane,Tampa,FL,32785,M,10/17/2003,Y,193-74-0274, Smith, John
6. Dating Is HARD! Let’s Create
Software To Help Track Things
• Need to account for multiple dates with the
same person.
• Different things are done on different dates
• Food is a critical part of every date
Image Credit: thisdateisover.com
7. But What About Flowers?
Every Date Needs Flowers!
• If we decide that dates need
flowers, then we’re going to have to
change our code
• Every date needs different types of
flowers
• Flowers are used at different points
in different dates
Image Credit: www.clipartpanda.com
8. Our Design Has A Problem!
• When we add a behavior, like including
flowers, we end up making a lot of changes in
different places.
• What seemed like a simple change (include
flowers) ended up making multiple changes in
multiple places.
Image Credit: www.clipartpanda.com
9. Our Design Is Breaking
The Single Responsibility Principal
• Single Responsibility Principal: Every object in your system
should have a single responsibility and all of the object’s
services should be focused on carrying out that single
responsibility.
• When we add support for flowers we have to go back and
mess with all three date actions.
• How would we handle adding support for jewelry, a concert,
or a sleepover?
Image Credit: kenmorebranch.akronlibrary.org
10. The Ripple Effect Is BAD!
• The ripple effect occurs when one small
change to your software causes a ripple of
changes throughout your software.
Image Credit: qwerty2jam.wordpress.com
11. You Want To Create DRY Code
• DRY: Don’t Repeat Yourself
• Avoid having any duplicate code in your
software. Abstract or separate out things that
are common and place them in a single
location.
• DRY is about having each piece of information
and behavior in your system in a single
sensible place.
Image Credit: www.graphicsfactory.com
12. What We Covered Today
1. Good design strategies
2. Why grouping code into
segments makes sense
3. Single Responsibility
Principal
4. D.R.Y.
Image Credit: http://www.tswdj.com/blog/2011/05/17/the-grooms-checklist/
13. What We’ll Be Covering Next Time
1. Version Control
2. Configuration Mgmt
Software
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.