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

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Readability in Programming Languages

    • 37 Comments

    I saw a side by side comparison of a bunch of scripting languages online recently. Scripting Languages: PHP, Perl, Python, Ruby My first, and second reaction was yuck! Now I have my biases – biases which may  not be shared by others of course. But I like readable code and for me anytime I see a special character (anything not an alphanumeric) it slows me down. This got me thinking about where we are going in design of programming languages? Are we moving forward (what ever that means) or backwards or just sideways?

    Back when I started programming close to 40 years ago the big three programming languages were FORTRAN and COBOL with an up an coming language called BASIC. FORTRAN (short for FORmula TRANSlation) was used by mathematicians (my math major brother had to learn it) and scientists. COBOL (the B stands for Business) was used for business applications. BASIC was a teaching/Learning language that was spreading into business. COBOL was both loved and hated by different people for its wordiness. But it was at least understandable. Take the loop below:

    PERFORM VARYING WS-BOTTLE-NUM FROM 98 BY -1
                   UNTIL WS-BOTTLE-NUM < 2
    END-PERFORM

    Pretty close to an English sentence. Compare that to this sample for a C-style language (C#)

    for (WSBOTTLENUM = 98; WSBOTTLENUM >= 2; WSBOTTLENUM--)
    {
    }

    Which one is more obvious? Pretend you are not an experienced programmer.

    BASIC (Visual Basic in this case) is somewhere in the middle.

    For WSBOTTLENUM = 98 To 1 Step -1
     
    Next

    The step – the counting down – is more easily understandable for me at least. Now let’s take a look at something very simple. k = i / 10;

    This drives beginners crazy. What’s going on here? Sure we programmers know but a lot of beginners struggle with which direction the operation is going. Compare that to the same code in COBOL

    divide i by 10 giving k

    Wordy? Sure, but at least even a beginner can read it. Now I am not arguing that we should all go back to COBOL though honestly with modern IDEs and features like Intellisence it would be a lot easier than it was back when I was typing out punch cards. Rather I am suggesting that beginner languages can and probably should be more wordy rather than more obscure – that English is easier to pick up than “what does # in this programming language mean?”

    Just for fun, if you want to see what different programming languages really look like visit the 99 Bottles of Beer site.

    This Website holds a collection of the Song 99 Bottles of Beer programmed in different programming languages. Actually the song is represented in 1434 different programming languages and variations.

    Somewhat related posts:


  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    People Who Know Nothing About Schools Telling Us How to Fix Them

    • 35 Comments

    Today's rash of quick fix answers started with Steve Jobs telling us the teacher unions are broken in the worst possible way. Principals can't get rid of poorly performing teachers. Plus Jobs says we need online books that are updated like Wikipedia. Brilliant job of stating the obvious and repeating things everyone in education knows. Yes, teacher unions help protect the jobs of poor teachers and yes textbooks are not being updated fast enough. I have yet to meet a teacher, a principal or a school board member who doesn't agree with those statements.

    Don Dodge jumps in to support Jobs and to add that the other part of the problem is that principals have no way to reward top performers. Is there someone in education who doesn't know that this is a problem? It is a problem hardly anyone wants to fix though because it depends on people being fair and no one respects principals enough to give them a job like that. Robert Scoble agrees with both Jobs and Dodge and suggests that teachers need to be paid more. And he should know because he used to be married to someone who used to be a teacher. They all mean well but the problem is bigger than they think it is. In fact it is much too large to cover in a blog post. One of these days I'll write a book.

    Heaven save us from experts. They all seem to have one thing in common - they think that teachers are, if not the only problem, the largest problem with American education. By my reckoning there are several groups that are a much larger problem. They are:

    • Government officials and the rules they lay down
    • Parents and the lack of support they give education
    • Students and their lack of willingness to do their part
    • Voters for not supporting the needs of good education

    Yes there is work that can be done to improve teaching and teachers (let's start with schools of education by the way) and also school administrators. No question that there is room for improvement. But for the most part we are looking to fix large problems by fixing small things. Look at it like trying to fix a car by putting new tires on it while ignoring the fact that the engine is missing.

    Every time the subject of school vouchers comes up someone tells me "schools that receive vouchers should have to follow the same rules that public schools do." Let me translate that to English. "Schools that receive vouchers much be required to fail." The government creates sets of rules with fairness as a theoretical goal but with a practical effect of making money for lawyers and life hard for teachers. It's not really about education as much as it is about control and covering peoples rear ends. It is about taking the easy way out regardless of results.

    Take some of the aspects of no child left behind for example. If a school is failing the principal will be replaced. Will the new principal have any more power to effect change than the person they replace? Good grief no! That would be wrong. Is it any wonder schools don't improve. Or better yet, if the school doesn't have enough resources to do a good job let's take some of those resources away until they do a better job. Yeah that makes sense. If the board is too short cut it again.

    Parents? Oh you don't even want to get me started on parents. Help a teacher control their child in class? Oh no that is the teacher's job. And oh by the way the child has heard the parent say that they don't respect teachers because people who make that little don't deserve their respect. And the parent who explains that the reason their child's report is word for word the same as the article in the Encyclopedia is coincidence? What about the parents who take their kids out of school for a week (or more) for a family vacation and demands that the teacher make it up when the child returns? Ask any teacher and you'll get stories like that for hours. How do we hold parents accountable for helping their children learn?

    What about the student who refuses to do the work? Or who is disruptive in class on a regular basis? Why do we hold a teacher responsible for a student who thinks that filling in the bubble sheet (for a standardized test) in a pretty pattern is more fun than actually trying to figure out the answers? Or the student who comes to class to sleep because they were up late watching their friends play hockey? Or they worked late earning money for designer jeans and a new iPod? My father believed my job as a school aged child was to be a student. That's what I told my son his job was. In some parts of the work that is still the case. Not in the US of A though. Fix that problem Steve Jobs! No, you're not interested because it would cut back on iTunes sales wouldn't it!

    I hear a lot of talk from voters about school issues. Cut the budget. Books out of date? Too bad. Computers old? Too bad. Teachers can't afford to live near work? Too bad. Cut cut cut. Do more with less!

    Now I'm not a real expert. Yes I did teach in the classroom for nine years. I only spent one year teaching in elementary schools though. Although I did teach every grade from kindergarten through eighth grade that year I spent most of my teaching in a high school. I did serve six years on a (private) school board and another six years as an elected member of a public school district's budget committee. My wife and son are both public school teachers. My son teaches special education BTW. So I think I understand a little bit about how schools work. But I'm sure people will be happy to tell me where I am wrong.

    The problems are huge. The need is for a complete restructuring of our education system. We need more choices for students and more responsibility placed on them and their parents. We need a way to remove the kids who refuse to learn and extra support for the students who want to do more (that means for gifted and for special needs both).

    We need a new culture that values education above sports. We need teachers who are trained to teach using technology and who are provided with the resources (including paid training like most other professionals get) and the chance to be rewarded for doing a good job. We need principals who can get rid of bad teachers, reward good teachers and deal in a fair way with problem students and parents. We need testing that is reasonable but we need to lose the idea that we can test quality into the system. We need to teach the things that are hard to test. Things like creativity, problem solving, critical thinking and initiative. We need parents and other adults who lead by example - being life long learners and putting their time and money into education for themselves and their children.

    As hard a problem as Steve Jobs may think fixing education is in actual fact it is harder than that.

  • 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 2 of 618 (1,853 items) 12345»