I am a Selfish Git: A bit on my teaching philosophy

A common observation I encounter from people who have taken my class is that there is less structure in the assignments than they are used to, and oftentimes less than they would like. A consequence of this is that participants do a lot of searching the web for tidbits on syntax and program idioms for the language du jour, a process that can take time with the wealth of information that is returned by a simple google search. I could track down some research that shows the benefit of this “look it up yourself” approach, and it would all be valid and it is one of the reasons I structure assignments the way I do, but there is another reason. A more selfish reason.

Throughout the term I’ll assign a series of assignments. Details are tweaked each semester but the general outline is something like:

  • read in lines of numbers, one per line, do something with them and write out a result number.
  • read in lines of structured data, do something with them, write out lines of structured data
  • spawn a child process, or two, connect them with a pipe (this year I will probably integrate the “read in lines” idiom into this assignment since I like it so much)

I’ve done each of these myself of course, and tweaked my own solutions from year to year and have found a structure for each that I think works well, is easy to read and is as simple as possible. Often times my solutions use fewer lines of code than some of the solutions I receive, which admittedly make my estimates of how long a particular assignment will be inaccurate. I know some of the assignments end up taking a lot longer than I anticipate for some, and this can be
extremely frustrating, especially since I know everyone’s time is a precious commodity that must be partitioned across other classes and personal time too (you are making time for play, aren’t you?).

I could provide more details in the write-ups. I could say “I tried algorithm X a number of ways: A, B and C, and settled on B because P, Q and R”. It would save those completing the assignments time and it would save me time, because on average the results I’d get back for grading would take up fewer lines of code and be more familiar to me. And that is why I don’t.

If I wrote in the assignment and said “for part A, use method B in conjunction with idiom X and you can complete this part in 3 lines” then I can guarantee you that around 99% of the 60 assignments I received back used method B in conjunction with idiom X in only 3 lines of code. It would be much easier to evaluate: I’d be familiar with the most common errors when using method B in conjunction with idiom X and would have made spotting them quickly a reflexive response.

But I wouldn’t learn a thing.

Let me tell you a secret. Sure, I enjoy seeing others learn and explore new ideas and get excited when they discover they can write something in 10 lines in Python that took them 30 in C. I really do. But that’s not the only reason I teach. I teach because I learn a tremendous amount from the process myself. In fact, all that tweaking I said I’ve done to my solutions? That was done in response to reviewing a diverse (sometimes very diverse) set of solutions to the same problem. Often times I’ll get solutions written in a way I would never have used solving the problem myself, and my first reaction is something like “why does this even work?” And then I’ll look at it a little closer (often times using a fair amount of googling myself to find other similar examples) until I understand the implementation and form some opinion about it. There are plenty of times that I’ll get a solution handed to me that I think is cleaner, more elegant and simpler than my own, and so I’ll incorporate what I learned into my future solutions (and let’s not forget back into my own work as well, a topic for another post). And I’ll learn something new. And that makes me happy.

I really like learning new things (thank goodness for that, given how long I’ve been in school!), and I have learned so much over the past couple years that I’ve been teaching. Possibly more than what I’ve learned in all the classes I’ve taken during my graduate career (different things for sure, which makes it difficult to compare amount, but still, you get the idea).

To be sure, there is a balance, and part of my own learning process has been to find out that sweat spot between unstructured free-style assignments (“Write a program that does X with input B. Ready go!”) and an enumerated list of steps that will gently guide a traveler from an empty text file to a working program that meets all the specs. I think I’ve been zeroing in on the balance, and the feedback I get from blogs as well as the assignments themselves is really helpful.

So keep writing, and keep a healthy does of skepticism regarding my philosophy. And ask questions!

3 thoughts on “I am a Selfish Git: A bit on my teaching philosophy

  1. I really like your “learn by doing” approach to teaching. I must admit I don’t understand a fair amount of the more specialized language in many of your posts. I think it is fantastic though because I end up googling the stuff I don’t know and learning more about a new topic. You seem to have inadvertently applied your teaching method to your blogging method as well with a positive outcome (at least for me).

  2. While your philosophy teaches us more since we have to research it, isn’t the point of me going to college having that centralized hub of information? Telling me to go Google it and then I get no or bad answers (not uncommon) pretty much defeats that purpose. And I also don’t learn when I ask a question for every problem I encounter. I learn how to avoid those problems, not do the work. The main problem seems to be that you give us no tools. When I come to class, I expect it to be relevant to something of mine that is graded. If it doesn’t, why even bother going? I’m not saying to tell us how to do something. But even bringing up the concept of error catching in languages most of us have never used would have been helpful.

    • Armaun, this opens up a really important discussion: what is the point of going to college? It bugs me to no end that the engineering curriculum is set up in a way to discourage, or at least make it difficult to have these discussions in class. Luckily we have blogging, which can stand in until the department comes to its senses and starts talking about this stuff.

      I don’t see college as a centralized hub of information, and if that were all it were it would be a complete rip off considering current tuition rates. A library is certainly a hub of information, and now tools built on top of the Internet are also hubs of information, and for the most part there are plenty of really excellent hubs available to everyone for free (plus the cost of an internet connection, in some cases).

      I think of college as a breeding ground of new ideas. It’s a place where many of us can come together and share bits of information that we have found on one of the many available hubs, and form new connections between pieces that we didn’t realize were connected. That process is a critically important component of education, without it, all we would learn is how to recite pieces of information that were given to us.

      A more concrete example (and as a preface, this is of course based on my own opinion and personal set of experiences, I welcome and encourage anyone to share their thoughts, especially if they contradict with my own): What’s the use of learning, say Python, as a specific example? It is one particular language that happens to be fairly popular right now. It has a ton of loadable modules that can be used to make fairly complex tasks simple. We might think then, to become better programmers we should memorize all the modules available to Python, what they do, the exact syntax, so that when faced with a problem we can sit down and whip out some Python code, bam solved. Then we get a job.

      Me: I’m so excited to be working here, I am an expert in Python, I can’t wait to solve all our company’s problems with awesome Python code.
      Boss: oh. well, we switch to Ruby last year.
      Me: Oh? How do I program in Ruby? What about all these Python modules I memorized, was that a waste of time?
      Boss: Probably, here’s a book.

      Learning something like Python has only a limited amount of value. Even *if* you end up using Python later on, the modules will always be updated, changing, code you wrote a year ago might not work exactly the same way on a different machine with a newer version of Python. The world is a very dynamic place, we can’t tackle it with only a memorized list of information.

      Learning how to learn a new language is infinitely more valuable. It’s the difference between “Oh, Ruby? What’s that?” to “great, I love new languages, I’ll get something written up in a week”. Going out into the wilds of the web and searching for how best to handle error handling in Python does two things, one, it helps hone skills needed to sift through the wealth of information that is freely available to us, and it helps form connections between different languages (or even entirely different ideas that seem unrelated), “oh, Python uses exceptions, so does C++, do the two differ wildly, or can I use what I know about C++ exception handling to aid my understanding of exception handling in Python?”).

      One thing that troubles me about the direction I think I see the department (and from what I gather, other engineering departments) going is that they seem to be morphing into vocational schools. Vocational schools are great assets to society, and they provide a valuable and important service. They also tend be a good deal cheaper. It’s a critically important role to have, but a different role from a university. I think it has been particularly easy for engineering to get funneled down this path due to the inherent connection between engineering and industry. That connection, of course, is vital, but if it becomes the only connection that receives any attention we will lose our ability to innovate, our ability to create radically new things and to solve problems we’ve never encountered before. And in a world with increasingly complex and changing problems that absolutely need to be solved, that thought is very concerning.

Comments are closed.