Computer Science Teacher
Computer Science Teacher - Thoughts and Information from Alfred Thompson

December, 2010

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Four Key Concepts of Computer Programming

    • 18 Comments

    Last week Rob Miles who is taller than I am, has more hair than I do and has an English accent all of which indicate he is probably a lot smarter than I am left a comment on one of my posts that lists his idea of the four key concepts in programming. He left to comment on Do We Need A New Teaching Programming Language BTW. The post and his full comment are worth the read. Rob’s list was:

    • Process data (assignment)
    • Make decisions (if)
    • Loop (do - while, for)
    • Use indexed storage (arrays)

    Among other things he said:

    If you can do these four things you can write every program that has ever existed. Sure, the code won't be pretty, but it will solve the problem. In my course we focus on algorithms at the start because this is where we actually create behaviours  [note classy British spelling which adds credibility] that solve problems.

    In all seriousness, Rob is a great teacher who also writes some really good textbooks. He really knows his stuff. All of that not withstanding I kept trying to think of a fifth thing to add to his list.

    I thought about input/output for a long time. But I/O is such a platform dependent sort of thing. It depends not only on the language but the operating system and even available hardware. Input via a key board is different from punch cards (remember those) and still more different from input via a Kinect sensor (let’s keep in mind that there is a future). As I recall the PASCAL standard did not specify requirements for input/output and left it to the developers for individual platforms. So that probably doesn’t fit.

    I thought about variables but that is sort of covered by process data and indexed storage. Even internal data representation which I see as a key computer science concept is probably not as key for programming. I have successfully used programming languages that only stored integers and strings. Well maybe there was a Boolean but I forget. I managed to write some useful applications anyway. Some even dealing with money.

    Recursion? How often do you really need recursion? And a lot of things that recursion is used for loops will do just fine for. So while one should learn recursion and a really good programmer should know how, and more importantly when, to use it I don’t think it fits the top four or five list.

    Would you add something? Remove something? Overall what do you think of Rob’s list?

    Note:  To subscribe to this blog please use http://feeds.feedburner.com/ComputerScienceTeacher as the RSS feed source. Thanks.


  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    How not to teach programming

    • 14 Comments

    Through the wonders of DZone I came across a blog post called Don't teach like you code. The target audience seems to be professional coders who are teaching beginners. It’s always interesting to read articles like this and part of that is to understand the perceptions that people have about teaching when they are not full-time teachers themselves. And this article does make some good points about how not to teach. Unfortunately the examples of how people, one presumes the author included, actually code are not what I want new programmers to learn. In fact this post was quite unsettling to me as someone who made his living writing code for 14-15 years and who still writes some when necessary.

    The article has a line that reads “”But, good coding isn't like teaching at all. It promotes habits that are entirely counterproductive to the art of teaching.” Really? I’m skeptical. He goes on to say “”Part way through writing a method, you might decide you need to track things in an array. After a few minutes, you'll decide a hashtable works better.” Oh please in the name of all that is good in the world don’t let that be common among professional developers. Yes, that happens sometimes but it should be awfully rare. You should have thought things through in some detail before you started coding. If you are making big data structures in the middle of coding you clearly (in my opinion at least) were not ready to start coding at all.

    On the other hand in teaching I would expect this to be more common. Specifically the lecture that worked well with one audience may not work as well with another. A good teacher sees this, adapts and tries to explain things a little differently.

    And then there is this gem “Second, coding lets you cheat on the details. We compile our code not because we think we're done, but because we want to find out what we may have missed. ” No! If you run the compiler and get errors and warnings you should be surprised. Or at very least disappointed. Now maybe the author is using crummy tools. I am spoiled by Visual Studio which notices a lot of syntax and other errors as you are typing. And IntelliSense goes a long long way toward helping avoid spelling errors. This makes it easier to avoid missing things. But don’t people read though and self-edit before compiling any more? Some days I think we were all better off when programmers had only one or two chances to compile their code a day. Coding is about details. Cheating on details is a path to destruction.

    The last line of the article is priceless. “How do you teach people well? It starts by knowing that what may make you a great programmer will not make you a great teacher.”  Probably true. But you also have to understand what makes a great programmer. I think a lot of programmers have a much higher opinion of their coding ability than is warranted. I never saw myself as a great programmer BTW. In fact I know what a great programmer is and how they work. I’m pretty sure I don’t have it. But I know enough about it to teach it. Like a great football coach who has never thrown a touchdown pass or gotten a sack or kicked a field goal but who can help others do all those things better a good teacher is someone who helps others learn from the mistakes of others.

    A great programmer may not make a good teacher because they may not understand how they do what they do in a way that they can translate for a beginner. But someone who speaks the language of software and can translate the concepts and ideas for beginners may make for a great teacher even if only an average (or even fair) programmer themselves. We still have to focus on what makes for a great programmer not what makes a lazy programmer though.



  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Free E Books from Microsoft

    • 0 Comments

    I “borrowed” this list from the  Microsoft UK Higher Education blog (Free Microsoft ebooks) Most of  these I have linked to in the past but it is nice to have a good list of them in one place. Most are fairly technical but some (Free ebook: Own Your Future: Update Your Skills with Resources and Career Ideas from Microsoft) are not. Some of them are particularly useful for network managers and students learning about network management as well. And one of my favorites is Programming Windows Phone 7, by Charles Petzold

    Note: That I am on vacation this week so this post was prepared in advance for appearance now. To subscribe to this blog please use http://feeds.feedburner.com/ComputerScienceTeacher as the RSS feed source. Thanks.



Page 1 of 7 (19 items) 12345»