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

    Should Johnny Learn to Program?

    • 29 Comments

    Last week I shared a link on Facebook - Why Johnny Can't Program: A New Medium Requires A New Literacy – that makes that case that everyone should learn how to program.  Philip A DesAutels, my good friend and one of the smartest people I know,  replied in Facebook with a long well-though out reply. With his permission I copied it below as a sort of guest post. I would love replies either to the origional article or to Philip’s reply. Who is right? Philip or Douglas Rushkoff? Should everyone learn to program and if so how much? Or should we only push a few into programming? [EDIT: The ACM and CSTA have a new report out about computer science education in the US. I blog about it here.]

    Philip wrote:

    I truly understand the place of CS in HS and so, I feel the need to rail against this article... Let's start with a line that sums up the central premise - "Digital tools are not like rakes, steam engines, or even automobiles that we can drive with little understanding of how they work." Ummm, hello Douglas, first each of these technologies - hand tools, steam engines and automobiles transformed humanity, each had a very dedicated training program for professionals and users and each was encapsulated to the point where it the technology (or its meta-equivalent - is now so well hidden that only a few experts need the professional design skills while the mass of users can apply the technology with some technical skills and deep domain skills. Let me explain.

    Rakes, aka hand tools - I am trained at the nation's premier craft school, the North Bennet Street School, in the art of using hand tools to build wood structures. I was in a class of 12 Preservation Carpenters who know how the make (not buy) moulding, who can build a timber frame and who can carve a Corinthian Column capital with an appropriate acanthus spinosus leaf detail. And if I continued in that profession, I would have been in a minority of carpenters, practicing an art form. Our chief competition and the reason most in the 'real carpentry' trade can't charge someone the $80 an hour is what I would term modernization... aka the Big Box and the lumber yard. Sally homeowner can run to Ikea and buy cabinets that she can put up herself, she can go to home depot and buy wood flooring that is prefinished and a sink that requires no open flame to install. Why would she call me unless she lives in a period house and wants to preserve an art form? Technology has encapsulated my skills (learned in two hard years of apprenticeship) and made them available to the masses. Is there still a need for real carpenters, not just assemblers as I call what most 'pros' and homeowners are (intentionally derogatorily since I am a real carpenter...)? You bet! But we do not have nor need tens of thousands of students studying the fine art of carpentry in its Vetruvian classical form. We need students studying modern building codes and sustainable building practices for the modern age. If they can't shoot a moulding by hand or tell you the appropriate ratios for moulding in a room, does it matter? NO... If these modern carpentry students can't use that encapsulated technology to build modern structures that are safe, energy efficient and stylish then we and they have a problem. Even if a few very skilled in the carpentry profession are creating the encapsulated components, there won't be anybody to apply them.

    I could make the same ranting point about steam engines - not many of us firing up the coal boiler to make steam to open the garage doors today...or the automobile - when was the last time YOU even checked you oil let alone adjusted the timing or valves... The points I make here are that 1.) Technology encapsulates, 2.) Encapsulated technology requires domain skills combined with a new type of technical skill to apply encapsulated technologies to modern problems. And.. herein lies the problem with the argument presented in this article and the call for more CS programs in High School. To what end? Is this like a call for more carpenters to learn how to make mouldings by hand? More HVAC professionals to learn how engines are designed? I THINK SO.

    There are students for whom programming is a desired skill. They want to be developers. Great for them. The giant hole in our workforce isn't entry level developers who can hash out c code and write a compiler from scratch. It is for people with combined skills who can APPLY encapsulated technology (lots thanks to companies has been encapsulated) to specific domains.

    So I offer up a different call. In high school, teach students how to apply technology. Teach them how technology fits with their domain of interest. Teach them how to use the components not how to build them. Those students that want to become more technical can choose to learn down the stack to real engineering (aka CS, CE, EE) or up the stack to become expert in technical domain applications (IS, CIS, Project Management, Bioinformatics).

    There are FAR FAR FAR more jobs out there today for someone with the technical skills to build a SharePoint portal, or light up a CRM instance or build a bioinformatics database than there are for someone who can build the next Python compiler. Let's stop trying to train the mass of high school students to become preservation carpenters, and instead make them very good contractors.



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