Category Archives: Teaching Open Source

CS-140 Lab 1 Using Our New GitLab Server

Chad Day recently completed the installation of our new GitLab server (read about it here and here.) This project was precipitated by some issues I had been having in trying to teach the use of git earlier in our curriculum. I had been having the CS-401 Software Development Process students use git and github in their FOSS projects, but it was difficult for them seeing git for the first time and expecting them to use it intensively in a project in the same semester. They had asked a number of times, “Why don’t you teach this in an earlier course?”

So, I decided to try using it in the first programming course – CS-140 Introduction to Programming. While they don’t do any large projects in CS-140, they do work on their weekly labs as Pair Programming. Using git for the collaboration aspect (so they don’t have to keep emailing versions back-and-forth to each other) and as a way to submit their completed lab assignments to me (so I only have to receive one copy of the assignment per pair) seemed to make a lot of sense. In addition, I had attended a workshop at CCSCNE 2013 entitled “Git on the Cloud” which provided a methodology to do just that, which had encouraged me further.

The “Git on the Cloud” workshop suggested using Bitbucket, since it allows an unlimited number of private repositories.1 I’m very willing (in fact, I often require) students to make their code for senior-level projects public with an open source license. But private is important for coursework at the freshman level.

On the other hand, the “Git on the Cloud” methodology involved using a single repository per student, and a different branch for each assignment(!)  In other words, whenever you change branches/assignments, all of your other code goes away, and is replaced with the code for the current assignment.

After discussing this with Chad and Dillon Murphy, we decided that this was too confusing, and gives students an incorrect idea of how git should be used. Also, it would only work in pairs if the students worked in the same pair throughout the semester, and I like to have my students switch partners for each lab. So, I wrote my lab instructions using Bitbucket, but one repository per assignment, per pair.

I tried it out during my summer 2013 section of CS-140. It was a nice testbed — with only 6 students it was not too difficult to work out the bugs in the procedures. In another post I’ll explain how I had the students use the repository, and how I processed the repositories for grading (including the scripts that I wrote with some help from Stoney Jackson on a train ride from Providence to Philadelphia.)

The problem came when I decided to try it with my CS-135 Programming for Non-CS Majors class in Fall 2014. Soon after we started the first lab — the git lab — the student who had also been in the summer class could not add her lab partner as a collaborator to her Bitbucket repository. After a bit of investigation, we determined that while Bitbucket allows unlimited private repositories, you can have at most 5 collaborators — per account, not per repository — without paying. That had not been a constraint with a class of 6, but it certainly was with a class of 24, and it would just get worse as the students progressed to other courses.

At this point, I gave up on git for the semester and started looking for alternatives. I had used Gitolite in the past, which had worked well but had no web interface. I wanted something more like Github, and came across GitLab. I added installing GitLab to Chad and Dillon’s project of building a number of new servers for the department (see here and here.)

Once Chad had finished the GitLab install and worked out the kinks, we decided to test it by running through the CS-140 Lab 1 using the new server. I quickly updated the lab assignment to refer to a repository on our GitLab server, set up the repository on the new server, and had Dillon and Chad work their way through the lab to look for problems. They found a few typos, and a number of places where I had not replaced all the references to Bitbucket with GitLab, but otherwise it worked.

We had only one puzzling issue — Dillon was able to push changes to a repository he should not have had sufficient privileges to modify. It turns out that (not surprisingly) if you are a GitLab adminstrator, you have the ability to push to any repository on the server.

I’m looking forward to testing the server on a larger scale with 48 students in CS-140 starting in January.

  1. I’m aware that students can get multiple private repositories from GitHub, but that requires contacting GitHub and asking. The Bitbucket option just seemed easier.

From the blog On becoming an Eccentric Professor... » CS@Worcester by Karl R. Wurst and used with permission of the author. All other rights reserved by the author.

My Year of Open Source – Post Mortem

Some of you will remember the post My Year of Open Source from 1 January 2011 – almost 3 years ago – where I made a New Year’s resolution to participate more in FOSS. Here are the goals I listed for myself for that year:

I have four main goals (at this point):

  1. Learn the tools and processes myself by participating in a FOSS project.
  2. Figure out what FOSS tools and processes I can begin to introduce my students to in earlier courses.
  3. Figure out what FOSS experience(s) I can provide my non-CS students.
  4. Find a project (or projects) to place my Senior CS students into in Spring 2012.

Well, it was as successful as most New Year’s resolutions – meaning, not very. Or maybe, not completely. I was (partially) successful at some of those goals, although almost none were completed within the year that I so rashly promised.

Figure out what FOSS tools and processes I can begin to introduce my students to in earlier courses.

This one was somewhat successful, although not until this past June (2013) when I managed to have my summer Introduction to Programming class (all six students!) use git and Bitbucket to collaborate with their lab partners and to submit their work to me for grading. Fresh from that (small-scale) success, I tried to have my Programming for Non-CS Majors class do the same, and ran into some scaling issues. We’re working on the solution for that right now – more in a future post.

My Spring 2013 capstone project course did use git and GitHub for our project developing an app for a Worcester Art Museum exhibit. But my understanding of git was not a good as it could have been and the student use of git was spotty. We also planned to use Pivotal Tracker, but didn’t get very far. We did successfully use IRC, however.

Find a project (or projects) to place my Senior CS students into in Spring 2012.

My Spring 2012 capstone project course worked with Eucalyptus, and had some pretty strong interaction with some of the members of the community, but I think that both the students and I felt we weren’t as successful as we could have been due to some technical issues early on in the course. For Spring 2013, I abandoned working in an existing FOSS project in favor of new development when the Worcester Art Museum opportunity presented itself. We did, however, make our code freely available (https://github.com/CS-Worcester/JILOA)

Figure out what FOSS experience(s) I can provide my non-CS students.

This goal got very little attention, other than my abortive attempt at using git in the Programming for Non-CS Majors course.

Learn the tools and processes myself by participating in a FOSS project.

And I still have not made any real progress in my own participation in a FOSS project.

However, that’s all going to change. Stay tuned for My Year of Open Source v2…

 

From the blog On becoming an Eccentric Professor... » CS@Worcester by Karl R. Wurst and used with permission of the author. All other rights reserved by the author.

IRC: 1, Nemo: 0

Our CS 401 Software Development class was canceled on Monday, 11 February 2013 due to ongoing snow removal and cleanup on campus from the Nemo blizzard. (Worcester received 28.5 inches of snow in just about 24 hours.) This is a problem for a class that meets only on Mondays, especially with the next Monday being a holiday.

As soon as the campus closing was announced on Sunday afternoon, I emailed the students to announce that we would replace class the next day with an IRC (Internet Relay Chat) meeting. (Actually, that’s a lie. The first thing I did was panic, then I screamed, then I ranted to my family about the injustice of cancelling my Monday-only class. Then I thought about holding class on IRC…) Here is the message I sent the students on our class listserv:

Campus is closed tomorrow, so we will not have class. We will not have class next week either due to the President’s Day holiday.

This is going to seriously mess up our schedule. I’ll think about how we can carry on in the two weeks.

Let’s try to hold an IRC chat tomorrow during class time (2:00pm-4:30pm). I’ll send out instructions on installing (optional) and using an IRC client later tonight. I have instructions already written up, I just have to find them, possibly update them, and send them out.

Holding class on IRC would be a little bit of a challenge since the students had not used IRC yet, so this would have to serve as both an IRC familiarization exercise and a useful meeting. I sent them the following message to prepare them:

We are going to meet today on IRC (Internet Relay Chat) at 2:00pm.

You should read through this in advance so that you are prepared. Especially if you are going to install an IRC client – you will need time to set it up. I suggest trying this out at least 1/2 hour in advance to make sure you get the connection working. I’ll stay on IRC all day so you can try out chatting.

You have two choices for connecting to the IRC server:

  1. Install an IRC client. There are many available, you may want to try a few to see which you like the best. Some are standalone applications, and some are browser plugins (like Chatzilla for Firefox.) I’ve heard that mIRC is the most popular for Windows, I use Colloquy on the Mac.
    Here are some of the most important settings you will need. How you set these will depend on your client. You will want to install your client and do the setup in advance of our meeting, so you aren’t late.

    1. Server: irc.freenode.net
    2. If you can set a port, you may want to use 7000 since it can be used for an SSL connection.
    3. Nickname: Choose your own*
    4. Channel: ##WSU-CS401
  2. Use the webchat page on freenode: https://webchat.freenode.net
    1. Nickname: Choose your own*
    2. Channels: ##WSU-CS401
    3. Complete the reCAPTCHA
    4. Connect

* You may want to register your nickname, so that no one else can use it. That way we can all get used to looking for a specific nickname for you. See the instructions: http://freenode.net/faq.shtml#registering

IRC Resources

The most important commands which chatting:

  • /SERVER new-server-hostname
  • /NICK new-nickname
  • /QUIT
  • /JOIN #channelname
  • /ME does something
    This command is used for saying that you are doing something like:
    /ME is looking for that information in my email
  • /LEAVE

Chatting:

  • If you want to address your comments to everybody, just type your comment and hit return.
  • If you want to address your comments to a specific person, type their nickname followed by a colon, then your message. E.g.

         kwurst: I have the answer to your question

I had created a course-specific channel on freenode last spring, so we could use that channel, but to hold a useful meeting, felt that it would be vital to have a MeetBot running to take minutes. I could have used used the #teachingopensource channel, which has zodbot installed, but then the minutes would be saved on Fedora’s website, rather than ours. So I decided to install Supybot with the MeetBot plugin on our own server here.

I managed to get MeetBot installed (mostly – gives me an error message for every meeting command I give, but then does it anyway) and we had a very successful meeting for a class of IRC newbies: http://cs.worcester.edu/kwurst/wsu-cs401/2013/wsu-cs401.2013-02-11-21.13.html

From the blog On becoming an Eccentric Professor... » CS@Worcester by Karl R. Wurst and used with permission of the author. All other rights reserved by the author.

I built my first PhoneGap app!

My CS 401 Software Development class for Spring 2013 at Worcester State University is developing an iPad app for the Worcester Art Museum (more on that in another post.)

Because few of the students have Macs the development environment was going to be a problem. There was the option of using either WSU’s or WAM’s Mac labs, but I figured that the students would want to work outside of the normal hours of the labs. Fortunately, Stoney Jackson at Western New England University suggested that I look into PhoneGap, a free and open source framework for developing cross-platform apps using the web technologies HTML, CSS, and JavaScript. PhoneGap will take a site developed using those technologies and compile it into a native app on a number of platforms, including iOS.

Even better, Adobe, which now owns PhoneGap, has set up a build server. That means that we can just have their site do the build, rather than having to rely on the few students in the class who do have Macs to do the building. To use it for free, your code does have to be in a public GitHub repo, but we were going that route anyway.

Last night I decided to do some more reading on PhoneGap, and discovered that it’s really simple to build a working Hello World app using their Getting Started documentation and GitHub respository of code. I forked the code, and submitted it to the build server, then downloaded the working app to an Android tablet. I wanted to download it onto my iPad as well, but it seems that I’ll have to go through the Apple developer provisioning setup to get a key. I’ve done that before to work on a native iOS app, but I’ve got to go dig through all my notes to get back up to speed on that process.

I decided to write up this post so that my students can see the steps I took, and get the example working on their own systems. This is pretty much just what is posted in the Getting Started page on the PhoneGap Build site.

  1. Fork the https://github.com/phonegap/phonegap-start repo. The fork button is in the upper-right hand corner of the page (https://github.com/phonegap/phonegap-start/fork_select).
  2. Go to your own GitHub page to see the repository you just created.
  3. You can clone that repo to your local machine if you want, but that is not necessary at this point, unless you want to make changes. I decided to leave making changes until later.
  4. You will need the http URI for the repository, so either copy it or leave the page/tab open.
  5. Go to the https://build.phonegap.com/ build site, and choose the Completely Free plan.
  6. Sign in through your GitHub account.
  7. Click the +new app button.
  8. Make sure you’ve clicked the open-source tab.
  9. Paste the URI from your fork of the GitHub repo.
  10. Click Ready to Build.
  11. When it’s done, click the appropriate device icon to download it to your device.

Next steps for me:

  1. Make some changes to my fork, build, and download again.
  2. Figure out the iOS provisioning so I can build and download to my iPad.

We’ll have to figure out how to set up the provisioning for the class after we determine which iPads we have available (student- and/or museum-owned) for testing.

From the blog On becoming an Eccentric Professor... » CS@Worcester by Karl R. Wurst and used with permission of the author. All other rights reserved by the author.

Seven Languages in Seven Hours? (Installing, that is…)

I purchased the book Seven Languages in Seven Weeks from The Pragmatic Bookshelf earlier this week. I’d heard about this book in multiple blogs, and the languages it covers:

  • Ruby
  • IO
  • Prolog
  • Scala
  • Erlang
  • Clojure
  • Haskell

are all “hot” languages that I thought it would be good for me to have some familiarity with. I’ve got about seven weeks left before classes begin again in September, so this seemed like the perfect time to try this.

Today’s task was to install all seven languages. I’m going to be away from the Internet at times, so I figured I had better download all the language environments and make sure they are working, then I can work on the exercises whether I have network access or not.

I’ll try to write more as I work with each language.

From the blog On becoming an Eccentric Professor... » CS@Worcester by Karl R. Wurst and used with permission of the author. All other rights reserved by the author.

Feedback to the Euca2ools User Guide

In an earlier post, I said that I felt we had succeeded in making a clear and understandable user guide for Euca2ools. While I still feel that this is the case, we got some useful criticism of the guide from the last group to present on Wednesday. This group was tasked with trying to use Euca2ools and Eutester by only following the guides on our wiki, and then to report their findings and suggestions. They told us that while the guide overall was well-made, there were two areas that were difficult to follow.

The first issue was finding the user credentials when setting up Euca2ools. I admit to having trouble with this as well at first, but it did not even cross my mind to put instructions into the guide on how to find your credentials. Oh well, that is why having other people critique your work is good! I edited the wiki to fix this problem.

The second issue was about getting a working SSH connection. This is the biggest weakness of the guide. Getting SSH to work consistently never happened for us. We have several theories on why it failed so often. We suspect  as dynamic IPs could be the culprit. I do not have any solutions currently better than what is already posted in the guide, so it will stay as it is for now. Perhaps a future class will be able to fix up that part of the guide for us.

From the blog Code Your Enthusiasm » WSU CS by Jon and used with permission of the author. All other rights reserved by the author.

Eucalyptus Presentations

On Wednesday, all of the groups presented on what they had accomplished during the semester. I did not realize how much work we actually got done as an entire class until I saw the presentations. There were 7 presentations in all:

  1. Eutester Issues
  2. Cloud Overview
  3. Eutester Documentation
  4. Infrastructure
  5. Leveraging Python for Eutester
  6. Using Euca200ls (my group)
  7. Installing Euca2ools and Eutester

The first group gave an overview of the open and closed issues on Github. The second group gave a very detailed overview of the ideas behind cloud computing and defined many general and Eucalyptus-specific terms. The third group described the process of attempting to document the Eutester code. Dave and Mike, the infrastructure group, had an entertaining discussion about how much frustration went into setting up a working Eucalyptus cloud. The fifth group went into depth about using Python with Eutester. My group described the main functions of Euca2ools and the process of creating a user-friendly guide on our wiki. We actually succeeded in demonstrating a working SSH connection to an instance created from an image that I uploaded to our Eucalyptus cloud, which I consider to be a big accomplishment! The final group critiqued the experience of attempting to get several modules up and running, specifically Euca2ools and Eutester, just by following the wiki guides that we had all created.

It was very interesting to see the other groups present, especially the groups involved with Eutester. Spending most of my time with Euca2ools, I did not look into Eutester very much at all. Seeing all of my classmates describe their experiences with it was great to see.

From the blog Code Your Enthusiasm » WSU CS by Jon and used with permission of the author. All other rights reserved by the author.

Evaluation of the Euca2ools User Guide

Most of my work this semester has been experimenting with Euca2ools and modifying our User Guide to reflect my findings. My primary goal in collaborating on this User Guide was to make it easy to follow, especially for a Linux novice such as myself. Ultimately, I think we achieved our goal. My group partners are definitely the experts and filled the guide with very useful information on how to perform the various tasks. I took their knowledge and formatted it, expanded on it, and tried to explain as best I could what each command was doing. A lot of trial and error went into this, as a lot of the time I wasn’t exactly sure what I was doing. A positive side-effect: fumbling through Euca2ools and revising this guide over the semester did help me a lot with my knowledge of Linux.

I wanted someone who was completely new to Euca2ools to be able to successfully do something productive by only following our guide. I think we came pretty close. Now that the semester is at an end, the guide is as finished as it will be until perhaps a future CS class takes over on the same project. It definitely is not 100% done. Eucalyptus is a huge project and Euca2ools is a major part of it. There is always more that we could do in writing the user guide, but I am happy with the progress we made.

From the blog Code Your Enthusiasm » WSU CS by Jon and used with permission of the author. All other rights reserved by the author.

Success!

Today is a big day in working with Euca2ools on our cloud. I have successfully uploaded an image, kernel, and ramdisk to the Matrix server and an instance is actually running off of my image. This has been a trial and error process that has taken weeks, and I am pretty satisfied. Here is the proof:

The instructions posted on our user guide by Dhimitri and Mindo were really helpful, but of course being a complete noob to Linux I was confused by some parts. The wiki will be changing slightly to reflect my new found understanding and hopefully the revisions will help anyone else trying out this process in the future.

From the blog Code Your Enthusiasm » WSU CS by Jon and used with permission of the author. All other rights reserved by the author.

First Merge!

Following on Trevor Hodde‘s post First Commit!, it’s time to mention our First Merge!

First Nate Doe, and then Trevor, made commits to our class’ fork of the Eutester repository on GitHub. I submitted a pull request, which has now been merged into the master branch of the repository.

We’re looking forward to more commits, and having them merged into the project. I know that Nate and Trevor have issues assigned to them, and I think that Matt Morrisey will soon.

From the blog On becoming an Eccentric Professor... » CS@Worcester by Karl R. Wurst and used with permission of the author. All other rights reserved by the author.