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, August 25, 2009
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.
Subscribe to:
Posts (Atom)