A New Kind of Circle: Math Circle at Graterford Prison

This painting was done by a Graterford Math Circle participant, inspired by the question of how to test someone's claim that they could tell the difference between Pepsi and Coke by smell.

This painting was done by a Graterford Math Circle participant, inspired by the question of how to test someone’s claim that they could tell the difference between Pepsi and Coke by smell.

Like many other Math Circles, the Graterford Math Circle just had its first meeting of the fall. The leaders, Katie Haymaker and I, brought a question to the group: How can we understand the lottery, and when can you play to win? Following a plan from Michelle Manes (in turn inspired by Jordan Ellenberg’s book), we ran a mock lottery to illustrate how buying a certain slate of tickets can reduce risk and make the lottery a good investment (under very rare circumstances), but found that the lottery in general is a very bad investment. We talked about the MIT group that made at least $8 million in the Massachussetts lottery. We had several good laughs, students anticipated every “mathematical point” that we’d hoped to make, and I left feeling totally proud of the students, and jazzed about math and math circles. This was all very normal and fun and cool! There were two unusual things about our circle. First, the students are adults, though not teachers or necessarily parents. Second, the circle takes place in the education wing of Graterford Prison, a maximum-security men’s prison about 45 minutes from Philadelphia, where the students are incarcerated.

Katie and I started the Graterford Math Circle in January of this year. We both were interested in starting a new Circle of some kind, and in working with adults, but there is already a wonderful Math Teachers Circle in Philadelphia (also, see my earlier blog post). We were both interested in teaching at Graterford through Villanova’s degree program, but hadn’t had the opportunity yet. So we hit upon the idea of a Math Circle at Graterford. We hoped the Math Circle could teach problem solving techniques, help Graterford students to see mathematics in a new way, and hopefully make students more comfortable in future mathematics classrooms. Since many of the students also have children, I hoped that positive experiences with Math Circle would also influence how the students talk to their families about math, and at least slightly reduce the chance that their children would be anxious about math.

Of course, Math Circles are generally for K-12 students, teachers of K-12 students, or occasionally parents of K-12 students, so our Circle for adult students was really a new model. We were not sure if it would work, honestly. What if the questions were not interesting to these students? What if there were major institutional rules that kept us from being able to create a fun atmosphere? We envisioned armed guards watching sternly and students forced to remain in their seats at all times.

We did a trial run, giving a talk at Graterford to share some puzzles and see if there was enough interest to have a monthly meeting. As I described in my blog post, it was really fun, and convinced us that the Math Circle could work. Our first meeting was in January—we did the Pancake Problem that I described in another blog post. It went over really well! There was a guard in the hallway, but the classroom atmosphere was relaxed and fun. We moved desks, worked in groups, and interacted just like people in any other math circle. We met once a month for the rest of the spring, with groups varying from 4-15 students. These guys are really enthusiastic. Getting them interested in the problems has not been at all difficult—the only difficult parts have been getting into the institution, not being able to use any technology, and getting some of the more outspoken people to delay shouting out answers.

In May, Katie and I went to Graterford’s graduation ceremony. Seven students were graduating from the Villanova program, and many more were receiving GEDs or certificates for vocational training programs. One of our most consistent Math Circle participants was graduating, and was very happy to see us at the event. He sent us (and our department chair) the most beautifully typed (yes, on a typewriter) thank-you letters over the summer. At the latest Math Circle, he brought us three of his summer projects: careful solutions to some of the problems posed in the handouts for three of the spring’s Math Circle topics. For the pancake problem, he had written computer programs to sort stacks of pancakes and to produce disordered stacks. For the puzzles we had brought in our initial talk, he had typed up full solutions to each. His reasoning was very clear and the explanations were excellent. Reading these solutions, I was so impressed with his work, and I felt incredibly happy that we had taken the opportunity to share some of our favorite parts of math with these guys. It feels like recommending your favorite book to someone who really puts in the time and thinks about it, and then tells you that the book now means something to them, too.

This is a flowchart created by a Math Circle member to describe an algorithm to sort a stack of pancakes.

This is a flowchart created by a Math Circle member to describe an algorithm to sort a stack of pancakes.

Other members of the circle have also brought extensive and creative work on past problems to later math circles, and they have naturally come upon some really interesting ideas in mathematics. There was sort of an organically developed generating function approach to one problem, and steps towards abstract algebra in another. We also received letters from some of the other guys, including the drawing I included above, inspired by a math circle question on how you could test whether a person could tell the difference between Coke and Pepsi by smell. (adapted from a Math Teachers Circle problem by Amy N. Myers of Bryn Mawr College).

Katie and I are planning (if our Dean approves) to co-teach a math class at Graterford this spring. We were originally planning to suspend the Math Circle for the spring, since we would be busy with teaching, but after last week, I’m not sure I can give it up. This Math Circle only happens once a month, but it really reminds me why I wanted to be a math professor in the first place.

Posted in math circles | Tagged , | 1 Comment

Tool for the (collaborative) job

“Screws,” another classic from xkcd.com.  The mouse-over text reads: “if you encounter a hex bolt, but you only brought screwdrivers, you can try sandwiching the head of the bolt between two parallel screwdriver shafts, squeezing the screwdrivers together with a hand at either end, then twisting. It doesn’t work and it’s a great way to hurt yourself, but you can try it!” I have similar thoughts about the potential benefits of using the wrong tools for collaborating. 


Managing collaborative projects can be a job unto itself. I have five active collaborative projects right now, and each one follows has a different protocol and uses different collaborative tools a slightly different system, determined by the needs of the project and the personalities of the collaborators. Of course, everybody has their own ideas of the best way to use each of these, so there’s room for conflict. Sara’s post about Slack a few weeks ago was great, and I have talked with a few people who are really happy with that. I have used and heard about a lot of other tools, though, each of which seems to be good for many things but have some potential points for discussion. Also, some of these collaborative tools have spilled over into my teaching life, and have become more and more important as my teaching has evolved. In this week’s blog I’ll run through some things I’ve used and some I’ve just heard about, starting from basics.

Tool(s) 0: Skype and email. I really enjoy Skyping with my collaborators so we can have informal conversations and talk in real time about the direction of the project. Email is also really useful (can’t believe I’m writing something so obvious) for needs including sending thoughts at odd hours and sharing more complete ideas which involve notation or longer arguments.

Room for discussion: I think that it sometimes takes much more time to resolve simple questions over email, and it is often hard to communicate “squishy” ideas without some back and forth. So Skype is an important part of my collaborative life. That said, I currently have a collaborator who hates Skyping. She often doesn’t understand what I am trying to say when we Skype. Instead, she wants a list of carefully formed comments and questions, and she wants to think before responding. So email has become even more important in this collaboration than it usually is. This is also a totally valid way to work, but it has been a struggle for me to adjust.  Really both of these technologies are so general that people’s ways of using them can vary wildly, opening up plenty of room for collaborator disagreement.

Tool 1: Dropbox.

Dropbox is sort of the classic collaborative file sharing tool. I am using it in 3 different projects, each in a slightly different way. In all cases, we have created a Dropbox folder and shared it with all collaborators. We generally store references, images, slides, and all the files for the paper we are writing. With internet access, any collaborator can log onto Dropbox from any computer and access the files, edit them, and upload the changed documents to the shared folder. The feature that I like most about Dropbox is that since I have Dropbox installed on my two laptops, all the Dropbox files are stored on these computers and I can access the files when I don’t have internet access. They will automatically sync with the shared folder when my computer next connects to the internet. This can cause a problem occasionally if another collaborator has edited the file in the meantime, but nothing is lost—the later update just gets saved as a “conflicted copy”.

Room for discussion: I love Dropbox, and in fact I think it does its job perfectly. The discussion points here could actually apply to most of the file sharing systems that follow. These stem from my experiences with sharing documents, which have revealed how many conflicting assumptions and attachments my collaborators and I have. Basically, you have to decide who is allowed to change what, and how they will do that.

In some cases, one person has written a draft and then other people have made editing suggestions. In other cases, my collaborators and I have all assigned ourselves sections of a document, written the sections in separate LaTeX files, and then split up editing duties. Both of these are reasonable, as long as everyone is on the same page about what kind of changes people can make. I like sharing the initial writing duties, because then everyone feels like they own the document, but it always stings when someone wants to cut ¾ of and change the wording of the rest of your carefully crafted section. So, no matter how it works, plenty of consideration and care are required in the editing process. The sharing technology can both help and hinder this. Some people like to create a new version of a document with edits, so that the old one still exists just in case. This can lead to a profusion of different versions in the Dropbox folder, somewhat maddening to those who love super organized and clean files and folders. Also, edits can get lost, the same section can be edited by different people, resulting in conflicting changes, and so on. Someone has to go through and synthesize all these changes. All this is no problem if the group is basically on the same page about things and is fairly organized, but it can get messy, especially since LaTeX isn’t super helpful here.

Two hacks for better organization/easier LaTeX via Dropbox collaborative editing that I learned from some great collaborators:

  • Create one main skeleton .tex file, which has all your packages, commands, authors, title, and such in the preamble, and has the actual \begin{document}, \maketitle, and \end{document}. All the actual content should be in a separate .tex file for each section. These are merged by typing \include{section name here} in the body of the main file. For example, if you had a separate .tex file called introduction, you would write \include{introduction}. Then your file introduction.tex would start with the line \section{Introduction}\label{sec:intro}. To merge, just make sure the section .tex files are saved in the same folder as the main, and then compile the main document.
  • Create a command for each collaborator to comment in a different color in the document. You can type \usepackage[usenames,dvipsnames]{color} in your main file preamble, and then create a command for each person (also in the preamble) by typing something like \newcommand{\bet}[1]{{\color{magenta} \sf Beth: [#1]}} Then, when want to comment in any section, I would just type \bet{my comment here}. When I compile, my name and comment will show up in magenta.

Tool 2: SageMathCloud.

One of my collaborations involves thousands of lines of Sage code (SageMath is an awesome open-source computer algebra package). When my collaborator and I were in the same place, we could just work on Sage together in his office. When I changed institutions, we tried emailing Sage files back and forth, but it was very clumsy. This was right about the time when Sage launched SageMathCloud (SMC), its cloud-computing portal. SMC has been perfect for us, because it allows real time collaborative editing of the same document, and all computations run in the cloud, so you never need to download and install or update Sage on your machine. I can even check computations and edit from my phone. SMC also has a shared LaTeX editor, so we used this to share the TeX file that eventually became our first paper. It also supports sharing iPython notebooks, and many other file types. SMC has recently added course organization features as well, and I am using SageMathCloud with my class this semester (more on that in a couple weeks). Another nice SMC feature is the ability to “time travel,” which allows you to see old versions of your documents. I have periodically lost work due to some mistake on my part, or a cloud/internet glitch of some kind, and I have often been able to recover it using this feature.

Room for discussion: I love SMC! Let that be said before I say anything else. I also think it’s really worth watching this video about the history of Sage and SMC. I used the free version of SMC (a lot) for a couple years, and I was very happy with it. However, it was occasionally a bit glitchy. Computations ran at variable speeds, and sometimes seemed to just stall completely for no reason I could understand. I decided to invest in a membership, which allows me to run my computations on members-only servers and get other handy upgrades. I’m totally fine with paying for this, and I strongly support the model. However, the free version now seems even glitchier when I go back and try to use it with my students. I think it’s just that I got used to the improvements, and the free version still works fine. However, I would suggest that if you try the free version and like the basic idea, you might be happy with actually buying a membership. You can always go back to free, and your work will never disappear.

Tool 3: Network-Attached Storage.

I am currently working on a project with a great undergraduate student and a Psychology professor, who has a lab with many projects, many students, and a lot of data—something like 4 terrabytes in all. This is way too much stuff to store on dropbox, so his lab uses network-attached storage for all their work. This is my first time working on a project that involves so much stored information, so this is new to me. I am still figuring out the system but it seems to work well so far.

Room for discussion: As with SMC, I need to be connected to the internet to access the files, and I either have to be on campus or use a vpn, which is a small pain. Also, this isn’t my problem, but clearly my collaborator had to do some work to set up this system—buying a server, maintaining it, etc. In addition, my collaborator had to trust me with a username and password for the NAS server, and it makes me nervous to have access to all the files for his entire lab. What if I mess something up?! Of course that is unlikely, but it feels like a real responsibility. It would be great if I could only have access to a small part of the system, but that would mean we couldn’t easily draw on the data and figures from the whole in our document, so I guess I just need to be careful. I am definitely being careful.

Tool 4: Overleaf.

Overleaf is designed for creating and sharing documents in LaTeX. I haven’t used Overleaf, but it’s been recommended to me recently by two of my favorite math people. It looks great. It has a friendly LaTeX user interface, which is either a good or bad thing depending on how attached you are to your editor. Multiple people can work on the same document and see changes in real time, as in SMC. I am told that it solves one of my main Dropbox problems, which is how to easily track changes and incorporate comments in a shared document. The comments feature is really nice, similar to my comment hack above but much better. However, I don’t know that it has the mark-up capabilities that I would like. Really I just need to explore it more.

Room for discussion: I don’t know enough about Overleaf to say much about potential issues, aside from my speculation above. However, the free version of Overleaf shares one problem with some of these other tools—you can only edit or access documents when you are connected to the internet. You can pay for the pro version to sync with Dropbox.

Tool 5: ShareLaTeX

ShareLaTeX has been around for a while now, and it definitely does what you would think—lets you share LaTeX files, and work on TeX files on machines that do not have LaTeX installed (as long as you have internet access). Like Overleaf and SMC, it allows multiple users to work on the same document and see changes in real time. I used ShareLaTeX on one collaboration and it worked well, and I have taught several classes using this as an alternative to having students install LaTeX on their machines. It has a good previewer for viewing changes to the .pdf as you write the .tex code, so the students aren’t completely freaked out by their first LaTeX experience. I haven’t used it to collaborate recently, but it now seems to have a nice method for tracking changes. I am intrigued!

Room for discussion: ShareLaTeX seems to have many of the same features that Overleaf has. Similarly, you must subscribe to the premium version to automatically sync with Dropbox and be able to access documents and work offline. The free version also allows you to work with only one collaborator on each project. I think that is fair, but it is nice to be able to work with a larger group.

Thoughts about these tools? What do you use to collaborate or teach? Love the Corb Lund song that inspired this title? Let us know in the comments.

PS I have to add a personal update. I had a very Philadelphia weekend, including seeing Bruce Springsteen at Citizens Bank Park, and then leaving Philadelphia to go to the Jersey shore. Lucky for me, because apparently it was raining catfish in Philly.  Okay, this happened on Labor day, but it still seems worth sharing…

Catfish falls from sky, hits woman on street
Falling catfish weren’t generally considered to be one of the hazards of life in Philadelphia until now.

Posted in collaborations, research collaborations, technology, technology for teaching | 7 Comments

The Ximera Project: Turning LaTeX into Interactive Websites

I’m backtracking a little bit to describe a really cool project I got to work on over this summer. Jim Fowler and Bart Snapp at Ohio State have been developing a way to easily translate LaTeX documents into interactive websites, called Ximera. Since all the students at my school get tablets, which we use pretty heavily in class, I thought this might be an easy way to start designing some of my own online materials. When I saw that they were offering funding for a summer workshop, I signed right up.

Screen Shot 2016-08-31 at 8.12.11 PM

Ximera is the backbone of OSU’s Calculus courses, which they also run as an online-only course on Coursera. Ximera is how they deploy content to students, and how the students do their homework. It produces handouts, and even all the content as a (non-interactive, obviously) textbook if anyone should want one. It collects a ton of data on how students interact with the work. And it’s all free and open source.

There’s a lot that I liked immediately about this project. First is the price tag: I’ve used plenty of proprietary online homework systems out of necessity, but I’ve also known plenty of students for whom the price tag for an access code is a genuine financial hardship. In the old days, a low-income student could always get an older edition of a text and just copy down the homework questions from a classmate with the current book. There’s no equivalent anymore. And when their access expires, so does their book. This could solve both problems.

I also like how easy it is to write my own questions and accompanying exposition. I’ve written online quizzes in lots of different learning management systems, and a little in WeBWorK, and it always feels far more painful than I think it should be. With Ximera, it’s all just a LaTeX document using new premade environments, like \begin{problem} or \begin{multipleChoice}. It’s easy to set the tolerance on numerical answers and give hints. And it natively uses Desmos to produce interactive inline graphs with the command \graph{y=x^2}.

The project does have a few more kinks to work out before it will be doing everything I’d like. It doesn’t do free response questions that well yet, or questions that have non-numeric or -algebraic answers. I’m still not entirely clear how the gradebook or data collection works, but that’s because I haven’t played around with that end yet. And the biggest hurdle for many potential users is the workflow: documents need to be typeset in LaTeX, then added and committed to GitHub, then published. It’s not terrible once you get the hang of it, but I know terminal commands can be a big barrier to entry for some.

I expected I’d be mostly doing curriculum development during my time at the workshop, though I’d indicated in my application that I also had some coding experience. I ended up spending most of my time on developing the backend, making LaTeX, javascript, HTML, CSS, and various sites’ APIs all talk to one another. Which I was woefully unqualified to do, but that’s never stopped me before. I implemented a new command to make content appear in its own scrollable frame within a site, and also added to the Desmos integration. It was great to get to flex some muscles I haven’t used in a long time, even though the work was slow going.

One of my goals for the fall semester is to work on updating the documentation repository for the project. We wrote some new commands and came up with a bunch of tips and tricks this summer, and I don’t want them to all get lost to history. I’d also like to work on the free response question environment, and add a question environment that can parse text answers correctly, but those are beyond what I’m capable of doing solo. Luckily there seem to be enough of us from the summer still interested in working further on the project that I think progress will be made.

I feel like Ximera is really close to being something that could both make my teaching better and my life easier. How often do you get to do both of those at once?





Posted in Uncategorized | Tagged , , | 5 Comments