Algorithmic Thinking

11.17.10

posted by: mcrocker

I have heard the term “algorithmic thinking” tossed around a lot since joining NDeRC.  My teaching at Trinity involves teaching computer programming to Juniors in high school.  Most of these students have never done any programming before.  The final goal of teaching computer programming at Trinity is to give the students the skills needed to create tools in MatLab that can be used to “simulate” kinematics, kinetics, and other physics topics taught at Trinity so the students can try more experiments than are possible in a high school laboratory.  (It also has a very beneficial side purpose, which is to expose students to computer programming early, which is a good idea in general.)

In the course of teaching, I wanted to understand how well I was doing.  I assumed that this idea of algorithmic thinking was the best way to evaluate how well the students were learning.  However, it seems that algorithmic thinking is not the biggest issue when teaching the basics of computer programming.  Most students are really good at breaking down the steps of a task.  This is similar to explaining how to do something to a child.  I found that students would be good at explaining tasks to a computer if the computer knew English.  So really, the students just need to understand the computer commands.  This is harder, since the things a computer can do easily is not the same as the things that a person can do easily.  Computers perform calculations very quickly without error, but computer cannot make assumptions or correct for inexact commands.

So I came to the conclusion that abstraction is the key thing to teach students.  Once the student learns how to make a generalized statement in a form that the computer can understand, everything else falls into place.  However, students often have a hard time figuring out how to use an index variable in a loop.  Even v(i)=v(i-1)+1 is hard for them to come up with.  Having the students create and use their own functions, which have different variable scope, is even harder.

It is possible that algorithmic thinking is much more important later on, especially when it comes to more complicated problems (for example, problems that have more general inputs of arbitrary size).  However, when first teaching programming to students, the main hurdles seem to be with:  (1) understanding what computer commands are likely to be available to them, and (2) understanding how to abstract or generalize commands to apply to any dataset.

Also, the skills that students had before starting programming seem to go away due to frustration.  For simple programs, students tended to be willing to step through the programs in their minds.  With larger programs, they tend to rely on previous examples, and miss obvious errors that they would easily catch if they went line-by-line through the code.  I do that myself, since code can get very long at times.  In the end, it seems there is a lot more for me to understand about how first-time programmers understand what they are doing.

Be the first to like.

5 Responses to “Algorithmic Thinking”

  1. acarr Says:

    In regards to your last thought: “In the end, it seems there is a lot more for me to understand about how first-time programmers understand what they are doing.”
    Do you relate your first experience in programming to their first experience? Are there some similarities, and do you share your past experiences with the class? (although the big difference may be if you didn’t have this opportunity in high school, or did you?) Does this help in your understanding of their challenges?

  2. mcrocker Says:

    My memories of my first time experiences with computer programming are all about frustration. I taught myself programming from books. I remember reading a lot of confusing text then copying exactly the examples from the book. Those ran. But when I tried to make changes myself, I would rarely get those to work, even if it was only a tiny change.

    It took a long time to get used to the syntax of C (the language that I first learned). Eventually I got the hang of it (months later), but I really wanted to figure it out! About 2-3 years later, I took programming classes. I already knew how to mess around with programming, but the class introduced me to the idea of making code better, faster, and easier to read and change later. Plus the teacher was 1,000,000x times better a guide than a book.

    The biggest similarity has to be the frustration. A lot of the students just think the whole thing is overwhelming and that they are just not getting it. I do share my experiences with programming, but I guess I rarely tell them stories when I started out. Mostly because that was 15 years ago. I can hardly remember the specifics of what I found hard (other than compiler errors). Perhaps I should find my old programming books to see if that sparks my memory…

  3. vgoss Says:

    I found this post intriguing. Thanks.
    Do you think that there is a single most important skill that will increase the learning curve for anyone learning computer programming? If so, what is it?

    Even through the challenges, do students become Mat lab tool-creating savvy?

  4. acarr Says:

    thanks for responding back!

    How do you feel about the time frame you have to teach the students these programming basics? And, does the amount of time you and the students both have contribute to the frustration? I only ask this because you said it took awhile for you to get use to everything when you learned this. Are your goals being met as the teacher in this time frame? could the goals be smaller or bigger? I feel that “Time” is just one factor to continue thinking about…

  5. mcrocker Says:

    I think that abstraction/generalization is the hardest programming concept to understand, but the most powerful. I think the studetns do a wonderful job figuring it all out. Some of the students use their classmates to borrow from, but overall the class has done very well both years.

    In general, it would probably be beneficial to spend more time on pure programming, try different problems, etc. However, I think there is plenty of time to go over the basics in the fall semester. The later classes (over the next 3 semesters) will give lots of opportunities to use those skills again, thus deepening those skills.

    As for the frustration, I don’t think it ever goes away. Any programmer will tell you stories of how they spent 20 hours fixing a bug than ended up being a single incorrect operator on one line of code! Time only replaces one frustration with another bigger one.

Leave a Reply

*