Monday, December 6, 2010

Trying to catch up.....for loops

well while I was taking a small little break from doing blog posts (which I would not recomend anyone else doing), I was learning about various loops and how to use them in order to accomplish a wider rang of tasks with less code. One of these loops include the for loop. A for loop is statement that outputs something as long as the variable being used does not supercede its limit. What a for loop looks like is
for (x=(int);x(</>/=)(int);x+-(int)){

do something();}


what this does is repeat do something until x has reached its limit. at the end of each loop cycle, x is incremented. if it weren't for the incrementation, the loop would go on forever with out stop.

personally, i love these loops. They, with if statements, replace all other code learned at the beginning of the year. infact, i wish that we were taught this first instead of the step by step procedure. 

Tuesday, November 2, 2010

the if/else statements

a continuation of IF statements, the if/else statements make everything more organized and easier to read. Before if I wanted more then one result from a variable I would've had to write more then one if statement, for ex., if        (  t= = 3){ out. print.ln(........) / if (t>3){ out.println(....)
with the else statements, i can write this same code as if (t = = 3){ out.print.ln(....) else out.println(.....). This will make everything much easier when it comes time to start writing complicated programing. I had some trouble with the labs though.
 Along with if/else, we also learned how to compare strings. there is code to see if the string words are the same, what the difference in ascii values are, and can even replace every letter in that string with something else. The only problem I've had with this was with the word sequencing lab. IN that lab, we had to find out if the word goes before another word. At first, words whos first letter was different from the second word's first letter would be put first, but when they have the same, I got bad results. 

Friday, October 29, 2010

This week of if statements

so this week were are doing IF statements. These I can tell will be pretty fun. If statements basically give code life and more options than just a one-way code. For example, in gridworld, a character can move anywhere it wanted despite other objects occupying the space. But with the application of if statements, one can make it to where the character can't move anywhere because an object is in it's way. learning how to do if statements wasn't so hard, i mean the whole logic behind it is "if it does(n't) do this, it'll do this instead."
     The labs for the if statements were fairly easy and I was able to become creative. in these labs, i did not need much help on figuring out what to do, so really if's just come natural to me :p

Thursday, October 21, 2010

Strings

So in Comp Sci this week, the goal is to figure out strings. I think because this lesson went slow and thorough, i was able to understand it perfectly. In the labs, when I encountered an error, unlike most other times where I ask for assistance from the teacher, I usually figured the string labs myself. Not only that but it allowed for me not to have as much stress trying to solve a problem in time before class ends. Now I usually have enough time to hang out, which i really like. Also, i have noticed that even though I'm sorta off task, Im still able to get ahead of some people. That too makes me happy.

Sunday, October 3, 2010

week 2 blog responce.

http://www.examiner.com/spirituality-in-charleston/a-new-earth
So this week I got news of a new earth sized planet being discovered. As a child, my dream was to find the first aliens in space as an astronomer, so news like this really excites me. If we were to actuatly find life on this planet 20 light years away, the knowledge would turn our culture inside out.

week 2 class.

So this week I had to take the 6 weeks test. For a little bit, I was afraid of not remembering about what Scanners were, but luckily i was able to still do good on the test. I enjoyed difficulty of this test, it really wasn't that hard at all. This also makes me afraid for free-response code writing questions. Now that we're moving on into new territiory, i hope i can stay caught up with this class.

Sunday, September 26, 2010

Second Blog."What's been goin down/my blogs"

Well so far, methods are still sorta grey to me, I mean i know what they are, I just can't imagine what they should be or do. Hopefully with more practice, I'll be able to understand the whole methods lesson alot better. I have enjoyed the smiley face lab being that I was just meesing with it the whole time. If there is one thing that still gets me is how I can create triangles in JCreator. I wish that there was a lesson on making more complex polygons.

Also, for right now, I've been reading the Onion. this week I read "Department Of Defense Unveils $83 Million Thing That Shoots". So even though the Onion is satryical, it does have a strong point to this. The author uses simple diction such as "When combined with our thing that goes underwater and our thing that flies around and drops exploding stuff, this cutting-edge shooting thing will help ensure American military dominance for decades." this just goes to show how much thought the American people really think of the war in the Middle East. It has come to a point where everything is just general and not worth knowing the details about. All in all, I agree with the onion satryizing the war.

Friday, September 24, 2010

1st blog update about ApCompSci

So the first couple of weeks have been like a flash from the past with my Java class in 7th grade. Although I feel totally new to JCreator, it's like I sometimes get de ja vous moments and totally understand what the assignment requires me to do. Overall, i enjoy Jcreator because I'm that kinda guy that likes to create things out of simply nothing.

Also, JCreator, in my opinion involves alot of mathematical skill and a highly imaginative mind. One needs the skill to not only to make sure that the code makes enough sense to work, but also the imagination to know and to picture what it is they are typing in. Sometimes i feel like I am short of that imaginative skill. It's like i type in code without even picturing what it should be or look like. This is a problem I hope to fix in the future.

Overall, CompSci, despite being stressful, is fun and interesting.