Saturday, November 7, 2009

Alice: the flexible tool for teaching programming.

This last Tuesday the Skyline High School was the featured school in the Colorado In Sync Expo in Longmont.

As you can see, there were four of the best MESA Intro to Programming students there to show off their skills to anyone who was interested.

Skyline is undergoing an interesting transformation as it is being remodeled and re-vamped to provide more resources and space for the schools two independant initiatives for STEM (Science, Technology, Engineering, and Math) and VPA (Visual and Performing Arts).

Right from the start I knew that the STEM and VPA spheres would overlap. In fact, if I had to poll my programming students and Computer Club members, I'd say they'd be split about 50-50 between choosing STEM or VPA if they had to choose just one. Luckily, Computer Science at Skyline has been able to walk that fine line between science and art. Because the Comp Sci department is not funded by outside interests (like many CS programs that exist in the business departments of other schools), the department has had the freedom to make choices based soley on the interests of the students involved. For this reason, Open Source applications are used exclusively, including Python, Java, BlueJ, GIMP, Oregano, and, of course, Alice.

This year has been quite a year already in the Intro to Programming classes. When students are allowed to freely explore ideas, some unexpected uses of applications can be discovered. This is very apparent in how Skyline is using the Alice environment to extend computer science beyond the usual territory of learning to program. When you look at Alice creations examples online, you see that they tend to ... well ... look like Alice programs. This Fall, however, many of the creations I'm seeing are making me say things like, "You did THAT in Alice?!"

After corresponding with the Alice team at Carnegie Mellon University, I've decided to showcase these creative ideas and send them to Don Slater, from the core Alice team. Haven't decided yet where to post these for the public to see, but when I do (and I'll ask Don for advice on this), I'll put a link here. Hopefully you too will say, "Wow...that's done with Alice?!"

Of course this is just confirmation that Alice all along has been a great tool for teaching programming and comp sci. I think most people never really push a tool to it's limits, finding new ways to use that tool to create beautiful and expressive works of science AND art.

Tuesday, August 25, 2009

A new beginning ... of sorts

I can't say how many times I've sat down and thought about writing a blog entry this past Summer.

I guess it was a gut check of sorts: what do you really care about? Many times I wondered. I mean, there's just so many things I feel like blogging about from time to time. You know, things like open source software alternatives, computer science education, an occasional book or movie review--all of that.

And yet, none of it seemed to matter this past Summer. I felt like I was barely hanging on, or sort of floating through life. Being a strict skeptic, I had long denied many of the things that were suddenly seeming to be necessary in my life. Things like faith and hope. I started to wonder: is this how it happens? Is this when a person officially becomes old and senile?

Well, I went and got help. Admitting that I just didn't care much about 90% of the things in this world (make that 98%), I reached out and asked the tough questions, like what my purpose in life was--you know, that kind of stuff. Well, nothing changed quickly, but over time and with a lot of work, I started to care again. I decided that, yeah, I suppose I had a pretty good career and life and it was worth pushing on.

This sounds melodramatic, and it was. As logical as I try to be, I've always been pretty emotional, and I had to admit that last school year was the most difficult year of my life. Throughout my teaching career I had seldom used sick days. Suddenly I was drinking a little more and having trouble getting up in the morning. Having emergency surgery was bad enough, but admitting that the painkillers sent me into an even deeper depression--well, that part sucked. All of that was small stuff, though, compared to losing my dog in February. She was so happy and so obviously wanted to live on, that it just killed me inside to admit that she was suffering balance and nervous system degradation to the point where she was crashing into things and sliding along the walls whenever she wanted to move on her own. Holding her still and seeing that she still was coherent and loved her life--I can't get past that somehow. I had no religious revelation. In fact, I felt the opposite: life is cold and hard and impersonal and things happen at chance. It simply wasn't fair. I felt like an angry child who was robbed of the things he loved the most.

Suddenly fighting to promote Linux and open source alternatives seemed, well, unimportant. Convincing the College Board that Python would be much better than Java for AP Computer Science--who cares? My former adversaries seemed no so different from me. We're all just people and we all have to accept the undeniable truth: life is cruel.

But...then it happened. Things started to improve. Therapy told me to simplify my life. When writing down projects that I was committed to, I came up with almost 20 that were just things that I was volunteering for. Somewhere in all of that I had a family and career, and yet I was spending a LOT of time working on side projects.

So I got another dog. Adopted her from a local shelter. She's absolutely wonderful and her effect on me was sudden and strong and very positive. I learned to spend time taking her to play fetch and leave the other stuff behind. I no longer had to be a programmer, educator, advocate, lobbyist--I just had to be her owner and make sure that her life now would be much better than the year she spent as a stray. She had hit the jackpot with me, and that felt good.

So this update may be a goodbye to blogging. The good news is that I'm having a great school year, loving my classes, and I've cut off all alcohol, caffeine and crap food. I've lost 30 pounds and feel pretty good. I get up early and take my dog out to play before I go to school to teach calculus. Somehow, it all fits.

And changes are happening at my district. Suddenly our district tech department seems to be on our side and are opening up a lot of policies that were very restrictive in the past. Also, free and open source software seems to be doing quite well with our without me as an advocate. Now I just use the software in my classes and others want to do likewise. Oh, and my students last year absolutely kicked butt on the AP exam. Having all students pass is a rare diamond in a year that was a large pile of coal.

I still read a lot of blogs and cheer on the young blogging teachers out there. We have a tough job and don't get much pay for what we do. Although I'm not much of a believer, if there is a heaven, I figure teachers have a good shot at being let in. I am working hard with my students and we're making a difference. We're partnering up with two local human societies and a local hospice care center to start a program that takes old electronics stuff and we repair what we can, recycle what we can, and use the rest to create new and cool gadgets and junkbots that teach students about robotics in a way I really like.

I may give a link to that project, for those interested. Otherwise, I'll probably just ignore this blog for a while longer and maybe let it die off. Maybe. I'm not sure, and right now it's time to take my dog out to play frisbee. :-)

Tuesday, March 17, 2009

Sometimes They Come Back

So I'm working through a great Python book by Andy Harris, and I'm running a little orbit simulator.

You can the original orbit that my space ship was in (the oval shape that fits on the screen). I hit the thruster a bit too much and altered the orbit (the oval that goes OFF the screen). My ship seemed lost in space and time, as I started to think about Kepler's brilliant 2nd law. In short, if my ship was to return, it would be a while.

Python, however, deals well with really large numbers. If your program requires them, Python will supply them. Printing a googol in Python is no problemo. So I waited.

And waited.

And waited.

My wife came in and asked me to help her move some furniture in our guest bedroom. Later, I came back and the orbit was complete: my ship had returned home. Sometimes they come back.

Sunday, March 15, 2009

Pygame for Flocking Behavior Simulation

Back in the 80s, Craig Reynolds did some great work on simulating the flocking behavior of birds on a computer. I've always been fascinated by his results, as they look so much like a real flock of birds.

Since then there have been numerous implementations of his approach.

While programming Alice with a student recently, we came up with a way to simulate fish swimming in schools. Our method was nowhere near as complicated as flocking boids, but it was quite effective nonetheless. It merely involved random movement with boundary checking: get too far away from the "center" and the fish decided to head back towards the "center". Of course the "center" here may be a physical location, or the average location of the fish.

To study this in more detail, I decided to use Pygame, a module for Python. Pygame makes writing little graphical simulations a piece of cake. Add to it the functionality of Numpy or Scipy and you have a very powerful environment for scientific simulations.

Tuesday, March 10, 2009

My Ping Pong Problem

While writing up some new and original logic problems for the PyWhip site, I came up with this one, which kept several teachers in our math department (and a student) entertained during lunch:

Imagine that we have some ping pong tables and need to have them "sealed" before the next round of competition. It takes one worker 10 minutes per table to get it properly sealed and cleaned up. It takes two workers 5 minutes per table, as they can each work on a half. Only two workers can work on a table at one time, though, so three workers also would take 5 minutes on one table. All we care about in this problem is how long it takes for the work crew to be done with the table "resealing" job so we can get the next round of a tournament started.

Your job:

Write a function that accepts two parameters (numberOfWorkers , numberOfTables) and have it return the total number of minutes it will take for the work crew to get the job done.

Saturday, March 7, 2009

PyWhip and Javabat ?!

If you are a member of Edu-Sig (the Python in Education group), you may have heard talk recently about creating a Python alternative to JavaBat, a tool used by almost every AP Computer Science teacher on the planet.

JavaBat is almost universally loved and used by high school APCS teachers. Students can sign up easily and then start solving the 250+ challenges they are presented with, ranging from simple String manipulations to hard core recursion methods.

One of the difficult aspects of Java is that it never was designed as a nice language to quickly write up some code and let it run. Old farts will talk about the golden days of BASIC, but Python is really a great language for Computer Science education. Javabat helps by letting students write simple methods (functions) without the need to enclose everything in a Java class with public static void main (String[] args) . In short, it let's students and teachers focus on the login involved in a particular method--which is a good thing. Teachers can track student progress, browse their code, etc.

So the reality is that Javabat is one of the most used tools for teachers of AP Computer Science. I have yet to meet a teacher of APCS in my state that does not use Javabat.
If Python is to ever gain a foothold in secondary school CS education, having a Python alternative to Javabat is a very good idea.

Right now it's just beginning, but if you want to contribut to PyWhip, head on over to edu-sig or contact me on how to get involved. Since I haven't really asked the two main contributers for permission to put there contact info here, I'll leave their names out of this, but they're doing a great job on this so far.

Friday, March 6, 2009

Thank You! BlueJ and Greenfoot open up.

I just stumbled across this announcement about BlueJ and Greenfoot going open source. These are two applications used by many teachers of AP Computer Science classes. In the past they were always "free" as in free beer, but the source code was not available. Opening up their code can only help spread the use of these two wonderful programs.

Many times in the past I've contacted Ubuntu users in the Ubuntu forums for help on issues with BlueJ and Greenfoot. The response has always been a bit reserved--show us the code and maybe we can help. This change of policy will immediately build acceptance from a very talented group of developers and programmers.

Also, it's just plain fun to read the source code. Michael Kolling and John Rosenberg have written code with much better documentation than you will usually find. Here's just one example:

* Java 1.4 & prior version of trinary "? :" operator. See JLS 2nd ed.
* section 15.25.
* @throws RecognitionException
* @throws SemanticException
private JavaType questionOperator14(AST node) throws RecognitionException, SemanticException
AST trueAlt = node.getFirstChild().getNextSibling();
AST falseAlt = trueAlt.getNextSibling();
ExprValue trueAltEv = getExpressionType(trueAlt);
ExprValue falseAltEv = getExpressionType(falseAlt);
JavaType trueAltType = trueAltEv.getType();
JavaType falseAltType = falseAltEv.getType();

That was interesting. This comment here was also fun to find:

* Find the Wireless Toolkit. In Windows we search all the filesystem roots.
* In other systems (Linux, that is) we search the directories in the
* initializer list of array 'roots' listed below.

I've got a lot of reading to do, it seems.... :-)

Saturday, February 14, 2009

The Day it Rained Forever

The Public Library just had a book sale and I was lucky enough to find a nice hard-cover copy of The Stories of Ray Bradbury. The 100 stories in here will nicely complement my copy of a more recent Bradbury anthology of 100 stories--none of them are duplicated.

I've been in a lull. Although I have been quite productive teaching-wise, my life has been dominated lately by the difficulties my boxer dog is having. She's 10 years old and shows the symptoms of geriatric vestibular syndrome. Although her mind is still there, she lacks to coordination now to feed herself. I've been feeding her by hand, though, as it's the least I can do. She really has been a great dog--albeit a somewhat high-maintenance one. :-) She went through a difficult spell last Spring and fully recovered. We're hoping she can do so again, although this time the symptoms are much more severe. When I was a kid I used to absolutely dread the extreme emptiness you experience when you lose a pet. Not much has changed, really. Many things just don't matter as much all of a sudden, and you feel as if you're floating through life.

Thursday, February 5, 2009

Alice 2.2 Video Export Test

Just seeing if this works. Recently we upgraded to Alice 2.2 in my Intro to Programming classes and we are now testing out the cool features 2.2 has that 2.0 did not. Exporting videos is one of them.

Wednesday, January 28, 2009

Scratch on Ubuntu

Today I had a personal visit from Bud the Teacher. We had a few things to discuss about our upcoming district tech fair, but as usual we soon were talking about big ideas and all sorts of stuff that we would like to see reach fruition.

Bud mentioned the possibility of using Scratch with some of our district Gifted and Talented student. Bud didn't even start by saying, "have you heard of Scratch?" No, by now he knows that if it deals with teaching programming and/or is open source, I probably have looked into it. I told Bud I would be happy to help teach Scratch to any interested teachers, possibly this upcoming June.

When I got home, I fired up my Ubuntu laptop, opened the command line and typed "scratch". I got the cold and impersonal Linux response of "command not found" and realized that I had NOT installed Scratch on my current Ubuntu version (8.10). I did recall, however, installing it on Ubuntu 8.04 and having it work great. A quick visit to this page had me up and running, scratching my way along in a neat little world of click and drag logic. I remember the days when Linux versions were a ton of work. That's changing, though, and more and more great apps for teachers are fully supported on Linux, with Ubuntu being the most common choice.

Gotta go. My Scratch is rusty....

Oh, and if you're like me, you'll want the source code. Happy {code} reading.

Sunday, January 18, 2009

Raygun Gothic: The Future That Wasn't

Today I went for my first long bike ride of the year. It's day one of our school's voluntary "wellness challenge", and I'm looking forward to getting in shape.

The weather was very windy, but warm, almost warm enough for me to be wearing the t-shirt and shorts I had on. While biking, I listened to my iPod play the first episode of the old time radio series X Minus One. It was a great example of retro futurism, as the episode (from the mid 1950s) described the "future" in the 1980s.

Now, if you were a kid of the 80s like me, you won't recognise the 1980s in the old radio episode. That's because it was the future that did not occur, the future from the forgivably short-sighted minds of 1950s writers and producers.

As I was riding along, I got to wondering: what's the term for that style? Steampunk has it's own look, as does Cyberpunk. I found myself wishing I could Google it right then and there on my bike just to put an official term to it. Now, after looking it up, I find there are really two terms: retro futurism and raygun gothic (from Wikipedia):

Raygun Gothic is a catchall term for a visual style that incorporates various aspects of the Googie, Streamline Moderne and Art Deco architectural styles when applied to retro-futuristic science fiction environments. Academic Lance Olsen has characterised Raygun Gothic as "a tomorrow that never was".
I first came across this term when William Gibson coined it in his excellent short story, "The Gernsback Continuum." That was the first time I really thought long and hard about the concept of retro futurism. I mean, of course I had always watched The Jetsons and a host of other old science fiction shows. When I first watched them I still thought they were presenting a plausible (all-white, sexist, and safe) version of what the future could be. In time, though, you notice that the "future" of those old shows looks more like our own past--albeit with big shiny fins and slidewalks.

Great examples of Raygun Gothic are all around us. The Fallout 3 video game is 100% raygun gothic. The TV series LOST is also almost entirely raygun gothic. Heck, even this great video on Youtube is Raygun Gothic, as it tried to imagine the world of 1999 way back in 1967.

The thing is, though, that every story about the future to come is doomed to become another case of retro futurism. When I was reading cyberpunk in the late 80s, it sure looked cool and exciting. Now it looks a lot like ... well ... the late 80s. :-)

[Note: All the episodes of X Minus One are now in the public domain. You can find them at the Internet Archive for free.]

[Note number two: The difference between the term retro futurism and raygun gothic is this: raygun gothic is a particular type of retro futurism that features a future that was envisioned by the (male) writers and producers of the 1950s: automobiles with big fins, blonds ubber people, rayguns, etc. Stempunk, therefore, is also a form of retro futurism.]

Why Teachers Don't Share More Often.

One thing that drives me nuts is watching money be wasted. Pretty much every institution finds ways to spend money unnecessarily, but schools are often quite proficient at this skill.

What makes this even more frustrating is that teachers are by nature one of the most sharing and willing to contribute group of people I've known. Teachers create things every day that they'd be willing to share with others. If only someone would coordinate this resource and bring a true community to fruition!

Sadly, it seldom happens. I blame proprietary formats and money-hungry businesses. Teachers have been slammed for so long by the copyright zealots of the textbook publishing industry that they simply are unaware that there can be an open alternative to the way they do their jobs. Certainly within individual schools and districts there may be a large amount of sharing going on. By this I do not mean illegal sharing. Instead, I'm talking about the plethora of lesson plans, activities, and strategies that teachers create and use in their classroom. Most teachers would love to share their creations and utilise the creations of other teachers. This occurs whenever teachers get together at a workshop--they exchange email addresses and promise to send each other their creations.

Many times, though, they feel guilty doing this, or feel that it is too good to be true to be able to "steal" from other teachers. [They use that term, "stealing"! when they should be saying "sharing."] Where does this come from? Maybe from the fact that any time teachers attend a workshop sponsored by major textbook publishers, they are given complimentary copies of what often appear to be wonderful resources. As soon as they open up the book to make a few copies to share in class, though, they see the strict copyright warnings printed on every page. This is so common that they believe it is typical of teachers sharing resources: there's always a cost.

But, there isn't always a cost. Most of the resources that teachers share are not photocopied from copyrighted materials--they're quizes, plans and activities that teachers created by themselves. They should be able to enter these items into the vast network of teachers and create a free and open community of resources for any teacher to contribute to and to use.

There's one problem, though: proprietary formats. If teachers continue to use closed software like Geometer's Sketchpad, we remain slaves to the format. This is changing slowly, however, as there is no longer a stigma attached to writing pdf files or importing doc files into OpenOffice. Geometry teachers could use several of the free and open source alternatives to Geometer's Sketchpad, but few do. Why? Because the textbook publishers are like crack dealers. They know by now how to "give" (although you really don't get any rights to what you're given) teachers a free copy of their software. They also know how to make district tech departments feel like adopting their software will make their lives very easy.

So the district buys a site license to Geometer's Sketchpad and they're all set. Notice the students were never mentioned in this process? That was intentional. They are NOT factored into this process at all. Instead, decisions are made that lock students into having to use expensive software that they have no access to outside of class. Students would have access to all of the open source alternatives at home.

My district has done quite a dance with proprietary software. In the past it was acceptable to pay for access to, say, MacSchool, as it was pretty reliable and did what we wanted it to do. Since then, though, we have used expensive software that was terrible, and freeware (NOT open source) that was generally despised by all involved. Next year we switch to Infinite Campus, which I believe is a good thing. In the meantime, though, we have a semester where teachers are allowed to use whatever they want for a grading program. Really. Whatever we want. Some will no doubt just use the traditional red gradebook and only use computers for reporting final grades. Others will try to find an old copy of Making the Grade or something similar lying around.

I decided to Google "open source grading program teachers" and found Open Grade. It's simple and (dare I say) elegant. I did the Linux make, build, install and now have a pretty cool grading program with few features, but even less annoyances. It works. I can print out student or class reports into text files and fit a lot of info on one page. Also, since it's open source, you can get to the source code (in Perl) and alter the way it works.

We're lucky, as educators, that there are people like Ben Crowell, who created Open Grade. Some may scratch their heads and say, "but why would someone do that and share it for free?" I would say, however, that behavior like that is the rule, not the exception, in higher education, and I have hundreds of examples to prove that point. Here's a couple:

Jason R Briggs has written an excellent Python book for teaching Python to kids.
Dick Baldwin shares a ton of his own work for the Alice programming environment.
Allen Downey has been sharing his Java and Python books for years.
Moodle and Wordpress are used by many teachers, most of which can't believe they're free.

I just wish we had a more efficient way of sharing all these homegrown education resources....

Sunday, January 4, 2009

Leaving on a jet plane

Tomorrow is the first day of the Spring semester. While my students are filing into my classroom, I'll be on a jet flying to Carnegie Mellon University in Pittsburgh for a one-day workshop on Alice 3.0, which I'll be using in my Intro to Programming class this semester.

My students will be official bug reporters for Alice 3.0, a scary and yet exciting job for us. I'm also hoping to put a word in for Linux support while I'm there. Wish I was better at tweaking Java in Linux, so I could help out more. :-(

Spent most of today packing up and storing away my NES and SNES game collection. Had to make more room for some recent book acquisitions....

Thursday, January 1, 2009

When worlds collide....

My online identity is pretty diverse. Each different facet seems to interact with a large web or sphere of somewhat similar individuals. What surprises me, though, is how little the various spheres tend to interact with the other spheres.

For instance, I see very little overlap between these three spheres: math teachers, programmers, and technology in education experts. All three of those spheres accept me and allow me to contribute and ask questions--and yet I know very few individuals that exist in even two of those three spheres.

For instance, take a look at this recent post about a probability question on a programming blog. The immense number of comments arguing one solution over another reminded me of the Monty Hall problem, which is taught in IMP 3 Math. In fact, there's almost nothing in those comments (other than the occasional coded "solution" to the problem) that would tell you that these are primarily programmers--not math teachers--arguing their view of the problem.

I found the comments amusing. I haven't necessarily found that being a natural at math makes a student a natural at programming--although I must say that almost all of my best programmers are very good at math. I've done research on a correlation between language acquisition aptitude and programming ability, but the results, of course, were unclear. What I do know, though, is that very few programmers (aside from a few Linquistics experts) ever think much about language acquisition.

Let the fun begin:

Let's say, hypothetically speaking, you met someone who told you they had two children, and one of them is a girl. What are the odds that person has a boy and a girl?