Coding standards are very important in programming because it creates a consistent environment to work in which in turn improves readability, allowing for easier debugging, maintaining, and extending. If it wasn't for coding standards, programmers would be responsible for coming up with their own "style" and have to figure out others' style. One would get caught up in the little details and waste time that would otherwise be spent on programming.
The coding standards I used for my revised version of Robocode robots include:
- The Elements of Java Style
- ICS Coding Standards
- ICS Robocode Standards
One problem I had with coding standards while using others code however, was the first rule in The Elements of Java Style of "Adhere to the style of the original." For my Tracking robots I had modified the sample Tracker robot. I did end up changing some of the documentation for the borrowed code because it did not follow the coding standards I was using even though part of the standards was to adhere to the style of the original. I felt that I was taking a small enough amount of code that I could easily change.
Link to my revised Robocode robots: link
0 comments:
Post a Comment