You are on page 1of 24

A Fistful of Ideas

1
Quiz set-up
Hats off/backwards (brims and hoods)
Technology and notes put away
On your desk
Single piece of standard-sized paper
pen/pencil
eraser if you like, but faster to scratch out
About your paper
Name and student ID on paper
Eyes on your own paper
Protect your paper
Please write neatly
Turn over after done checking your answer
Question? Raise your hand and well come over
Remember
Partial credit do your best
We grade gently
2
Quiz
1. Apply the Strategy Pattern to the code below so that customers can
also use MasterCard, AmEx, etc. credit cards to make purchases.
class VisaCard { boolean validateCSC(int csc) {} }
class CustomerAcct{
private VisaCard card;
CustomerAcct (VisaCard card) { this.card = card; }
boolean acceptCSC(int csc) {
return card.validateCSC(csc);
}

2. Draw class diagrams for the above code and your Strategy solution.
3. Using my ten-cent OOD method, provide a class design (classes,
fields, and method interfaces) for the given BDD scenario:
Givena wizard named Harry
And a wizard named Hermione
When the wizards meet
Then a spark occurs
You can use either UML or code, but no method bodies, please. 3
CSC = Card Security Code
OOD = Object-Oriented Design
Discussion
1. Apply the Strategy Pattern to the code below so that customers can
also use MasterCard, AmEx, etc. credit cards to make purchases.
interface CardType { boolean validateCSC(int csc); }
class VisaCard implements CardType {
boolean validateCSC(int csc) {}
}
class MasterCard implements CardType { }
class CustomerAcct{
private CardType card;
CustomerAcct (CardType card) { this.card = card; }
boolean acceptCSC(int csc) {
return card.validateCSC(csc);
}

4
Discussion
2. Draw class diagrams for the above code and your Strategy solution.
5
<<interface>>
_____CreditCard_____
bool validateCSC(int)
______VisaCard______
bool validateCSC(int)
____MasterCard_____
bool validateCSC(int)

____CustomerAcct____
- CardType card______
bool acceptCSC(int)
(after case only)
(Recall that PowerPoint doesnt have the open arrow,
so here Im using a closed arrow for subclass, and a
swooped arrow for composes)
Quiz
3. Using my ten-cent OOD method, provide a class design (classes,
fields, and method interfaces) for the given BDD scenario:
Givena wizard named Harry
And a wizard named Hermione
When the wizards meet
Then a spark occurs
You can use either UML or code, but no method bodies, please.
wizard
spark
wizards
class Wizard {
private String name;
Wizard(String name);
String getName();
}
class Wizards {
List<wizard> wizards;

} 6
CSC = Card Security Code
OOD = Object-Oriented Design
WizardTracker {
private Wizards wizards;
boolean meet(Wizard a, b);
// might make/trigger spark
}
class Spark {
void occurs();
}
Remember
Yes, its hard too hard for most people to try
thats why youre in college
youre the top of the top 10%
thats why the pay is high and the jobs easy to get
If I didnt have you learn it, Id be cheating you
Well keep at it until you master it
stakes are low in quizzes: 2% and we drop one
graded gently
I only curve your grade up, never down
well get you ready for final
7
Your Resume, Today
8
Things you can put on your resume now
Technologies
Java, Android, Google App Engine
Tools
Eclipse, JUnit, JIRA, GIT, Android ADT
Techniques
Agile Software Process, BDD
Basic OOD, Design Patterns
Mobile software development
Course
Software Engineering (CSE 110)
Keep Change - Start
96 responses
10
Keep Change Start
Keep
Clicker questions, Labs, Reading quizzes, Piazza
Change
Adaptive reading quizzes (need more time)
Clicker questions take too long (e.g., ask for answers)
In-class quizzes are too difficult
Start
Better labs: error-free, clearer
Discuss Android development in class
11
Keep Change Start
Adaptive reading quizzes (need more time)
The adaptive quiz gave 4 minutes/question
Required about 15 clicks
I encourage you to do reading and understand it before
starting quiz
Each quiz is worth 0.3% of grade; drop 2 lowest
Clicker Qs take too long (e.g., ask for answers)
Ive been speeding up, I hope you noticed
I havent asked for answers in over two weeks (day 7)
Generally only ask for answers on tradeoff questions
In-class quizzes are too difficult
(Already discussed)
12
Keep Change Start
Better labs: error-free, clearer
Yes, Im sorry, were trying really hard
Google is a real problem
Only one lab left!
How some of you could help: read the lab, dont just cut-and-
paste as fast as you can
Discuss Android development in class
Covered in Discussion and Lab
Do need to teach software engineering, too
Android also here!
We did Android Listener, integrate with GoogleMap
Callbacks and Observer pattern central to Android
Strategy pattern is central to LocationProvider (e.g.)
The preference for Interfaces over subclassing
Want more Android? The web is full of tutorials (video, too)
13
Always Runnable
Slow and steady wins the race
14
Agile and Always Runnable
If your app is running, you can confidently
develop, test, debug, and demo
If it doesnt run after adding new story, no fear
Roll back, debug new code, etc.
Failed tests, new bugs are due to new story
Narrows search, code still familiar
Can demo your new story right away
Self, teammates, customer
15
Always Runnable: How
User story is a new thing the user can do with app
So it should be demo-able, system testable, etc.
Keep stories small
But tendency is to make them too big
Implement story in runnable order
dont do all the logic, then all the UI, etc.
do enough of each to get essence of it running
then add on the remainder bit by bit, always runnable
Test as you go
Dont check-in code until system tests run
If the system tests dont pass, then it doesnt run
Debug immediately, while fresh on your mind
16
Lets do this
17
The sum is greater than its parts
Respect
Planning
Language
Negotiation
18
Individual commitment to a group effort that is
what makes a team work, a company work, a
society work, a civilization work.
- Vince Lombardi
Respect
All human beings are deserving of respect
including the ones on your team ;)
polite, friendly, considerate on time, etc.
Embrace diversity
different people have different skills or preferences
makes the team more capable, versatile, energetic
Dont rush to judgment
unique people face unique challenges
your compassionshould earn respect
Dont abuse your teams goodwill
Put in the effort
Under promise and over deliver
19
Planning
Not like hacking with your best friend
Teams of size six wont naturally coordinate
Plan your stand-ups
Plan your coding sessions
Plan your testing
Plan your delivery session
Respect can be planned, too
Frank but respectful discussion at stand-ups
Take meals together, do something fun together
Will go a long way towards the respect thing
Rotate pairs on tasks so that everyone works with
everyone
20
Language and Body Postures
Listenmore than you talk
Respond to what you hear, dont change subject
Ask questions
Avoid talking over, interrupting
Avoid: ultimatums, confrontational language
Anti-team language:
No, wrong, dont, never
Answer with But
Pro-team language:
Yes, I see, I (dont) understand, Can you explain?, I see
where youre coming from
Answer with And
Avoid: crossed arms, leaning back, frowning, shaking head
Try: uncrossed arms, leaning forward, smiling, nodding
21
Negotiation
Respect and planning arent enough
True conflicts arise
I want to learn the Android map control
you want easy tasks and are expert at it
Who will get to code it?
Negotiate it
Take turns!
Pair program together!
Horse trade
Is something else easy for you, too?
Something else you could trade for?
A very creative process
Beware long-term trades: You do the first phase and Ill
do the second phase
Any error in planning will mean you do the second phase, too
22
Trouble-shooting the dysfunctional team
People being mean to each other
Respect problem how can we rebuild it?
Some one is moody and sulking
Respect problem? Talk about it.
Not getting what he wants from project? Negotiate!
A pair never contributes b/c they always
have an exam to study for?
1. Rotate pair-programming teams
2. Negotiate
3. Suggest a meeting with me
23
Take-Aways
Planning
Effort
and Respect
Are an unbeatable combination
24

You might also like