Wednesday, September 30, 2009

A Nightmare for a Programmer

Anyone can write the best code that they can, but there will always be something very small that could mess up the whole program. The one nightmare for a programmer is a program that was written in one hour but still being debugged for three hours. Any programmer or ICS student knows what I am talking about. But what I have learned about Ant has helped tremendously in making sure my code is correctly made.

In a workplace, having a standard for everything can keep the workplace safe, quickly done, and easily understood by others. Formatting code helps greatly for others in the workplace to understand your code, but what about the world? What about other platforms that want to download the program that you made on your own computer? This is where the program Ant comes in. Ant is a program that contains a bunch of xml files that can check your program and the build of your program. It can check the style of your code and prompt you for every line that is incorrect. Also, it can look for bugs which check your code for incorrect inputs. The most important thing that Ant does is create a file that could be run on any pc.

When I started this program, I found that the style of my java file had a bunch of errors. What was great even though it had a lot of errors was that each error said what was wrong and where it was. It took me a while at first to figure how to correct some errors but they were easy. Most of my errors was when I was commenting about @params. But after fixing that and some whitespace my program was fine. Also what was hard was correctly assigning the titles for the xmls. I had to find each title and change it to mine.

I you would like to learn about my new Robocode file click here.

No comments:

Post a Comment