Tuesday, January 29, 2013

How to teach Programming

Subversion Under Control

Our team had a dinner meeting tonight. Hunter told us that we would be receiving our source code later in the evening. Everyone was excited to head back to the lab to talk about the source code. I now have on my hard drive a working copy of Obsidian. We talked briefly about the different main parts of Obsidian, but the main idea is for each of us to go in and explore the code ourselves. We came up with a list of functionality that is needed for completion of the project as well as some possible areas of extension that we could work on. To learn the source code we decided that going through the source and creating class diagrams of the packages and how everything interacts would be best. This way we are forcing ourselves to look at every file and method in the project and understand their connections. We might even get a good class diagram that we can use to teach other people about the code at a faster pace then them just looking around.


Programming Education

I have advocated that the educational paradigm that we have currently (not just for programming) is broken and needs to be drastically changed. Sir Ken Robinson is one of my favorite public figures who shares very similar viewpoints on how education should be changed. The main problem with school is the fact that it hasn't evolved since its growth during the revolution. The level of importance on each subject is very skewed to catering to "creating professors" as Sir Robinson puts it. By this he means that we put Math and Sciences first, followed by everything else, with any type of art usually being at the bottom. Now, this might be all well and good for anyone who wants to go to what we know of right now as higher education (Math and Sciences being the main competitors while liberal arts colleges being the only schools who entertain the thought of an art major) but it isn't the best if we want to be able to start seeing problems from different angles. I'll talk more about general education in a later blog post, but for now lets talk about programming.

The main idea behind learning different paradigms like Object Oriented and Functional languages is for the expanding of our cognitive self, to be able to see the problem from different ways. This is also the same reason that we learn about different ways of solving the problem (recursive solutions vs iterative solutions). So with this reason well established I must ask, why do I feel like most of the people who try to go through a programming degree switch? Why do some students really struggle with the problems? I remember specifically when learning about linked lists and our teacher taught at a high level (concepts) and wanted you to figure out how to program it by yourself. The problem was that most of the students around me seemed to not understand how to code it. When I would sit the student down and try to get them to explain to me what a linked list is they could draw the diagram, and how to move though it, but they never made the connection that "currentNode = currentNode.next()" is the way that you can move to the next node. Why did so many students not seem to grasp the concept? I honestly don't have a concrete answer, but I can say that the students that didn't get it the first time seemed to grasp the concept a lot better when I used real world code examples and a visualization of what happened step by step. I feel like if we want to teach programming more we need to change the way we tackle the situation. And this doesn't mean just teaching the syntax either! I remember being in another class where we learned syntax for most of the class and then for the final I was asked questions about higher level concepts that (again) some students didn't seem to grasp. It seems that no matter how you teach there are just going to be students who don't understand parts of concepts. I know a full range of programmers, ones who know many different ways of solving the problem, but they couldn't program the simplest of solutions to a problem. Others who if given the method signatures could program everything, but couldn't come up with their own solution to the problem. How do we bridge the gab so we don't have this large whole in our talent.  

Bret Victor (former interface designer at Apple) says that the "new" ways of teaching programming by using tools like Codecademy and Khan Academy are doing everything wrong. In his interactive paper he explains that both the environment and the language should be able to allow the student to learn the way of thinking that is required of us to get our creative ideas into code. He emphasizes that Code and Khan Academy are just teaching the "rote skill" of programming, which as he puts it, "Learning about 'for' loops is not learning to program, any more than learning about pencils is learning to draw". The goals of a programming system should be, "to support and encourage powerful ways of thinking, as well as to enable programmers to see and understand the execution of their programs". His paper has started influencing developers to help create his vision of a new programming system that would allow students to easily pick up the theory of programming without getting lost in the syntax that teachers seem to want to push under the rug until a later time (I had to go look up what the main method in Java actually meant because of the lack of explanation in class to keep the smoke and mirrors afloat until after people learned syntax). For me and the other students who have both a strong skill-set in programming as well as problem solving seems to stem from the fact that we continue to learn outside the classroom. These are the students I would want working with me on any project. The ones who stay here late at night solving a programming problem because they want to and not because it is just the day before the homework is due. I want the ones who work on projects outside of class, who work on projects that are not their own, who help teach other students. Those are people who I think go to class to get the grade, but they are also the ones who if given the opportunity to make their own curriculum of what they want to learn would choose bigger and harder challenges. THAT is what we need to change our current students into. And the only way to do that, is to change the way we think about teaching. 

No comments:

Post a Comment