Tuesday, September 30, 2008

Review on StackOverFlow

Overview:
This week I took a look at this programming website (http://stackoverflow.com/) and I tried to see what is the purpose of this website and how it can benefit me. As I continue to learn about all the available resources and tools in programming, I need to evaluate and note down those that are helpful for me currently and those that can help me in the future. StackOverFlow is a simple website that follows the same concept as (www.digg.com) and (www.reddit.com) where users can post information and others can rate it up or down and post comments. StackOverFlow takes this and message board concept to provide users with access to many other helpful programmers.

The interface is pretty straight forward. Questions are listed by the date it was posted and there are counts on views and replies. The questions can also be categorized by subject which is helpful when looking for questions and answers that you may have. Reputation is also a nice feature to allow people to see who are knowledgeable in each subject. I particularly love the user profile because it gives a history of all the questions and answers a person has given.

Conclusion:
StackOverFlow seems to be a very useful tool for those that are stuck and need a push. A good reputation on this website can also help improve ones professional persona. I would recommend it to friends to browser through when there are down times to learn more. I would use it to help broaden my knowledge and to find answers to specific questions.

Wednesday, September 24, 2008

Ant, PMD, FindBugs, and Checkstyle

Overview:
With the introduction of Ant, PMD, Findbugs, and Checkstyle, we are given the task to test these new tools and to observer the different types of errors we can get. The stack code comes with a few errors to show us how errors are displayed and resolved.

Reaction:
There has always been a sense of fear when I think about programming and it becomes more apparent when I'm faced with more complex issues. I always attribute my poor work habits towards my procrastination and this fear. It is very demoralizing for me when I hit a brick wall and I'm resorted to asking for help. I am starting to feel more comfortable with programming now because the only what I can remove this fear is to work on programming more.
This exercise took me around four hours complete in a spread of two days. There were a few issues with ant not seeing my environment variables, but I was able to resolve it by deleting and re-adding the variables. The corrections in stack was fairly easy, except for the pmd error. I had to google more into Set interface because the example given was unclear for me. I had to walk away from the computer a few times to reset my brain, but in the end I was able to complete all three tasks.
Corrected Stack

Monday, September 15, 2008

CodeRuler

Overview:
After going over everyone’s CodeRuler code in class, we are given the task to example another team’s code to find any inconsistency with the coding standard of “The Elements of Java Style” and “ICS-SE-Java”. By examining other team’s code, I would be able to point out proper coding faster and to learn how others solve the same problem.

Review:
The JavaDocs in Kaneshige and Ly's code are clear and concise. It gives a short explanation of what the code does for each class or method. It helped me locate the exact code that controls the knights, peasants, and production. The methods are created and listed in a logical matter following the author’s hierarchy.

Conclusion:
Over all, the code was nice and clear. The strategy for the decoy peasants is clever and effective for simple “hack and slash” strategy. Production strategy seems to run into problems if the enemy goes after the peasants first. One thing that particularly caught my eye was when I was looking for improper coding format. I was able to see two distinct style of coding. For short codes, this would not matter, but I can see the importance of following one style when there are larger codes to review.











































FileLinesViolationComments
MyRuler.java7EJS-46@author and @version
MyRuler.java20, 54, 131, * EJS-56Documentation on precondition and post condition
MyRuler.java15, 18EJS-62End line comment
MyRuler.java49, 50, 51, *EJS-64Label highly nested structures
MyRuler.java59EJS-69Smaller methods
MyRuler.java105, 114, 148, *EJS-5Else statement should be on new line

Wednesday, September 3, 2008

New Beginning

Welcome to my blog.
I hope you will enjoy this journey with me as I develop my software engineering skills. This blog will mainly focus on the projects and experiences I have in ICS 413. I am excited in expanding my portfolio and learning new things to expand my set of software engineering tools.

The first assignment for the class is to program a simple Java function called FizzBuzz. This function will count from 1 to 100. If the number is a multiple of three, I should print out "Fizz". If the number is a multiple of five, I should print out "Buzz". If the number is a multiple of both three and five, I should print out "FizzBuzz". And finally, if the number does not fit any of the above it will just print the number.

The purpose of the assignment is to brush up on our Java skills because our use of Java are very limited after ICS 211. By refocusing on Java, we can build upon our foundation and to experience software engineering in a larger scale.

After installing Eclipse, I went through the short tutorial and started programming FizzBuzz. I mainly used Notepad++ when coding and I can see the big difference immediately. It was very nice for Eclipse to set up all the classes for me and to watch all my brackets. The only problem I have so far was to locate the compile/run button. Everything was straight forward and I'm looking forward to finding more tools in Eclipse to use.


public class FizzBuzz {

/**
* @param args
*/
public static void FizzBuzzFunction (int n){
for(int i = 0; i <= n; i++){
if((i % 3 == 0) && (i % 5 == 0)){
System.out.println("FizzBuzz");
}
else{
if(i % 3 == 0){
System.out.println("Fizz");
}
else{
if(i % 5 == 0){
System.out.println("Buzz");
}
else{
System.out.println("" +i);
}
}
}
}
}

public static void main(String[] args) {
// TODO Auto-generated method stub
FizzBuzzFunction(100);
}
}