Maintainability is a major stake of professional software development. Indeed, maintenance is nearly always the longest part of a software life cycle, as it lasts from the project release until basically the end of times.Moreover, projects being in maintenance represent a large majority of the overall number of projects. According to http://www.vlegaci.com/298/interesting-statistics-%E2%80%93-numbers-of-programmers-in-maintenance-vs-development/, the proportion of projects being in maintenance is about 2/3.I recently came across this question, where the guy looks pretty surprised discovering that his job is mainly about maintenance. I then decided to open a discussion (french) on the main site of the French community of software development professionals (http://www.developpez.com/). The discussion is entitled Are students well-enough trained to the reality of professional software development? and is mainly about maintainability. It was pointed out that, at least in France, people are not well-enough prepared to face maintenance in both aspects of it:maintain existing codemake maintainable codeMy question here echoes to this discussion and aims at finding a good way to teach maintainability.How can we teach maintainability?What kind of exercise would you suggest?If you have been well-trained regarding maintainability, what particular kind of courses did you take?[edit]After some misunderstanding, I think I must clarify my question.As a project leader and software developer, I often work with trainees or freshly graduated students. I once was freshly graduated myself. The thing is that students are usually unfamiliar with principles such as SOLID that increase the maintainability of a project. We often end up having important difficulties making projects evolve (low maintainability).What I am looking for here is a concrete academical example of successful teaching about the importance of maintainability and how to make better code regarding this particular point; or possible suggestions to improve the way students are trained.
How to improve the training of students regarding maintainability?
programming practices;education;maintenance;maintainability
How can we teach maintainability?That's a matter of practice.The most straightforward way of practicing it in a controlled way I can think of is to simulate typical maintenance project about as follows.Get some project (Project A) that is well done and introduce few issues over it: inject some bugs, a good doze of duplicated and dead code, drop some features, unit tests and documentation here and there etc. You may even have a dedicated name for that, like Project A - damaged version.Establish an issue tracker and fill it with requests corresponding to particular damages you made. Establish basic rules and practices for development process - VCS commits, code reviews, QA etc - consider taking what you can from check list provided in The Joel Test.coursework 1.Fix bugs, add missing unit tests, documentation and features.coursework 2.Refactor.coursework 3.Maintenance / improvement of original projects to use by next year students- Project A version 2.0 and Project A - damaged version 2.0, respectively.By improving damaged version I mean making better educative damage to it. :)Of the practices mentioned above, pay special attention to that of code reviews. This is likely the most effective way to ensure that code is easy to maintain, as indicated eg by the top answer in related question.