A repository for HW4 of the JCE Software Engineering Course
In this homework we are exercising Test Driven Development. In this software development method code is written through the following cycle: Test (Red) -> Code (Green) -> Refactor. See lecture slides for more details and resources. We will also use git to document the process.
You can either follow the given problem or ask the course team for another problem, e.g., from the Kata page in the lecture slides.
This excecise was prepared in Honor of Or A. R.I.P who died during the 2015 Nepal earthquake.
Let's take a look at Ushahidi, which is a platform, services and tools for geographical crowd sourcing, e.g., for coordinating rescue eefforts following a natural crisis (Nepal). The Crowdmap - Basic Features, are:
- Create a post
- Create a Map
- Find Posts
- Find a Map
- Collaborate
- Find a Person: This feature will be added at a later date. Stay Tuned
- See all the latest Posts
- See all the latest photos
- Map view
- View a post by Location
Since they state that there is a missing feature, we are going to "implement" it! For a start we do not assume dependecies on exising code rather we will discover and implement only the necessary dependecies.
- Given a person name, return all posts (of a map) containing it’s name (in any of a post fields), example:
- Input: "Or A."
- Output: ["I met Or A. at Chabad house Bangkok", "We found Or A. R.I.P at Langtang valley"]
- Given a name, check if the map includes a location information (place or geo. location), example:
- Input: "Or A."
- Output: True
- Check if there are map inconsistencies, e.g., the same name with different locations. Example:
- Input: nepal map (with content as above)
- Output: True (since the name appear in more than one location)
- To start, fork the exercise repository (For later updates: first add a remote to the upstream repo and sync with a pull:
git pull upstream master
). - Clone the repository to your workstation.
- Make sure you have a test runner setup working, e.g. by running:
python test_find_person.py
- Modify/add files (in the repository directory) to complete your solution.
- Each TDD phase needs to be committed separately with a suitable message that tell the TDD stage and achivement, e.g. “RED: Test for finding a name”.
- You can also do it with pair programming, but you must switch roles between RED and GREEN, including commit author (see here, there is also a fun Eclipse game to guide it).
- Please don't commit compiled and project files.
- You can suggest other features by editing the requirements above.
- Push/sync the changes up to GitHub.
- Create a pull request to the original repository to turn in the assignment, don't forget to mention your pair.
(A pull-request screencast demo - done for another course)
Submit a pull request by next next Tirgul, this time you don’t need to use the regular submitting form, but you can if you must 😄).
Requirements: correctness, completness, code coverage, code quality, TDD cycle including Refactoring, meaningful commit messages.
We will give feedback through the pull-request system.
We will reserve one more week for improvements (please leave a comment for every change you do after submitting the PR).
Good luck!