MarkUs Blog

MarkUs Developers Blog About Their Project

Archive for January, 2013

Punchlines – UCOSP Winter 2013 – Week 2

without comments

Marc

Status:

  • Pushed a couple changes to some small issues and attempted to work on issue 80.
  • Also researched the change over from Prototype to jQuery as can be seen on my blog post.

Roadblocks:

  • Issue 80 will take me a significant amount of time due to its complexity, so I will most likely put it on backlog for later.

Next week:

  • I want to start working on converting over Prototype to jQuery. Since I am working with Daryn on this, We will set up a Google Doc to track which changes we are making, and who is working on what task.

Ian

Status:

  • Pulled the test-framework branch from github. I fixed some problems with the branch (syntax and no method errors) and got the configuration set up so I can run tests without crashing on my local machine.

Roadblocks:

  • I’m not sure what the test framework is actually supposed to be doing.

Next week:

  • Get the test framework to mark an assignment.

Daryn

Status:

  • Looking over Markus source code to get a scope on the magnitude of prototype dependent code.
  • Documenting findings in spreadsheet to keep track of progress on specific files.

Roadblocks:

  • Re-familiarizing myself with jQuery/getting the rust off.
  • Determining how completed code changes will be submitted.

Next week:

  • Planning to start digging into the code and testing results.
  • Will be absent over the weekend (attending MHacks event in Michigan)

Nick

Status:

  • This week I familiarized myself with the testing framework. I looked over some of the testing framework code. I think I have the main ideas in my head, and I’ll try to create a flowchart/schematic drawing sometime soon.
  • In the end, I was able to manually force a test to run through rails console, and now I can see some test results when grading in MarkUs.

Roadblocks:

  • I don’t think the documentation on the testing framework is very good. I had to figure everything out by reading the code (which wasn’t that bad).
  • When grading in MarkUs, I can see the test results in a “Test Results” tab. But how do I transfer those marks automatically to the rubric on the right?

Next week:

  • Keep staring at testing framework code.
  • Figure out: (1) what features still needs to be implemented, (2) who will be implementing them, and (3) the order the features should be implemented in (priority).

Alysha

Status:

  • Working on issue 941. Becoming more familiar with code revolving around remark feature. Have a working way of getting old result and remark result without relying on database ordering and timestamp.

Roadblocks:

  • Spent a lot of time trying different things out (trial and error) and learning ruby on rails. Initially tried to change submission schema from “has_one :result, :dependent => :destroy” to “has_many :result, :dependent => :destroy” but it affected too much of the code at once. Decided to first find a solution for the query and write the get_result and get_old_result methods, then to work on changing the schema.

Next week:

  • Finish up this issue (changing the schema). Possibly write a blog post to follow-up on this post which was about the original issue and the temporary fix that I am working on replacing.

Mike Stewart

Status:

  • Spent quite a bit of time resolving some new issues with my environment. Everything is working now.
  • Completed testing and code review of pull request #928.
  • Reviewed other issues related to grade entry, to get a sense of what all will need to be done.

Roadblocks:

  • It would be ideal if pull #928 can be merged before I proceed with making additional changes to that code.

Next week:

  • Coordinate with Oussama to see how we will divide the work to be done on grade entry, then start making progress.

Oussama

Status:

  • working on grade entry aspect of Markus
  • fetched branch ‘issue894’ from Kira’s repository
  • performed review for pull request …
  • tested functionality changes

Roadblocks:

  • trying to understand some of the code changes as I am still familiarizing myself with Ruby on Rails

Next week:

  • do some more reading on the Ruby framework
  • start working on grades sheet

Mike Wu

Status:

  • Committed some additions to MarkUs setup documentation for Linux on Wiki (pull #16).
  • Added median grade for assignments, number of fails, and number of zeros to dashboard; some refactoring to do before submitting a pull request for issue #915.
  • Set up MarkUs project in Aptana (as an Eclipse plugin, a more familiar environment for me).

Roadblocks:

  • How to get French translations in general? Is Google Translate reliable for English-to-French? Should I get them before committing or create separate issues for translations and use English temporarily in the initial commit?
    • Currently, those for “Number of zeros” and “Number of fails” are needed for issue #915.
  • Learning Ruby syntax and the structure of codebase was where most of my time was spent.
  • Setting up Eclipse and Aptana was mostly straight-forward with a few tricky bits.

Next week:

  • Commit issue #915.
  • Learn the structure surrounding the remark feature by working on issue #938.

Daniel

Status:

  • Completed fixes for issues #63 and #860.
  • Discussed and proposed a solution to issue #19.
  • Made a wiki pull request cleaning up a few things: pull 14
  • Wrote a blog post about the switch from svn to git. Wrote a script for the comparison.

Roadblocks:

  • None.

Next week:

  • Finalize a fix for issue #19 once we’ve all agreed.
  • Research other areas that might help improve Markus performance.
  • Decide exactly what I’d like to work on this term.

Written by Daniel St. Jules

January 30th, 2013 at 2:04 am

Posted in Uncategorized

From SVN to Git

without comments

I’m currently researching areas where Markus performance may see improvement. This involves reading through major parts of the wiki, particularly those relating to the schema and design, as well as previous issues and parts of the code base on Github. The blog is also a great source of information, as prior contributors have mentioned performance issues. Severin even did a complete benchmark of Markus: http://blog.markusproject.org/?p=3383

His findings, throughout the 4-part analysis, include the cost of subversion interactions. In part 3, he mentions that it’s likely that the primary contributor to heavy IO during peak traffic involves svn: subversion repository creation and file storage on existing repos. But can this be improved upon?

One of the future goals for the Markus Project includes a transition from Subversion to Git. I love Git, and Grit is a well-documented ruby gem for interacting with Git repositories. Much better documented than the svn ruby bindings. But given a switch from svn to git, could we expect improved performance?

Much of the git community claims that git is much faster than svn: https://git.wiki.kernel.org/index.php/GitSvnComparison The git website even presents some benchmarks for comparison: http://git-scm.com/about/small-and-fast The numbers are promising, but unfortunately, the commit operations include pushing, which I don’t believe is part of Markus’ operations. They also don’t involve grit nor the svn ruby bindings. So to research whether or not Markus’ peformance could improve from a transition to git/grit, I figured I’d have to write a small benchmark.

The script

The code can be found in a gist: https://gist.github.com/4658271

Screen shot 2013-01-28 at 4.26.14 PM

The code discussed completes 4 operations, and outputs their running time:

  • Initializing 10,000 svn repos
  • Initializing 10,000 git repos
  • Initializing and commiting a small test file to 10,000 svn repos
  • Initializing and commiting a small test file to 10,000 git repos

The test file that’s committed is called ‘test.txt’, and contains the string “hello world”.

The 40,000 repositories is a small enough sample size such that my laptop can complete the script in a bit over 10 minutes. I may come back to this with a larger sample, leaving it to execute over night, at a later time.

And note that the script keeps a reference to all those repository objects, so it uses a fairly large amount of memory. We aren’t setting things to nil to give the garbage collector time to go through while the process is running.

The Environment

Before getting to the results, here’s some details on the benchmark environment:

OSX 10.6 Snow Leopard
2.4Ghz Core 2 Duo
4GB ram
svn version 1.7.8 (r1419691)
git version 1.7.12.1
grit (2.5.0)

Results

And now for the numbers:

  • Creating 10,000 svn repos: 119184.502 ms
  • Creating 10,000 git repos: 120582.207 ms
  • Creating and commiting to 10,000 svn repos: 285041.101 ms
  • Creating and commiting to 10,000 git repos: 223160.437 ms

From this simple experiment, we can see that initialization was only minutely slower with git than svn, which comes as a surprise given the smaller size of git repositories. But we start to see a stronger contrast once committing files was involved, and svn showed to be ~22% slower in comparison. If initialization wasn’t included in those operations, the difference should be even greater.

I should also mention the size of the generated directories. 20,000 repositories were generated with both git and svn, making for 40,000 in total. The combined size of the 20,000 SVN repositories, of which half had our test file committed, is 594 Mb. And git? 278 Mb. That’s less than half the size!

And so given the benchmarks previously available, as well as the results from this simple benchmark, I agree with the majority: a switch from SVN to GIT should help improve performance. It may not be a high priority at this time, but with svn interactions being such a bottleneck under heavy load, it should help alleviate some of the strain. As such, though I’ll continue researching areas where Markus may see performance benefits over the coming week, I’ll keep this transition in mind as a possible goal for this work term. It would certainly be a large task to complete.

Written by Daniel St. Jules

January 28th, 2013 at 5:21 pm

Posted in Uncategorized

Migrating Prototype to jQuery – MarkUs Term Goal Winter 2013

without comments

My long term goal for MarkUs will be to port over our Prototype framework code to jQuery. I have had to do some research on this to find out how complex will this be and what is involved. Here are my findings.

Complexity

Since jQuery has such a huge developer community around it, finding replacement plugins for some of Prototypes features should not be hard. The MarkUs code base will have to undergo:

  • A complete Prototype code refactoring to jQuery. Refactoring javascript_include_tags to include jQuery, modifying Prototype creation code for Modals, Windows, Tabs (Included under the LivePipe UI Framework) and Prototype feature detection code blocks.
  • New plugins (jQuery equivalent) if no other substitutes can be found
  • Tests. It seems that as of right now only Functional and Unit tests are up to date in MarkUs. Acceptance tests may have to be written using Cucumber, in which case we can also include Javascript testing as a part of Cucumber.
  • Documentation. I want to document everything I create, most frequently used methods, and any plugins / extensions used for jQuery.

Major Differences Between Prototype & jQuery Syntax

Dollar Variable Selectors

  • Prototype uses $ for ID based selections
  • jQuery uses $ as a CSS based selector (Equivalent to $$ in Prototytpe)

DOM Ready Event

  • Prototype uses an Event object
  • 2 different ways to do this exist in jQuery

DOM Manipulation and Traversal

  • Different methods exist within each framework.

Events

  • Prototype uses Event class methods.
  • jQuery uses bind, unbind, and various other shortcut methods.

Ajax Requests

  • Different syntax between the two frameworks.

Tasks needed to complete

Going over the source code of MarkUs quickly, here are some tasks I see right away that need to be completed.

Replace UI Elements Created by LivePipe

The jQueryUI library may have to be used in order to replace what was provided by the LivePipe library. LivePipe and associated libraries, such as scriptaculous provided:

  • Tabs
  • Windows (Modals)
  • Dragging
  • Dropping
  • Sorting

As a result of this, some of the basic UI elements such as modal dialogs, draggable lists, tabs, may look just a little bit different.

Port over Prototype Classes to jQuery

Prototype is very OOP oriented and abstracts Javascripts prototype (different from the framework) functionality. jQuery requires you to use Javascript’s prototype functionality to extend jQuery and create your own custom objects.

Replace Prototype Feature Detection

Cases such as the following will need to be ported over to jQuery.

<%# Alert Internet Explorer users of incompatibility %>
      if (Prototype.Browser.IE) {

The Modernizer framework can be used in case jQuery lacks any advanced feature detection methods that Prototype may contain.

Written by Marc Bodmer

January 27th, 2013 at 5:14 pm

Posted in Uncategorized

Meeting Recap – Week 1

without comments

Team is making steady progress. General conclusion was that most of us would be working on Github issues for weeks 1 and 2. Also, it was noted that it would be beneficial if team members started to review other people’s pull requests, so pull requests could be merged faster into master. The wiki pages were noted to be outdated, so if you ever see any outdated wiki pages make notes or edit them. In order to update changes, you will have to clone the wiki repo that exists within MarkUsProject and submit pul requests there.

Daryn will be working on switching over Prototype to jQuery and if time applicable, SVN to GIT.
Oussama will be working on grade entry sheets.

TLDR:

  • Team working on issues for rest of week 1
  • Review other team members pull requests to get changes merged in faster
  • Make notes on outdated wiki pages and update them if possible

Link to IRC Log: http://www.markusproject.org/irc/markus20130123_pg1.html

Written by Marc Bodmer

January 23rd, 2013 at 3:08 pm

Posted in Uncategorized

Punchlines – UCOSP Winter 2013 – Week 1

without comments

Marc

Status:

  • Last week we were at the sprint for the weekend. When I got back, I make 2 changes to pull requests I had submitted, and I wrote blog posts about the sprint and my introduction.

Roadblocks:

  • svn-ruby bindings got into my way when trying to set up MarkUs during the sprint, and I was having a couple problems with git which are now resolved.

Next week:

  • My plan for next week is to tackle a few more Github issues before I start working on my long term goal for the term.

Ian

Status:

  • Got MarkUs up and running.
  • Finished 2 issues relating to compatibility between MarkUs and Rails 3.0.19 and Ruby 1.9.3.
  • Started looking in to how the test framework works currently.

Roadblocks:

  • Setting up a test using the test framework is not very intuitive.

Next week:

  • Figure out how the test framework is working currently.
  • Determine what it can and can’t do.

Daryn

Status:

  • Looking over issue 980 and 91 (related) and discussed plans to work with Marc on Prototype to jQuery and replacing SVN for Git

Roadblocks:

  • Need to consolidate with Severin on decision about issue 980/91

Next week:

  • Planning out the steps to take for transitions of jQuery

Nick

Status:

  • Installed MarkUs
  • Attended code sprint
  • Made 2 pull requests
    • issue 577, which deals with timing out the user, and
    • issue 958, which deals with a JavaScript problem when creating assignments.

Roadblocks:

  • I haven’t done much yet, so I have not encountered roadblocks so far.

Next week:

  • I plan on reading through more Rails tutorials & guides and start looking at the testing framework code.

Alysha

Status:

  • Set up MarkUs.
  • Fixed a bug so that rubric criteria is ordered correctly when uploading and downloading yml files.
  • Fixed a bug so that sorting columns that have html with text (ie: textboxes) is now sorting correctly.

Roadblocks:

  • New to Ruby on Rails, still familiarizing myself with project code base

Next week:

  • Look into and familiarize myself with the remark feature by looking into any related issues on GitHub.

Mike Stewart

Status:

  • I’ve started reviewing Pull 928, to get a sense of the work that has been done on grade entry.

Roadblocks:

  • None.

Next week:

  • I plan to test the code that has been submitted (Pull 928), so I can complete the code review and get it into head.

Oussama

Status:

  • Have become familiar with Rails to a certain extent.

Roadblocks:

  • Still studying the MarkUs code-base.

Next week:

  • Will finalize term objectives during upcoming team meeting.

Mike Wu

Status:

  • Installed Linux and set up MarkUs
  • Documented steps to resolve problems encountered during setup (to be submitted to wiki)
  • Fixed an issue where the Assignment Submitted calculation on dashboard was incorrect.
  • Uploaded group pictures taken at Facebook to Facebook and MarkUs blog.

Roadblocks:

  • Encountered issues during the setup, resolved with the help from Nick and Mike.
  • Continue learning the codebase and Ruby on Rails in general.

Next week:

  • Post setup documentation on wiki
  • Work on adding more information to dashboard, including statistics of assignment scores (#915) and remark information (#938).

Daniel

Status:

  •  Setup Markus on OS X with Ruby 1.8.7 and rails 3.0.x
  • Worked from Friday through Sunday, while flying back to Ottawa. It was a fight to keep my laptop charged, but I managed to fix a few extra issues because of it. The three that I completed at the codesprint related to browser compatibility dialogues and a simple tab issue. Those consisted of issue #658#968, and #617. Aside from those, I also completed fixes for issue #982,  #953 and #415 on Sunday.

Roadblocks:

  •  I’ve yet to be able to build SVN on OS X with Ruby 1.9.3. I experience issues when setting up SWIG.

Next week:

  •  I intend to continue fixing other issues throughout the tracker to become more familiar with the codebase. So far this includes: issue #860 and #63

Written by Mike Wu

January 23rd, 2013 at 12:00 am

Posted in Uncategorized

UCOSP Code Sprint – Recap

with one comment

Hi everyone,

The Winter 2013 MarkUs team had a fun and productive 3 day weekend at Facebook HQ for our educational hackathon. I just wanted to let everyone else on the MarkUs team know what we accomplished, what our future goals are and what each of us plan to be working on for this term.

Sprint Accomplishments

What did we accomplish while we were there?

Friday

The team was mostly setting up for the day. There were some issues happening with the svn-ruby bindings on Mac OS X and Linux, but they were resolved by the end of the day.

Saturday

The team eagerly started looking at issues and making trivial commits to get a hang of Git and Github. A bunch of issues were created, older issues were cleaned up, and we got a feel for how MarkUs worked from the demo Karen gave. The team also got a nice amount of pull requests in fixing previous issues.

Sunday

The last little bit of coding was mostly looking at the pull requests from saturday and fixing any issues that occurred. The team continued to work until the presentations where all the hackathon teams gave an overview of their project.

Winter 2013 Term Goals for MarkUs

What are some of the goals we would like to see get accomplished this term?

Testing Framework – Feature

One of the more important features of MarkUs. This testing framework will allow graders to upload their testing suite to MarkUs that can be used to run student’s code to determine any faults in their programs. The goal here is to fix up remaining bugs as well as code syntax issues.

Remark Requests – Feature

Another nice feature that would be beneficial to MarkUs. This is where students have the ability to submit a remark requests for assignments. A nice feature we can add here is to add a side by side comparison window (original assignment vs remark assignment).

Grade Entry Sheets

Grade entry sheets already exist within MarkUs, but more functionality can be added to them. A couple features we discussed are:

  • Multiple Sections for Students
    • Give the ability to assign students to multiple sections
  • TA Grading
    • Allow TA’s to enter marks

Switch Prototype to jQuery

As jQuery continues to gain popularity (54% of the top 100,000 sites currently using jQuery – http://trends.builtwith.com/javascript/jQuery), we decided that maybe it’s about time we should make the move over to jQuery.

Reasons:

  • The difference between communities is huge
    • Because of the popularity of jQuery, there has been an enormous increase of Stackoverflow questions (jQuery’s 265932 tagged questions vs Prototype’s 2114 questions) and plugins for it. Along with popularity, if students know jQuery coming into MarkUs, that is one less framework they have to learn.
  • As of Rails 3.1, jQuery becomes the default Javascript library.
  • jQuery allows chaining and if used properly, allows for more readable and understandable code.

Upgrade Ruby & Rails versions

Make the upgrade to Ruby 1.9.x and upgrade Rails to 3.2. We also discussed whether or not this should be left for the summer team to complete, as we did not know how complex this would be.

Replace SVN for Git

This is one of the lower priority goals for the term. Git is another version control that has seen an immense popularity gain in the last few years. Few key reasons for this:

  • Git repo size much smaller compared to SVN size
  • Git is faster than SVN
  • Git is a distributed system

svn-ruby bindings are a bit of a pain to set up on some operating systems. Not sure if Git will be any easier, but more research on this topic will definitely have to be done.

Team Roles

What will the team be focusing on for the time being?

Daniel St. Jules – Database issues, schema and performance optimization

Alysha Kwok – Remark requests

Nick Lee – Testing framework

Mike Wu – Remark requests

Mike Stewart – Grade entry

Ian Smith – Testing framework

Marc Bodmer – Prototype to jQuery and replacing SVN for Git

Team MarkUs at Facebook HQ! From left to right: Nick, Marc, Karen, Alysha, Ian, Daniel, Mike S, Mike W.

Team MarkUs at Facebook HQ!
From left to right: Nick, Marc, Karen, Alysha, Ian, Daniel, Mike S, Mike W.

Written by Marc Bodmer

January 21st, 2013 at 4:30 pm

Posted in Uncategorized

The UCOSP MarkUs team hard at work

without comments

markus_facebook

If we weren’t having so much trouble with svn-bindings today, we would really be having fun at the UCOSP code sprint at Facebook headquarters.

Written by Markus

January 18th, 2013 at 6:53 pm

Posted in Uncategorized

Introducing the Winter UCOSP team

with one comment

Here is some information (and hopefully pictures) of the team that is working on MarkUs this term:

Marc Bodmer

Hi,

My name is Marc Bodmer and I am a 4th year student finished up my last term at the University of Guelph. I am into front end web development, working on side projects with new web technologies at every chance I get. Along with MarkUs, I am also working on another project related to conference planning. I have written a short tutorial book on Ember.js called Learning Ember.js that will be released in February, 2013. I love attending conferences and meetups. In my spare time, I play squash, rollerblade and snowboard.

If you want to find out more about more or find out my accounts on various social networks, you can visit my website.

Daniel St. Jules

Hi, my name’s Daniel St. Jules, and I’m a 4th year student at the University of Ottawa. I joined MarkUs with an interest in working on a larger Rails code-base, and because I really enjoy developing web-based projects. Some of my projects can be found on http://danielstjules.com/ and on my Github. Aside from development, my hobbies include snowboarding and basketball.

Alysha Kwok

Hi everyone,

My name is Alysha Kwok and I’m finishing up my last term of Computer Science at the University of British Columbia. I am most comfortable working with Java and have worked on mobile applications (iOS and android) on co-op and course projects. I am new to Ruby on Rails but am eager to learn. My hobbies include graphic design, ballroom dancing, and yoga.

Here’s a picture from the code sprint at facebook so you can put a face to the name =]

Taken at Facebook, Palo Alto

Taken at Facebook, Palo Alto

Mike Wu

Hi, my name is Mike Wu, and I’m in my last term of undergraduate studies at the University of British Columbia. I grew up in Beijing, China, and I have been into computers and technologies ever since I was a kid. From co-op and courses, I have become familiar mostly with Java and desktop application development, so this project is a great opportunity for me to learn more about web technologies through Ruby on Rails.

My other interests include sports (especially basketball), photography, traveling, and music. I’m hoping to learn a few tricks to make my website more awesome! 😀

Vancouver 2010 Olympic Torch Relay. Prince Rupert, BC.

Vancouver 2010 Olympic Torch Relay. Prince Rupert, BC.

Ian Smith

Mike Stewart

My name is Mike Stewart, and I’m in my fourth year of Software Engineering at the University of New Brunswick in Fredericton. I’ve completed 4 co-op software development terms at different companies, mostly working with Java and C++,  as well as some web development. I’ve also developed apps for Android and Blackberry and have put together a few websites over the years, though I’m completely new to Ruby on Rails. I look forward to working with this very talented student team, and learning even more about web development!

Other than development, some of my interests include skiing, SCUBA diving, and volunteering with a few organizations.

Nick Lee

Oussama Ben Amar

Daryn Lam

Hi everyone,

My name is Daryn and I’m in my last year at UofT studying computer science. I’ve worked on MarkUs in the past summer so feel free to email me directly if you have any questions (daryn.lam@gmail.com). I had an internship at IBM last year, also working with Ruby on Rails, developing an information management system that organized events and data which were crucial to my team. On my off-time I like to get active and play sports such as basketball, ultimate frisbee, and dragon boat. Any sports fans out there? Anyways, I hope to get to know everyone better over IRC even if I don’t get the chance to meet in person.

Daryn =)

Written by Markus

January 18th, 2013 at 4:45 pm

Posted in Uncategorized