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

October, 2006

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Bringing Industry into the Classroom

    • 1 Comments

    I've had a number of interesting conversations in the last week or so with people about the value of bringing industry experience into teaching important computer science concepts. Some of the people I have talked to have been people who have moved from industry jobs into teaching. Others have been students of such people. One of the common threads of the discussion has been that "real life examples" have helped bring home the importance of various concepts. It is one thing to talk about the theory of concepts and how they work in practice. A couple of stories from my own experience come to mind.

    One of my students called me up from his summer internship a few years ago. He said that the programmers he was working with were doing things I had taught him not to do. Specifically some of the programmers were allocating memory but not always de-allocating it. (This was in C++ BTW) I asked him how it was working out. He replied that when he ran his tests in a single iteration everything was fine. When he ran it in 5-10 iterations things got pretty slow. By the time he ran the tests in 25 iterations the application just flat out died. This was a story I got quite a bit of mileage from over the following couple of years.

    Another example was a project I worked on where we hard-coded in a specific value. Yes we all knew better but we did it anyway. We believed people when they told us this value would never change. When it did change it took the seven of us about a month to find, change and test the change everywhere. This time we were a little smarter and used a constant variable in case the number changed again. Which of course it did. The next time the change took us little longer than editing a single value and rebuilding the software. Plus some testing time of course. Explaining to students just how much that seven man-months cost the company made a real impression on my students.

    Not everyone has the chance to make or learn about important exemplary mistakes in industry. Small artificial applications demonstrate concepts but tend not to be as convincing to students. Students are often skeptical of their instructors - it's part of being young. For this reason it is a great idea to look for opportunities to invite professionals into the classroom to tell of their experiences.

    I used to work with a salesman who wanted his technical support to be a "swears by it." What he wanted was someone technical  to swear by the statements he made to customers. Sometimes a software or other professional can be a "swears by it" in the most positive sense in the classroom. Lots of professionals look forward to the opportunity to give something back by making an appearance in a classroom. If you as a teacher don't know of any you may want to seek out the local chapter of ACM or the Computer Society of the IEEE. Those organizations generally know people who are more than happy to help.

    When students hear professionals confirm the truth of what you are teaching them it becomes more than theory to them. Plus it can give you more credibility beyond just what the professionals say. Give it a try.

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    A Reply to an Interesting Comment - More on a first programming language

    • 13 Comments

    Tom Hoffman wrote a long and very interesting reply to my previous post for which I am very grateful. He makes some thought provoking statements and I like having my thought provoked. I was going to reply in an additional comment but things got really long so I decided that a new post (this one) was in order.

    The short version though is that Tom doesn't make a good case as to why a language being non-proprietary is relevant. For example, I think that if a person says "I want to give my students a copy of the software to use at home" that is relevant. That has absolutely nothing to do with the language being proprietary or not. Tom talks about different things that are relevant but does not make a good case that these issues are the property only of non-proprietary tools. He also doesn't make a good case for why proprietary or commercial tools are "bad" or should be avoided.

    Further I would add that automatically ruling commercial software out just because it is proprietary or commercial is closed-minded, short sighted and intellectually indefensible. Teachers should be judging a product on how well it does the job not on who produces it.

    Tom's comments are in italics below. My replies are inline following Tom's comments.

    First off, there is nothing wrong with an educator using free software for philosophical reasons.  Teachers often make decisions for philosophical reasons.  I'd be frightened to trust my kid with someone who didn't.

    Well it depends. How would you feel about a teacher who refused to teach about George Washington because the man was a slave owner? Valid philosophical reason or not? I think that the philosophy used should revolve around how well a tool teaches concepts rather than around the source of the tool.

    Now, what do you get with a free software license?

    1) the freedom to use the language for any purpose.

    For schools, the most important part here may be that this right doesn't expire.  You don't have to renew the license, you can't be forced into paying for an upgrade.  This isn't a limited educational version, you can use it to write and deploy any kind of application you want.  

    This is not something that non-proprietary software has a lock on. I don't know very many licensees that expire. The license for Visual Studio does not expire. And the academic version is the professional version with a different label on the box. Hardly limited. The difference is in the license which does not allow commercial development. That does not limit students in a first programming course in any real way. If fact any commercially viable software would easily generate enough income to buy a commercial license.

    2) the freedom to study how the language works and adapt it to your needs.

    Is this of practical value to 90% of the kids in an intro class?  Probably not.  Is it of value to teachers who really want to understand what they're teaching and kids who are fired up about programming?  I think it is.  Good programmers learn a lot by reading well written code.  You can read and learn from code that would be too complex for you to write, or understand completely.

    If by how the language works you mean looking at the source code for the compiler, I would argue that this is of use to fewer than 1% of the total population of people who have ever programmed in the history of programming. Of practical value to a single student in a first programming course? I don't think so. You can understand quite a bit about how a language works without having access to the source. Should the student know more than what is being covered in the first programming course? Of course, but that will be something they learn during their training and not something they will require in a teaching tool.

    But beyond that, yeah, this is a philosophical issue.  I believe that computer science is a science, and I can't imagine being in another science class, like biology or physics, where a student would be told, say, "Well, as a matter of fact, mitochondria do have their own RNA, but I can't tell you why, because that is a trade secret."  We should value engagement and drilling deeply into issues, without running into black boxes and proprietary code.

    You are addressing issues that are years away from a first programming course and outside the scope of my post. Interesting to be sure but a red herring in this discussion.

    3) the freedom to redistribute copies.

    This is very important for schools.  The language isn't limited to specific computers in the school.  It can be installed at home by students.  They can install it on their friends computers and show their friends how to program.

    You mean like Visual Studio .NET in the MSDN AA program, Visual Basic Express (free download) or the command line compilers that come free as part of newer Windows installs or updates though Windows Update? I don't see the connection to open source.

    4) the freedom to improve the program, and to redistribute your changes.

    Maybe not a big deal on the local level, but globally, it means that derivatives can be created that may suit local or educational needs better than the generic version.

    You do understand that you are making an argument against using Java and for using C# right? There are several C# compilers available in source form and one can easily make ones own modifications to the language without fear of legal action. The same is not true of Java which is a proprietary language and which Sun has taken people to court and won hundreds of millions of dollars in judgements against a company for making changes they didn't like.

    I'd like to address this on several fronts. First off it seems irrelevant to a first programming course. Neither students or teachers are going to be modifying compilers in that course. Secondly I don't see a whole lot of need for modifying compilers or IDEs by non-professionals. In fact few professionals are up to doing major modifications to compilers and IDEs. Even when they are I think that too many derivatives can cause software to be less productive as a teaching/learning tool because of a lack of consistency. It also makes finding comparable textbooks problematic. Further more it can make sharing of sample code and projects difficult which can limit what teachers can use in class.

    The may be some value in source availability for established professional developers but a) I don't see it for beginners and b) I don't see many professionals taking advantage of it either.

    Also, cross-platform compatibility does not always accompany free software, but it often does, and it is important for keeping schools' options open for their OS platform, and it ensures that students can use the software at home.

    The idea of cross-platform comparability does have merit. At the same time I think that in general the costs of maintaining multiple OS platforms in a single school (I have some experience in this from previously working in schools) adds costs and complexity that is hard to justify. Running Macs for graphic arts program makes some sense even though the rest of the building is Windows for example. However maintaining two platforms for teaching the same subjects is generally not a good idea. That's just my opinion based on my own experience in previous jobs in a couple of schools.

    FWIW The nice thing about a fast Internet connection is that schools can offer Virtual Terminal Access to a development platform at school for students to access from home on any platform. That is not used nearly as often as I think it could be or should be.

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Picking the First Programming Language

    • 10 Comments

    A recurring question in computer science education at all levels is what language should be taught first. The discussions on this issue at Slashdot, where the issue comes up about once a year as far as I can tell, are legendary. There are various arguments that are used:

    • It should be a language used in industry so students can get jobs
    • It should not be a language used in industry - we're not a trade school
    • It should be a language that was developed specifically developed for teaching
    • It should be a very high level language
    • It should be a very low level language (assembly language
    • It should not be a proprietary language
    • It should be available on a lot of platforms
    • It should be available from multiple sources
    • and on and on and on

    It seems to me that the first thing one has to do in order to make a good selection is to remove the irrelevant arguments from the issue. For example, a language being used or not used in the professional job market is not in and of itself relevant. In a first course one is not trying to create a professional programmer (even though some have gotten jobs with little to no formal training) so the fact that a language is used for professional work in not important. Likewise that a language is used by professionals is not per se a reason to discard it. Now there may very well be things that make a language a good choice for professionals that either do not contribute to learning in a first course or even make it to complicated to use. But that the simple fact that professionals use the language does not automatically mean it is not good as a teaching language.

    Another completely irrelevant argument is over avoiding proprietary languages. Cost may (though it rarely is) an issue but generally schools can easily afford proprietary languages. Compilers and even IDEs are available for free for proprietary languages like Java and Visual Basic .NET. Often when I hear the argument that proprietary languages should not be used the issue is mostly philosophical and very often another way of saying "Microsoft Bad." Individuals who reject C# (which is not proprietary as the term is properly used) and promote Java (which is proprietary) by saying that they don't want to use proprietary languages generally fall into the "Anything but Microsoft" camp and are often confused about what is and is not a proprietary language anyway.

    A semi-relevant argument is the one about tools being available from multiple sources. But to be honest I think that is more valid in later courses  than in a first course. In a first course keeping it simple is important. I think that this is easier if every student is using the same tools as the ones being used by the instructor in class. Being available from multiple sources is a relevant argument for a lot of things but not for a first course in programming.

    The next big thing is to identify what things are relevant. In my opinion what is relevant are the things (features and tools) that help one teach the important concepts of the course. If for example object orientation is important than languages like FORTRAN, COBOL and PASCAL are not good candidates even though there are some versions of those languages that support OOP they are not really designed for it like C#, Java or Visual Basic .NET. If you are trying to teach strictly functional programming than something like Scheme is going to jump out as a natural choice while Java or C is clearly going to get ruled out pretty much automatically. I could go on about this but you probably get the idea.

    Things like how simple is the syntax, how easy to use is the debugger, how good are the error messages and related things are also relevant. Although to some the issue of using or not using a debugger is a source of major controversy. I may take that one up in a later post. But if you are going to use and IDE it's available features are relevant.

    So it is a complex question with no simple answers. A lot of times the instructors level of expertise with given languages is also going to be a factor. It's hard for me to second guess the choices someone else makes unless they are clearly failing at teaching or getting the students to learn. Of course lots of second guessing does go on. There is as much politics in computer science as anything else. It makes life interesting. Yeah, I think interesting is the word I want.

    BTW I read an interesting post today that is related to this topic. It was at Lance Fortnow's blog. The comments are the best part so don't miss them.

     

Page 1 of 9 (26 items) 12345»