Pro rojects cts Introductory Lectures / Quizzes: 2 HP Python - - PDF document

pro rojects cts
SMART_READER_LITE
LIVE PREVIEW

Pro rojects cts Introductory Lectures / Quizzes: 2 HP Python - - PDF document

9/6/2016 TD TDDD63 63: Pro rojects cts Introductory Lectures / Quizzes: 2 HP Python Programming Project : 5 HP jonas.kvarnstrom@liu.se 2016 jonkv@ida jonkv@ida Proje oject ct: : Why? 2 2 Why a programming project? Direct


slide-1
SLIDE 1

9/6/2016 1

jonas.kvarnstrom@liu.se – 2016

TD TDDD63 63: Pro rojects cts

Introductory Lectures / Quizzes: 2 HP Python Programming Project: 5 HP

2

jonkv@ida jonkv@ida

2

Proje

  • ject

ct: : Why?

  • Direct hands-on programming experience early in your education

▪ Don’t wait to learn everything and then apply it

  • A chance to create something larger

▪ Not just a sequence of short lab exercises illustrating specific topics

  • A chance to practice working independently

▪ Y

  • u are at the university now!

▪ Take personal responsibility for what you do and what you learn

Why a programming project?

slide-2
SLIDE 2

9/6/2016 2

3

jonkv@ida jonkv@ida

3

Proje

  • ject

ct: : Now?

  • Dive head first into the world of programming!
  • Spend a great deal of time on your project:

Work hard, write a lot of code

  • Try different approaches, solve a lot of problems
  • Make mistakes:

There is much you haven’t learned yet

  • Learn as much as possible from the mistakes,
  • and show us what you learned!

We expect you to…

slide-3
SLIDE 3

9/6/2016 3

5

jonkv@ida jonkv@ida

5 P1 P2 P3 P4 P5 Five distinct project types

Project ect: : Prefer ferenc ences es

 For each project type:

  • Extensive instructions on the web
  • One assistant taking care of day-to-day issues
  • One senior person making the ultimate decisions

Names on the course web pages!

6

jonkv@ida jonkv@ida

6

Project ect: : Prefer ferenc ences es

Tell us your preferred project usingWebReg

We take your preferences into consideration, but no guarantees (group size limits!)

slide-4
SLIDE 4

9/6/2016 4

7

jonkv@ida jonkv@ida

7

Proje

  • ject

ct: : Group up Assignment ignment

 We randomly generate project groups of 3 students

P1 P2 P3

#1 #2 #3 #4 #5 #6 #7 #8 #9 #1 #2 #3 #4 #5 #6 #7 #8 #9 #1 #2 #3 #4 #5 #6 #7 #8 #9

Professionalism: Work with the people you are assigned to

Game: e: Captur turethe Flag ag

slide-5
SLIDE 5

9/6/2016 5

9

jonkv@ida jonkv@ida

9

Captur ture the Flag ag: : Outdo doors

  • rs

 Capture the flag: Traditional outdoor sport

  • Each team has a flag and a territory of its own
  • Objective: Capture the other team’s flag

▪ Without being tagged/touched in the other team’s territory Image: Wikipedia

10

jonkv@ida jonkv@ida

10

Captur ture the Flag ag: : Electro troni nicall cally

 Electronic versions exist since 1984…

slide-6
SLIDE 6

9/6/2016 6

11

jonkv@ida jonkv@ida

11

Captur ture the Flag ag: : Proje

  • ject

ct

 Project: Implement ”Capture the Flag” in Python

  • Basic framework given

▪ Graphics, physics

  • Mandatory or potential tasks:

▪ Implement part of the basic game ▪ Add sound effects ▪ Add destroyable and movable objects ▪ Implement an AI player (artificial intelligence) ▪ Add support for networking with multiple players ▪ Write a level editor allowing new levels to be easily defined ▪ … Image tiles given – focus on programming

Game: e: XPilot lot-AI AI

slide-7
SLIDE 7

9/6/2016 7

13

jonkv@ida jonkv@ida

13

XPilot lot: : Intro roductio duction

 XPilot: classical game

  • Control a spaceship
  • Rotating, thrusting,

firing on the enemy

  • Avoid other ships / obstacles

14

jonkv@ida jonkv@ida

14

XPilot lot-AI AI: : Artificial tificial Intelligence elligence

 XPilot-AI: A programming game

  • Write code to control the spaceship: An intelligent agent
  • Find ways to:

▪ Navigate ▪ Avoid the enemy ▪ Shoot at targets ▪ Fly as an escort ▪ Learn the environment (you can only “see” a certain distance) ▪ …

  • At the end:

▪ Maybe a tournament between project teams?

slide-8
SLIDE 8

9/6/2016 8

Softwar ware: e: Mapping ping

16

jonkv@ida jonkv@ida

16

Mapping: ping: Introduct roduction

  • n

 Maps used to be

  • n paper…

 …but now they

tend to be electronic

slide-9
SLIDE 9

9/6/2016 9

17

jonkv@ida jonkv@ida

17

Mapping: ping: Usag age

 Many popular uses for maps!

  • Real-time navigation

(in combination with GPS)

  • Mashups overlaying interesting information

Heatmap: Where are photos in Panoramio taken? How do hummingbirds migrate?

18

jonkv@ida jonkv@ida

18

Mapping: ping: Project

  • ject

 Project: Develop a web application!

  • Begin using the

Google Maps API to display maps

▪ But Google does not provide direct access to roads, …

  • Add freely available

structured map data from OpenStreetMap

▪ Generate paths for navigation ▪ …

slide-10
SLIDE 10

9/6/2016 10

Hardwar dware: e: Lego Mindstorms dstorms

20

jonkv@ida jonkv@ida

20

Lego Minds dstor torms ms EV3

slide-11
SLIDE 11

9/6/2016 11

21

jonkv@ida jonkv@ida

21

Mindstorms: dstorms: Robots ts

 Can be used to build many kinds of robots…

22

jonkv@ida jonkv@ida

22

Mindstorms: dstorms: Project

  • ject

 Project: Build (and program) a guard dog!

  • Patrol an area
  • Fire balls at intruders
  • Chase intruders away
slide-12
SLIDE 12

9/6/2016 12

Hardwar dware: e: Robocop copHuma manoid noidSoccer er

24

jonkv@ida jonkv@ida

24

RoboCup Cup: : Introduct roduction

  • n

 Robocup: Robotic soccer competition, since 1997

AIBO dogs (up to ) Middle Size League Simulation League Small Size League

slide-13
SLIDE 13

9/6/2016 13

25

jonkv@ida jonkv@ida

25

RoboCup Cup: : Robots

 We have:

Made by Aldebaran Robotics 57 cm, 4.5 kg

Six Nao robots

26

jonkv@ida jonkv@ida

26

RoboCup Cup: : Project

  • ject

 Project: Play soccer!

  • Hello World!

Get started programming the robots

  • Basic Skills

Develop simple skills like walking a certain distance and turning the head searching for the ball

  • Playing Soccer

Track the ball, kick the ball, score a goal

  • Cooperation

Pass the ball

slide-14
SLIDE 14

9/6/2016 14

28

jonkv@ida jonkv@ida

28

Proje

  • ject

ct Timeline eline Overvi view: w: Startup rtup Phase se

160909 This lecture

160912

160913

160914 WebReg open for signing up

160915

160916

160919

160920 Deadline: Sign up, tell us your preferred project

160921

160922

160923 Preliminary group assignment sent out

160926 Mandatory meeting: Meet partners, learn about the project…

160927

160928 Deadline: T ell us by lunch if group members are missing!

160929

160930 Final group assignment sent out

161003 Full speed ahead!

slide-15
SLIDE 15

9/6/2016 15

29

jonkv@ida jonkv@ida

29

Spend even more time outside these lab times – standard lab procedure!

Proje

  • ject

ct Timeline eline Overvi view: w: Phase ase 1

Week 37 Week 38 Week 39 Week 40 W 41, (42) Week 42 Week 43 Next week: Sign up Preliminary notification First meeting (LA1)  potential group changes Startup: Intro phase, relatively detailed instructions Re-exam period – catch up with intro phase if not finished Exam period LA2 Intro phase LA3 Intro phase LA4 Progress report LA5 Intro phase LA6 Intro phase LA7 Progress report

30

jonkv@ida jonkv@ida

30

Proje

  • ject

ct Timeline eline Overvi view: w: Phase ase 2

Week 44 Week 45 Week 46 Week 47 Week 48 Week 49 Week 50 Demonstrate the project for the assistant Deadline! Main phase Investigate, explore, implement, write a lot of code! Guidance and goals given in project-specific instructions, together with milestones to achieve Use your creativity and imagination, and expand the project as much as time allows Most weeks in the main phase 4-hour lab (assistants present for one hour) 4-hour lab (assistants present for one hour) 2-hour lab with progress reports from each group (not a question session) ≈4 hours

  • f work
  • utside

the schedule! Final presentations in Visionen

slide-16
SLIDE 16

9/6/2016 16

31

jonkv@ida jonkv@ida

31

Working ngat Home me

 For some projects, you may be able to work at home – bonus!

  • Example: Thinlinc

▪ https://www.ida.liu.se/local/tus/handbook/linux/thinlinc.sv.shtml ▪ https://www.ida.liu.se/~TDDD11/UPP_Course_Mtrl/tools/thinlinc/index.sv.shtml But be at the labs at well – maximize feedback!

slide-17
SLIDE 17

9/6/2016 17

33

jonkv@ida jonkv@ida

33

Proje

  • ject

ct: : Extent nt

 How much must you implement?

Achieving milestones is one way of showing progress; minimum requirements are project-specific Another is making mistakes and showing clearly what you tried, why it didn’t work, and what you learned

Do as much as you can!

Whether your implementation is rudimentary or full-featured How often you run into unexpected trouble How many solutions you try before succeeding

The time required to finish a milestone depends on: Spend the time, try hard, learn, explain!

34

jonkv@ida jonkv@ida

34

Proje

  • ject

ct: : Extent nt – Clari arificatio fications ns

 Remember: Around 14 hours per week and person!

  • Complete project 5 hp = 3.33 weeks = 133 hours
  • First period

33h (14h scheduled, 19h on your own time)

  • Presentations

2h

  • Second period

98h in 7 weeks = 14h per week  That's 42 person hours per group and week

  • If you spend this time but have difficulties completing a milestone:

Fine (as long as you show what you have done): You're still learning

  • If you can't demonstrate that you are working hard:

Expect additional tasks, komplettering

slide-18
SLIDE 18

9/6/2016 18

36

jonkv@ida jonkv@ida

36

Proje

  • ject

ct: : Reading ing Instruct tructions

  • ns

 Engineers must know what the users want and need!

  • Read and re-read the instructions and specifications – all of them
  • Otherwise:

▪ Running as fast as possible – in the wrong direction? ▪ Y

  • u’ll miss important hints!
slide-19
SLIDE 19

9/6/2016 19

37

jonkv@ida jonkv@ida

37

Proje

  • ject

ct: : Keepi ping ng Track? ck?

 Engineers must keep track of their code and documents!

  • Version control – Subversion, Git, …
  • Commit regularly
  • Assistants may use this

to review your progress

38

jonkv@ida jonkv@ida

38

Proje

  • ject

ct: : Probl blems ems

 Engineers are given tasks and objectives,

not step by step instructions

  • You will run into problems

▪ Great! Y

  • u’re here to learn!
  • Try to solve the problems yourselves,

especially programming problems

▪ Discuss within the group ▪ Search the web for information ▪ Try to find workarounds ▪ Practice your independent problem-solving skills!

slide-20
SLIDE 20

9/6/2016 20

39

jonkv@ida jonkv@ida

39

Proje

  • ject

ct: : Assist istance ance

 But don’t bang your head against the wall for too long…  ”No engineer is an island”, so eventually:

  • Ask the other groups
  • Ask the assistant

 Ask the right way!

  • Show clearly what the problem is, how you have tried to solve it,

and why the solutions did not work! ”I’ve spent 30 hours on this single problem! The course is terrible!”

40

jonkv@ida jonkv@ida

40

Activit vity

 Be active!

  • If you don't get help immediately, continue working anyway

▪ Keep searching for information ▪ Keep trying to solve the problem ▪ Look at another exercise or milestone ▪ Clean up your code, write technical documentation

  • Real events:

▪ Demo on Friday: “We tried on Monday but didn't know how to continue, so we could not do anything this week” ▪ Progress report handed in at 08:15: "We couldn't do anything – we sent a question at 21:30 last night and got no reply"

Assistants have other projects, courses, scheduled events Assistants do not work 24 hours a day Expect help eventually, but do something productive meanwhile

slide-21
SLIDE 21

9/6/2016 21

41

jonkv@ida jonkv@ida

41

Proacti tivit vity

 Be proactive, take initiatives

  • pro·ac·tive or pro-ac·tive (prō-ăk′tĭv)adj.

Acting in advance to deal with an expected difficulty; anticipatory: proactive steps to prevent terrorism.

  • Example: Prepare for upcoming difficulties

▪ Read and think about upcoming tasks so that you can ask questions on Monday instead of getting stuck until Thursday

Mandatory participation!

slide-22
SLIDE 22

9/6/2016 22

43

jonkv@ida jonkv@ida

43

Proje

  • ject

ct: : Progre gress ss Reports ts

 Once every week, hand in a progress report

  • Instructions and deadlines: See the web pages

 For each individual group member (in the same report):

  • What did you do?

▪ Have you spent a week going in the wrong direction? T ell us what you did and what you learned from this – that’s also progress!

  • How many hours did you spend? (Mainly as a log for your benefit)

 For the group as a whole:

  • What's your overall progress this week (milestones completed etc)?
  • Anything in particular you need assistance with?
  • Any problems discovered in the project / instruction / APIs?

44

jonkv@ida jonkv@ida

44

Proje

  • ject

ct: : Progre gress ss Discussio ussions ns

 Once every week, a progress session

  • Instructions and dates: See the web pages
  • The assistant will read the report before!
  • 5-10 minutes per group

▪ Demonstrate the current implementation to your assistant ▪ Discuss the reported progress ▪ Discuss difficulties, solutions, what you plan to do next, …

slide-23
SLIDE 23

9/6/2016 23

45

jonkv@ida jonkv@ida

45

Proje

  • ject

ct: : Final al Demonst

  • nstrat

ratio ion

 Last week, a final demonstration session

  • Show the final result to your project assistant
  • Typically 5-10 minutes
  • Must be well prepared

46

jonkv@ida jonkv@ida

46

Proje

  • ject

ct: : Final al Present sentati ation

 Last week: Final presentations (most likely 151215, 151216 ! 2 hours (7-8 min/group) 2 hours (7-8 min/group) 2 hours (7-8 min/group) 2 hours (7-8 min/group)

P1 P2 P3 P4

Prepare 5 slides showing how great your project is! Main focus: The project / its applications, not implementation / code Practice (professionalism course) Present in Visionen (B-huset)… Have fun!

slide-24
SLIDE 24

9/6/2016 24

47

jonkv@ida jonkv@ida

47

Proje

  • ject

ct: : Mandato datory ry Final nal Prese esentation ntation

Plan your travel accordingly Don't oversleep

Presentation is mandatory!

48

jonkv@ida jonkv@ida

48

Proje

  • ject

ct: : Deadli lines nes

 Deadline summary:

  • Send in background information before each progress report session
  • Final demonstration session last week
  • Final presentation session last week
  • Hand in the final code by 170108

 Deadlines are hard!

  • ”Round off” your project in time
  • Don’t risk being too late
slide-25
SLIDE 25

9/6/2016 25

49

jonkv@ida jonkv@ida

49

Pride de

 Take pride in your work!

  • You could try to satisfy the literal requirements with minimal effort

▪ "Innocent (of doing too little) until proven guilty!"

  • Or you could:

▪ Construct something you can be proud of ▪ Learn something you can be proud of, even if the end result isn't quite there yet

  • Impress your employer!

50

jonkv@ida jonkv@ida

50

Proje

  • ject

ct: : Grading ding

 Possible outcomes:

  • Project approved in its entirety
  • Additional work needed
  • Additional work needed for some project members
slide-26
SLIDE 26

9/6/2016 26

52

jonkv@ida jonkv@ida

52

Potenti tial al Problem ems

 We are not making any progress!

  • Don't hesitate to discuss with your assistant
  • T

ell us early, when we can still help you  A group member is not showing up!

  • This should be reflected in the progress report (hours worked, …)
  • If it isn't:

▪ Discuss with your assistant ▪ Discuss with me, jonas.kvarnstrom@liu.se

  • This is not "disloyal"

▪ Y

  • u are not saying "he isn't doing what he should, he should be punished"

▪ Y

  • u are saying "our group is having some trouble, please help"
slide-27
SLIDE 27

9/6/2016 27

53

jonkv@ida jonkv@ida

53

Potenti tial al Problem ems s 2

 There's too much to do!

  • First, look at your time logs. Have you spent the expected time?
  • No 

▪ Being a student is hard, takes time!

  • Yes, but I still can't keep up with the exercises/milestones 

▪ Discuss the workload with your assistant ▪ Expectations could be wrong, there could be crucial misunderstandings, …

 Others are writing all the code!

  • Everyone should be involved in everything
  • Even if you're inexperienced, demand the right to write code
  • We are here to learn!

If you are more experienced: Feel free to give hints Do not provide full solutions to others Add unexpected features to show what you can do,

54

jonkv@ida jonkv@ida

54

Potenti tial al Problem ems s 3

 Others are writing all the code!

  • Everyone should be involved in everything
  • Even if you're inexperienced, demand the right to write code
  • We are here to learn!

If you are more experienced: Do not provide full solutions to others Feel free to give hints, but leave them at the keyboard You can add unexpected features to show what you can do, but let them work on the core solution This is your way of providing value to the overall project!

slide-28
SLIDE 28

9/6/2016 28

55

jonkv@ida jonkv@ida

55

Potenti tial al Problem ems s 4

 There are bugs in the provided hardware / software

  • These things will happen – also in industry
  • Report such problems early
  • We'll take this into account

▪ Fix, provide workarounds, modify assignments, adjust expected results, …

 Instructions are unclear

  • Ask, don’t assume

 Talking to the assistant did not help / there are delays / …

  • Discuss with me, jonas.kvarnstrom@liu.se

Don’t miss them – at your own risk! There is much more information

  • n the project web pages!
slide-29
SLIDE 29

9/6/2016 29 Take your time, think about it

Signup opens Wed

No sign-up  we must assume you have dropped out…

Deadline: Tue