solid liskov substitution principle barbara liskov in a 1987 conference keynote address entitled...

25
SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program, if S is a subtype of T, then objects of type T may be replaced with objects of type S (i.e., objects of type S may substitute objects of type T) without altering any of the desirable properties of that program. Liskov substitution principle (LSP) is a particular definition of a subtyping relation, called (strong) behavioral subtyping FUNCTIONS THAT USE POINTERS OR REFERENCES TO BASE CLASSES MUST BE ABLE TO USE OBJECTS OF DERIVED CLASSES WITHOUT KNOWING IT STOP!!!

Upload: leona-scott

Post on 18-Jan-2018

238 views

Category:

Documents


0 download

DESCRIPTION

PresentationsPresentations Presentations are vary important Make sure that you dress nice Don't say umm or ahh Practice Be sure to have notes Use a laser pointer Pretend the audience is in their underwear Don't run with scissors Don't spit when you talk Demo What went wrong?

TRANSCRIPT

Page 1: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

SOLID• Liskov substitution principle• Barbara Liskov in a 1987 conference keynote address entitled Data

abstraction and hierarchy• In a computer program, if S is a subtype of T, then objects of type T may be

replaced with objects of type S (i.e., objects of type S may substitute objects of type T) without altering any of the desirable properties of that program.

• Liskov substitution principle (LSP) is a particular definition of a subtyping relation, called (strong) behavioral subtyping

• FUNCTIONS THAT USE POINTERS OR REFERENCES TO BASE CLASSES MUST BE ABLE TO USE OBJECTS OF DERIVED CLASSES WITHOUT KNOWING ITSTOP!!!

Page 2: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

WHAT THE HECK WAS I TALINKG ABOUT?

Page 3: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

Presentations• Presentations are vary important• Make sure that you dress nice• Don't say umm or ahh• Practice • Be sure to have notes• Use a laser pointer• Pretend the audience is in their underwear• Don't run with scissors• Don't spit when you talk• Demo

What went wrong?

Page 4: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

Presentations• Presentations are vary important• Make sure that you dress nice• Don't say umm or ahh• Practice • Be sure to have notes• Use a laser pointer• Pretend the audience is in their underwear• Don't run with scissors• Don't spit when you talk• Demo

What went wrong?• Spelling mistakes• Reading the slides• Turning back to audience• Discussions between team members• Poorly dressed!• Speaking too fast• Speaking to softly• No flow• No plan• Not enough practice

What went wrong?• Slides too busy, font too small• Too many things at once• No setting of the stage• Umms...ahhs...• technology problems• talking at the wrong level to your

audience• trying to cover too much content or

too much detail• inappropriate language

Page 5: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

Presenting is scary...

Page 6: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

But it's a skill just like any other...

Page 7: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

You will screw up...

Page 8: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

But that's ok...it's ok to screw up!!!

Page 9: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

A few hints...

Page 10: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,
Page 11: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

Preparation!!!

Page 12: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.” ― Winston S. Churchill

Audiences remember 10% of what you say...

Tell 'em what you're going to tell 'em...Tell 'em...Tell 'em what you told them...

Fear or laughter cements messages...

Page 13: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

For instance...• Prepare for the worst, plan for the best, and

make the best of the reality!

Page 14: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

Build a flow to your presentation

Tell them a story!

Page 15: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

Read the wiki slides for flow tips

Page 16: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

Toastmasters or Dale Carnegie Public Speaking Course

http://sheridanbruins.toastmastersclubs.org/

• Get along with groups• Influence groups without friction• Improve your confidence 10 fold• Improve your interviewing skills• Likely the best thing you can do to improve your

career• Make more $$$'s• A great thing to improve your life• It's not as scary as it seems at the beginning

Page 17: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

5 skills of successful developers

• Understand OOP at a greater depth than other programmers.

• Write clean, cohesive, loosely-coupled code that is easy to read, to maintain, an to re-use.

• Get along in groups very well• Can present their ideas and build consensus• Strike a good work and life balance

Page 18: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

Working in Teams

• We teach you all about how to architect code, write code, manage code...

• What we should teach you is how to work in teams.

• The coding part is easier...

Page 19: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

Working in Teams: The big stuff

• If everyone in the group agrees that you are the problem, then you are the problem.

• If everyone else in the group is the problem, then you are the problem.

• Don't mistake bullying for leadership.• Don't make the mistake of thinking that others

won't notice if you coast through a project.

Page 20: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

Clarity is the key

• Define clear goals and deliverables• Assign work in a clear, unambiguous way.• Document plan and have team sign-off on it• Build checkpoints into the plan• Attack problems, not people• IOFS

Page 21: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

A Suggestion...• Meet as a group. Discuss the deliverables.• Agree on who will do what.• Try the tandem approach where two

members of the team share a task and work together on it.

Page 22: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

A Suggestion

• Record this contract on Trello, create a vote tab and have each team member vote their agreement.

• This is a contract! • Build a regular checkpoint for the entire team

to present their work so far.• Be supportive and constructive

Page 23: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

Being a leader• One of the hardest things about being a

leader is that letting your team do the work even if it isn't how you would have done it.

• The 2 worst things a leader can do:– agree with no one – agree with everyone.

Page 24: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

There will still be problems...

• Problems need to be addressed head on.• Discuss problems from the perspective of fixing

them, not from a position of assigning blame.• Sometimes you can solve things together.• Sometimes it helps to have a third party weigh in.• However, it should NEVER get personal.

Page 25: SOLID Liskov substitution principle Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy In a computer program,

There will still be problems...

• Common sense, practice and experience helps!

• Make no mistake, you will work with many groups in your career...some will be great...MOST WILL NOT!!!

• If all else fails...IOFS