Category Archives: Computer Science Education

Course Prep: Open Educational Materials Grant Proposal

OER Logo
The Worcester State University Library has called for proposals for Open Educational Resources Initiative (OERI) mini-grants to support Fall 2017 courses to the use of Open Educational Resources.

I have submitted a proposal to support the use of OER in CS 343 Software Construction, Design, and Architecture. This is the first required course in our Software Development Concentration in the Computer Science Major, and is taken by students in the concentration in the Fall of their Junior year.

Rather than repeat material from my mini-grant proposal, I’m just going to reproduce my submission here. Whether I receive the mini-grant or not, I will still be doing this with my course, and I will blog about it here as I work on it.


Course Number

CS 343

Course Title

Software Construction, Design, and Architecture

What type of course is this?

LASC
Check Box Noun project 10759 Required course in the major
Elective course in the major

Number of Students

Please estimate the enrollment of the course, either using data from previous semesters (average or aggregate), exact enrollment from the last time the course was taught, or, if proposing a new course, an estimate of anticipated enrollment.

Currently 33 registered for Fall 2017. (Another 5-10 are likely when transfer students register.)

(There were 26 students in the last offering in Fall 2016.)

(This course is a first-semester junior-year course required of all Software Development Concentration students in the CS Major, offered every Fall semester.)

Current Textbook(s) or Anticipated Textbook(s) that will be replaced

If more than one, please list all

Flexible, Reliable Software: Using Patterns and Agile Development, Henrik B. Christensen, CRC Press, 2010 (was used in Fall 2016)

Clean Code: A Handbook of Agile Craftsmanship, Robert C. Martin, Prentice Hall, 2008 (I will likely require this book for Fall 2017 in addition to any OER materials – although if I can find equivalent OER material, I will not require it. This book will be used in all 4 courses of the Software Development Concentration – CS 343, CS 348, CS 443, CS 448.)

New Cost of Current Textbook(s) or Anticipated Textbook(s)

Please list the current price on Amazon for a new version

Christensen – $79.49

Martin – $36.59

Used Cost of Current Textbook(s) or Anticipated Textbook(s)

Please list the current price on Amazon for a used version

Christensen – $51.30

Martin – $29.99

What are your goals regarding this initiative? What are your intended outcomes for your students’ learning?

I am redesigning this course from scratch and there is no single textbook that covers the range of material that I want to include in this course.

My plan is for this course to cover the design of software systems, as represented by design patterns and software architectures. The students will design software systems, and construct some of them from those designs, in some cases using available software frameworks. The unifying theme for these three design topics (design patterns, software architectures, and software frameworks) will be the concept of modeling these designs using the Unified Modeling Language (UML) as a representation.

To implement this plan, I will need to find resources covering four areas:

  1. Learning the most commonly used diagrams in the UML and learning to use a modeling tool to create the models and diagrams.
  2. Learning about the most commonly used design patterns, and to what types of problems they should be applied.
  3. Learning about a number of commonly used software architectures, to what types of problems they should be applied, and how to design with them.
  4. Learning about a number of commonly used software frameworks that correspond to some of the architectures, and how to implement a design/system with them.

By using OER materials for:

  1. The UML – I will be able to pick and choose which diagrams we cover, and to what level of detail. Students will not need a textbook that is larger than needed. In addition, we will have access to instructions for using the most recent version of the modeling tool, and students will not have to translate from a different tool that might be used in a textbook.
  2. Design Patterns – I will be able to pick and choose which patterns we cover, and to what level of detail. Students will not need a textbook that is larger than needed. In addition, I will be able to find more relevant examples of the design patterns for the students.
  3. Software Architectures – I will be able to pick and choose which architectures we cover, and to what level of detail. Students will not need a textbook that is larger than needed. In addition, I will be able to find more relevant examples of the architectures for the students.
  4. Software Frameworks – I will be able to pick and choose which frameworks we cover, and to what level of detail. Software frameworks are not typically covered in textbooks. In addition, we will be able to use the most up-to-date versions of appropriate frameworks, which change quite frequently.

Finally, it will be easier to have the course materials reflect the current state of software design for future semesters, as a textbook would go out of date quickly and not be updated as frequently.

Please give a brief description of the plan for which you seek support. This might include how you will go about identifying or creating resources to replace the materials used in your course, how students will access the assigned content (e.g., via laptop, mobile device or smartphone), how you will make your educational resources openly available, etc.

There are literally hundreds of online tutorials and blog posts about the four areas I want the course to cover. There may be some materials in some of the open content and open textbook databases, but I am not having as much luck with those. The difficulty will be determining which of the materials are of high enough quality and at the right level for the students. The bulk of my effort will be put into finding and reviewing the materials. Once the materials have been identified, compiling them into lessons and background reading for assignments will not be too difficult.

As the materials I am looking at are mostly Web resources, the students will most likely be accessing them on their laptops, although access through a mobile device will be possible.

All materials that I produce myself (syllabus, lists of readings and resources, lessons, assignments, project specifications, and tutorials) will be licensed CC-BY-SA (which I have been doing for years) and will be available on the GitHub repository for the course. I will look into which of the OER sites is the most appropriate for posting to as a directory to link to my materials.

What challenges do you anticipate in implementing your goals? (e.g., time constraints, technology barriers, etc.) How do you plan to address those challenges?

The biggest challenge will be having enough time to review the large quantity of web materials. Another challenge will be the fact that I am still designing the course, as I am researching materials.

I plan to address those challenges by adopting a “good-enough” approach and finding something good enough for each topic first, and then when additional time is available, looking for better materials before the topic is covered (or after the course has ended to prepare for the next offering.)

What library or other support will your project require?

I have not spent any significant time investigating library resources, particularly database and ebook offerings. Spending some time with one of the librarians to look at what is available will be helpful.

How do you plan to assess the effectiveness of this initiative? Will you be able to participate in library assessment?

I will blog about my efforts to design the course and select materials. I will survey the students on the materials themselves. I plan to have the students spend time looking for materials themselves and blogging about them as part of the course, in service of our program outcome:

“Learn new models, techniques, and technologies as they emerge and appreciate the necessity of such continuing professional development.”

I will give the students both the Pre-Test and Post-Test that the Library develops to assess the OER Initiative.

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

New Course Prep: Learning UML

I am preparing for a new (for me) course for the Fall 2017 semester: CS 343 Software Construction, Design, and Architecture. My intention is for this to be a course primarily about software design and I want to approach it through design patterns, software architectures, and modern software frameworks. These are all topics that I have read a little about, but not enough to really teach. So, I am spending my summer reading a lot about them.

For other courses, I’ve learned little bits of UML (mostly class diagrams, with a very small amount of use-case diagrams, sequence diagrams, activity diagrams, and state diagrams) and all very informal. So, I decided that, if I’m going to teach design, I need a representation for those design patterns and architectures and it’s time that I finally learned UML more formally.

I am currently working my way through the video series UML Fundamentals, Standardized Structural and Behavioral Modeling for System Design by Simon Bennett from O’Reilly Media (6 hours, 12 minutes). So far, it’s pretty good, although it seems almost more about how to create the diagrams in Enterprise Architect (a commercial product) than about UML itself. I’m going to have to read some books about UML also to supplement the videos, but it’s a good introduction.

Standardized Structural and Behavioral Modeling for System Design

The commercial tool he uses looks nice, but I would like to find a FOSS alternative to use, both for myself, and for the students to use in class. I’ve played around a little bit with some of the Eclipse tools for modeling, but I’ve not found them very easy to use. So, I’m still looking. If you have any suggestions, please let me know.

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

Sabbatical Reading Update

I wanted to post an update to my post Sabbatical Reading List.

To better keep track of my progress with my reading, I’ve started tagging the books on my LibraryThing account in different categories:

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.

De-lurking…

I have been lurking in the OpenMRS project for the last 6 months or so. I have read wiki pages, installed the development environment, cloned the repository and built the code, and listened in on a number of OpenMRS weekly developer meetings.

As I begin my sabbatical, I realized that it was time to finally introduce myself to the project members. So here’s what I posted to the OpenMRS Developers mailing list, and to OpenMRS Talk:

My name is Karl Wurst and I am a Professor of Computer Science at Worcester State University in Worcester, MA, USA (about 80 km west of Boston.)

Our university has recently created a concentration in Software Development for our Computer Science majors, and I am one of the primary instructors for the courses in this concentration. I am currently on sabbatical (no teaching responsibilities) from June through December 2014 and my plan is to participate in OpenMRS to improve my somewhat outdated Software Engineering skills.

I have installed the development environment, built the openmrs-core code, and now I will begin looking for tickets that I can work on. I am excited that the 1.10 beta release is imminent, and hope that I can be of some help in that sprint. I am also very interested in the development, testing, integration, and release processes as a way of seeing “real-life” examples of many of the tools and technologies that I have been reading about, but not had any hands-on experience with.

I am also part of the Foss2Serve/POSSE (foss2serve.org) group that is encouraging faculty to have students participate in Humanitarian FOSS projects as part of their coursework, and have been doing that primarily with our senior project course with varying amounts of success. I would like to have my students participate in OpenMRS beginning with the Spring 2015 semester (January through May 2015.) I want to get familiar with the project myself, first, so that I can direct them.

I also want to use OpenMRS for examples in our courses on software process and management, and testing and QA. We also have an installed server instance that we hope to use for the Health Informatics course that we teach for our Nursing students so that they can get some hands-on time with an EMR system.

I’ve already learned a lot just by exploring and listening. I’m looking
forward to learning even more by contributing.

A note to my students: Introducing yourself to a new group of people is hard, even for faculty members! I have put this introduction off for a while. I may be a Professor, but these people are real experts – they do this stuff all the time, and many of them do it for a living! But, as I’ve often found, once I forced myself to write my introduction and pressed the send button, I’ve gotten back only helpful, welcoming responses. Open Source communities really are welcoming groups that are genuinely happy to have you join, want your help, and will help you succeed. You’ll see…

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.

Sabbatical Reading List

I have begun my reading list for my sabbatical. It includes general software development/software engineering books, as well as books specifically aimed at the next two courses I will be teaching in our Software Development Concentration:

  • CS-348 Software Process Management (Spring 2015)
  • CS-443 Software Quality Assurance and Testing (Fall 2015)

Here is my sabbatical reading list on my LibraryThing account. I will update it as I find other books, or have other books suggested to me.

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.

Fall 2014 Sabbatical

I am spending the Fall 2014 semester on sabbatical1. This is the proposal I submitted to request my sabbatical leave:

I will use my sabbatical to become more expert in the area of Software Development/Software Engineering. The Computer Science Department recently created a Concentration in Software Development, which has expanded our course offerings in this area from two courses to four courses. This expansion does not simply expand the number of hours we spend on Software Development topics, but adds many topics that we have not been covering at all. Many of these topics are outside the expertise of any of the faculty in the department.

I am the only member of the Computer Science Department who has worked as a professional software developer, but have not worked professionally in that field for over 20 years. Many of the current processes, techniques, and tools were not in use at that time. The members of the department have worked to learn these new skills so that we can teach them to our students, but have only an academic/theoretical knowledge of many of them – we lack the practical experience of using these skills in a professional environment.

During my sabbatical, I will learn the processes, techniques, and tools of modern software development, and apply them in a professional context by working as a full-time (but unpaid) developer within an open source software project. I will work with Dr. Heidi Ellis at Western New England University and Dr. Gregory Hislop at Drexel University to get the academic perspective on how to teach these skills to undergraduate students, and to take advantage of their experience working with, and their contacts within, open source projects.

Drs. Ellis and Hislop are both well-known software engineering researchers and software engineering education researchers. They have been on the forefront of work to help students develop professional software engineering skills by working with open source software projects. They have a particular interest in having students work within projects with a humanitarian aspect. I have done some work with them in this area over the last 4 years, but have not had the time to work exclusively and intensively on developing these skills myself. In addition, Dr. Hislop served on the committee that developed the SE 2004 software engineering curriculum for the ACM and IEEE, and is currently serving on the committee that is updating those standards. I have already tapped his expertise in developing our new curriculum, and plan to do so again as we develop the new courses in the curriculum.

Proposal
  1. Develop a list of processes, techniques, skills, and tools that are necessary for modern software development. Thislistwill bedevelopedin consultationwithDrs. EllisandHislop, by reviewingtheSLOs of our newly approved Software Development Concentration courses, and by reviewing the SE 2004 Curriculum and any publicly released drafts of the new ACM/IEEE Software Engineering curriculum. This list will include,atminimum:
    • Agile development processes
    • Automated build environments
    • Automated test environments
    • Version control systems
    • Software architectures
    • Design patterns
    • Requirements elicitation
    • Software licensing and intellectual property
    • Project planning and estimation
    • Risk management
    • Analysis techniques
    • Test planning, strategies and techniques
    • Test coverage
    • Code reviews
    • Quality assurance
    • Project and team management
  2. Select an appropriate humanitarian open source project to participate in. The project will be one which
    • Allows me to experience the full range of processes, techniques, skills and tools from the list above. (Or as many as possible.)
    • Allows me to use tool and language skills I already possess to minimize the number of new tools and languages I need to learn.
    • I can continue to use with students in the Software Development Capstone course, and with other courses in the concentration.
    • At this point, the two projects that seem most likely for my participation are:
      OpenMRS (http://openmrs.org/)
      “The global OpenMRS community works together to build the world’s leading open source enterprise electronic medical record system platform.
      We’ve come together to specifically respond to those actively building and managing health systems in the developing world, where AIDS, tuberculosis, and malaria afflict the lives of millions of people.
      Our mission is to improve health care delivery in resource-constrained environments by coordinating a global community to create and support this software.”
      Ushahidi (http://www.ushahidi.com/)
      “We are a non-profit tech company that specializes in developing free and open source software for information collection, visualization and interactive mapping. We build tools for democratizing information, increasing transparency and lowering the barriers for individuals to share their stories.
      “Ushahidi”, which means “testimony” in Swahili, was a website that was initially developed to map reports of violence in Kenya after the post-election fallout at the beginning of 2008. Since then, the name “Ushahidi” has come to represent the people behind the “Ushahidi Platform”. Our roots are in the collaboration of Kenyan citizen journalists during a time of crisis. The original website was used to map incidents of violence and peace efforts throughout the country based on reports submitted via the web and mobile phones. This website had 45,000 users in Kenya, and was the catalyst for us realizing there was a need for a platform based on it, which could be used by others around the world.”
  3. Participate in the selected project. Iwillparticipate in the selected project on a full-time (unpaid) basis, contributing to the project in whatever ways I can including:
    • Participation in planning and design meetings
    • Writing code
    • Testing
    • Writing documentation
    • Helping with support
  4. Participate in Western New England University course. I would like to observe or help teach a software engineering course at WNEU so that I can see what pedagogy is used in the course, and adapt it to our own courses.
  5. Blog about my experiences. I will write about my sabbatical experiences on my blog (http://blog.karl.w-sts.com/). This will allow me to document and reflect on what I am learning and how I can use it in our own courses.
Preparation for this Sabbatical
  • Participant in POSSE (Professors’ Open Source Summer Experience) in 2010, 2011, and 2013 – A workshop designed to prepare faculty to support students working within open source software projects. The summer 2013 workshop group is continuing to work together over the 2013-2014 academic year.
  • Participant in SoftHum (Software for Humanity) workshop in 2011 – A workshop with faculty working to design materials for use in their courses.
  • One of the organizers of Teaching Open Source Symposium in 2012
  • Participant in OpenFE Materials Sprint in 2013 – A workshop to develop materials for teaching POSSE workshops
Relevant Courses
  • Introduction to Programming
  • Software Construction, Design and Architecture
  • Software Process Management
  • Software Quality Assurance and Testing
  • Software Development Capstone
  • Software Development Process
Benefits to the Computer Science Department and to the University

The department will benefit by having a faculty member who has relevant professional experience in software development, with contacts within at least one open source software project, and with the academic experience of applying that experience to courses. I will be able to use that experience and those contacts in order to give students the opportunity to gain valuable practical experience working within a large software project on the same types of tasks and using the same kinds of skills that they will be expected to use in their professional careers.

The University will benefit through a strengthened Computer Science program, by having a higher profile in the software development world, and being recognized as an organization that has donated a semester’s-worth of work of a full-time faculty member to further the mission of a humanitarian project.

There have been some changes since I wrote the proposal and it was approved:

  1. IchoseOpenMRS as the project that I will be working within.WhileUshahidi seems like a very interesting project,OpenMRS seemed to fit better with my goals for the following reasons:
    • It is written primarily in Java, which is the language that we use most in our Computer Science courses. (Ushahidi is written primarily in PHP, which we do not teach at all.)
    • OpenMRS seems to have a more “formal” software development process and tooling, which I think covers more of the topics on the list of what I want to learn.
    • We can use OpenMRS as a tool in the Health Informatics course that we teach for the Nursing majors, to provide an Electronic Medical Record system for the Nursing students to try out.
  2. I participated in the Teaching Open Source Symposium at SIGCSE 2014 and in POSSE 2014.
  3. I increased my use of Open Source tools both in my own work, and introduced them in our first-year courses.
  4. Students in my Spring 2014 capstone course did some work within the OpenMRS project.
  5. I started attending OpenMRS online meetings to familiarize myself with the project.

I will be writing more about sabbatical as the summer and the semester move along.

  1. For those not familiar with the ways of academia, a sabbatical is a paid leave awarded every 7 years to allow a faculty member time for research or updating skills.

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.

All Aboard the Coding Train!

cue Ozzy Osbourne laughter…

This blog is coming to you direct from Amtrak Northeast Regional Train 95, where Stoney Jackson and I are on our way to POSSE 2014 at Drexel University in Philadelphia, PA. This is becoming an annual tradition for us.

So, why is it called the Coding Train? Because we are spending the 5 hour train ride writing code!

When we did this for the first time last year, we worked on the code for the grading scripts that I had started writing in bash (https://github.com/kwurst/grading-scripts/tree/bash-version). Stoney started adding error checking, and then a Python version – neither of which he finished, but we learned a lot about how GitHub works for collaborative development.

This year we discussed a number of options for what project we would sprint on (after we spent a lot of time on professor-talk about curricula, and courses, and learning outcomes, and assessment) but we ended up back on the same project. This time our starting point was the Python conversion of the original scripts that I had started in December, and which I had just begun to refactor this month (https://github.com/kwurst/grading-scripts/tree/master).

Stoney has been doing some serious refactoring on the code, adding one major new feature: a JSON configuration file so that I don’t need 15 different scripts – just different configuration files to pass to a single, more general script. He’s also undertaken a major cleanup of the code, and added the project’s first unit test!

I, on the other hand, have been installing tools that Stoney suggested – git flow and git bash prompt, and in the process having to debug my Mac’s installation of Homebrew and cleaning up my .bashrc file (being completely ignored by my shell) and my .bash_profile file (full of lots of cruft from previous installs.)

Stoney has just pushed his branch, so now it’s time for me to pull it, and test it on some data on my computer. And we’re almost to Philadelphia, so just in time…

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.

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.

Code Break: Data File Manipulations in Python

In my CS-135 Programming for Non-CS Majors class, one of the primary objectives for the students is to learn to work with collections of data in files. I’m always happy when this requires manipulations that can’t be performed with other tools that the students are comfortable with — thus motivating the need to learn to code.

This afternoon in class, students were working in groups on their final projects. Two groups came up against some problems in getting their data into a format that could be easily processed in Python. Both cases involved data that was only available in the form of PDF files.

The old standby of selecting text and pasting it into Excel did not provide nice columns of information. Our second attempt was to export the data as text.

Case 1

In the first case, we got text data that looked like:

Biology 306 N/A 306
Biotechnology 80 26 106
Business Administration 748 N/A 748
Chemistry 141 N/A 141
Communication 245 N/A 245
Communication Sciences & Disorders 218 N/A 218
Community Health 158 N/A 158
Computer Science 116 N/A 116
Criminal Justice 445 N/A 445
Early Childhood Education 80 19 99
Early Childhood Education, Non-Licensure 26 N/A 26

This looked promising – we’ve dealt with one-record-per-line-space-delimited data files in class before. You just need to read a line at a time, and use Python’s string split method to turn it into a list… But — wait! — the first item  is a variable number of words separated by spaces. That will make for some messy lists — they’ll all be of different lengths:

['Communication', '245', 'N/A', '245']
['Communication', 'Sciences', '&', 'Disorders', '218', 'N/A', '218']
['Community', 'Health', '158', 'N/A', '158']

Here’s the solution: Python lists can be indexed from the end using negative indices. So, we can definitely get at the last three values (numbers of majors — undergraduate, graduate, and total). Assuming a list in a variable department, they are at positions department[-3], department[-2], and department[-1] respectively.

But, what about the department name, which may be in multiple list items? Well, we can get it as a sub-list, using list slicing: department[:-3] yields:

['Communication']
['Communication', 'Sciences', '&', 'Disorders']
['Community', 'Health']

All that’s left is to concatenate them together into a single string:

name = ''
for item in department[:-3]:
    name = name + item + ' '

Full code is here: https://gist.github.com/kwurst/7761789

Case 2

In the second case, we got text data that looked like:

Boston    00350000    4368    65.9    15.2    0.8    2.1    15.9    0.1
Boston Collegiate Charter (District)    04490000    34    67.6    32.4    0.0    0.0    0.0    0.0
Boston Day and Evening Academy Charter (District)    04240000    162    13.0    55.6    0.0    6.8    24.7    0.0
Boston Green Academy
Horace Mann Charter School
(District)    04110000    72    70.8    26.4    0.0    1.4    1.4    0.0
Boston Preparatory Charter Public (District)    04160000    27    74.1    11.1    0.0    3.7    11.1    0.0
Bourne    00360000    145    90.3    4.8    0.0    2.1    2.8    0.0
Braintree    00400000    369    95.1    3.3    0.3    0.3    1.1    0.0

Which could be fixed the same way, except for the fact that some of the district names ended up broken across multiple lines. (I’m not sure why this happened, and it turned out that exporting the data in a different way fixed the problem. But I’d already found a solution, so I’m going to document it here…)

Working from the assumption that the district org code always starts with a zero (I know — not a good assumption, but it works in this case…), the solution involves checking for lines with no zero in them and concatenating them together. Then you can treat the lines as in Case 1.

for line in f:
    while line.find('0') == -1:
        line = line + f.readline()

Full code is here: https://gist.github.com/kwurst/7761789

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.