Thursday, November 1, 2012

Lecture (Oct. 25)

Today, we had a lot of good quotes from Pops. A LOT of good ones.

Pops was talking about objects and classes.
"Inside here - well, I haven't opened it yet, so I hope it's in here - is a Rice Krispy Treat. Or at least there had better be, 'cause I paid a buck and a quarter for it. ... And, ya know, if you eat it, it tastes good. That's a behavior! And this..." *points to recipe* "...is NOT a Rice Krispy Treat! It's a class!"


“Ya know, you can build multiple houses with a single blueprint. In Java, you'd just say new house! I mean, it's not that easy, but I mean...yeah.”

“See, it's not software, and I'm not good at hardware.” -Pops, after failing to fly a paper airplane

“Call it something indicative of what it does. Don't call it Afghanistan. It's not! It's a point!” -Pops, on names of objects

Anyway, I've got a good feeling about objects.

Lab 8

This week in the lab, we dealt with 2D arrays. The first four problems were quite easy, and WH and I flew through them in a half hour at most. The last problem, however, kicked our asses. We sat there for at least an hour trying to figure it out, when Trick Master came by and mentioned that he did it using four Booleans and five "if" statements. He prodded us a little more and we finally got it. Turns out we were just overthinking it, like we tend to do.

Lecture (Oct. 30)

So today, we learned about constructors and what they do, which is pretty much that they initialize variables in an object. That's basically it. What was really fun about this particular lecture was the video for today and Pops' quote towards the end.
In the YouTube video of the day, we learned that if you want to enhance your computer's wireless range, wrap a cell phone in Ethernet cable and plug an end into your computer. You can make an aluminum foil "satellite dish" to enhance it further.

Wisdom from Pops:
“The last thing you want is for someone to reach into your object and mess around with your privates! You're all objects, so I'm sure you can relate to that. If you want someone to mess around with your private parts, go ahead and make 'em public! And there /are/ reasons you'd want to be able to mess around with private parts...” - Pops, on why to make your variables private.

Thursday, October 25, 2012

Lab 7

This week in the lab, WH and I spent way too much time on a single problem because we were over-thinking it so much. It kinda comparatively kicked our asses, to be honest. Our Trick Master helped us simplify it a lot. We were still able to finish the entire lab, so that's good. Actual post to follow.

Thursday, October 18, 2012

Lecture (Oct. 18)

Today, we basically learned that you can make a bunch of references to the same object (say, a HashMap or an ArrayList) and if you change anything about the object through any reference, all of the others see it too. This is probably going to trip us up somewhere anyway, but at least it's in our notes so we can maybe find it at some point.

Other Stuff:

Pokedex!
I am making a Pokedex of sorts using a large TreeMap with string keys and long string data entries in Java. It's gonna be super awesome, but it'll take for-frakking-ever.

Saturday Morning Breakfast Cereal!
Heh. Boob joke.

Trial of the Clone!
So, Zach Weiner, of Saturday Morning Breakfast Cereal, made a super nerdy choose-your-own-adventure book called Trial of the Clone. I'm not entirely sure what the main story is, but I backed it on Kickstarter and I'm getting a signed paperback copy of the book, a signed postcard with art from the book, a flowchart poster of the whole book and an audiobook narrated by Wil Wheaton!

Lab 6

Today, I had the sixth CS1121 lab, not including the lab quiz. It was dealing with ArrayLists, which are so much easier than Arrays. They're both essentially lists of stuff (could be any primitive type), but the amount of elements in an Array is set in stone once you create one. With ArrayLists, you can add elements and take elements out with no hassle at all, which is wonderful. WH and I pretty much did four of the five problems this week in ten minutes or less. Problem number three was where we ran into issues. We had to mush two ArrayLists together, keeping them in ascending order while eliminating duplicates. Once we figured it out, Trick Master showed us that there was a function within Java that sorts any list you throw at it. Awesome.
Anyway, still victorious!

Tuesday, October 16, 2012

The HashMap Epiphany

Today in class, we learned about this Java object called HashMaps. This allows you to build a database of any size and call upon specific entries using specific keys. This is probably useful in practical applications, but it inspired me to do something extremely nerdy. I'm planning on building a huge Pokémon database that, when inquired, will give you a Pokédex entry, types, type advantages, and evolutions, maybe more. I AM EXCITED. I'll keep you updated!