The Need To Teach Code Maintenance?
By Mark K. Reha GCU Instructor
I. Introduction
What are computer-science and computer-program students taught? To write software. What are many newly hired college graduate programmers assigned as their first task? To do code maintenance. Why? Because maintaining existing software is the quickest way to get up to speed, not only on the codebase itself, but also on corporate coding practices. By studying the codebase, and then by making small, incremental changes (to make patches or implement minor feature changes), developers gain essential knowledge and valuable experience. (SD Editorial Board, 2010).
Yet, with only rare exceptions, students aren’t taught how to maintain code. Maintenance is also not perceived as being interesting and therefore doesn’t lend itself well to the way that Computer Science and Computer Programming is taught. Industry leaders and editors of industry trade journals have actually proposed a new course for all Computer Science and Computer Programming majors. This course would be of code maintenance. If one of the first responsibilities of new hire graduates of Computer Science and Computer Programming programs is maintaining software then the skills required to maintain software must be properly taught in our colleges and university’s (SD Times Editorial Board, 2010).
This topic, among others related to software engineering, is a topic I am very passionate about, have researched as part of my Masters Degree, and even wrote a book “Debugging Our Computer Science Program ISBN: 978-1-105-37499-9” (Mark K. Reha, 2012) where I discussed this academic gap (and a number of others). In this article I will outline this gap in detail, provide industry research I completed, as well my offer my opinions on how to ensure we close this gap in academia. By the end of this article, I will provide a call to action that outlines the suggested changes that need to be incorporated into curriculum and classrooms to help ensure we prepare our students to maintain code.
I. Definition of Code Maintenance
So what is code (or software) maintenance? Code maintenance in software engineering is the modification of a software product after delivery to correct faults (i.e. defects) and to improve performance or other attributes. A common perception of code maintenance is that it merely involves fixing defects. However, studies have indicated that over 80% of maintenance effort is used for non-corrective actions that include one or more of the following maintenance activities (TutorialsPoint, 2017):
- Adaptive Maintenance: This includes modifications and updates applied to keep the software product up-to date and tuned to the ever changing world of technology and business environment.
- Perfective Maintenance - This includes modifications and updates done in order to keep the software usable over long period of time. It includes new features, new user requirements for refining the software and improve its reliability and performance.
- Preventive Maintenance - This includes modifications and updates to prevent future problems of the software. It aims to attend problems, which are not significant at this moment but may cause serious issues in future.
III. The High Cost of Bugs
It is estimated that as high as 90% of the cost of software development is in software maintenance. This alarming trend was predicted as early as 1972 where McKinsey suggested that CIOs should spend no more than 40-60% on maintenance. Gartner’s IT Spending and Demand Survey (2002) reports that CIOs are actually spending 80% of their budgets on maintenance. (Blane, 2007).
Two industry experts almost jokingly have stated “All programming is maintenance programming, because you are rarely writing original code. If you look at the actual time you spend programming, you write a bit here and then you go back and make a change. Or you go back and fix a bug. Or you rip it out altogether and replace it with something else. But you are very quickly maintaining code even if it's a brand new project with a fresh source file. You spend most of your time in maintenance mode. So you may as well just bite the bullet and say, "I'm maintaining from day one." (Dave Thomas, 2003). And, “It's only the first 10 minutes that the code's original, when you type it in the first time. That's it.” (Andy Hunt, 2003).
The general rule of thumb in software development is that for every $1 spent to develop the original software code an additional $3 is spent to maintain the software. The cost of fixing defects also varies depending on when the defect is found in the SDLC process. The later a defect is found in the SDLC process the more it costs to fix the defect:
- If a defect is found in the requirements phase it may cost $1 to fix.
- If a defect is discovered later in the development process that the same defect will cost: $10 if found in design and $100 during coding, and $1000 during testing
IV. Further Proof We Have a Problem
In 2011, I personally conducted a small scale interview on each member of my 15 member software development team that I was responsible for managing. Their primary job duties involved software maintenance. The experience of the team varied and ranged from 1-8 years in industry experience and who all had a Bachelor of Computer Science degree. The goal of my survey was to retrospectively explore the responsibilities of their first job after graduating from their Computer Science program and compare those job responsibilities with the skills they actually required as a new hire college graduate to perform those responsibilities. The following is a summary of the results of the interview:
- None of them were taught the skills required to maintain software.
- None of them were actually taught how to proficiently use a debugger.
- They were taught basic object orientated skills, basic data structures, assembly language, Java, and to general use a database.
- They believed there was too much theory and not enough practical knowledge taught using real-world projects.
- They believed some classes, such as artificial intelligence and compiler design, were a waste of time and not relevant for their careers.
- 80% of the interviewees’ said their University programs did not adequately prepare them to maintain, design, and program (web based) applications.
V. Entry Level Programmer Job Duties
An Entry Level Programmer (i.e. college graduate), who must given explicit instructions, and where one must check everything they do, who has little or no design responsibility, and who has little or no analysis responsibility, will very likely find themselves in their first job with many of the following code maintenance related job duties:
Analyzing existing code to learn design and structure of the code along with reading someone else's code, which generally is code that is fairly old with no documentation and poorly commented.
- Fixing code issues and maintaining that code in a version control system where there is ideally an existing production support branching strategy and merging best practices in place.
- Refactoring code and restructuring the code to improve the maintainability of the codebase.
- Running static code analysis tools and commenting the code to improve the maintainability of the codebase.
- Performing functional testing that includes testing code you write as well as others on the team.
- Performing regression testing that include testing code you write as well as others on the team.
- Writing and updating Unit Tests, ideally in a Test Driven Development (TDD) environment.
- Conducting peer code reviews.
- Participate in a team of with 8-10 members working in an Agile (Scrum) Delivery environment.
IV. Closing Remarks and Call to Action
If the primary duties of an entry level programmer (i.e. college graduate) is primarily related to software maintenance and the majority of the cost of a software product is related to software maintenance, shouldn't our Computer Science and Computer Programming programs ensure that our students enter the workforce with he proper skills and tools to support software maintenance? I suggest an obvious yes to answer that question!
We must prepare our students to properly, ensure the have the following skills, be able to work with the following tools, and work within a team. This means our students at a minimum must:
- Be proficient ideally in at least 1 object orientated programming language (like C++, Java, Python) and at least one other language (C, JavaScript, CSS/HTML).
- Be able learn how to navigate through unfamiliar code.
- Be proficient in using an IDE and also how to take advantage of the productivity features of the IDE.
- Be proficient at using a debugger to find complex problems in the code.
- Be proficient in how to use a source control system and also understand various branching strategies and code merging best practices.
- Must be proficient in managing code defects using a defect tracking system.
- Must be proficient in conducting effective code peer reviews.
- Must be able understand and work with multi-threaded software concepts including processes, tasks/threads, queues, events, and locks.
- Must be able to deliver projects using an Agile Delivery Methodology (such as Scrum), as well as, have a solid understanding of full SDLC process.
And finally, because most companies have moved to a team orientated Agile Delivery Methodology such as Scrum, where teamwork is paramount, it will be critical that students have a number of soft skills including but not limited to the following;
- Must be easygoing, enthusiastic, with a personality that plays well with others.
- Have solid communication skills.
- Must be willing to learn LOTS and apply old skills to new areas.
- Must be resourceful with ability to ”Google to find things” and figure out solutions to problems for “things they don’t already know”.
- Have a solid programming style that makes code easy to read, is well documented code, and who doesn't get compromised by time working in "sloppy" existing code.
- Have solid documentation skills.
I always have said that the great engineers I hired are not the ones that “already know it but are the ones that can easily figure out what they don’t know” (Mark K. Reha, 1995). After spending almost 35 years in the industry and almost 15 years as a hiring manager for a lot of great software engineering teams I was responsible for leading I still believe in that saying today. Great engineers have the “it” factor and the attributes that make them simply more productive and more resourceful than the average engineers. Some of these great engineering attributes cannot be taught but many of these attributes can be taught.
I suggest that all Computer Programming and Computer Science professors do a critical retrospective on their course curriculum and hands on activities to ensure that we are providing all of our students with the proper skills and exposure to tools to perform the first duties they will be asked to perform in their very first day entering the workforce.
What are your thoughts on this topic?
References
Arima Developer. (2003). A Conversation with Andy Hunt and Dave Thomas.
Retrieved March 28, 2017 from http://www.artima.com/intv/dry.html
Reha, Mark K., Debugging Our Computer Science Program, 2012. Print.
SD Times Editorial Board. (2010). Let’s Teach Maintenance.
Retrieved April 15, 2010 from http://www.sdtimes.com/SearchResult/34244
Blane, Tyler. (2007). Agile Development and Software Maintenance Costs.
Retrieved March 28, 2017 from http://tynerblain.com/blog/2007/02/28/agile-
development-roi-2/
TutorialsPoint. (2017). Software Maintenance Overview.
Retrieved March 28, 2017 from https://www.tutorialspoint.com/software_engineering/ software_maintenance_overview.htm