Applying the TBC Method in Introductory Programming Courses

3 downloads 21607 Views 165KB Size Report
indispensable part of program development. Our method has been exercised in the introductory computer programming courses and has improved the students'.
Session T1E

Applying the TBC Method in Introductory Programming Courses Syed (Shawon) M. Rahman Assistant Professor, Dept. of Computer Science & Software Engineering University of Wisconsin-Platteville, Platteville, Wisconsin 53818 Email: [email protected]

Index Terms – software development method, eXtreme Programming, software quality, software testing.

some activities that even TDD or Waterfall or any other development method does not acknowledge. These activities play a very important role for creating test cases; understanding the requirements; helpful for developing the codes; and producing overall higher-quality programs. TBC provides an easy and simple framework that anyone can follow to develop programs. If the students follow the TBC method, they would perform the following: ‹ Practice software development lifecycle as an integral part of programming practice. ‹ Must learn how to test their own code and write test cases before writing code. ‹ Understand the problem requirements better that would be helpful while writing the programs. ‹ Make a cultural change in program development and consider program quality as an objective.

INTRODUCTION

THE TBC METHOD IMPROVES THE PROGRAM QUALITY

The National Institute of Standards and Technology released a report on June 28, 2002 that software failures cost in the U.S. economy an estimated $59.5 billion per year [2]. The software testing phase cost is 40-70% of the total cost the software in an industry. Industry leaders reported that half their project budget was spent on activities related to improving software quality, and they believed that developers did not pay adequate attention in the development phase [3]. We believe one of the root causes of this problem is our educational system. Students do not receive enough knowledge or training about how to test their code and how to develop reliable and higher-quality software. Students in programming classes usually focus on producing “correct” output and a “compiled” version of the code that is superficially tested, graded, and then discarded [5]. We believe that the traditional way of teaching introductory programming courses is not suitable for developing higherquality and reliable software.

In general students in the TBC method consider quality as an objective. The TBC method forces the students to test their own code thoroughly and make sure that their programs are doing what they expected it to do. Following the TBC approach, students must learn how to test their own codes from the beginning; not only producing the correct output or a compiled version of the code like traditional method’s students. The TBC method would help students understanding the requirements; reducing the ambiguities in the system; writing the codes; and revealing faults or failures in the program. In our study, we collected both the TBC and non-TBC sections students’ programs and created our own black-box test suite. We executed all test cases in all student programs in both sections and found that the passing rate of the black-box test suite in the TBC sections was at least 24% higher than the non-TBC sections. We have also used different automated tools to measure the fault density in the programs in both sections and found the similar improvement in the TBC section’s code quality.

Abstract - In our research, we have introduced and implemented a new software development method, Testing Before Coding (TBC), to bring in the benefits of using software development lifecycle in computer programming and improved students program quality. TBC follows the basic concept of Agile Method (such as Test-driven Development, TDD) and makes students a “cultural shift” in developing their computer programs i.e., students must test their own codes and consider testing as an indispensable part of program development. Our method has been exercised in the introductory computer programming courses and has improved the students’ programs quality at least 24%.

APPLYING THE TBC METHOD

IN PROGRAM DEVELOPMENT

In general, TBC [1] is categorized as a subset of eXtreme Programming. The TDD method is the closest match with the TBC method. However, there are a few distinct differences in lifecycle or activities between these two methods. TBC provides and emphasizes the data specifications and datamodeling phase that has similar activities compare to the Waterfall’s detailed design phase. The TBC method covers

I. Some activities introduced in the TBC method The TBC method acknowledged the classical or traditional development method activities, such as requirement gathering and analysis, design, implementation or coding and testing. However, the TBC method introduced several additional

1-4244-1084-3/07/$25.00 ©2007 IEEE October 10 – 13, 2007, Milwaukee, WI 37th ASEE/IEEE Frontiers in Education Conference T1E-20

Session T1E quality at least 24%, in terms of the passing rate of the blackactivities that we believe play a significant role in improving box test cases. Students (67%-88%) have claimed that this software quality or producing higher-quality software such as, method has helped them in understanding the problems and ‹ Specify the input and output values and identify extreme writing the codes, made the code easier to debug, improved cases. the students’ code reliability and quality, and lot more. ‹ Create test cases before coding. ‹ Execute the test suite and test their codes. TABLE I ‹ Create similar more test cases if any test case fails. COMPARE SOFTWARE QUALITY BETWEEN THE TBC AND ‹ Refractor the code and apply a few iterations. TRADITIONAL METHOD ‹ Create a “working” Features TBC method Traditional method prototype quickly. In Table I, we have involved Students test their code and make sure Generally they create a “toy” compared different features in Students that their programs are doing what program that is superficially tested, the TBC method with the considered they expected it to do. graded, and eventually discarded. traditional methods and found quality as an that the TBC method improves objective. the program quality. Understand the Data specification, data modeling, and The students do not perform the requirements write test cases before coding cycles data modeling, data specification, and the force the students to understand the or create test suites before coding II. Compare the software problems. requirements and the problem better like the TBC method. quality (67%-88% of the students claimed). We have compared the The passing rate of the black-box test Generally, the students do not number of warnings, faults or Improves program cases was at least 24% higher in TBC focus on testing during the failures found in both sections quality section compare to non-TBC section. development phase. of students’ programs using Create a Students create a working prototype The students do not really know several automated tools. In the “working” quickly in their first a few iterations. unless the project is very close to previous section, we measured prototype end and it would be very late for the software or program making any adjustments. quality in terms of black-box quickly. 67% of the students agreed that the Students always fear that if they test cases passing rate. We Confidence of make any changes in one place, the found that the TBC sections the correctness TBC approach boosts students’ of the program. confidence and it gave them the program may break somewhere the passing rate was at least courage to move forward and produce else. 24% higher than the non-TBC higher-quality software. sections. Using different Students consider program testing Students do not focus on program measuring tools, we found that A cultural change in phase as part of the program testing and do not consider testing the non-TBC section contains development and quality as an as part of the program more faults and failures in the program objective. development. code. We concluded that the development. TBC sections have less faults or failures in their code which REFERENCES supports our previous claim that the TBC sections program quality are better than the non-TBC sections. RESULTS AND CONCLUSIONS The TBC method is an agile software development mehtod and it is a subset of eXtreme Programming and it provides a simple framework that anyone can follow and apply in software development. Students applying the TBC method do not require any prior knowledge in software lifecycle. TBC emphasizes customer needs, short releases, and heavy testing cycles in throughout the development process. We believe that if someone follows the TBC method, he or she would follow a software development lifecycle, such as the Waterfall method. Our research also concluded that the TBC method makes a “cultural shift” in software development. The TBC method has been implemented successfully in five different introductory programming courses in the Department of Computer Science at North Dakota State University in two years and improved the students’ programs

[1]

Rahman, Syed and Juell, Paul; Applying Software Development Lifecycles in Teaching Introductory Programming Courses; 19th Conference on Software Engineering Education and Training (CSEET), April 19-21, 2006, Hawaii, USA.

[2]

Newman, Micheal, "Software Errors Cost U.S. Economy $59.5 Billion Annually," NIST Assesses Technical Needs of Industry to Improve Software-Testing, June 28, 2002,

[3]

Townhidnejad, Hilburn, “Software quality: a curriculum postscript?”, Technical Symposium on Computer Science Education, Proceedings of the 31st SIGCSE technical symposium on Computer science education, Austin, Texas, USA, 2000, Pages: 167 – 171

[4]

Shepard, T., Lamb, M., Kelly, D.: “More testing should be taught”, Communications of the ACM, Volume 44 , Issue 6, June 2001 , Pages: 103 – 108

[5]

Allen, E., Cartwright, R., Reis, C.: Production programming in the classroom, Technical Symposium on Computer Science Education, Proceedings of the 34th SIGCSE technical symposium on Computer science education, Reno, Navada, USA, 2001, Pages: 89 – 93

1-4244-1084-3/07/$25.00 ©2007 IEEE October 10 – 13, 2007, Milwaukee, WI 37th ASEE/IEEE Frontiers in Education Conference T1E-21

Suggest Documents