All posts by rwhite

My CS classes before distance teaching happened

I want to talk a little about CS distance-teaching, and I realize that this is kind of a niche topic given that teaching CS at all is a niche endeavor. I teach other classes–I’ve been a high school science teacher for much of my career–but teaching CS is what makes up most of my day now, so I suppose this is a good place to start.

I’ll talk about teaching Physics classes online in another post soon.

Conflated with the question of “what are some great ways of distance-teaching computer science?” is the deeper, darker question that haunts each of us: “Can you just help me identify some great ways of teaching CS under any circumstances, even those not involving a pandemic?” Because I don’t think we’ve really got that figured out yet, either.

There is some great research being done out there, and a lot of it gets presented at the annual SIGCSE convention each year. You need to go. There are other conventions as well, but SIGCSE is arguably the best, and you’ll get some great ideas, meet some great people, and have the chance to reflect more deeply on what we do–teaching CS–and how we might go about doing it better.

For today, I’ll just tell you what I’ve been doing for the past few years in teaching my own CS classes, and after that, we can talk about what changed when I had to start distance-teaching.

For context, after a long career teaching in public schools, I have taught at an independent school in southern California for the last 15 years. I have an incredibly supportive administration that has supported the growth of the school’s CS “program” (three classes) even when that sometimes results in class sizes that are quite small. Just as importantly, I work with an amazing IT director who has provided so much for our program, from hardware to servers to off-campus network access for students. Some key elements of our program wouldn’t be possible without support from higher-ups at my school, and without that, my teaching strategies, and even parts of the curriculum, would look very different.

Another important factor in all of this is the students’ access to technology. The Upper School in which I teach is a Bring Your Own Device (BYOD) school that requires students to have their own Apple or Windows laptop on campus with them every day. Having students work on their own machines, and then take them home where they can continue working, goes a long way toward facilitating the work we’re able to do. Without a BYOD program, I’d be working with a roomful of computers and having students either carry data back and forth on flash drives or interact with data directly on our server. We’d make it work, but it would change some of what we can do.

Some notes on infrastructure

As classroom teachers we know very well that the curriculum for a course is supported by all sort of infrastructure, what a textbook publisher would call ancillary materials.

For my courses, I post the vast majority of the materials I present to materials on a website that is available to them throughout the course. New material is presented in class using an LCD projector displayed on a whiteboard at the front of the room, supplemented with comments and lots of drawing with whiteboard markers. Live-coding demonstrations of syntax and coding strategies, or public decoding of students’ programs, likewise happens using the LCD projector.

Speaking of textbooks, after struggles with availability of a seemingly endless series of editions of Horstmann’s excellent Java Concepts: Early Objects, I chose to move to a free, open-source textbook that seemed to satisfy most of the needs for that course… and subsequently shifted to free, open-source textbooks for the other classes as well.

I include appropriate sections for reading in the course calendar, but most students seem to rely more heavily on the online materials I’ve prepared for presentations anyway.

Intro to Computer Science, AP Computer Science A

These courses are both taught at the introductory level, and both cover approximately the same curriculum. The year-long AP course uses Java, and introduces objects near the beginning of the course and covers object-oriented design principles and algorithms in much greater depth than the Intro class, and students are formally tested along the way. The single-semester Intro to CS class uses Python and blitzes along quite quickly, with an occasional quiz to help keep students honest.

For both courses, programming problems are assigned on a daily basis, and students use the Terminal on their own computers to upload assignments to a server maintained by me. I can run auto-graders on their assignments and/or look at their code as desired.

An important preface to each course is an introductory unit that includes lessons on computational thinking, the filesystem on their computers (mostly Apple, some Windows, an occasional Linux), the and Terminal. As more students come into the course with little experience using local files (music and movies are streamed! Google Docs are in the cloud!), it’s critical for me to give them experience thinking about files and directories for them to be able to manage these courses.

Here then, are the topics covered in both courses, approximately in chronological order.

  1. Introduction
    1. Computer Science vs. Computer Programming
    2. Intro to Computational Thinking
    3. Encapsulation, Binary numbers
    4. The filesystem, using GUI to navigate the system, organizing files in directories
    5. The Terminal
      1. Navigating the local (client) computer
      2. Logging on to a server
      3. Navigating the server
    6. Text editors
    7. Integrated Development Environments (AP course)
  2. Computer Programming Principles
    1. Output
    2. Input
    3. Data Types
    4. Math operations
    5. Implementing classes (AP course only)
    6. Functions (Static methods for AP course)
    7. Conditionals
    8. Loops
      1. while
      2. for
    9. Graphics (using Processing.org)
    10. Object-oriented design principles (AP course only)
    11. String functions
    12. Lists (Arrays, ArrayLists)
    13. Algorithms
      1. Recursion
      2. Sorting
      3. Searching
    14. Objects (for Python course)
    15. Graphical programs (Graphics-based game)

Advanced Topics in Computer Science

This course picks up where either of the other two leaves off. After (re-)acquainting students with Python and object-oriented programming, it covers:

  1. Algorithm analysis; Big-O notation
  2. Recursion
  3. Linear Data Structures
    1. Stacks
    2. Queues
    3. Deques
    4. Linked lists
  4. Algorithms
    1. Sorting
    2. Searching
    3. Hashes (Map or Dictionary)
  5. Trees
    1. Binary Trees
    2. Heaps
    3. Binary Search Trees
  6. Graphs (introduced)

A note on providing a course website

I consider the website for each of my courses to be the logistical hub for what I do–it’s not uncommon for me to begin class by calling up the course calendar from the site and asking out loud, “So, what are we going to be doing today?”

I’m no genius in website design, and at least one of my students will attest to that: in a classroom presentation, he used one of my course websites as an example of “an okay site that could be so much better.”

Thanks for that, Ikenna. :)

And you may not be a rockstar at writing HTML/CSS/JavaScript code, but there are ways of making a website happen.

A course website will have a profound effect on how easily you can transition to distance-teaching.

If you don’t currently have a website that you use as a focal point for your teaching, you might not feel like now is the time to take that on. That makes sense. And yet…

We’ll talk about this more in the next post.

Hardware for Distance-Teaching

This is perhaps the least sexy part of an extended conversation about distance teaching. Hardware is just stuff you can buy, so it doesn’t demand anything special from a teacher aside from money, either your school district’s or your own.

One of the great things about hardware is that you can almost always get by with less, as dictated by constraints. The barebones minimum that you need is simply that which you almost certainly already have: a laptop with wifi, webcam, and microphone.

Most of us benefit from having access to a bit more hardware. In order of subjective importance, then–most important first, niceties last–is my list of things that I’m currently using in my online teacher. (This list assumes that your base working computer is a laptop.)

  1. external backup drive
    There’s no way I’m going to do anything data related without a backup of my computer. A former colleague of mine, just yesterday, dumped coffee into her MacBook Air. Of course it was an accident; nobody does these things on purpose.
    Backups before all else.
  2. external monitor (and cable, dongle)
    One of the best things you can do to help manage your newfound digital teaching is to give yourself some extra screen-based real estate. It’s possible to simultaneously manage windows with your calendar, website, word-processor, email, and Zoom meeting all on your laptop’s screen, like an animal, but who would want to? If at all possible, finding a spot where you can set up an extra monitor will empower you to better juggle everything. A top priority.
  3. graphics tablet
    This isn’t something that would have been very high on my list before I started teaching from home, but it turns out to be pretty important now. From highlighting written documents during a Zoom session to actually writing out things, doing math, or drawing arrows to emphasize relationships, a small tablet has made a huge difference in what I can communicate on the computer.
  4. ear buds/headphones
    Most video-conferencing software–Skype, FaceTime,Meet, Zoom, etc–benefits from keeping the audio output from your speakers away from the audio input of your microphone. Most software does a remarkably good job of managing feedback loops so that you may not need ear buds or headphones, but it’s a nice thing to have access to, especially if you’re trying to be kind to a partner or worker within earshot of your teaching.
  5. mouse (blue-tooth)
    For most people, an external mouse makes everything better. Logitech makes some very nice ones.
  6. external keyboard and laptop stand
    The ergonomics of using a laptop are famously disastrous: if placed in your literal lap, the keyboard is in the right position but the screen is to low for proper posture, and if propped up at some height in line with your vision, you can reach the keyboard. Placed on a desk, both your neck and hands are forced into unhealthy positions.

    The best solution is to place the laptop at a height where you can easily see it–mine is currently propped up using books, and my partner’s is sitting atop a pile of shoeboxes–and use an external keyboard at an appropriate height lower down. A well-designed stand can dress up your workspace nicely.

    You didn’t get into teaching to spend hours each day at a computer, but this is where we are now. The least we can do is take care of ourselves.
  7. comfy chair and awesome desk
    These, too, can make your new life as a desk jockey much better and more healthy for you. Not all of us have the luxury of a dedicated work space, or that holy grail, a home office. Bu the more you’re able to carve out a literal or figurative “room of your own” in which to work, the better it will be.
  8. external microphone
    Your machine may have an adequate microphone, but an external microphone is almost always better. If you’re meeting with students or recording videos for them, improving your sound quality is a big bonus for them.

My partner needs less hardware than I do, so she’s got her “home office” piled onto a card-table in the living room. I’m fortunate to have a 5-foot wide desk from Ikea that I can spread everything out on. It’s a bit of a mess, but hey, we’re all suffering a little bit here. I’m consider myself lucky to be well-equipped, at least as far as my hardware situation is concerned.

Thank you, Apple, for the dongles.

A return, of sorts

This is my “professional” blog, and it has been just about a year since I’ve written. That’s not to say that my career has been on hold. Quite the opposite, and of course, that busy-ness is partly to blame for my lack of posting here.

There is slightly more room in my schedule now, thanks to a certain pandemic, so I expect there will be a bit more content here going forward. Likewise, some of the very fine computer science teachers I follow online have encouraged others of us to take up pen and paper keyboard and blog… et voila.

Here I am again!

What’s next? Over the course of the next few weeks I’ll be sharing lots of stuff, most of it having to do with some variation on “distance learning during a pandemic.” Teaching with technology has always been a thing I’ve done, and I feel fortunate at this point to have some background there.

Still, this is a challenging time for teachers and students everywhere. I’m looking forward to setting down here a little bit of what I’ve learned.

Stay tuned!

Rip. Mix. Burn.

Thank goodness for CDs. I don’t know how life is going to change once I can’t own my music.

Look, I know that this whole streaming thing is where you live now. I get it. You’ve got a subscription, and you get to listen to what they provide you, available 24-7 on your phone and computer.

Whatever.

Spotify may be working for you, but it’s not working for me. It doesn’t have what I want to listen to.

Sometimes it does, I guess. But sometimes not. The very first song I tried to find on Spotify this evening was Lene Lovich’s New Toy, a classic on KROQ back in the 80s. And near as I can tell it was on Spotify at one point, at least according to this guy’s playlist that he put together. New Toy is grayed out, for some reason, and doesn’t show up in any searches. I guess it’s gone.

Where’d that song go?

You know what’s not gone? The MP3 on my computer that I legally ripped from a CD that I own.

I had a bit more luck finding Pink Floyd’s Meddle album. Well done, Spotify. And Old Hag You Have Killed Me by the Bothy Band. Excellent. I shouldn’t trash them too much for their selection. They’ve got enough to worry about, what with the criticisms regarding their payment to artists.

Spotify has most of what I want, okay, but it doesn’t have everything I want. The Lene Lovich example above is something you’ve almost certainly lived yourself, perhaps on Netflix when you went to watch a show that you’d seen their before, only to find out that some licensing agreement had expired and the show is no longer available. It happens all the time.

So where music is concerned, I’m still buying CDs. I’ve heard some exaggerated rumors concerning the death of physical media, but it’s not dead yet. I’m buying physical media and ripping it on my Linux box to FLAC (of course), transcoding it to MP3s using the Apple app XLD, and living large.

CDs will go away someday, of course, and I’ll have to get my bits elsewhere. But I dearly hope it’s the bits that I’ll be buying, as opposed to a license to temporary access to those bits, revocable at any time.

In related news, Microsoft has been selling digital books via the Microsoft Store since 2012. Cool, yeah? Oh, wait. Microsoft has pulled Books from the Microsoft Store and is planning to offer customers who’ve purchased any ebooks via the Store refunds, as their books will no longer be accessible as of July, 2019.

Oops. Guess the money I paid for those books wasn’t actually a “purchase.” It was a “user agreement.” My bad.

Hang on to your data, folks. And make backups. ;)

Open Source, Open Community

A brief story of sharing educational resources

In the software community, the Open Source movement encourages sharing software freely. Whether it’s “free of charge” (one type of freedom) or “free to use these materials and modify in any way you wish” (a different type of freedom altogether), these people share the work they’ve done and the rights to use their work with the larger community.

In the education community, too, there is a long history of teachers sharing resources with each other. From worksheets to lessons plans, from presentations to assessments, we have all benefitted from the experiences and work of our peers at one time or another.

In my own teaching career I have moved from being a borrower of others’ materials to a creator of my own. Computer programming assignments from Cindi Mitchell, physics lesson plans from Dennis Wittwer, Don Hubbard, and Carol Wawrukiewicz, and pedagogical strategies from Aaron Glimme have all informed what I teach and how I teach. A few years into my career I began developing the confidence to share my own growing expertise with others, and learning how to publish my own materials on the World Wide Web was a turning point. Since then, I’ve been happy to share much of what I do professionally on my course websites, even as my own practice continues to evolve.

For a number of years now, teachers at Poly have been using the school’s internal website, MyPoly, to help organize and manage resources for their students. Some teachers also maintain public-facing websites where that information is available to others outside our community. (See Greg Feldmeth and Craig Fletcher” for examples.) These websites typically don’t share everything a teacher does—test keys and personal student information wouldn’t be appropriate for posting-—but assignments, practice materials, and even homework solutions might be found.

It’s not unusual for a teacher who shares materials to receive emails like this:

Hello Mr. White!

I’m teaching AP Physics 1 for the first time at Crescent Valley High School, in Corvallis, Oregon.

I came across your website while searching for materials to use for a pre-assessment.

Would it be all right with you if I include some of your questions in the document I give to my students? I’d be happy to return the favor at some point if it’s ever useful.

Thanks in advance and I hope the new year is treating you well.

Take care,

DB Science Department Crescent Valley High School

Occasionally a student will write asking for assistance of one kind or another. I received one such request from a student in Maryland just after the Thanksgiving Holiday in November, 2018.

Hello Mr. White,

My name is Zeke Nohr, a senior at Aberdeen High School. Over the brief Thanksgiving break, our physics teacher resigned very unexpectedly. The school in the process of finding a replacement for him but as of now, me and 5 other seniors who are very skilled and interested in physics have been placed in charge of planning the curriculum for his physics classes. Two of the classes are AP Physics C: Mechanics which we all took last year so we have all the resources we need for that. The other two are AP Physics C: E & M which we are currently enrolled in. We have some resources that our teacher left behind but we are missing practice tests we would like to use as review materials, especially since we plan on having our next test on Monday or Wednesday next week. Our previous physics teacher frequently used the “Multiple-Choice Practice Problems” from your website, learnapphysics.com, that are displayed with all units. I do not see a way to download these as a document to distributed to our class. If you have those documents available for the Electricity and Magnetism Units, we would be extremely grateful if you could provide us with a copy.

Best Wishes,

Zeke Nohr

I replied, with instructions on how the student could access some of those problems, and provided links to some practice tests that I post online for students, and got a quick reply.

Hello Mr. White,

Thank you so much for taking time to respond to my email and providing me and my fellow students with resources we can use for the rest of the year in our physics class. We are extremely grateful for your help during this transition.

Thank you,

Zeke Nohr

When I shared the story with Craig Fletcher, he thought that he might have some materials that the students would benefit from as well. In a separate email, he sent along his own set of links.

We didn’t think much more of it until we each received an email the day before Winter Break:

Dear Mr. White and Mr. Fletcher,

Hello, this is Zeke Nohr from Aberdeen High School. I sent you an email around the end of November asking for practice tests resources for our physics classes that me and two other students were teaching due to the unexpected departure of our physics teacher. Mr. White first sent me some great practice tests which were extremely helpful and we are all very thankful for your generosity. When Mr. Fletcher sent me the email saying the two of you had discussed it and shared the plethora of resources on your website, including lectures, textbook links, practice tests, and homework problems and solutions, we were all surprised and excited by your generosity and willingness to help us through a difficult time. Luckily, a new physics teacher was found very quickly and he started here on Monday. His name is Viktor Polyak and he recently graduated from college and this is his first time teaching. He is very good at explaining the topics and all of us here at the school like him. Since he is a first time teacher, he didn’t have any teaching resources when he came in so we have been using the lectures that the two of you supplied and they have been so informative and helpful to us (the mechanics classes have especially enjoyed “The Island Series” at the beginning of Mr. Fletcher’s lectures) and we intend to keep using them for the rest of the year. Having these resources has made the transition to a new teacher so much easier as he does not have to spend time looking for lectures and homework problems and can focus on helping us learn. We are all extremely grateful to the two of you for sharing your resources with us in a time when we did not have access to any. Your generosity and compassion is heartwarming and has made a huge impact on us here. I told the other students here that I was sending a thank you email today and some of them wanted to sign the email as well to show their gratitude.

Thank you so much,

The email was signed with the names of 42 students, the school’s program director, and the new physics instructor, Victor Polyak.

Teachers at Polytechnic School find lots of ways to become involved in our community of learning. We are involved with consortiums and cohort groups, we attend workshops and conferences, we teach at summer school or Partnership for Success!, and we work with teaching fellows and mentor new teachers. For me, making course materials I’ve developed available online where they can serendipitously benefit students and teachers in an even broader community has been a rewarding part of my professional life.

Homemade Capture-the-Flag, part 2

In the last post I was talking about the Homemade Capture-the-Flag competition that I’d created for my students as part of a culminating, end-of-semester activity. Students, working in teams, used their computers and technological/programming skills to solve a series of puzzles that I’d created for them.

As mentioned before, there are two main challenges in implementing the CTF: first, the creation of the problems themselves, discussed in the last post. The other challenge is programming the infrastructure that will manage the competition: the delivery of problems, solution submission, scoring, and leaderboard updating.

To do this, I leveraged some of my website, PHP, and MySQL skills to create the small website that students would use to log in, read problems, submit answers, and access the leaderboard.

The MySQL database consisted of three tables that teams of students would interact with. There is the users table which included their a user_id (a primary key), a team name (identified by the email field in the screenshot here), a hash of their password (pass, and the time/date of the team’s last login.

The second table was the problems table, with fields for the problem_id, the problem_num, the problem itself (statement, the correct answer, and the points awarded for successfully solving the problem.

Finally there was the successes table which identified for each problem successfully solved the success_id, the problem_id, the solver_id of the problem, and the time it was solved.

Manipulating these three tables with various queries allowed the site to display the Leaderboard with a running total for all teams: SELECT users.email, SUM(problems.points) from users, problems, successes WHERE successes.solver_id = users.user_id AND problems.problem_id = successes.problem_id GROUP BY users.user_id ORDER BY SUM(problems.points) DESC

For people who have worked with PHP, MySQL, and querying databases, putting together this kind of thing can range in difficulty from a trivial activity for an afternoon to a week-long exercise in PHP debugging hell. For myself, it was just enough of a challenge for me that I found the process to be entertaining and engaging.

If you are not a PHP/MySQL person and don’t have any experience with writing “normalized” databases, you may be wondering whether or not it would be possible to find some way to avoid this whole “build an entire database-driven website just so students can solve a few puzzles.” These are just puzzles, of course, each with a simple answer that a student could submit on paper or whisper in your ear. You’re still almost certainly going to have to deliver computer-based problems by computer, however—a 6MB text file for students to search through, for example, is not something that you can hand out on paper—and without the database, there’s no practical way to create a live leaderboard indicating who is in the lead at any point. For a do-it-yourself CTF, I’d strongly recommend finding a way to make the website experience happen.

If you don’t decide to conduct your own Capture the Flag event, however, there are a number of publicly available competitions for high school-aged students that will work for your students. A quick search online will yield results for CTF events and their corresponding schedules.

I encourage all Computer Science teachers to give these activities a try, and consider making them a part of your curriculum.

Homemade Capture-the-Flag Competition, part 1

Happy New Year, everybody!

Just before school got out for the winter break, our school provided some time in the form of “block days” during which teachers could administer mid-year assessments.

I’m currently teaching two Computer Science classes—a single-semester Introduction to Computer Science taught using Python and a one-year AP Computer Science A course taught using Java—and in addition to a one-hour written assessment for each of those classes, I gave them a performance-based Capture the Flag-style assignment to complete as well.

A digital Capture the Flag competition is one which participants attempt to solve a variety of technology-based puzzles, challenges which are often based on hacking, or decrypting, or programming a solution to a problem.
With the exception of one or two students, nobody in these two classes had participated in something like this before, so I was sensitive to the idea of providing a few easy problems to get them started on things.

I also wanted to provide a variety of problems: some that would require programming a solution, some that would require converting from binary to decimal/hexadecimal/ASCII text, some that would require moving out onto the campus to find a hidden clue or “rogue wifi access point” (that I’d placed there with the permission of our IT team).

Having participated in a couple of CTF challenges myself, I also knew that one of the things that can be inspiring is seeing one’s score updated as challenges are solved, along with a leaderboard to let you know how you’re progressing compared with others.

I also wanted to try to ensure that teams had enough members that they could both support each other as needed, but also dole out responsibilities if they wanted to divide-and-conquer the problems they were working on. At the end of my verbal instructions, I ran a program that randomly assigned them to their groups.

There are two significant challenges for a teacher in implementing something like this: one is the creation of the problems themselves, and the other is programming the infrastructure that will manage the CTF: the delivery of problems, solution submission, scoring, and leaderboard updating.

Writing problems turns out to be mostly do-able, especially for anyone who has been teaching CS for awhile. A list of the challenges that were part of this most recent CTF:

  1. Hide and seek – Every page that you look at on the Internet is displayed according to code. Most web browsers have some means of allowing you to view the code that they use to display a page.

    Figure out how to see this code in your web browser, and then take a look at this page (which linked to a page with a lot of tildes, only one of which was an actual link to a page where the key was hidden).

  2. Content vs Style – Some people prefer to focus on creating content, and others like to emphasize their style. What sort of style do you like for your web pages? (The link led to a webpage with a link to an external CSS sheet, in which was hidden the key.)
  3. cd, ls, cat – I don’t know who came up with this idea, but these folders, randomly named, seem to go on forever. Log on to the server and see if you can find a flag in /home/rwhite/Public/directories. (Buried inside a series of randomly-named folders was a file with the key in it.)
  4. Chips Ahoy – I do love a good cookie now and then. Have you seen any on this website? (The competition website had placed a cookie in their browser, which they could identify (if using Chrome or Firefox).
  5. Indigo and Orange – What does that poster, hanging in Poly 110, mean? (A series of alternating colors represented 0s and 1s, which in turn were ASCII codes for the letters for the key.)
  6. Encapsulated data – A graphics file can contain all sorts of interesting information… (The linked-to file had appended to it a text value for the key, which could be identified with a hex analysis using hexdump or some similar tool.)
  7. Number Guessing Game – Well this is interesting. (The link led to a script running on the server that would take numerical input, and then produce a binary output that would guide the solver to closer and closer values until the correct number was entered, revealing the key.)
  8. Sowpods – The game of Scrabble has a collection of legal words that its players abide by. What is the highest scoring word that consists of only letters with odd-numbered point values?

    ‘cab’ has a value of 3 + 1 + 3 = 7, for example, but you can do better than that. Enter your flag in lower-case letters.

  9. Luhn and done – A list of stolen credit card numbers has been leaked on the Internet. You wouldn’t want to get caught using a false CC number (although you probably wouldn’t want to get caught using a correct stolen CC number either).

    Which number in the list is clearly a false CC number?

  10. Pirates Occupy Haaga – Somewhere on the Poly campus is a rogue wifi access point, operating without authority. Use your smartphone or computer to locate that access point, open a web browser, and retrieve the key you’re looking for.
  11. Taste the Rainbow – Just because I can’t brute force your password doesn’t mean it’s secure. If it’s a weak password, it’ll show up in a rainbow table somwhere.
    baddf925cae1a16b0641fd3da97600a1072b10991f66fed6387899cfa47ff726
    is the hash of my not-as-awesome-as-I-thought password.
    The flag for this problem is my password.
  12. Circular Primes – The number, 197, is called a circular prime because it and all rotations of its digits—197, 971, and 719—are themselves prime.

    There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, and 97.

    How many circular primes are there below one million?

There are always a few hiccups when writing problems. It’s nice to have other people double-check your solutions to make sure that you’ve gotten the answers correct. (I had an error in the first iteration of the rainbow table problem.)

Also, I’d intended the Circular Primes problem to be a programming exercise—I’d first heard of this problem from the awesome projecteuler.net website. But because of the fact that other people have discussed this very problem on the Internet, it’s pretty easy to Google an answer, so this problem turned from a programming challenge to a searching challenge. Not what I intended, but I’d already asked them to Google stuff on the Internet to assist them (the Luhn algorithm and the rainbow tables problem given previously) so I just had to go with it.

Once you have some problems, you have to find a way to administer those problems… and that is the far more significant challenge. :)

We’ll save that for the next post.

Project: Raspberry Pi Kiosk Display

If you’ve got a Raspberry Pi lying around and you were wondering about what you might do with it, consider using it to drive a presentation kiosk.

This post doesn’t describe how to set up a Raspberry Pi from scratch. Getting a new Raspberry Pi up and running requires a collection of materials and a bit of time, which is the price one pays for being able to buy a $35 computer. There are a wide variety of tutorials on the web describing how to make that happen, including this YouTube presentation by yours truly.

Assuming you’ve already got your Pi running, though, here’s how you can set up a presentation kiosk that will cycle through a slideshow.

1. Create and test your presentation using LibreOffice Impress software. You can do this on a separate machine running LibreOffice or on the Raspberry Pi itself. You’ll want to set up the slide transitions and the presentation repeat. (Also, if you’re using images in your presentation, be careful of using high-resolution images. I’ve had presentations choke to a halt when given too many high-res images to present.)

2. Using the terminal, download and install xscreensaver.
$ sudo apt install xscreensaver
This is the only way most people have found to reliably keep the screen from sleeping while you’re using your Raspberry Pi in a kiosk mode. Once the software is installed, you can disable the screensaver in the Accessories settings.

3. The system is now effectively running as a kiosk, although you have the Raspberry Pi, the mouse, the keyboard, and a tangle of wires all over the place. To clean things up a little, get some 3M Dual Lock reclosable fastener tape and put one strip on the Pi housing and one on the back of the monitor. You can attach the Pi to the back of the monitor now, and get it up and out of the way.

4. Once you’ve got the display set up and running in a desired location, go ahead and unplug the keyboard and the mouse from the Pi. That way it will be harder for the presentation to be accidentally interrupted.

What can you use this project for?

  1. Showcasing student work
  2. A vehicle for student investigation of the Raspberry Pi or Open Source software
  3. Presenting program information to visitors at Open House or Back-to-School night

Materials

Open Sourcing

Fun story.

For my own use and as a programming activity, I wrote a little Python script that I could use as a countdown timer. (Bonus feature: I can run multiple timers at the same time. Apple iOS, I’m looking at you!)

I wanted to have a little bell that would ring at the end, and look at that, GarageBand has a little alarm bell sound! Here it is:

I was going to throw my little project up on GitHub as an example for my students; also, because I’m A Developer. I was pretty sure I wouldn’t have a problem packaging Apple’s alarm bell sound with that project. I mean, I’d already had to go to the mat with Google/YouTube about a song I’d made using some of Apple’s sound loops, and I’d done my research. At just under 30-thousand words (at that’s only for the English version) you can polish off GarageBand’s User License Agreement in an easy afternoon, and here’s the good news about GarageBand projects:

H. GarageBand Features and Support.
Except as otherwise provided, you may use the Apple and third party audio loop content (“Audio Content”), contained in or otherwise included with the Apple Software, on a royalty-free basis, to create your own original soundtracks for your video and audio projects. You may broadcast and/or distribute your own soundtracks that were created using the Audio Content…

Cool! Oh… but wait….

…however, individual samples, sound sets or audio loops may not be commercially or otherwise distributed on a standalone basis, nor may they be repackaged in whole or in part as audio samples, sound libraries, sound effects or music beds.

Dammit, Jim. I can’t use that file in my project. Oh, and maybe I just violated the license by embedding that file here.

What should I do for my project? Quick fix: borrow a desk bell from the Theater Department at school, record a single “ding!” and process it using open source Audacity (“Screw you, GarageBand.”), et voila:

My project–including that alarm bell!–has been posted on GitHub: https://github.com/rwhite5279/timer . Mischief managed.

For the record, I totally get why the GarageBand license agreement would restrict redistribution of files. It’s just another in a long list of Apple-related frustrations for me and I needed to vent a little.

Plus, I wanted to play you my bell recording. I’m quite proud of it! ;)

Quitting Facebook

I quit Facebook last month.

It wasn’t a rage-quit, or a “I’ve had it!” kind of thing. For me, the thing has just run its course. FB has little value to me at this point in my own life, and although I used to maintain the account to keep in touch with alumni, a lot of them aren’t using it anymore either.

There were a couple of precipitating events, perhaps, that did nudge me closer to the precipice. There was a tone-deaf Mark Zuckerberg being interviewed by Kara Swisher a few months ago. There was a phone call from an old friend a few weeks ago who let me know that she isn’t on Facebook, reminding me that such a thing was possible.

Knowing a little bit about how these things work, I’ve been bothered for years by the algorithmic manipulation of your News Feed. Facebook doesn’t display items in your feed in chronological order—it displays them in an algorithmically-generated “Top Items” order which (until very recently) you had no control over. If you’ve every wondered why you haven’t seen some friends’ posts on Facebook, it may well be that their comments were buried so far down in the algorithm that Facebook effectively never showed them to you, in favor of sponsored ads for socks from Sweden.

Last month I read this interview with Yuval Noah Harari, and it really resonated with me. Although the focus of the article wasn’t social networking, there was some discussion of technology and how we respond to it emotionally.

An excerpt:

I try to be very careful about how I use technology and really make sure that I’m using it for the purposes that I define instead of allowing it to kind of shape my purposes for me. That sometimes happens when you open the computer: you have a couple of minutes to spare, so you start just randomly browsing through YouTube, and two hours later, you’re still there watching all types of funny cat videos, car accidents, and whatever. You did not say to yourself, “Okay, I want to spend the next two hours watching these videos.” The technology kind of dictated to you that this is what you’re going to do by grabbing your attention in such a forceful way that it can kind of manipulate you.

How has removing those attention-grabbing technologies changed your quality of life?

I have much more time. I think it makes a much more peaceful… I mean, it’s not such a big secret. The way to grab people’s attention is by exciting their emotions, either through things like fear and hatred and anger, or through things like greed and craving. If somebody [is] very afraid of immigrants and hates immigration, the algorithm will show him one story after the other about terrible things that immigrants are doing. Then somebody else maybe really, really doesn’t like President Trump, so they spend hours watching all kinds of things that make them very, very angry. And it doesn’t matter if it’s true or not—they see this headline of “President Trump Said the World is Flat,” they feel this irresistible urge to click on it.

It grabs your attention because you already have this weakness. But if you kind of sit there and just read infuriating stories for an entire hour you are basically feeding your mind with things that make you more angry and hateful. And this is especially bad if many of these stories are just not true. Sometimes they are true, quite often they’re not. But the net result is that you now just spent an hour feeding your hate and your fury.

It’s the same way with the other side of the coin, with greed. Because if you really want something—the perfect body, the perfect car—and you watch all these videos, you want it more and more. And if you don’t have it, then you feel worse and worse that you don’t have this kind of body, or you don’t have this kind of car. So you just spent one hour feeding your cravings and your greed, and it’s really not good for you.

The better you know yourself, the more protected you are from all these algorithms trying to manipulate you. If we go back to the example of the YouTube videos. If you know “I have this weakness, I tend to hate this group of people,” or “I have a bit obsession to the way my hair looks,” then you can be a little more protected from these kinds of manipulations. Like with alcoholics or smokers, the first step is to just recognize, “Yes, I have this bad habit and I need to be more careful about it.”

So how do you get your news?

I rarely follow the kind of day-to-day news cycle. I tend to read long books about subjects that interest me. So instead of reading 100 short stories about the Chinese economy, I prefer to take one long book about the Chinese economy and read it from cover-to-cover. So I miss a lot of things, but I’m not a politician and I’m not a journalist, so I guess it’s okay I don’t follow every latest story.

So, ummm… yeah. I’m out.

It doesn’t feel as if I’ve really made a big decision or anything because I haven’t spent any significant time on FB in the last year anyway.

Also, to be clear, I haven’t deleted my account or anything. The few things I’ve uploaded in the past are all still there, and I’m sure my timeline is going to tick by just as it has in the past. I just won’t be paying any attention to it.

If you need me, you know where to find me. And it won’t be on FB. :)