Wednesday, August 20, 2014

Hacking Away at Little Problems

We have a fairly nice system for student information and the like. It is not perfect but then what system is? For example, our student management system will output class rosters as PDF, Word or Excel files. The problem with the excel output is that there is way too much information in it to be easily used for many of the things teachers want to use it for.

If it were just a matter of extra columns it wouldn't be too bad but there are also extra rows. It is tedious to strip things out. I’ve done it before but it’s just not fun. Writing code on the other hand is fun. Well for me anyway.

So of course I wrote some code. I saved the Excel file as a CSV, ran it through my program which output a new CSV file with just the information I want. That CSV was opened in Excel, nicely formatted and saved for future use.

Honestly I think it took less time to write than it would have to manually clean the data. It was something under 30 lines of code and a bunch of that was just variable definitions and other setup.

As a bonus, now I have the code for next semester. It's not fancy and it is not bulletproof - I'd really worry about supporting it for use by others - but it works for me. Just one edge programmers have over people who are not comfortable writing code. I did this in Visual Basic. Others would use other languages or tools and I am sure some UNIX/Linux person will jump in without how they would do it as a shell script using utilities. But the point doesn’t change that knowing these things can be useful.

I think lots of people run into simple problems that can be solved with what we like to call “a small matter of programming.” One doesn’t have to be an expert or a professional to write many simple programs to solve simple problems. Nothing is my code is beyond what I teach my beginning students for example. In fact my honors programming students will have a similar, but involving more complicated string manipulation project, later this semester.

In today’s world should basic coding be part of more people’s skill set? I think so.

New Widget–CS Teaching Tips

I added a new widget to my blog last night. It is connected to CS Teaching tips which is a webpage and Twitter account – @CSTeachingTips. imageThe widget provides a different teaching tip when ever this blog is opened in a web browser. It looks like it could be a useful addition. You can of course also go to the CS Teaching tips website and search for specific types of tips.

Some information from the website’s About Page where you can learn more about the people involved.

Project Summary

Problem: CS pedagogical content knowledge (CS PCK) – i.e., knowledge of how to teach computer science – is mostly undocumented.
Project Goal: Develop a set of CS teaching tips to help teachers anticipate students’ difficulties and build upon students’ strengths.
Status: Beginning the project in October of 2013, we are currently recruiting CS teachers who have insights into student learning.
Funding: This material is based upon work supported by the National Science Foundation under Grant No. 1339404. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

Tuesday, August 19, 2014

Why AP

Sometimes you miss something by reading a blog post too early. Such is the case with a recent post by Mark Guzdial - Python is the most popular intro language: But what about CS Principles? There have been some 37 comments worth of interesting discussion since I read the initial post. I wouldn’t have known about it if not for a post by Laura Blankenship. The comments discuss the future of the new CS Principles course as an AP course. A lot of the discussion is about why students take AP exams. There are two main reasons:

  • To get college/university credit
  • To improve their chances of getting into the college/university of their choice

A lot of the discussion on Mark’s blog post focuses on the possibilities for students getting credit at the university level. Most of the people commenting are in fact teaching at the university level and there is some skepticism as about the number of universities that will teach an equivalent course and give credit or placement for the AP CS Principles exam. If students can’t get credit will they take the course?

Some point to the perceived value of AP courses on high school transcripts towards college admissions. With additional weighting at many school and with admissions officers looking at AP courses as evidence of students being able to handle post secondary workloads this is a big incentive for many students to take these courses.

Are these what we really want in a high school course though? Should it be all about university credit or acceptance or something else? Do we worry too much about the post secondary aspect/goals and not enough about both shorter and longer term benefits?

I think we are looking at AP courses, at least in CS, as the only way or perhaps the best (for some definition of best) way to get CS into the curriculum. It may be true but it is also sad.

Monday, August 18, 2014

Interesting Links–18 August 2014

Seems like I spent all my time last week doing last minute tasks before school starts. Getting cars inspected and reregistered for example. And a haircut that my wife insisted, correctly, was overdue. Teachers at my school report back tomorrow. I’ll see students on Wednesday!  I spent hardly any time on line last week. That showed in a shortage of my own posts last week and a brief set of links today.

Favorite quote found on Facebook this week. “Without requirements or design, programming is the art of adding bugs to an empty text file.” -- Louis Srygley

Ray Chambers has a nice blog post about Multi-Dimensional Data Structure – Example

Mike Zamansky wrote over the weekend about the crew (the teachers) of his summer CS program. The Crew

One problem we have getting more computer science in schools is reports like this. Ofcom: six-year-olds understand digital technology better than adults via @guardian Even if we agreed (which I do not) that six-year olds understand digital technology better than adults that is not the same as agreeing that they know enough about technology. Ever CS and ICT teacher I talk to has stories of digital technology knowledge that is just a thin veneer

Someone sent me to a link to an interesting infographic and set of information about The Raspberry Pi: The Tiny Computer That Could

Friday, August 15, 2014

Learning By Doing Works for Adults Too

Over the last year or so I have had a number of meetings and conversations with school leaders about using social media. One of my first questions is always “who has a Facebook account?” Invariably I get answers like “I created an account to look at but haven’t used it” or “Not me.” Occasionally I get a person who shyly admits that they have an account. Most of what most administrators know about social media is what they read in the mainstream media. Unfortunately that tends to be bad news – scary tales of things going viral that most administrators would rather no one knows about. Is it any wonder they are afraid of the possibilities more than excited by them?

Educators worry about social media for some very good reasons. People have lost their jobs and reputations by doing stupid things on social media. Or even for doing things that would be acceptable for most others but which are detrimental to educators because of the extra scrutiny people in those roles are subject to. On the other hand there are very good reasons why educators should, arguably must, understand these new communication paths.

Teachers and administrators are role models. We try to set good examples every day at school. We work to exemplify life long learning. We watch carefully how we treat others and how we act in front of students. We try to teach what we know and share our excitement at our subject matter. And yet somehow we often feel content to talk to students about social media without really understanding it ourselves. That is not a recipe for success.

Students today are communicating and learning about the world though social media. Facebook, twitter, snap chat, and many more online tools are part and parcel to the way they interact with the world around them. Can we as educators afford to be ignorant of them? Can we really understand those tools without using them?

Can you imagine a shop teacher who has never used a saw? Or a chemistry teacher who has never mixed chemicals and watched the reaction? Or an English teacher who doesn’t read books? Or a math teacher who reads about calculators but doesn’t use them herself? Of course not. And yet we trust administrators to make rules about social media that they only know about from reading about them. Or teachers to talk about online social behavior who get their information from watching movies like “The Social Network.”

Now I am not suggesting that people start living their whole life on line. Or even that some social media should be required. But it should not be banned either. And people who hope to understand social media should at least use it to some extent. Facebook can be very useful for keeping in touch with friends but it is also a good way to keep informed on the latest social media memes – not all of which are bad. Arguably the ALS Ice Bucket Challenge which has seen donations to find a cure for this horrible illness skyrocket is a powerful force for good.

Twitter is an amazing tool for professional development as well as communicating about the good things that happen in a classroom, a school or a school district. It can be hard to see the value without experience however.

Educators need to fearlessly experience the modern online world. Not carelessly or thoughtlessly of course. But knowledge and understanding are vastly improved by hands on learning. The end result is highly likely to be better policies, better communication, and even better understanding of the world our students live in. Most of all perhaps, it is a chance to lead by example.

leadershipday2014_01

This post is a contribution to Scott McLeod's Leadership Day 2014 project.

Monday, August 11, 2014

Interesting Links 11 August 2014

One more week until I return to school for the new year. I’ve been spending a lot of time planning and thinking about how to teach things better this year than last. You many have seen some of my posts on projects lately. A lot more to be done but I feel good about the year. How about you? Are you back already or starting soon? Either way I have links to share.

The Hottest Ticket in Tech for Companies Struggling With the Gender Gap via @BloombergNews They are talking about the Grace Hopper Celebration of Women in Computing. A must attend for women in computing from all I’ve heard. Attending one day is on my bucket list.

It was interesting reading about the Founding of the Grace Hopper Conference via @anitasquilt as well.

40 Down, 1 To Go: What is this? A teacher friend is documenting his 41st and last year of teaching. I’m looking forward to reading what he has to say.

Apparently I am not the only one thinking about new projects. Take a look at Always a new idea for a project by Garth Flint and don't miss the discussion in the comments. Plus this follow up post by Garth - Silly little programs

School has started for many. I love the message here. Smile

Embedded image permalink

Thursday, August 07, 2014

Why You Need Parentheses

A friend posted the following image on Facebook. You’ve probably seen like it. Actually I have posted similar myself.
math puzzle
The result, as you might expect, was people arguing over the answer. Is it 9 or is it 1? Obviously it is. Smile
I wrote some code.
            double x = 6 / 2 * (1 + 2);
            button1.Text = x.ToString();
Actually I wrote it twice. Above in C# and below in Visual Basic. Not that there is a lot of difference or course. And they both probably translate to the same intermediate code (MSIL).

        Dim x As Double
        x = 6 / 2 * (1 + 2)
        Button1.Text = x.ToString()

As I expected, the result showed as 9. The addition happens first because of the parentheses. Next the operations start on the left and move right. So 6 is divided by 2 and that result (3) is multiplied by 3 (the result of 1 + 2). But while the computer thinks that way not all people do.

For many people the obvious next operation after the addition is to multiple that result by the 2 before dividing. And there is some logic to that. One would like to think it didn’t make a difference. But of course it does.

Moving from left to right is common practice and it makes things consistent but there is no law of nature that says it has to be that way. This is the sort of sloppy coding that confuses a lot of people. The question should probably be written ( 6 / 2) * (1 + 2) to remove ambiguity. That would remove the confusion. It is a better coding practice even though it just states what we’d like to think is obvious. In real life what is obvious to one person is not always obvious to another.

When writing code a developer owes it to the people who will later have to work with their code (even if it may be themselves) to remove as much ambiguity as possible. Things should be clear to both the computer and other people.

Tuesday, August 05, 2014

It's Hard To Make Easy Projects

I’ve been working on my lesson plans for this year and one thing I always struggle with is creating projects. Oh I have lots in my tool box but I am always looking for something new and more interesting. In many ways the hardest to create are the ones that are easiest for students to create. Let me put it this way – what sort of project can you design using nothing more than assignment statements? And make it fun and interesting for students?

Not easy is it? There is of course the traditional Hello World program. Yawn. And of course conversion programs. Fahrenheit to centigrade obviously. Last year I was introduced to the Red/Green program. This works very well in Visual Basic or C# where one can easily create buttons on the form and have one button change the color of the form to Red while the other changes it to green. Students actually have some fun when you say “now create more buttons for more colors.”

We’ve also used a program where an image is loaded into one picture box and pressing a button causes it to “move” from one box to another. This has a great feature that lets it be built up and made cooler as more programming features are learned (See this rotating lights project for example) I like projects that can be built upon for later use.

I’m always looking for more ideas though. What do you use for the first or second program?