I attended the AP Computer Science workshop led by [Leon Tabak](http://eonsahead.com/) from Cornell College at the AP Annual Conference. The workshop was a good mix of discussion among the participants and sharing of information by Leon. This post captures the litany of resources, pedagogical ideas, and insights from the workshop.
* Java Style Guide. Leon recommended [The Elements of Java Style](http://www.amazon.com/Elements-Java-Style-Reference-Library/dp/0521777682). I currently use Litvin and Litvin’s [The 17 Bits of Style](http://www.skylit.com/javamethods/JM-Appendix-A.pdf) which is Appendix A in their book Java Methods. I also reference Sun’s [Code Conventions](http://www.oracle.com/technetwork/java/codeconv-138413.html). I’ll have to pick up a copy of the Java Style Guide.
* Leon makes great use of [Javadoc](http://www.oracle.com/technetwork/java/javase/documentation/index-jsp-135444.html) in his code. I learned that you can embed any HTML in the Javadoc comments. This includes image tags referencing UML diagrams, links to articles on algorithms, or even LaTex markup through the inclusion of [MathJax](http://www.mathjax.org)!
* Speaking of LaTex, Leon introduced me to the [Listings package](http://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings) which supports Java and very nicely formats both inline code and code snippets in LaTex documents.
* Leon’s site: [Eons Ahead](http://eonsahead.com/)
* [ICE](http://ice.cc.gatech.edu/apexam_final/) at Georgia Tech has AP practice questions
* [Dia](https://wiki.gnome.org/Dia) is a UML diagramming tool that was recommended
* Leon led us through a series of exercises to introduce recursion. His exercises help students to understand the value of recursion rather than just understand the concept. He highlights an analysis of effective and efficient methods implemented recursively and iteratively. He starts with the classic example of implementing a factorial method recursively. While this recursive implementation is easier to understand conceptually, it is no more efficient (actually less efficient) than an iterative solution. The next exercise implements a powers of 2 method recursively and illustrates that the recursive solution is more efficient than an iterative solution by applying the algorithm . Additional exercises build on these ideas. A recursive method that raises a number to a power can introduce log n vs. n efficiency. Similarly, [Euclid’s Algorithm](https://en.wikipedia.org/wiki/Euclidean_algorithm) for calculating the greatest common divisor is another good example.
* While talking about recursion, one of the participants shared an exercise that she uses with her students. She gives them index cards with a number written on them and references to other cards. A student with a card reads the number and then asks the person with the referenced card to do the same. In the end, the school’s telephone number is spoken. She then has them ask the person with the referenced card for their number before speaking the number on the card. The result is the school’s telephone number backwards. This nicely illustrates the difference between tail and head recursion. Reflecting on this activity, I think I would put letters on the cards instead of numbers such that the series of cards would spell one word with tail recursion and a different word with head recursion. I’m definitely going to try this concrete example of recursion next year.
* In the midsts of a discussion of whether students should type in code by hand in order to discover common syntax mistakes that they will inevitably make and how to debug them, an alternative activity was shared. The activity is to provide students with working sample code and a list of errors to introduce one at a time. Students introduce the error, observe the result, and then better understand the how common mistakes are manifested.
* Another discussion focused on engaging students through pop culture examples. One that sounded intriguing was exploring class hierarchies using Angry Birds.
* Leon shared the importance of having students present and explain their code to their peers. I’m going to try and incorporate this next year. Perhaps in conjunction with their capstone project.
* Students that have a computer science class before AP Computer Science are much more successful. This is not surprising, but I was surprised by how many participants teach AP Computer Science as students’ first course. At my school, we are fortunate that we have Programming 1/2, each one semester, that is required (except for exceptional situations), before enrolling in AP Computer Science. I would be unable to expose students to many of the topics that I think are important (UML, unit testing, Javadoc, graphics) if AP Computer Science was their first course.