This site is an archive; learn more about 8 years of OpenHatch.

[OH-Dev] Proposed theme for diffpatch mission

Asheesh Laroia asheesh at asheesh.org
Mon Jan 2 20:55:51 UTC 2012


As per https://openhatch.org/bugs/issue641 , the diff/patch mission needs 
a plot, also.

Karen suggested we keep the food theme, and I like this idea.

Background
----------

This training mission is live here: 
http://openhatch.org/missions/diffpatch/

Learning objective: The student should, after finishing the mission, be 
able to use diff and patch to modify single files and full directories.

For an activity, we have them use diff and patch. For the assessment, the 
user submits files that we check with some Python code in the backend.

Suggested plot
--------------

"You are a big fan of pancakes. Through this training mission, imagine you 
maintain a recipe book of pancakes. Your book has become a fan sensation: 
it has garnered a community of adoring fans, willing to send and receive 
modifications to your recipes through 'patch' files.

In this training mission, you will learn how to create and apply 
patches."

For the "Patching individual files" step:

In this step, we tell you that someone submitted you a patch for a 
recipe, and we ask you to apply the patch locally and upload the resulting 
recipe. I imagine we'd say: "Someone fixed a recipe of yours so 
that it includes the temperature to set the oven to."

For the "Diffing individual files" step:

In this step, we tell you that someone wanted to know what changes it 
would take to double the recipe. So we tell you take all the numbers, and 
double them.

For the "Diffing entire directories" step:

In this step, we tell you that someone wanted a version of the 
recipes for a British audience, where "eggplant" is replaced by 
"aubergine".

For the "Patching entire directories" step:

In this step, we tell you that someone submitted a change set that fixes 
your capitalization across a few files. It would behoove you to accept 
these changes. However, you have to fiddle with "-p0" "-p1" options to 
make it work.

Once you have applied the patch, we ask you to upload the resulting 
patched files as a tarball.

Thoughts?
---------

As always, say what you think. (-:

I think if we are careful when building the implementation, we can make it 
so that there is no strict dependency between different stages of this 
training mission. (Perhaps each one should just start out with a link that 
says, "Download this tar file and work from it.")

If we like this cooking analogy, we could perhaps go through and apply it 
to the tar mission also....

-- Asheesh.


More information about the Devel mailing list