Tuesday, January 25, 2011

share: 1/16



This is the Midifighter. It is an awesome controller available on the web at midifighter.com . I'm asking for one for my birthday. There are many videos on youtube of awesome individuals using the Midifighter to control several songs at the same time. One of my favorite mixes is a mix of "Renegade Master" by Fat Boy Slim and Boy 8-Bit. It is an awesome mix, and I suggest looking it up if you have some free time. Until next time, my birthday is next week!

Frank

Reflection 1/16

This week we worked on Arrays. I did very poorly on the array quiz. I understand the basic concept of arrays, that they store information at locations. This kind of reminded me of my biology class, where we learn about the locus of genes of chromosome. In a joking way:

int[] chromosome = {1,2,3,4,5,6,7,8,9,0};

Say the gene for blue eyes is the number 2. This number is stored at location 1 on the chromosome (array).

out.print(chromosome[1]); //expresses the gene

So then it would print:
2(expressing blue eyes)

That's all for this week.

-Frank

Wednesday, January 12, 2011

Reflection winter break :: SHARE

Over winter break, I went to Israel with my dad's side of the family. It was a blast, and an experience I will never forget. We first went to Tel Aviv, the most modern part of the country. It felt like I was in the middle of New York. Next we bussed our way up to Haifa, to the beautiful gardens there. A whole mountain was made into an amazing landscape by the Bajai, one of the many religions with a holy place in Israel. Then we went to The northern tip of the country. We stood at a point where Lebanon was visible, and it looked beautiful. There are many border issues between those countries, so we made sure to keep our distance from the fence. After that, we went to Jerusalem. The old city was so well kept, it was amazing. The huge castles and fortresses we saw (built by Herod, a famous and crazy King) were astounding, and it was awesome to look out at the newer parts of town from there.

Sunday, January 9, 2011

Blog Entry January 9: Reflection on Class

This week, we worked on GridWorld. GridWorld is really not hard for me. I managed to get the "Z-bug" after many tried attempts containing many, many lines of unnecessary code. The first thing I tried was just having one integer that would determine how the bug would move next. It worked, but was about 70 lines longer than it needed to be. It ended up needing an integer to tell it what side it was on. I finally got it to work, and my success made me very happy. One of the reasons i like programming are that when I achieve success after a lot of work, it makes me really proud. Although GridWorld doesn't make me think quite as hard as some of the labs have in the past, it's still interesting to challenge myself to get a desired outcome from a code.

Friday, December 10, 2010

12/10 Blog Reflection

This week we worked on for and do while loops. For loops set the parameters like this:

for(int x = 1; x<=4; x=x+1)
{
System.out.print("run");
}

The section closest to the "for" (x=1) is setting the initial value of the int x. The next part, "x<=4", sets the value that once reached by the designated variable (x), makes the loop stop. The last piece, "x=x+1" makes it so that every time the loop runs, the variable x increases by 1. The output would be

run
run
run
run

This is because once the value of x hits 4, the code runs once and then stops. The value of the x, displayed in the run is:

(1)
run
(2)
run
(3)
run
(4)
run

Do While loops are different from for loops because for loops check the requirements before running. Do Whiles, on the other hand, check the requirements after running. The approximate code that is similar to the above code is this:

int x = 1
do{
System.out.println("run");
x++;
}while( x<=4);
The output of this would be:

run
run
run
run

with variables shown:

(1)
run
(2)
run
(3)
run
(4)
run
(5)

This code, although the output is unchanged, shows the difference between Do While loops and For loops. The Do While checks the criteria after it runs, while the For Loop checks before.

One of the main problems I have is distinguishing where I should use Do While vs. where I should use For Loops. I think that you should use Do While when you want the code to run at least once. For example, in the "PasswordCheck" lab. It had to ask you to enter your password at least once before it could consider whether your response was correct or not. The code for that was very difficult to write. I think that For Loops are simpler and easier to write than Do While, which is why I employ them more frequently in my code.
For loops are probably one of my favorite parts about programming. I really get it. I like having one line of code to make many instances of things. Using input with certain loops is really easy as well. This was another interesting look at the possibilities of shortening code, and making it easier to code faster and more efficiently. I really like do while loops because the code runs at least once. The one lab that we did called "PasswordCheck", I thought, was really interesting, as a password is something actually useful and until recently we hadn't been doing that many things that were practical. I figured out the lab in no time. For a correct password, the computer would print "ACCEPTED" and for the incorrect password it would print "DENIED". It was a fun program to write.
This really made me think about how our programs could be implemented. We have been doing things that have not seemed as real to me as a password check. One of things I really enjoy is the graphics labs we do. More recently, the "Random Colored Boxes" lab was one of my favorite yet. I really enjoyed making something that actually looked cool. Greg Lyons, one of the smartest people I know, managed to make the four seasons in each corner of his random color box. It was impressive, to say the least. While I did not achieve anything like that, I did mess around with making the colors lighter or darker. I really enjoy using For Loops, so Nested For Loops were an obvious next step in my programming learning.
I wonder what else we have to learn about graphics and input. The rock paper scissors lab that we did really intrigued me. In class, we had actually made a functioning game. Sure, the game was based off of crude booleans and input, but it was still fun (maybe it's just fun to see your code work!). My friend Zoli made a really cool snake game, and Tron game using Java (may have been JavaScript, actually). I was very impressed, and asked Zoli to show me how to do what he did. He just laughed, and told me I had a lot to learn about programming before I could do something like that. I can't wait to learn all that I can about Java and to be able to program at that level


This port is a revamp of a post reflection 11/21 (http://frankblogfrankblog.blogspot.com/2010/11/reflection-1121.html)

Thanks for reading!
Frank

Tuesday, November 30, 2010

SHARE 11/21

This thanksgiving, I am going to have my mom's family over to my house. I cannot wait for thanksgiving, as it is my favorite holiday. Nothing is required except for eating good food, hanging out with cousins, and being lazy (at least at my age!). Turkey is one of my favorite foods, and I also really like pie (I don't think there are many people that don't). The break from school is nice too. A little sleeping in can really help a lot. I kind of miss the thanksgiving parties we would have in elementary school. We would spend a day of school just playing bingo and eating candy the teachers would give us. Being a little kid was fun, but having responsibility is nice. I am tasked with washing all of the dishes after thanksgiving is done, and I also have to look after 5 children under 8. Yeah, thanksgiving is going to be a blast.

Sunday, November 21, 2010

Reflection 11/21

This week we worked on while and do while loops. This was another interesting look at the possibilities of shortening code, and making it easier to code faster and more efficiently. I really like do while loops because the code runs at least once. We did a lab called "PasswordCheck" and I thought it was really interesting, as a password is something actually useful and until recently we hadn't been doing that many things that were practical. I figured out the lab in no time. For a correct password, the computer would print "ACCEPTED" and for the incorrect password it would print "DENIED". It was a fun program to write, and I can't wait for more challenging labs to complete.