Senior Honors Thesis

Increasing Retention by Introducing Interesting Problems Early.

Major questions that warrant continued work are highlighted in yellow boxes.

Background

Topic: Catching Students in CS1

Computer Science programs today are rightly concerned about the decline in degrees awarded in Computer Science, especially to underrepresented groups like women and ethnic minorities.

A large part of the problem is recruitment.  Some students never take a CS course because they have false negative or culturally gender-biased impressions about the subject, or systematically perpetuated misconceptions about the field.  Students' understandings of CS are often formed before they even have the chance to take a CS course, so this problem is being looked into on multiple fronts.

The focus of my work is on retention, not recruitment.  Still, recruitment is a very important (prerequisite) issue that requires much consideration and continued work on a number of fronts.

A second issue is retention.  Once we have students in a CS classroom, how can we keep them there?  For some students, the difficulty of learning their first programming language may intimidate them and prevent them from continuing in CS.  For others, programming itself may be boring without context, understanding why programming is important, as a tool for solving larger and more interesting conceptual and analytical problems.

Computer science, to me, is the study of problems, problem-solving, systems, and systematic thinking, and programming is a tool and a language for expressing such thought. Many freshmen don't see it that way, and don't enroll in a CS1 course even if they know they enjoy such logical thinking.  The best approach to recruitment and retention is probably multi-faceted, targeting students beginning in elementary school, presenting them with thought-provoking logical thinking problems, and getting them to associate interest in problem-solving and analysis skills with interest in Computer Science.  This approach has the benefit of not only encouraging students at a young age to consider Computer Science on the same level as other sciences, but also formally teaching valuable problem-analytical skills early.  CS Unplugged has developed an entire CS curriculum set for the elementary school level, without programming.  SIGCSE's educational policy group is already navigating the complex K-12 political machine to educate teachers, parents, and especially policymakers about why keyboarding, computer literacy, and Microsoft Word do not count as Computer Science, and why CS is just as primary a science as Physics or Calculus.

So how can we, at our level, get and keep undergraduate students in Computer Science?  One approach that has been offered is the survey course.  This PDF article gives an overview of B. Parhami's ECE1 course at UCSB, in which he presents ten interesting problems in computer science.  This approach is similar to that of CS Unplugged, in which students are presented with the Science and the challenging problems, without the programming.  Parhami makes the point that students in their first few semesters of CS or ECE don't often see the exciting challenges waiting after mastering their first programming language, and tries to address that shortcoming with a separate course.  If there are students who choose not to major in Computer Science based on an inaccurate idea of our field, such a survey course would correct these misconceptions and encourage students to continue in CS.  The challenge, then, is getting students to take this survey course.

Other pre-introductory courses, like a pre-introductory programming/CS0 course, address the issue that students without any prior programming experience are often overwhelmed or intimidated by intro programming courses.  These are often taught with scripting languages or specialized languages like Alice.  See this paper (PDF) from Tufts about their experiences with such a program.

Adding a new course doesn't really solve the problem:

  • SIGCSE's K-12 group reports that CS is difficult to offer in high schools because it's an additional course. That's a political issue, requiring faculty to cover it, more administrative work and additional funding, or at least an extra, volunteer-basis commitment, above contract hours, by an instructor.
  • It probably wouldn't count towards the major/minor/certificate.  The same group reports that when CS competes as an elective (not for any credit towards their program or graduation) students are discouraged from taking it. At the college level, those who wish to make the best use of their credit hours, especially those who would consider second majors or certificates, carefully plan their schedules based on prerequisites and degree requirement value, and they would probably start with CS1 instead.
  • Again, political hurdles: Some non-CS programs require CS1, an additional reason that CS1 will continue to be many students' first (and often only) encounter with CS.
  • A less intimidating CS0 course may be seen as a "slow-kids" course. We don't have such a course, so I can't assert that this would be a pervasive attitude or common occurrence.  Note: This may not be a bad thing--many students see such a course as an easy credit (consider the popular Geology course informally known as "rocks for jocks"), and this may actually encourage students to take it, especially if it could carry QR-B or some science credit.

Why do other departments require CS1? What benefits do these programs expect their students to get from a CS 1 course, and how do CS1 courses deliver on these expectations? These questions deserve further consideration. Consider that these questions underscore the political nature of course descriptions and prerequisites, and the difficulty of modifying the intro sequence. In the long-term, it may be worth instituting such a survey or perhaps a standard three-credit analytical-problem-solving course, and encouraging other departments to require it instead of CS1.  ("Computer Science for non-majors"?)

One program which already tackles the problem of retention at the CS1 level is WES-CS.  This program especially works on the hurdle of recruitment into CS1 to begin with, which is an important and related concern, but not one I aim to look at here.  WES-CS increases retention by making it less difficult for students to learn programming.  Their approach is based on Peer-Led Team Learning programs in Calculus and Chemistry, and such programs have been shown to increase students' grades and retention in all fields.  The additional support provided to WES-CS students makes programming less intimidating for them, and as a result they do better in these courses and have higher retention rates than other CS1 students.  Some schools have made such supplementary discussions mandatory for CS1 courses and seen benefits carry to all their CS1 students.  A common trend here is that additional support increases retention.  It may be worth looking at the effects mandatory discussion sections (not specifically Peer-Led) have on retention.

Parhami and CS Unplugged demonstrate that presenting students with engaging and challenging problems, while concurrently linking those problem solving and analysis skills with Computer Science, gives students a positive, accurate high-level understanding of Computer Science as a field, and may encourage students to pursue it as a major.  The primary role of CS1/CS2 is to teach programming, not survey the field. I'm not arguing that the focus of CS1 needs to change--CS is about problems, but we need a common vocabulary for describing those problems, so it's important to begin CS with programming.  However, CS1 presents a unique opportunity for retaining students, as their first (sometimes their only) exposure to Computer Science; it's in a position to provide such a survey, so perhaps pulling these "interesting problems" from higher levels into CS1 would encourage problem-solving students, especially those who don't enjoy programming for programming's sake, to continue on to the "interesting stuff".

CS0 courses and programs like WES-CS demonstrate that reducing the intimidation factor helps increase retention.  It may be worth considering ways to add additional support to CS1 students or make learning programming less intimidating.

In short, the recruitment and retention problem needs to be solved on all fronts.  But CS1 is a particularly critical stage when many students decide whether or not they are going to continue in CS.  Once we get them into our classroom, how do we keep them?

Return

Ideas: Improving CS1

CS1 is our chance to excite students about Computer Science.  If we agree with Parhami's contention that interesting problems presented early can excite students about Computer Science, how can we do this in CS1 without making the course more complex?

Return

Expose Students to more Real Code

WWhile we are trying to motivate students to continue in CS, we need to make it as easy as possible for them to learn programming to begin with.  As a WES-CS team leader, the most frequent question my students have is Why?  An intertwined part of understanding how you would use certain syntax is why you would use it.

Students with previous programming experience are favored in these courses, as they either already understand the topic presented, or if it's new to them (like OOP or exceptions, etc) they can understand why it would be useful and where they could use it in their programs.  Students without such experience are often left without context or explanation.

Thinking about a programming language as a foreign language, it may make sense to immerse students in good examples.  If students were exposed to more real, good programming code, they would have something to emulate and gain a broader context for why the syntactical elements and control-flow concepts they are learning are useful.

Most students in CS1 see plenty of bad code.  All the time, it's "This code doesn't compile.  Fix it."  Or, "This code compiles, but it's hopelessly obfuscated.  What does it do?"  This is similar to immersion-based foreign language courses, which have been shown to be highly effective especially in young children, but also in college courses.  This is the approach taken by many foreign language programs here, including our popular Spanish, French, and Italian programs.

Instructors should go out of their way to provide students with good, thoroughly documented code for students to emulate.  If their projects come with helper classes, they may consider releasing the source code for the projects.  It may be worthwhile to release the code after the project is handed in, so students don't think they are supposed to change the helper classes or code to the specific implementation (as opposed to the interface).

The WES activity #3 given below also demonstrates that students could be asked to modify existing code, not to "fix it", but to add additional features.  This approach is commonly taken in more advanced courses, where the goal is to reinforce interesting concepts.  Many higher-level courses provide students with sample code or an implementation of one part of a system, and students must build onto the code they are given.  This provides actual examples of good code, good practices, and good system design that the students can emulate later.

Return

Add Context Insights to Existing Projects

The primary purpose of most existing CS1 projects is to reinforce programming skills. In order to increase exposure to the rest of the field, it is worth connecting each project with those "interesting problems" or concepts from higher-level CS courses (like those described by Parhami).  To add connections to build awareness with the rest of the field, then, it may be adequate simply to append some text to an existing project, describing how the project they are working on relates to more interesting and exciting developments in the field. Students appreciate this context and the idea that they are actually implementing something that's meaningful or has real-world applicability, even if it's just a very rudimentary version. Students have reported to me that this is one reason they prefer to use real tools like Eclipse and languages like Java, even if just to write Hello World, because they know that they are learning tools and languages that are actually useful professionally and academically.

We can also take this opportunity to embed topics that are becoming more and more pervasive in software development, to increase awareness among student programmers and hopefully enable them to begin writing better code, should they decide to pursue development work after only CS1 or CS2.  This has the minor side effect of improving the quality of code that students generate in on-campus development jobs during their college career.

When I was in CS 1, the final project introduced the idea of the MVC design pattern.  They didn't expect us to fully comprehend this complex notion of encapsulation, they just spent a portion of the project specification explaining the basic idea of this principle, and then use our understanding to inform the object-oriented design we were being asked to make.  (Which would then be corrected as necessary by our TA's.)  This extra information promoted awareness of design patterns and got me interested in software engineering.

Three topics that are important in software development today, and will only become more important in the future are:

  • Multithreaded/Threadsafe Development, as multicore systems become the norm
  • Software Engineering, to promote good software design/architecture practices
  • Thin/Network Computing, as the "cloud" signals increasing focus on distributed systems

You could also include Algorithms, Information Security... almost every CS course has important and interesting ideas to present. See ACM's CS curriculum recommendations for more inspiration.

Software Engineering principles would be reinforced by exposing students to lots of good code they could emulate.  After all, Design Patterns are the epitome of this idea, that people like to emulate good practices and design tricks they have seen.

The first step I took was to identify aspects of these principles, Multithreaded development in particular, that were taught in higher-level courses.  Then I also mapped out the principles taught in a given semester of CS1 and CS2 projects.

The aspects of high-level courses that I identified related to Multithreaded Development are here.

Once I had identified these high-level concepts, I tried to bring them down into the first-year projects.  This would promote awareness of these ideas and problems without modifying the curriculum drastically, or requiring them to fully understand or learn these ideas at this early stage.

The best approach I found was, for a given project, to ask:

  • How would a similar system be implemented in real life?  What additional concepts would tie into this implementation?
  • How would this project function in a multithreaded environment?  Could students be led to a naive understanding of these synchronization issues?
  • What high-level projects does this remind me of?  What was exciting or challenging about those projects?
  • How could a graphical user interface be introduced?  Could this be used to promote thought about threads?

Then I took actual CS1 and CS2 projects and modified them to embed principles of multi-threaded development.  The same ideas could be applied for other topics.  Sorry, I do not have the images from the original project descriptions.

  • CS1, P1: Golf... and fireworks!  Added text describing Physics simulators and trying into simulations/game development.
  • CS1, P2: Knight's Tour.  Asked the question, how would a computer solve this?  Tied into Search algorithms and AI.
  • CS1, P3: A different kind of "loops".  Talked about the role of the Operating System for managing access to shared resources like hardware sound mixers.
  • CS1 present Design Patterns in P4 and P5 most semesters.
  • CS2, P1: Itinerary.  Introduced an intuitive overview of the problem of synchronizing thread access to data structures.
  • CS2, P3: Maze Solver.  Added an extra credit component that asked students to make use of a provided graphical interface.

Return

Rethink Programming Projects

Another approach may be to rethink how programming projects are structured to give logical thinking and analysis a more central role in student assessment.  For most students, the projects really bring the skills from class into perspective as they see all the syntactical elements they have learned come into a single body of code.  We could take this opportunity to actualize logical-thinking skills as first-class elements of the project as well.

One important project which has already done a lot of this work is Nifty Assignments, out of Stanford.  Each year this group presents many such "nifty" assignments at SIGCSE.

I have written a few complete WES-CS activities, based on Parhami's "Interesting Problems", which begin by asking students to consider such a problem or interesting topic, and then write some code to help them think about the problem further.  In these problems, programming is given its rightful context as a tool for problem-solving, where writing a program to think about a problem may encourage students to write another to approach it in a different way, or with a better algorithm.

  1. Number Sequences
  2. Impossible Change / code
  3. Secret Password / code

These problems could be expanded to form CS1 or CS2 projects, by omitting the provided code and asking them to implement it themselves.

Return

Further Directions

Intro sequence development is an ongoing process, and recruitment and retention will always be challenges to solve.  Even if we never determine why certain populations have historically been discouraged from pursuing careers in computer science, we can continue to develop and assess novel approaches for recruiting and retaining these students.  For the ideas presented here, it remains to be seen how effective such an approach would be in encouraging students to continue to CS2 and further.

There probably needs to be a more thorough and broad assessment of approaches to recruitment/retention like the effectiveness of CS0 courses against a variety of metrics, both qualitative and quantitative.  Between students who take CS1 with prior experience, students without prior experience but with CS0, and students without prior experience or CS0, how do grades in CS1 and CS2 correlate?  What is the role that self-selection plays in this correlation?  How likely are students of each of those three categories to continue in CS?  What are their perceptions of the field?  What impact do "Digital Divide" or survey courses have on students' perceptions of CS?  How do retention figures correlate between schools with mandatory discussion sections accompanying CS1 relate to schools without such a discussion, or with an optional discussion?

In order to solve the recruitment problem, systematic outreach to K-12 institutions, teachers, parents, and policymakers needs to continue.  Teachers who are already teaching such logical and analytical concepts to their students, especially as "fun" puzzles or enrichment activities, need to recognize the link to Computer Science.  More novel programs such as CS0's or survey courses should be implemented at different sizes and types of universities and trends or changes in retention or perception more closely studied.  How does the recruitment/retention problem in computer science relate to that in other fields?  Are there fields that are more successfully challenging or relying on systematic factors to attract and retain these targeted groups?  How does retention in CS relate specifically to retention in Math or other hard sciences that have faced similar issues?  What novel educational programs and approaches have been implemented in these programs that could be effective in CS?

Return

References

  1. B. Parhami's "Interesting Problems" Article / Paper / Course @ UCSB
  2. CS Unplugged
  3. WES-CS Program @ UW-Madison
  4. CS0 with Alice @ Tufts
  5. Alice in Education
  6. ACM's Education Policy Committee / SIGCSE
  7. ACM's CS Curriculum Recommendations / CS2008
  8. Nifty Projects @ Stanford

Return