looking ahead your final-year project. in final year you do a project... for these courses, it ’...

35
Looking ahead Your final-year project

Upload: sophia-douglas

Post on 16-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Looking ahead

Your final-year project

Page 2: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

In final year you do a project...

For these courses, it’s assumed you will build an “artefact”, and report on the building of it.

It’s marked on the cleverness, innovation, problem-solving ability, insight etc. shown in the report.

Page 3: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Project topic Ideally clever & small - you then have

the time to deal with it properly. You choose the topic, in consultation

with possible supervisors. (“Your” topic => motivation => better

projects.) Staff may suggest project topics, or

topic areas though.

Page 4: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Clearly, my suggestions are…

… mainly Software Engineering topics…

SE projects tend to need advance preparation…

… which is why I’m raising the issue now, so we can talk through possible projects over the rest of this year.

Page 5: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

My special SE interests

Program tools to help design & code:– graphic editors for design;– prototypers;– programming-language oriented text editors;– program provers;– configuration management tools;– …

Programming languages

Page 6: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Other S.E. staff

No other SE specialists at the moment, but various staff I’d point you at for particular aspects – e-mail me for suggestions!

Page 7: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

INSE - Lecture 12

Debugging; Maintenance

Page 8: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Debugging

Page 9: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

A thoughtGlendower: I can call up spirits from the vasty

deep

Hotspur: Why, so can I, or so can any man, but will they come when you do call for them?

Henry IV, part 1, Act 3 scene 1

So when you know there’s a bug - finding it takes some mix of persistence, luck, skill and thought.

Skill and thought don’t “just happen”.

Page 10: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Debugging is... time-consuming reveals one’s own errors, so is…

– often inefficiently done, so…

»AVOID IT as much as possible “Short cuts” in design & coding are false economy:

– take extreme care in design– struggle for highest legibility of code

In maintenance:– if something works, don’t tamper.

Page 11: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Effective debugging (1)

Simplify it!– unit test any fragment that you feel might have a

bug, no matter how small, & debug;– size modules so they probably have tiny numbers

of bugs, and debug;– system test for small new combinations, and

debug.

So then you only need to deal with a tiny number of bugs at a time.

Page 12: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Effective debugging (2)

Design every verification test to trap as many classes of bug as possible– avoids messy test-then-debug-then-test-

then-debug… cycles

Page 13: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

When there is a bug...

...you often need to improvise a “pursuit test” targeted on chasing the bug -– obvious, but often overlooked, especially

by beginners. …follow the logic of the bug back

towards it’s origin (“back-deduction”) -– also obvious but often overlooked,

especially by beginners.

Page 14: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Where is the bug?

Locate the region of the program that the bug is in -– e.g. in response to a mysteriously

corrupted variable - what/where is corrupting it?

– “wolf fence” tactic» (Also called “divide and conquer”).

Page 15: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Having put in debugging code It was expensive! keep it!

Comment it out:// ... some debug code ...

Eliminate it by conditional compilation:final boolean DEBUGGING = False;…if (DEBUGGING) { … some debug code … }

Page 16: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Dynamic debuggers... … are now common extras for compilers and

IDEs:– you can set “break-points”, then execute to the

first break-point reached;– you can restart from a break-point till the next is

reached;– you can “single-step”;– you can monitor the values of variables;– you can change the values of variables;– ...

Page 17: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Aptitudes for debugging

Ability to spot obscure patterns; Ability to separate interleaved patterns; Meticulousness; Tenacity; Judgement; Intuition; LUCK!!!

Page 18: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Maintenance

expense & risk corrective, innovative & perfective maintenance rate of discovery of bugs aptitudes for maintenance

Page 19: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Maintenance is expensive Most Industry reports say between 60% and

90% of total programming effort is maintenance;

quite where in that range seems to correlate to various sections of the industry;

high end => long life with regular need for functional change;

also varies with the effort that went into making the software maintainable and keeping it so!

Page 20: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Maintenance is risky

You are changing something beyond it’s original design…

… will the design stand up to the changes?

MORAL: designs should have flexibility build in.

Page 21: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Kinds of maintenance

Corrective - is really debugging, done late (the user reported the bug)

Innovative - adding new capabilities, perhaps updating old ones

Perfective - internal improvement to correct software not needing any innovation or update.

Page 22: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Corrective maintenance Fixing errors (or other severe deficiencies) in

a version of the software being used by customers;

therefore much more fraught than “normal” debugging.

Often– either not obvious where (in spec/design/ code)

it originates;– or blatantly a result of wrong requirements or

mis-specification!

Page 23: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Innovative maintenance The requirements have changed...… maybe new facilities are needed/

desired;… maybe the real-world situation has

changed;… maybe there’s a perception that the

real-world situation could be modelled better.

Page 24: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Perfective maintenance

Improving perceived quality, or... Improving actual (internal) quality, or… Increasing capacity, or… Increasing speed, or...

Page 25: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Rate of discovery of bugs

Page 26: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Rate of discovery of bugs

Page 27: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Rate of discovery of bugs

Page 28: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Rate of discovery of bugs

Page 29: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Rate of discovery of bugs

Page 30: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Rate of discovery of bugs

Page 31: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Staffing of maintenance

…perhaps because their managers told them to repair the old one…

MORALS:– keep the team stable;– manage it

thoughtfully.

Page 32: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

After this lecture (1) STRATEGIES FOR DEBUGGING:

– avoid;– simplify.

TACTICS:– back-deduce (location by history);– wolf-fence (location by geography).

TOOLS:– dynamic debuggers.– (read the manual for others in the compiler or IDE).

Page 33: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

After this lecture (2)

Build for maintainability;

Maintain thoughtfully;

Staff issues for maintainability – choose well!

This is another issue for long-term thought about your experience, and what you observe of other people’s experience.

Page 34: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

© C Lester 1997-2014

Page 35: Looking ahead Your final-year project. In final year you do a project...  For these courses, it ’ s assumed you will build an “ artefact ”, and report

Revisiting “risks of maintenance”