TDDD63: Projects 2 jonkv@ida Course Overview Courses in parallel… TDDD73: Functional / Imperative Programming in Python First period Introduction to Python: 6 HP TDDD63: Perspectives in CS and CE Introductory Lectures / Quizzes: 2 HP Python Programming Project: 5 HP Second period Why? Can we really do this now? What can a project consist of? What’s required to pass the course? Why a programming project? 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 ▪ You are at the university now! ▪ Take personal responsibility for what you do and what you learn 3 Project: Now? Can you really do a project now? Of course – though the end result may not be perfect! ▪ Still early in your education ▪ Haven’t learned about data structures, algorithmic techniques, programming paradigms, … We will: ▪ Provide detailed instructions for an introductory phase ▪ Provide additional guidance for the main phase 4 jonkv@ida Project: Why? jonkv@ida jonas.kvarnstrom@liu.se – 2015 Project: What Is Software Development? Can you really do a project now? 6 What is involved in software development? We expect you to: ▪ Dive head first into the world of programming! Much more than writing code! For example: Keeping track of code ▪ Version control using Subversion ▪ Spend a great deal of time on your project: Work hard, write a lot of code Knowing what the users want and need ▪ Reading instructions – all of them ▪ (Otherwise: Running as fast as possible – in the wrong direction?) ▪ Try different approaches, solve a lot of problems ▪ Make mistakes! Project: Preferences 7 jonkv@ida ▪ Learn as much as possible from the mistakes, ▪ and show us what you learned! Signup opens 150916 Five distinct project types P1 P2 P3 P4 P5 Take your time, think about it Tell us your preferred project using WebReg Deadline: Tuesday 150922 No sign-up we must assume you have dropped out… jonkv@ida 5 jonkv@ida Project: Now? We randomly generate project groups of 3 students P1 P2 Professionalism: Work with the people you are assigned to P3 We consider your preferred projects, but no guarantees (group size limits!) #4 #1 #4 #3 #6 #1 #7 #2 #5 #8 #9 #4 #3 #6 #1 #7 #2 #5 #8 #9 #7 #2 #5 #8 150911 This lecture 150914 150915 150916 150917 150918 WebReg open for signing up #9 150921 150922 150923 150924 150925 10 Deadline: Sign up, tell us your preferred project Groups assigned… Groups assigned… Preliminary group assignment sent out Mandatory participation: Meet partners, learn about the project… 150928 150929 150930 151001 151002 151005 Full speed ahead! #3 #6 Project: Startup Timeline Deadline: Tell us by lunch if group members are missing! Notification: Final group assignment Game: Capture the Flag jonkv@ida 9 jonkv@ida Project: Group Assignment Capture the flag: Traditional outdoor sport Capture the Flag: Electronically Electronic versions exist since 1984… 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 Capture the Flag: Project 15 jonkv@ida Image: Wikipedia Project: Implement ”Capture the Flag” in Python Basic framework given ▪ Graphics, 2D 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: XPilot-AI 14 jonkv@ida 13 jonkv@ida Capture the Flag: Outdoors 20 XPilot-AI: A programming game Control a spaceship Write code to control the spaceship: An intelligent agent Rotating, thrusting, Find ways to: ▪ Navigate ▪ Avoid the enemy ▪ Shoot at targets ▪ Fly as an escort ▪ Learn the environment (you can only “see” a certain distance) ▪ … firing on the enemy Avoid other ships / obstacles 18 jonkv@ida XPilot: classical game XPilot-AI: Artificial Intelligence jonkv@ida 17 jonkv@ida XPilot: Introduction At the end: ▪ Maybe a tournament between project teams? Mapping: Introduction Maps used to be on paper… …but now they tend to be electronic Software: Mapping Real-time navigation 22 jonkv@ida Many popular uses for maps! Mapping: Project 24 jonkv@ida 21 jonkv@ida Mapping: Usage Project: Develop a web application! Begin using the (in combination with GPS) Google Maps API to display maps ▪ But Google does not provide direct access to roads, … Mashups overlaying interesting information Heatmap: Where are photos in Panoramio taken? How do hummingbirds migrate? Add freely available structured map data from OpenStreetMap ▪ Generate paths for navigation ▪ … Lego Mindstorms EV3 Hardware: Lego Mindstorms 26 jonkv@ida Can be used to build many kinds of robots… Mindstorms: Project 28 jonkv@ida 25 jonkv@ida Mindstorms: Robots Project: Build (and program) a guard dog! Patrol an area Fire balls at intruders Chase intruders away RoboCup: Introduction Robocup: Robotic soccer competition, since 1997 AIBO dogs (up to 2008) Small Size League Simulation League Middle Size League Hardware: Robocop Humanoid Soccer Six Nao robots 32 Project: Play soccer! Hello World! Basic Skills Made by Aldebaran Robotics 57 cm, 4.5 kg 30 jonkv@ida We have: RoboCup: Project jonkv@ida 29 jonkv@ida RoboCup: Robots Playing Soccer Cooperation Get started programming the robots Develop simple skills like walking a certain distance and turning the head searching for the ball Track the ball, kick the ball, score a goal Pass the ball Project Timeline Overview: Phase 1 Week 38 Next week: Sign up Week 39 Preliminary notification Week 40 First meeting (LA1) potential group changes Week 41 W 42, (43) Startup: Intro phase, with 7 occasions booked in the lab rooms Spend more time working on your own – standard lab procedure! LA2 LA3 LA4 LA5 LA6 LA7 Intro phase Intro phase Progress report Intro phase Intro phase Progress report Additional time outside the labs Week 43 Re-exam period – catch up with intro phase if not finished Week 44 Exam period Week 47 Week 48 Week 49 Week 50 Most weeks in the main phase jonkv@ida 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 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 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) Week 51 Polish your project and demonstrate Week 52 Final demonstrations + presentations in Visionen Project: Extent 34 ≈4 hours of work outside the schedule! Deadline! But be at the labs at well – maximize feedback! 35 How much must you implement? Project: Extent – Clarifications 5 hp = 3.33 weeks: 133 hours The time required to finish a milestone depends on: First period Whether your implementation is rudimentary or full-featured Presentations How often you run into unexpected trouble Second period How many solutions you try before succeeding Do as much as you can! 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 Remember: Around 14 hours per week and person! 33h (14h scheduled, 19h on your own time) 2h 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: Spend the time, try hard, learn, explain! Expect additional tasks, komplettering 36 jonkv@ida Week 46 Working at Home Main phase Investigate, explore, implement, write a lot of code! jonkv@ida Week 45 33 jonkv@ida Project Timeline Overview: Phase 2 One senior person defining the project 38 jonkv@ida For each project type, there will be: Project: Progress Reports 40 jonkv@ida 37 jonkv@ida Project: Assistance Once every week, hand in a progress report Instructions and deadlines: See the web pages One assistant taking care of day-to-day issues Names will be provided on the project web page! When you run into problems (and you will!)… First try to solve them yourself – especially programming problems 1) ▪ ▪ ▪ ▪ Anything in particular you need assistance with? Any problems discovered in the project / instruction / APIs? Show clearly what the problem is, how you have tried to solve it, and why the solutions did not work! Project: Progress Discussions How many hours did you spend? (Mainly for your benefit) Discuss within the group, or with other groups Search the web for information Practice your independent problem-solving skills and learn! If this fails, ask your project assistant 2) Once every week, a progress session (mandatory) Instructions and dates: See the web pages Individually: What did you do? ▪ Have you spent a week going in the wrong direction? Tell us what you did and what you learned from this – that’s also progress! Together: What's your overall progress this week (milestones completed etc)? 39 jonkv@ida Project: Mandatory Final Demonstrations Near the end, a final demonstration session Show the final result to your project assistant Typically 5-10 minutes 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, … Must be well prepared Project: Mandatory Final Presentation Last week: Final presentations (151221, 151222)! 42 jonkv@ida 41 jonkv@ida Project: Mandatory Final Presentation Presentation is mandatory! P1 P2 P3 P4 2 hours (7-8 min/group) 2 hours (7-8 min/group) 2 hours (7-8 min/group) 2 hours (7-8 min/group) Plan your travel accordingly Don't oversleep 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)… Deadline summary: Send in background information before each progress report session 43 Project: Grading Possible outcomes: Project approved in its entirety Final demonstration session last week Final presentation session last week Additional work needed Hand in the final code by 160110 Additional work needed for some project members Deadlines are hard! ”Round off” your project in time Don’t risk being too late 44 jonkv@ida Project: Deadlines jonkv@ida Have fun! jonkv@ida 46 48 jonkv@ida Potential Problems We are not making any progress! Don't hesitate to discuss with your assistant Tell us early, not when it is too late 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 Potential Problems 2 47 There's too much to do! Potential Problems 3 There are bugs in the provided hardware / software First, look at your time logs. Have you spent the expected time? These things will happen – also in industry No ▪ Being a student is hard, takes time! Report such problems early We'll take this into account ▪ Fix, provide workarounds, modify assignments, adjust expected results, … Yes, but I still can't keep up with the exercises/milestones ▪ Discuss the workload with your assistant ▪ Maybe your or our expectations are wrong, … jonkv@ida This is not "disloyal" ▪ You are not saying "he isn't doing what he should, he should be punished" ▪ You are saying "our group is having some trouble, please help" Others are writing all the code! Everyone should be involved in everything Even if you're inexperienced, demand the chance 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 Instructions are unclear Ask… Talking to the assistant did not help / there are delays / … Discuss with me, jonas.kvarnstrom@liu.se Take responsibility for figuring out how to achieve your goals Engineers are not given step by step instructions – you will have tasks and objectives If you have a problem: ▪ Don't say "the instructions don't tell me how to solve it" Instead: ▪ Keep working ▪ Try to solve it ▪ Try workarounds ▪ Ask others – or your supervisors if necessary (possibly by email) Activity Be active! If ▪ ▪ ▪ ▪ you don't get help immediately, continue doing something Keep searching for information Keep trying to solve the problem Look at another exercise or milestone Clean up your code, write technical documentation Real event: ▪ Demo on Friday ▪ Students: "We tried on Monday but didn't know how to continue, so we could not do anything this week" 52 jonkv@ida 51 jonkv@ida Responsibility Be proactive! pro·ac·tive or pro-ac·tive (prō-ăk′tĭv)adj. Be on time Or if there is a deadline ▪ An engineer does not tell his client: "But why does it matter that I'm handing in the results late? You didn't really need it earlier anyway, and I want my salary!" 55 jonkv@ida 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 54 Especially if you may need questions answered ▪ Real example: 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" Acting in advance to deal with an expected difficulty; anticipatory: proactive steps to prevent terrorism. Pride Timeliness Be proud of your work! Don't try to satisfy the literal requirements with minimal effort ▪ "Innocent (of doing too little) until proven guilty!" Construct something you can be proud of ▪ Or learn something you can be proud of, even if the end result isn't quite there yet Impress your employer! There is much more information on the project web pages! Don’t miss them – at your own risk! jonkv@ida 53 jonkv@ida Proactivity