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

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Languages That Make You Think

    • 6 Comments

    The old joke used to be that “a good FORTRAN programmer can write a good FORTRAN program in any programming language.” The problem and what makes the joke not all that funny is that it involves not taking full advantage of the language in question. It is not a FORTRAN specific problem by any means. I have known many so called C++ programmers who really wrote C programs using a C++ compiler. Many programming languages are designed with an idea towards changing the way programs are written, problems are solved and how people think about problem solving.  Taking on a new programming language without  changing ones thinking is often a missed opportunity, at best, and a cause of serious problems at worst. I recently came across two posts inspired by one of  Alan Perlis's epigrams: "A language that doesn't affect the way you think about programming is not worth knowing." This comes after the same issue from a slightly different point of view.

    To some extent programming languages are idiomatic. That is to saw that there are particular ways that the language should be used. While it may be possible to use it the same or similar ways to other languages, the FORTRAN program in any language way, that is not the best most efficient way to use it. To get the most out of a language you have to think a little differently. A lot of languages are pretty similar – Java and C# for example. But there are still differences. Most obviously those differences involve libraries but there are subtle differences in the languages themselves. For example Java and put and set methods which are a little different from properties which are a different form of get and set.. The thinking involved is a little bit different.

    Other languages are very different. Scheme and F# are two examples of functional languages which are a completely different paradigm from languages like Java and C#. You’d really run into trouble trying to write FORTRAN programs using one of them.

    Visual languages like Scratch, Alice and Kodu are different (from each other and from other more traditional languages) in still more ways. I think we often focus on simple concepts, like loops, that feel the same but miss out on different ways of thinking about things like subroutines and methods. Kodu for example uses pages in much the way that subroutines are used in other languages. They have a a different sort of feel to me though. There isn’t a traditional return statement for example. This changes things. It means that leaving a subroutine doesn’t automatically go back to where it was called from. I’m still thinking about how best to take advantage of that. I am finding that Kodu is changing the way I think about programming. This is a surprise to me but in a good way.

    At the high school level there is a tendency to stick with one programming paradigm and even often a single programming language. I wonder it that is too narrow a way to teach programming. Younger students seem to adapt to different languages and paradigms faster then older students – much faster than their teachers all too often.  There isn’t a lot of room in the curriculum at most high schools to cover multiple paradigms in a single course. Over a couple of courses a school might cover a couple of languages perhaps. I recommend at least two and would prefer three. Mostly people tend to concentrate on the similarities between languages rather than the differences. There are advantages to this. The disadvantages are less clear though but I am starting to think that there is some value in talking about the differences. A good education widens ones horizons rather than focusing too narrowly. Something to think about. You know, while we are talking about making people think. Smile

    The blog posts that inspired this post are both well worth a good read.



  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Programming is for Girls

    • 14 Comments

    Fair warning: Some gross generalizations and exaggeration for emphasis follow. But some valid points I think.

    I wrote my first computer program over 35 years ago. There were more women in the field back then. Not as many as their were earlier in the history of computers though. Programming was a woman’s job. The excitement, the glory, the theoretically “hard part” was in the hardware. So was the money. Computer hardware cost a lot more than computer software. Even in the 1970s when one of my professors told me that one day people would spend more money on software than hardware I was not so sure he was right. But of course he was. Good thing for me and my career. But as the money moved into software women were pushed out of the field. This was not a good thing on many levels.

    When I was a student I went to a really conservative university – girls had curfews but boys didn’t. It was a long time ago. The boys tended to spend a lot of time “after hours” in the computer center working on their projects. And during hours as well. The girls not so much. They spent less time in the lab and somehow seemed to always get their projects in on time and to get good grades. In fact they got as good grades as the boys who seemed to live in the computer lab. Weird no? Perhaps not. Also in my first job out of college, mid-1970s, there were a lot of women writing code. Not quite as many as there were men but close. And the women were older, mostly married with kids and at the end of the day they easily left their work behind. And they met all their deadlines with a seaming ease that I sat in wonderment of. What was up with that? I have a theory of course. We, in the west at least, socialize women to plan and men to, well, not plan as much. Think about a high school prom. Planning for the boy means remembering to buy a ticket, perhaps organizing a Tux and showing up on time. For a girl, a whole lot more. Just the day of the prom there is scheduling when the hair is done, the nails, perhaps the makeup, where in the mix does one actually get dressed. And oh by the way she probably made sure the boy got the tickets and his tux.

    This post was inspired in part by an article from Stanford (Researcher reveals how “Computer Geeks” replaced “Computer Girls”) and there is a quote from Grace Hopper that I find most interesting

    As computer scientist Dr. Grace Hopper told a reporter, programming was “just like planning a dinner. You have to plan ahead and schedule everything so that it’s ready when you need it…. Women are ‘naturals’ at computer programming.”

    Naturals? Maybe or maybe not. But we do force women at an early age to plan. The women I went to college with and the women I have worked with in programming jobs were all planners. My wife was a professional programmer for a number of years. Her programs pretty much always worked the first time. She was not interested in debugging. She was interested in getting things to work the first time. And so it goes. When I was teaching I saw a lot of boys (not all but a lot) programming by the “ready, fire, aim” method. Start throwing code together, check it, fix it, check it, check what the result should be and fix some more. Bug? Throw in some code and see if it fixes the problem. Girls did not follow this pattern as often. Think things out, understand the problem, plan a solution, code. test, hand in and go on with their lives.

    Some days when I listen to debates about computer science vs. computer engineering I wonder if the solution is just to get more women back in the field? We are seeing tools that are designed to teach and interest, interest perhaps being the more important thing, young women in programming. The man who got Kodu rolling has a daughter as do several of his team. It is no accident that the graphics are girl friendly (while not turning young boys off either). Alice has been used, especially story telling Alice, with good results with girls. Young girls seem to love building robots with Pico Crickets among other tools. I have heard about a lot of middle school girls getting into programming through FIRST Lego league as well. The thing may be to not scare them away later.

    Either way I think we need them. I do not think our male dominated ‘throw a lot of code against the wall” sort of design works. It may get us there eventually but it is wasteful of time. money and energy. Oh girls are not the whole answer. There are girls who “program like boys” and boys who “program like girls” but are we getting the right mix? I don’t think so. And besides we clearly don’t have enough top programmers (Computer science grads fielding 'multiple job offers')  and if as many girls as boys went into the field we’d be a lot closer to having what we need. Plus we know that mixed gender times are more creative, productive and (at least in my opinion) more fun to work in.



  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    How Does Kinect Work?

    • 0 Comments

    imageChances are you have heard about the Kinect for Xbox 360 which lets you play games without a controller. The Kinect is a full body motion sensing device that lets you use your body as the controller. You may be wondering how it works though? The magic is in the software! OK, sure the hardware is important to but software is what makes the hardware go right? Anyway, here are some links to more information about how this exciting new technology works. Update: You can lsten to a podcast of me talkng about how the Knect works by vistng http://www.mos.org/events_activities/podcasts&d=4858 I recorded that intervew at Boston's Museum of Scence in February 2011.

    And a couple of videos looking at the device using IR imaging. Not sure what these really mean but my more geeky friends are all excited by them. Smile



Page 3 of 618 (1,853 items) 12345»