Piotr Banaszkiewicz

Amy: a workshop management tool

On Wednesday 20 May, 2015

I got involved in Software Carpentry one year ago. We went through one Summer of Code, I became certified instructor, and then at MozFest 2014 in London we decided to write a workshop management tool.

Software Carpentry is growing rapidly and managing workshops has become a hussle.

Greg Wilson, Software Carpentry’s father, started the Amy project on October 30th 2014. I got involved early in December, and became since then one of the core con­trib­u­tors.

On April 27th, almost a month ago, I received a chance to work on Amy during my summer and get paid for it (which was basically my dream summer coming true).

The community bonding period

I consider myself, Greg Wilson and W. Trevor King the core of Amy community. We had not much chance to integrate in the last month, but we used it to progress on Amy.

Amy: status update

Most important features of this bonding period:

  1. Amy v0.2 was released
  2. A new Rackspace server was set up just for Amy
  3. We started using Travis-CI for continuous in­te­gra­tion

Currently we have an open window for v0.3 release, and some of already im­ple­ment­ed features contain:

  1. No more "None" in Amy’s dashboard title [#282]
  2. A footer with Amy’s version (both release and git hash) [#275]
  3. "+" sing in the top navbar — a shortcut to add event/site/person pages [#286]
  4. Slimmed down Makefile [#284]
  5. New look for the dashboard with un­pub­lished events more visible [#274]

And there’s more in the oven!

Plans for the summer

I want to get a rest, cut down on projects (only Amy and my Bachelor’s project), play some games.

This is going to be an exciting summer, and I’m looking forward to it!

Peer instruction: update 9 - the end of Summer

On Monday 11 Aug, 2014

This summer was great. I’m really glad I had the chance to work with Mozilla Science Lab on bringing a new teaching tool.

Here are a few of my thoughts about the good, the bad parts about GSoC 2014 and the future of my project.

What’s cool about this summer

This summer was special for a variety of reasons.

I was working on a bleeding edge technology with a language I didn’t really understand previously. It gave me op­por­tu­ni­ty to not only dig into software ar­chi­tec­tures I haven’t known before (like pub/sub) but also to learn how pro­fes­sion­als write JavaScript.

I met quite a few people interested in my project (despite very low number of stars or watchers on GitHub) and spent fruitful time with my mentors on dis­cus­sions about the project.

What’s not cool about this summer

A few things that come to my mind that could’ve been done better.

First, at the beginning of this project I pivoted a little. The actual codebase and ar­chi­tec­ture (pub/sub) is, I think, third or even fifth iteration.

I was promised a community hosting for my project at Mozilla but didn’t get one, even though I went through some lengthy procedures. Instead, my mentor had to allow me on his private server.

I’m also a little sad that my project doesn’t bring as much attention and excitement as it excites me. Hopefully I will be able to present it during MozFest and it will spark some interest.


JavaScript’s poor object-pro­gram­ming design causes pro­gram­mers to write things in many different ways. There’s actually no one good way to write JavaScript. I found some really well-written JavaScript libraries but I was unable to write pretty code myself. Python for browsers anyone?


Cof­fee­Script or Dart were crossed out at the beginning. In April, during PyCon in Montreal, actually. Reason: too fresh, too unstable and with little support, even though they may provide a better language experience.

Running multiple camera streams within browser is very resource-heavy.

I’m pretty happy that I end the summer with a working ap­pli­ca­tion that still can fit multiple features, ehance­ments and im­prove­ments. There’s even place for something that wasn’t done before, I think.

Peer in­struc­tion teaching tool features

I "end" this project with these specific features im­ple­ment­ed:

  • broad­cast­ing mode
  • dis­cus­sions in small groups mode
  • really quick switching between these modes
  • countdown with audio aid before disabling dis­cus­sions mode
  • variable small group sizes
  • better interface for tablets
  • basic text chat

It might seem like not that much, but I spend whole summer on this and I think I did pretty good :)

In near future I want to see these features im­ple­ment­ed:

  • better chat
  • better interface
  • better backend and frontend code structure
  • sharing files
  • con­nec­tions routing / mesh


I want to highlight and thank Greg Wilson and Mike Hoye - my mentors during this summer. Their efforts and continuous work and long meetings with me… I call this summer a success; it wouldn’t be without your help. Thank you! :)

Peer instruction: update 8

On Tuesday 05 Aug, 2014

Google Summer of Code is coming to an end.

There’s still so much work to do on Pitt I’m sure I’ll be working on it after the GSoC 2014 is done.

Before the soft pencils-down date I want to release one last version, v0.5.0 (this week) and then work on doc­u­men­ta­tion im­prove­ments (probably will release additional v0.5.1 then).

Features not coming into Pitt this Summer

Sadly, there’s only so much I can do… A few features won’t make it into Pitt this GSoC:

  1. Hard: better broad­cast­ing mesh (students act like relays / proxies), read more at https://github.com/pbanaszkiewicz/pitt/issues/22
  2. Etherpad in­te­gra­tion – Greg Wilson told me that Etherpad right now is not in best condition so this one is postponed (https://github.com/pbanaszkiewicz/pitt/issues/23)
  3. Peer2Peer file sharing – something exactly like ShareFest (https://github.com/pbanaszkiewicz/pitt/issues/21)

Features coming into Pitt

  1. Mobile-friendly interface (at least for tablets) and fixes for non-full-HD devices (https://github.com/pbanaszkiewicz/pitt/issues/18)
  2. Voice-only con­nec­tions im­prove­ments – as long as I’m able to test them (https://github.com/pbanaszkiewicz/pitt/issues/19)
  3. Chat (https://github.com/pbanaszkiewicz/pitt/issues/20)

I won’t write summary post until after the firm pencils-down date. But let me say that this Summer was truly awesome :)

Peer instruction: update 7

On Sunday 27 Jul, 2014

I’m feeling terrible - I forgot to blog post last week. Again. I’ll try to make up for it…

Software Carpentry sprint summary

The sprint lasted two days (22-23 July 2014) and it was a blast! Poland had wonderful rep­re­sen­ta­tion in Kraków, where I’m living.

Most of the group worked on Data Carpentry lessons:

  • writing new in Excel or Python+Pandas
  • checking existing in Bash

As far as I know, everything was merged in! That’s what I call a success.

I was the only person working on a different project, ie. on my Pitt.

Most of the time I was working alone, but once or twice we’ve got together with Mozilla Paris to test some things.

I want to kindly thank Rémi Emonet and Raniere Silva for their help! These guys not only con­tributed feedback and bug reports, but also took part in co­or­di­nat­ed calls with me. Thank you!

Having tested Pitt with Paris, I’m now more certain that the signalling part of my ap­pli­ca­tion is now very close to being bug-free. Or maybe it is already. I’m really liking how easy it is to add new features and still be certain, that the ap­pli­ca­tion won’t break ac­ci­den­tal­ly.

Pitt progress during sprint

Here’s the list of everything that was achieved during the sprint:

  • five hundred lines of doc­u­men­ta­tion have been written
  • fixed too high volume for the warning beep
  • forced low video resolution
  • dropped _pubsub part from di­rec­to­ries or file names
  • turned on TURN server for testing – and suc­cess­ful­ly tested with Mozilla Paris

Exciting features coming

For the next big update, I’m thinking about setting some huge goals.

  1. Mobile-friendly interface (at least for tablets) and fixes for non-full-HD devices (https://github.com/pbanaszkiewicz/pitt/issues/18)
  2. Testing (and fixing in case of errors) voice-only con­nec­tions – that’s something I didn’t get to test during the sprint (https://github.com/pbanaszkiewicz/pitt/issues/19)
  3. Etherpad in­te­gra­tion – as far as I am concerned, Etherpad doesn’t provide any way to share chat with other sites. That’s a bummer. While I don’t need Etherpad’s content in­te­gra­tion, shared chat would be extra nice. This needs futher in­vesita­gion (https://github.com/pbanaszkiewicz/pitt/issues/23)
  4. Chat: if not possible to integrate with Etherpad, write our own (https://github.com/pbanaszkiewicz/pitt/issues/20)
  5. Peer2Peer file sharing – something exactly like ShareFest (https://github.com/pbanaszkiewicz/pitt/issues/21)
  6. Hard: better broad­cast­ing mesh (students act like relays / proxies), read more at https://github.com/pbanaszkiewicz/pitt/issues/22

I think the end of Google Summer of Code is nearing, but I like this project a lot, and I definitely will continue working on it.

Peer instruction: update 6

On Monday 14 Jul, 2014

I missed one post last week and this one is already delayed by two days (compared to my typical writings that appeared on Saturdays).

For­tu­nate­ly, I have good excuses.

First, I wanted to get something done. Second, I was buried under real-life super exhausting stuff like post-exams leisure. ;)


Okay, good news: Pitt has new interface:

Pitt's fresh interface

Pitt’s fresh interface.

And I’m in the middle of rewriting JavaScript code (again…). Now the code uses good JavaScript patterns (and I don’t consider myself a JS newbie anymore).

I separated ap­pli­ca­tion logic code from ap­pli­ca­tion appearance code. Overall, the code should be easier to understand for newcomers and a lot easier to maintain.

The list of issues is updated and available here.

I’m also starting to think about Software Carpentry Sprint that takes place on July 22-23. I’ll post some update soon…

Peer instruction: update 5

On Sunday 29 Jun, 2014

This is gonna be a short one. Because of exams, I have to study a lot. And because there was not much progress on Pitt during this week.

Current release

Current version is v0.3.1, and it’s tagged in git repository. I’m in­cor­po­rat­ing git-flow model.

What I wanted to get in was two major features:

  1. countdown before switch from group split to broad­cast­ing mode,
  2. small groups of students of variable-defined size.

I can tell that I was successful and these features are now part of v0.3.1 release.


While testing with Greg and Mike at their office and me here in Kraków, I couldn’t connect to them and vice versa. Con­nec­tions between Mike and Greg worked as intended.

This was strange, because I didn’t change the code so much that it’d break. More so: last week while testing with Greg alone it worked!

So I conducted few more tests:

  1. Pitt: Kraków ↔ Kraków
  2. Pitt: Kraków ↔ Toronto Mozilla Office
  3. Pitt older version: Kraków ↔ Toronto Mozilla Office
  4. Other WebRTC ap­pli­ca­tion: Kraków ↔ Toronto Mozilla Office

In the previous week, I’m guessing Greg worked from his home. We wanted to try Pitt in this con­fig­u­ra­tion (Kraków ↔ Greg’s home), but due to holidays in Canada we were not able to.

From what I can tell, the issue lies in the client IP addresses resolution. Here’s a lengthy article about how hard it is to do WebRTC properly: http://www.html5rocks.com/en/tutorials/webrtc/basics/#toc-signaling

Anyway, I hopefully will be able to easily overcome this issue.

Peer instruction: update 4

On Sunday 22 Jun, 2014

This week me and Greg Wilson, my mentor, we decided to test run Pitt. It was a success and, while revealing some annoying bugs, it made Greg really excited.

Current release

Current version is v0.3, altough I might have tagged it wrong in git. For­tu­nate­ly it seems that tag was not published to the GitHub repository.

Current features

This is a quick recap on what Pitt is capable of right now.

  1. Users coming in and quitting: thanks to signalling, as soon as someone appears online, they’re being logged in and everyone can see them.
  2. Quick switch mode: the instructor can easily and very quickly switch modes from broad­cast­ing (to all students) to work in small groups (students are split into pairs or groups of 3).

The code is decent. I presume there are some bugs with saved state of the ap­pli­ca­tion. For example, what to do if the instructor is broad­cast­ing and someone joins in? What if another instructor joins in? What if there are two in­struc­tors and one starts broad­cast­ing, should other in­struc­tors see their stream too?

These kind of questions will be addressed for the v0.4 release. Right now I’m working to get v0.3.1 release by Friday, 27.06.2014.

Exposed bugs

During my test run with Greg we quickly found out one super annoying bug.

There’s a very in­ter­est­ing human behavior: people slow down their talk when they hear themselves with small delay. It’s really hard to overcome this basic reflex.

Back to the bug: we found out that local stream video (ie. the one where you can see yourself, because browser plays the video from your webcam) is not muted by default. Add the playback delay to the mix and as a result Greg was struggling to speak.

This bug was really easy to fix (in HTML5: <video src="..." muted="muted">) and the fix is included in the recent code.

There was also issue with the state of the ap­pli­ca­tion - it somehow broke for Greg (when he was a student). I have yet to discover the actual bug.

Missing features

Greg wants me to add these two new features to the upcoming release:

  1. Countdown. The instructor presses "back to broadcast mode" button and the switch doesn’t happen im­me­di­ate­ly. First there’s 30 seconds countdown so that no students are in­ter­rupt­ed in the middle of the sentence.
  2. Variable group size. The instructor can specify if the students are split into pairs or groups of 3, or groups of 6. This task is more chal­leng­ing than it seems: I have to ensure that no students are left alone (what is often the case when there’s odd number of students).

Next release

I’m planning to release next version, v0.3.1, on Friday 27.06.2014 or earlier.

I have 3 exams before Friday and 2 after it. Ouch…

Peer instruction: update 3

On Saturday 14 Jun, 2014

The decision has been made, and I switched to a different codebase.

I had one exam this week (Aparatura Au­tomatyza­cji, eng. Automation Systems) and five more in next 2-3 weeks, so it is quite chal­leng­ing for me to find time for peer in­struc­tion right now.

I did, however, spend most of this weekend trying to make Pitt broad­cast­ing mode for in­struc­tors.

It works! Proof below:

Me as instructor and two students.

Having dual monitor setup helps getting this kind of screen­shots.

As you can see, the layout and design in general is very rough. And so is the code.

This code is mostly based upon multiple events being propagated through sockets.

But I really don’t like the design of these events, and, frankly speaking, I much more prefer a "pub/sub" (pub­li­ca­tion - sub­scrip­tion) ar­chi­tec­ture.

At this moment, when the instructor triggers an event, the server has to re­prop­a­gate it to every student.

In "pub/sub" arch, however, there’s no re­prop­a­ga­tion in between.

Some people use redis for pub/sub, but I found some really cool protocol: WAMP (don’t confuse it with Windows, Apache, MySQL, PHP stack!).

WAMP authors clearly explain why it is good so please go there and read. Let me just point out a few cool features of WAMP:

  • WAMP is not a NodeJS module, it’s a protocol
  • it can be (and indeed is!) im­ple­ment­ed in various languages
  • therefore it’s a solid foundation for a quickly changing service.

What I dislike about WAMP is that at the moment there’s only one leading im­ple­men­ta­tion: Autobahn. And I’m not yet sure if I want to drop NodeJS backend in the future, but if so, then there’s already fast Au­to­bah­n|Python.

Peer instruction: update 2

On Saturday 07 Jun, 2014

In this week’s video­con­fer­ence between my mentors, Greg Wilson and Mike Hoye, Software Carpentry‘s instructor David Rio, and me, we decided to tem­porar­i­ly drop my current codebase and what I’ve done with Licode and Erizo.

Instead, my current efforts will be focused on developing and enhancing David’s excellent work that uses PeerJS.

This has some in­ter­est­ing con­se­quences.

Firstly, we can’t have broad­cast­ing using MCU in teacher’s mode. Instead, in this mode, we’ll have to open P2P con­nec­tions, what’s probably going to be quite chal­leng­ing for teacher’s internet connection.


In teacher’s mode, the teacher broadcasts his stream to all of their students.

In student’s mode, students are split into smaller groups (6 people per group in real life, at most 4 people via Internet - more is less efficient) and talk with each other.

But for now we want to ship first version as soon as possible, so we’ll care about that later.

Secondly, we’ll have a lot clearer and "closer to the metal" code. Opening sockets and handling all data transfers will be much easier, and I like that fact a lot!

On my personal side of news, I’m currently preparing for exams (first one: next Thursday), which leaves me very little time for GSOC #sadface

Peer instruction: update 1

On Friday 30 May, 2014

I always avoided JavaScript. With my long exposure to Python, JS never appealed to me. And yet my whole Google Summer of Code project consists mainly of JS.

Let me quickly rein­tro­duce basic ideas and plans for Peer In­struc­tion project.

Peer in­struc­tion concepts

The most important feature of Peer In­struc­tion is the ability to, from the technical point of view, quickly switch between teacher and student modes.

Teacher’s mode

Teacher mode is basicly a broadcast sent to every student in a classroom. This might be quite chal­leng­ing: you can have many direct con­nec­tions and suffer from capped bandwidth and high CPU usage.

Teacher broadcasts their stream to multiple students

Teacher broadcasts their stream to multiple students.

The solution is to introduce additional server that helps to "spread" the stream to multiple students. It es­sen­tial­ly looks like this:

Teacher broadcasts their stream to multiple students through Multipoint Control Unit

Teacher broadcasts their stream to multiple students through Multipoint Control Unit.

What’s really good about this design? There’s an excellent open-source MCU available: Licode. I must admit Licode is a little too com­pli­cat­ed to set up, but authors’ support and continuous de­vel­op­ment make it a great option if someone wants, for example, to host their own al­ter­na­tive to Google Hangouts or Skype.

Me testing teacher's mode

Me testing teacher’s mode. (I was suprised it worked!)

As you can see above, the interface is pretty simple, but it works (at least for 1 student). I have yet to test it for more students, but I haven’t received a server account at Mozilla to do so.

Student’s mode

This is the second mode of broad­cast­ing. A very crucial from the point of science of peer in­struc­tion.

In this mode students are split into smaller groups so that they can talk with each other.

Right now I’m thinking how to implement this mode. One of the ideas is to create one Erizo Room for every group of students.

The way events are propagated within Erizo makes it really easy to subscribe to other students’ streams within one particular room. Using multiple rooms also helps manage all these smaller groups.

I should also mention that Erizo can create "full MCU" rooms - ie. rooms where streams are going through the server - and Peer-to-Peer rooms, where the server only handles sessions, signalling and events, but the streams are actually trans­ferred between the room par­tic­i­pants.

I think for small groups of 2-4 students it’s a good idea to use P2P rooms and save resources on the server.

Un­for­tu­nate­ly, this solution has some drawbacks, too. I found out that Erizo can only handle so much rooms at once (it’s specified in con­fig­u­ra­tion, but I don’t know the retionale behind it).

Current issues

My main focus for next week(s) is working PoC of students mode. Right now I’m working on a protocol used by Licode events.

It’s possible to send data through Erizo streams. I want to use this "channel" to com­mu­ni­cate with students’ browsers.

For now I’ll only send data like "join room ABC for small group discussion" and "leave room ABC". In future Peer In­struc­tion might be more advanced - quite important feature is chat, and I will likely leverage the existing protocol for that.

Anyway, that’s the update status on my project. I highly welcome any con­tri­bu­tion or comments.

Here’s project GIT repository: https://github.com/pbanaszkiewicz/peer-in­struc­tion