-
Notifications
You must be signed in to change notification settings - Fork 4
Swe cleanup exercise
fomics edited this page Jul 8, 2013
·
4 revisions
There are a number of options which you should recognize from the GIT lecture:
clone: create your local copy or "clone" of this repository
--recursive: indicates that this repository and all of its submodules should be cloned.
--b BRANCH_NAME: clone the branch with BRANCH_NAME
SWE_exercise: specify a non-default local directory name (default would be "SWE")
The "exercise_mv" branch is a slightly "dumbed down" version of the code, which has considerable room for improvement. Your job is to polish the code to help understanding and improving it. At this time the goal is not speed or functionalities, so it is not necessary to compile the code now.
Look at the code in swe_simple.cpp
. Is it understandable? Is well commented? Are the meaning of variables obvious? Are the code pieces well modularized? Is the intellectual property attribution clear and license of use well stated in the code?
To answer yes to these questions, do the following:
- Change non-descriptive variable names to names that make clear the variable function
- Learn how to comment, using Doxygen, functions and variables
- Comment the variables definitions and the main functions in
swe_simple.cpp
- Add the following code to
CmakeList.txt
to automatically generate html documentation withmake doc
# Make documentation
find_package(Doxygen)
if(DOXYGEN_FOUND)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile")
set(DOXY_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile")
endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile")
add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${DOXY_CONFIG})
endif(DOXYGEN_FOUND)
- Remove and put in a file by itself pieces of code that seems independent. Modify
CMakeList.txt
if needed. - Put appropriate license/copyright in the code.
- Update GIT