15-0429_p2_software.pdf

5
15 – 0429 DPS – MODERN INDIAN SCHOOL Introduction The code being reviewed is for our most scoring bot BETA Bot which collects the gold poms in the cave and stores them in the Starting Box using a simple claw which can grab and lift. The program was created by Aaranya so Abhiram and Siddhant are performing the code review. The review was conducted on 04/03/2015 Best Practices Checklist Code contains functions for organization. Code contains a brief comment on the use of the function. Code contains comments for every Task performed by the robot. Code contains comments on each function’s arguments. Code contains comment on each function’s return value. Code contains descriptive variable names. 0, 1, 2 are the only unnamed constants. Code shows flow of control. No Commented block of code. We assigned specific constants for specific functions. This would help us not to use the constants again and keeps the code neat and clean. This helps to prevent errors. All other minor and unnamed constants values are noted in the code on the side using comments as we don’t use many constants in our program. And also as our robot relies on sensors, the return value will change, so we cannot predict and state the return values in comments. YES YES YES YES NO YES NO YES YES

Upload: boris-pocus

Post on 17-Dec-2015

215 views

Category:

Documents


0 download

DESCRIPTION

softwar

TRANSCRIPT

  • 15 0429

    DPS MODERN INDIAN SCHOOL

    Introduction

    The code being reviewed is for our most scoring bot BETA Bot which collects the gold poms in the cave

    and stores them in the Starting Box using a simple claw which can grab and lift. The program was

    created by Aaranya so Abhiram and Siddhant are performing the code review. The review was

    conducted on 04/03/2015

    Best Practices Checklist Code contains functions for organization.

    Code contains a brief comment on the use of the function.

    Code contains comments for every Task performed by the robot.

    Code contains comments on each functions arguments.

    Code contains comment on each functions return value.

    Code contains descriptive variable names.

    0, 1, 2 are the only unnamed constants.

    Code shows flow of control.

    No Commented block of code.

    We assigned specific constants for specific functions. This would help us not to use the constants again

    and keeps the code neat and clean. This helps to prevent errors. All other minor and unnamed constants

    values are noted in the code on the side using comments as we dont use many constants in our

    program. And also as our robot relies on sensors, the return value will change, so we cannot predict and

    state the return values in comments.

    YES

    YES

    YES

    YES

    NO

    YES

    NO

    YES

    YES

  • General Code Analysis

    Reliability

    While meeting with the Building team we decided that our complete bots would be based on sensors to

    keep all movements autonomous. Since our testing was done on tiles (Not same as the Botball table)

    there was a high margin of error. So we decided that our bot would use the reflectance sensor and use

    line following programs to reach the cave and use touch sensors for aligning to the wall.

    The present code is quite reliable. While testing the bot we noticed that the bots accuracy and

    functioning changes with the background. So to increase the reliability we will increase the use of

    variables for threshold values so that it can be changed on the day of competition to the background

    conditions like lighting.

    Maintainability

    While most of our code was written by Aaranya and Siddhant, the coding team had accepted to read the

    code once every 3 meetings. Since it was read through constantly there was no problem while changing

    the code or updating it. We also agreed on using Dropbox to share the codes and also as backup. The

    start of the code contains comments on the latest revisions in the code with the name of the person

    who changed it. Every hard to understand codes were commented with an explanation for future use.

    The only way to improve on maintainability is by using more comments, not unnecessary ones though as

    it might be confusing later on. Every statement should be accompanied by a comment briefly stating

    what is going on. The coders must make it a habit to document the processes, movements and

    statements in the form of comments on the side. All unknown values and numbers should be

    documented in comments stating what their role is.

    Effectiveness

    The code completes all the assigned tasks. What our team lacks is in effectively completing the tasks. For

    this to happen, our code needs to be simple and clean but effective and fast. Writing comments is one

    way to do so. Also our bot should avoid unnecessary movements which might change the actions of the

    robot in the incorrect manner.

  • Specific Code Analysis

    The following excerpt is in support of RELIABILITY. The code is explained

    as comments in the code.

    The following code is for our bot to reach the cave and then collect the gold poms.

  • Our basic principle was to make the bot autonomous to its extent. As you can see from the excerpts

    above that our robot uses many sensors to complete the tasks. Also for adapting to lighting conditions

    on the board, we used variables for the threshold. In this we can get rid of any possible errors or flaws.

    We also try to keep the program simple.

    --X-X-X--