Wednesday, August 27, 2014

Yet More Block Programming Languages

I saw this announcement on Facebook first but I probably just missed seeing it on the email list. At this stage I have to wonder why? Why more of the same? Do we really know that these languages work and if so for what definition of “work?”

From Dr. Jeff Gray at the University of Alabama via the SIGCSE mailing list:

We would like to announce the availability of two new Blockly-based languages that may be of interest to CS educators:

  •  Spherly is a web-based programming environment that allows programs to be written using a block language to control a Sphero robot. Project URL: http://outreach.cs.ua.edu/spherly/
  • Pixly provides a block language for exploring topics in media computation; particularly, the manipulation of pixels within an image to support red-eye removal, chroma key, etc.  Project URL: http://outreach.cs.ua.edu/pixly/

Both projects can be run from within a browser (Spherly requires a provided server to be executing on a local machine for Bluetooth contact to the Sphero). Each project page has links to a demonstration video, a user manual, a Google Groups users forum, related links, and a “run” link for executing each environment.

For completeness I did add these to my Programming With Blocks post.

Tuesday, August 26, 2014

Rotate the Cell Phones

One of the things I am working hard at this year is making things more clear to students. I want them to understand concepts and why they are important and useful. Of course one issue with teaching computing is that experienced people are used to thinking in the abstract but beginners are not. So tying theory into physical activity can be helpful. And if you can use something students care about even better. I was pleased to discover a new visual aid today that I think worked well.

I was working with a simple project – rotate the values in a series of textboxes.

image

Take what is is the first box and move it to the second, the second into the third, the third into the fourth and the fourth back into the first.

Experience tells one to save what is in box 4 in a temporary variable so you can copy it later and not lose it. Students sometimes have trouble visualizing this in their heads and I often see projects were a value is lost for each rotation. In the past I have used classes of soda (pop, tonic, soda pop) and asked students about how to swap the contents. Today I didn’t have any of that (poor planning perhaps) and I was talking about more than two items to swap. Fortunately an answer was at hand.

The new school policy this year (let’s ignore if it is a good one or a bad one for now) is for all students to place their phones in a rack in the front of the classroom when they arrive. Teachers can of course tell students to keep and use the phones when educationally appropriate. In any case I had a rack of phones to use. Four phones in the bottom four slots in the rack.PhoneRack How convenient!

I asked a student to come up and show me how he would rotate them though the slots in the rack. Interestingly he tried to explain it to me but I insisted he show me.

This turns out the be an important step because it forced him to think for a second. The answer was there but not clear and solid until he was forced to move physical objects. After a pause he picked up the first phone and moved it out of the way – to an empty slot in the rack. Rotating the rest was easy after that.

Watching the students duplicate my example (from only the running form and explanation) is seemed like students understood the concept of the temporary variable better than usual. We are teaching a visual generation for sure. I wonder if the cell phones were an extra incentive to watch? Regardless this is a visual I plan to use again. When we cover sorting for example.

Monday, August 25, 2014

Interesting Links 25 August 2014

Well I made it though going back to school. Teachers went back Tuesday, we saw our freshmen students briefly on Wednesday and had a full (very full) day of classes on Friday. Today starts the regular routine.

Edutopia says the Computer Science is the Future of Education. Agree?

Abby Fichtner aka @HackerChick who I first met when we both worked at Microsoft writes convincingly on  Why We Need to Teach Kids to Code

Google is giving $1.5 million tosite.site_name organizations that encourage girls and minorities to learn computer science in the Google RISE Awards.  Apply now

I found yet another robot startup designed to get kids interesting in computing http://startrobo.com/ on twitter at @start_robo I don’t know much about them yet but their web site looks interesting

Bing's Developer Assistant for Visual Studio promises to make coding a little bit easier via @neowinfeed I’ve been using it a bit as I write some small projects. It’s helpful but you still need to know a) what you are looking for and b) how to recognize when what you have found will or will not solve your problem.

Computer Science and "Makered" on the @csteachersa blog by Laura Blankenship @lblanken  The maker movement in education and computer science are natural fits.

Friday, August 22, 2014

CSTA 2015 CALL FOR PROPOSALS

Time flies when you’re having fun. It seems like just yesterday I got home from this summer’s CSTA conference. But it has actually been a while. And then yesterday I saw the call for proposals for the Annual CSTA conference. Are you doing something interesting that you are willing to share with other computer science teachers? Seriously think about making a proposal.


The Computer Science Teachers Association (CSTA) invites you to participate in the 15th Annual CSTA Conference. This event will be held July 13-14, 2015, in Grapevine, Texas (Dallas/Fort Worth area).

The CSTA 2015 Program Committee seeks proposal submissions related to the practice of teaching and learning computer science and information technology in K–12. This year, the conference is seeking 3-hour workshops and 1-hour sessions, and 20-minute mini-sessions that focus on pedagogy and best teaching practices.  Proposals for all three session types must include:

  • the names and contact information for all presenters
  • an overview of the session
  • a description of the intended audience (level, knowledge, …)
  • a description of session activity (in sufficient detail for an informed decision)
  • presenter background and presentation experience

Proposal must also include an expanded description (to be submitted as a PDF attachment) that provides the following information:

  • background for the topic to be presented
  • description of the information to be covered
  • description of why this information is relevant/useful to K-12 computer science and information technology teachers
  • description of what the attendees will learn from this presentation, and
  • description of any handouts

Presenters will have the use of a computer projector and screen. If additional equipment or facilities are required, this should be clearly requested in the proposal; it may be possible to accommodate such requests but this cannot be guaranteed. Presenters will be required to pay for their conference registration.

All proposals will be submitted through the online symposium submission system that can be found at https://www.softconf.com/f/csta2015. If you encounter a problem with the submission system, please contact Duncan Buell at buell@acm.org.

The deadline for proposals is midnight on October 6, 2014. Review of proposals will occur shortly thereafter and notification of a decision will be made around November 15, 2014.  All submission will be evaluated on the following criteria:

  • technical quality
  • writing and presentation
  • relevance to CSTA (focus on K-12 computer science)

Successful proposers should expect to be asked to submit a draft copy of their presentation by May 15, 2015. Draft presentations will be posted on the website for attendee reference and note-taking. All final presentations will be gathered by room proctors at the end of each session. Some sessions may be selected for videotaping, which will be shared online post conference. All workshops and sessions will be photographed.

Why present at CSTA 2015? The CSTA annual conference is the only CS conference specifically dedicated to meeting the needs of K-12 computer science educators. Come network with your peers, present your great ideas, and learn best practices. Here is what some 2014 conference attendees had to say about the conference:

  • “Best session and workshops I’ve ever attended at CSTA conference”
  • “First year as CS teacher, and I’ve heard a number of good ideas that I’m excited to research further and implement, via CSTA”
  • “Very welcoming presenters, participants and volunteers”
  • “Excellent conference! Very informative and exciting!”

Additional conference details can be found at www.cstaconference.org.

We look forward to receiving your proposals and to your attendance at the symposium.

The 2015 Annual Conference Planning Committee

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?

Monday, August 04, 2014

Interesting Links 4 August 2014

It was both a slow week and a busy week last week. Slow online for the most part. There were a couple of big events that friends of mine were at but I was home. Microsoft had the world wide finals of the Imagine Cup in Redmond last week. A couple of years ago I might well have been there. It is a great event especially for university students – few high school teams make it as far as the world wide event.

Apparently Edutopia had a big event at the Skywalker Ranch in California as well. I expect to read blog posts about that this week. Mostly I have been doing lesson planning with school scheduled to restart in about two weeks. But there are some links to share.

Code.org announced that the Computer Science Education Act is now the most-supported education bill in Congress! Over 100 co-sponsors. I’ll be a bit more excited if Congress actually passes it though.

Congress CS

The Scratch Team at MIT @scratchteam announced that ScratchJr (for ages 5-7) is now available as a free iPad app. And claims that “coding is the new literacy!” See http://scratchjr.org for more information. Ages 5-7? I’m interested in how that plays out.

The Anita Borg Institute posted a link to 20 TED Talks by Women in Computer Science which I really need to spend some time watching. Maybe I’ll find one for use with my students.

Mike Zamansky continues his series on building a High School CS Summer program with SHIP - the Toolset Once he is done I plan to post an index if he doesn’t. A lot of good stuff going on. I think his model is reproducible if the right people, teachers and students, with a good culture can be found. Culture is under appreciated by many programs but not at Stuyvesant where Mike teaches.

Wednesday, July 30, 2014

The Troubles with Tutorials

The first thing I ran into with regards to programming tutorials last week was this tweet and accompanying image.

That is of course one extreme but it does seem like some tutorials are like that. Start simple and jump through some complex steps very quickly with little explanation.

Other tutorials take the other extreme. They give one every single step spelled out in great detail. The often try to explain things but the implementation details are such that you can create the program without learning a single thing. A number of online tutorials are like that. They seem great in theory and if someone actually read the explanations they would probably learn a lot. But alas many students will not read any more than what they need to create the project/program.

These are all reasons why I am not a fan of online or overly detailed (or not detailed enough) tutorials in textbooks. I prefer to live tutorials. Students can stop and understand things in a text or an online tutorial of course. I do that myself when trying to learn new things. But far too many students don’t. When doing a tutorial life it is easier to keep an eye on students and see where they are struggling. Plus one can ask questions “why did we use a variable here?” to force students to think about what is actually happening during the tutorial.

At some point though students have to write a program from scratch without tutorial like instructions. This transition can be difficult if tutorials have been too foolproof. If the tutorials have had too large of a jump from beginning to end students may never have success and develop the confidence to attempt a program from scratch. I just don’t think tutorials are enough. I think real teaching with explanations of concepts rather than just steps is necessary for most students. While some may be able to learn just from good tutorials many will need a bit more than that.

What do you think? Are there great tutorials online or in textbooks? What sort of help do students need (if any) beyond tutorials?

Monday, July 28, 2014

Interesting Links 28 July 2014

The highlight of last week was a two-hour workshop on TouchDevelop which I presented to teachers who are part of the New York City Department of Education Software Engineering Pilot program.  That’s me presenting below.Embedded image permalink

There was a great bunch of really smart and enthusiastic teachers there. I hope they enjoyed it as much as I did. It brought me back to Brooklyn where I grew up which was an added bonus. It was great to walk those streets again.

I added a blog by John Olsen to my computer science education blog roll.  Let me know if I am missing anyone who should be there.

Chris Leach @chrisleach78 is working on a list of female ICT icons. That is women in the field of computing who have been recognized for their accomplishments in the field and not icons/images of women. Just to be clear.

An HTTP error 404 is when a web server can not find the page you have asked for. One can specify a specific page to show for this error and one group has really done a 404 page in a special way.

I had to share this list of 10 things classroom teachers need to know about modern school librarians via @LibraryAllegra because its just so true.

My students are always surprised when I tell them that their smart phone has more computing power than the computers that helped men land on the moon. This posts by Dan Bowen explains that that really means - How coding has changed in 45 years

 Building a SHIP – Outreach is the latest post  by Mike @Zamansky talking about the summer program for students to learn computer science that he has been running this summer. Seems like a great program.

There is so much great stuff happening in New York City with regards to computer science education. Mike Zamansky’s SHIP program. The SEP program putting CS in more schools. And the many efforts supported by the NYC Foundation for Computer Science Education (CSNYC). It will be interesting to see how this plays out over time. Will it start making “Silicon Ally” a force to be taken seriously by the people in Silicon Valley? We’ll have to wait and see.

sep_hd11Print

Friday, July 25, 2014

Geeks Pick Nits Even On Jokes

I posted this following image on my Facebook page.

running

Comments came immediately. First one was something like “only one step?” Another said the method should be called inside a loop. Another suggested a more involved loop.

while (stamina > 0) 
{
step++;
stamina--;
}

We could probably go on and on. I just find it amusing that coders just can’t look at the joke and see it at face value. They do, I think, see it funny at face value but they also want to make it better for some definition of better.


Thursday, July 24, 2014

Whack A Mole Project

I’ve done variations in Whack A Mole over the years. I did a Whack Something Game for Windows Phone 7 some years ago for example. But somehow I put it aside and didn’t think about it when I was teaching the last year and a half. This week as the National CS Principles Summit this project came up in one of the presentations. This struck me as a particularly good idea for me to bring back into my own practice. So obviously I started coding. I came up with this.
image
What I have decided I want to do is use this for is to teach objects and classes. I created a MoleHole class. I may have to revisit that name before I go to students though. Suggestions are welcome. The reason for creating a class is that I could allow the class itself to handle showing and hiding the moles. My hope is that students will understand that having the object take care of itself will make things much easier.
The first think I did was to create  (using Paint) a couple of images – one to show a “mole” and the other an empty “hole.”
NoMole MoleNothing fancy and I may ask students to create their own. So many of them are much more artistic than I am. Doubtless one of them will use a picture of me if history is any indication.
Then I created a new User Control. I’m using Visual Studio and C# for this sample by the way. Once created I added the images to the project as resources and loaded the empty hole image as the initial image for the object background.
I have very little code in  the class. The constructor just sets the initial value of the Tag property which I could have avoided by putting that in the properties when I added the initial background image. The one method I wrote changes the background image and Tag value.
        public void Swap()
        {
            if ((string)Tag == "Empty")
            {
                BackgroundImage = global::WhackAMole.Properties.Resources.Mole;
                Tag = "Full";
            }
            else
            {
                BackgroundImage = global::WhackAMole.Properties.Resources.NoMole;
                Tag = "Empty";
            }
        }

Very simple. I add the objects to the form dynamically and included in that is setting the event handler for the click event. The code for the event handler checks to see if there is a mole showing and if there is it increments the score and swaps out the image by asking the object to do it.

        private void Whack(object sender, EventArgs e)
        {
            MoleHole hit = (MoleHole)sender;
            if ((string)hit.Tag == "Full")
            {
                hit.Swap();
                score++;
                ScoreLabel.Text = score.ToString();
            }
        }

The mole appears or disappears based on a timer firing. It randomly picks a mole hole object and switches its image and tag, again, by asking the object to do it.


        private void timer1_Tick(object sender, EventArgs e)
        {
            MH[r.Next(MH.Length)].Swap();
        }

Overall, including dynamically creating and loading the mole holes there are something around 30 lines of code. I think I can get students to manage this. And then I’ll want them to make it better, fancier, more interesting. We’ll see how it goes.

Wednesday, July 23, 2014

Scalable Programming Projects

One of the things I look for in a project is that it is extensible. That means that a reasonable and simple version can be done but that students who want to do more or who want to challenge themselves can make a very special version that is really them. One such project that I have used in a small way is a slot machine program. One of my co-workers came up with a fairly simple assignment of this type.

1. Slot Machine – Create a slot machine with 3 “slots” (containing pictures or colors). For each round, clear the slots until the user clicks on it (or a button below the picture), and then assign a random color/picture. Allow the user to place a bet and keep track of money won or lost depending on the outcome of the spin.

Beginning students create some fairly simple applications to solve this project. Many of them look something like the following.

image

I have seen student projects that involve a number of simple variables  and a long series of if statements. I am too lazy to do it that way myself and incorporated some arrays and loops in my sample program. By adding arrays and loops the door is opened to a wife range of more complicated features. The sample below incorporates 9 different “rows” with a total of 27 different possible winning values. 

image

It also includes scatter prizes and a bonus game for some conditions. Obviously it has more visual elements as well. Conceptually though is it just an extension and enhancement of the first program.

One of the ideas I am working on it helping students from the simple to the more complicated. By showing them how the addition of arrays and looks I hope to show them how to plan for enhancement, extension and addition of more features to an initially simple program. We’ll see how it works.

Tuesday, July 22, 2014

One semi colon away from disaster

At a recent workshop Alexander Repenning said that sometimes teaching programming is “one semi colon away from disaster.” How true that is. Minor syntax issues, especially when dealing with beginners, can make a program look like a complete disaster.

Last school year I had more than a few students come close to panic when a compiler reported dozes, scores or even hundreds of errors. Typically adding a semi colon or a curly brace in the right place made most of the errors “go away.” The words “in the right place” are bold for a reason. At times is seems as though beginners start putting in semi colons or curly braces closely to random locations in hopes of making the errors go away. Sometimes the syntax errors go away but create interesting logic errors. Since too often students associate compiling and running with success the results are not happy for grading purposes.

I’ve been thinking about decorations THINKfor my computer lab. I’m starting to think that a couple of signs might be useful. One would say “Don’t panic” and another one just say “Think” like the old IBM signs used to say. And maybe “slow down to make faster progress.”

Panic is bad as it prevents sound thinking. And speed without thought seldom seems to get people where they want to know.

Returning to semi colons, yes we have to, they are one of the reasons so many people like to use block programming languages. Or other forms of drag and drop programming. They do help with talking about concepts and helping students to achieve some success with programming. But do they help when it is time to move on to “real” or traditional programming languages. It seems like a big jump and research seems to be light on the subject.

I had a conversation at the CSTA Annual Conference and found that there are others who are skeptical of the transference from block languages to traditional ones. We could use some more research on this. Does it work? How can we make it work better? What is the best way to help students with the progression? A lot of questions but in the mean time there are days when we still walk one semi colon from disaster.

Late edit but it belongs here:

comma

Monday, July 21, 2014

Interesting Links 21 July 2014

What a week I had last week. The CSTA Annual Conference, the National CS Principles Summit and then the CSTA Board meeting. I need a rest. I tweeted a lot from the first two events. Not from the board meeting though because that information properly comes through the Board Chair and Executive Director. It took me a while to scan though things but I believe I have some good links to share. I hope you find some value here.
I find it interesting that this is happening. Business schools are realizing that even if you are not a programmer it is valuable to be able to share some common vocabulary and experience with programmers. B-Schools Finally Acknowledge: Companies Want MBAs Who Can Code via Business Week @BW
Delphi for fun - looks like some interesting projects thanks to Peter Beens @pbeens for the link.
One of the events of last week was the National Computer Science Principles Summit. I tweeted about it a lot but you can get a lot of the resources and videos at the CS Principles Summit web site.
Embedded image permalink
Link to Rich Kick's resources for Computer Science Principles
An Office Mix presentation on using Code Hunt A good way to get a quick introduction to what Code Hunt is all about.
Interested in learning more about App Inventor? Follow the link for an online course. http://bit.ly/1jJgUA6
HTML5 Canvas Basics handouts http://www.missblomeyer.com/csta2014 from the CSTA Conference.
Teachers new to programming, nice resource for getting started especially with CS Principles.
Resources from computational thinking through game design workshop at the CSTA annual conference.
510px-Scalable_game_design_logo