Monday, September 14, 2009

Meeting the standards while setting the standards

When I took my first programming course a few years back. I use to think "why do I have to format my code to the professor's way? As long as I can read my code and it does what it's suppose to do, it should be fine." Boy, was I naive back then. As the programs get more difficult, I was having a harder time debugging my code. And when asking classmates for help, it took them a very long time just to follow my code and find any errors.

The point of me telling this story is that if you ever want to a real programmer and be able to write codes with other programmers, you need to follow a coding standard. The point of setting standards and meeting these standards is so that everyone is on the same page. There are technically no real "set" standards that everyone MUST follow, but there are a lot of general guidelines that most programmers follow.

For our Robocode project, we follow the following three guidelines(standards)



By following these standards, we are able to easily follow and edit codes that are written by other classmates. In the real world, writing code that only you can read don't set you apart for the others. Its writing codes that everyone can easily read and follow that makes you special. So be meeting the standards, you are setting the standards...

Here is a link to my revised codes following these standards...

0 comments:

Post a Comment