Monday, October 31, 2011

Hawaii's Energy Future


            Energy has always been a problem due to the source that it comes from. People have relied on oil to power up their place of living, cars and many other things. Unfortunately on Hawaii, most of the energy depends on the burning of oil. This is the reason why it is of utmost importance to introduce new sources of energy so Hawaii can move away from depending on oil as the major source to generate energy.

            During the weekend I came across videos at this site https://sites.google.com/site/ics314fall2011/modules/overview-of-energy-in-hawaii, which not only allowed me to understand more about energy, but also understand what is currently being done. Before I viewed the videos I thought not only Hawaii depends on oil as their major source for energy, but also other states. Thanks to the videos I understand that in other states the dependency on oil is much less than in Hawaii. One of the reasons is because mainland has a variety of alternative sources for energy that are locally produced.  Having alternative sources of energy not only reduces the dependency on oil, it also helps reduce the cost (e.g. electricity bill), and even help with keeping a clean environment.

            Fortunately, Hawaii has an abundance of almost all of the natural alternative resources for energy. It includes sunlight, water, wind and other sources. Of all the sources the cleanest form is sunlight (solar), and wind. However, the source can be unreliable because sunlight and wind depends on weather. If it happens to be a rainy day then there won’t be sunlight to generate the energy. Same problem also applies to wind energy because if it is not windy then the turbines won’t move and generate the energy.

            Even though the alternative sources won’t completely eliminate our dependency on oil, but at least it can reduce the amount we use. Besides using alternative sources of energy, one important factor to reduce our dependency on oil is to use less energy. How do we use less energy? The answer lies in our habit of energy usage; we have always got used to leaving devices on even when we don’t use it. On a daily basis this can sum up to costing a lot of money just for leaving the device on. Therefore, one of the videos stressed to shut off devices that are not in use.

            To conclude, I believe these videos are trying to educate people of what we are facing and what our descendants will be facing in the future if nothing is being done. People always complain about our dependency on oil, but complaining is just not enough, actions must be taken in order for changes to happen. Therefore, it is of utmost importance for our state to invest in alternative sources of energy. It might be expensive now to start the facilities (e.g. solar farm/ wind farm), but in the long run it will reduce the dependency on oil and lower the cost. Since our state doesn’t have a super grid, like in the mainland, to deliver energy then our other way is to utilize what our islands have to generate the energy.

           

Friday, October 21, 2011

Midterms Already

1. Why should we name our methods starting with a lowercase word and follow by a capitalized first letter for each subsequent words?
Answer: The lowercase word is to differentiate between the invocation of a method and a constructor of an object. The capitalized first letter acts as a visual cue to separate the words within the method name.

2. Why is coding stands important?
Answer: Coding standards is important because it provides a standard readability no matter how many programmers worked/read the code. It can also improve understandability by using basic standard documentation, and improve maintainability to the code.

3. What is the traditional approach of release numbering for a project? Describe the advantage and disadvantage of this approach.
Answer: The traditional approach to release numbering is to use the format of MM.mm.bb where MM is the major release number, mm is the minor release number, and bb is the bug fix release number. The advantage of this traditional approach is able to allow us to compare the degree of change of the software. The disadvantage is that a programmer will easily forget to update the number since it has to be manually set after every change has been made.

4. What does subversion means?
Answer: Subversion is an free version control software that manages files and directories as changes are committed by programmers.

5. What is the difference between high level and low level quality assurance?
Answer: High level quality assurance checks to make sure if the system satisfy the three prime directives. Low level quality assurance checks if the system good testing cases, conform to coding standards, any known defects, and satisfy requirements of running as the programmers intend it to run.

Thursday, October 20, 2011

Robocode SVN

            Subversion (SVN) helps programmers to manage files and directories and being able to view the history of what changes have been made. It also allows the recovery of older versions of the file in case there is a mistake in the modification of the file on the system.

            Recently I had a project of developing a robot based on Robocode to prepare for the competitive robot competition; which all came to an end on October 14, 2011. After the competition the project needs to be uploaded online for other people to contribute their ideas to. The initial step was to create a project, in other words host it on Google; mines can be found at the following link Destroyer. The next step would be to upload the project, but it’s not just accessing some link or upload button on Google.  It would require the use of an software that allows user and committers (people who commit changes to the project) to submit changes to the project in a safe way.

            There are many SVN softwares for different operating systems. Since my system is Windows I used this software call TortoiseSVN. With this software I was able to upload my project by first establishing a link to a folder where I can download my project to. After I modified my code and other files in the project I just had to commit the changes back to the project on Google.

            I learned that by hosting a project and using SVN softwares, people can easily download the project, modify the code or anything that is necessary, and then just commit it back with few clicks of the mouse button. I also learned that one can view the changes committed by the committers so that it can be trace back to who committed a version that is non-executable.  

Monday, October 10, 2011

Destroyer Robot


            For this particular project, the requirement is to create a robot that is able to compete against other sample robots from Robocode. The list of sample robots includes the following: My initial plan for this competitive robot was to create one that can avoid the enemy’s attack and stop at a certain point to shoot at the enemy. Unfortunately I was not successful, instead I used a plan that had my robot follow the enemy and keep shooting at the enemy in a brute force way. That is why I named the robot Destroyer; not only does it try to destroy the enemy, but it also can destroy itself.

            My strategy for moving the robot is to have it move around the battlefield by following the enemy. The way it targets the enemy is to scan for an enemy robot, and if it lost contact it will scan for another enemy robot. Once it locates the enemy robot it will move towards it and attempts to shoot at the enemy. Initially the robot will shoot at a fire power of 100, when my robot comes into contact with the enemy or get hits by an enemy bullet then it will fire at a power of 200.
           
            Based on the test results by executing the robot in the Robocode app I notice that it can defeat both Tracker and RamFire at certain times, and Corners robot in all 10 rounds. As for SittingDuck, my robot can always destroy it since it is always sitting at a certain spot. Unfortunately for the other robots, it was able to shoot at the enemy but it never got to destroy the enemy. The main problem of the design I had was start shooting at the enemy once the enemy has been located. In the future I would redesign it to scan for an enemy and have my robot stay at that location, then have gun move relative to the enemy’s distance and shoot at the enemy.

            The approach I took to test the robot is to test if the bullet power is greater than or equal to 100. This is to ensure that it actually fires at a power that can have a possibility to beat an enemy in certain amount of rounds. I also tested if my robot is alive or not against RamFire and SittingDuck. Of course I tested to see if it is not true that my robot lost or won in some rounds against RamFire and Tracker.

            To conclude, this project was a good chance for me to learn how to incorporate code from the previous the previous project and design a robot for competition. I also learned that in software engineering, testing is the most important because, we as programmers need to ensure the product is without errors. If in the future I have a chance to redesign the robot I will perform more test cases and research more on the API of what other methods the Robot class have to assist in testing for errors.