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!

Saturday, October 13, 2012

Homework Problem 2: Finished!

I posted a few days ago that I thought I had finished the homework problem on my own, but my partner and I took it to the lab and tested it and a few of our sample cases broke it. I had taken about an hour to flesh out the basic program thus far. We worked for about one and a half more hours before we figured out why we kept getting out of bounds errors. A quick addition fixed the problem and we promptly celebrated with a spinning chair high five.
Victorious!

Thursday, October 11, 2012

Lecture (Oct. 11)

Today we learned about array lists, which would have made the lab so much easier, but the point was to do the problems with arrays. We also can't use array lists on our homework problem either, but more on that later. Array lists are basically arrays (a list of numbers) that can change length any time you want them to (whereas arrays cannot). THAT WOULD MAKE THINGS SO MUCH EASIER.

Anyway...
The homework problem!
I might have accidentally finished the homework problem already... It is working when used with the sample data and I'm afraid to use any other tests... This is a good thing in that it shows that I'm AWESOME, but could be a fluke that only works with the sample... I'll report back on that later, when I test more.

And lastly, something I StumbledUpon that I think is pretty cool: 64 Things Every Geek Should Know!

Lab 5

Lab five has just come and passed and my partner (WH) and I overcame it! The first five problems took us about an hour and fifteen minutes, and the last one took us forty-five minutes. Right after we finished, we consulted our lab's Trick Master and found out that we could have defeated it in a much easier way than we did, so that kinda sucked. I also got my grades for my first lab quiz and homework program one and got 100s on both, so yay! Lecture post to come after the lecture.

Wednesday, October 10, 2012

Homework Problem 2

On Tuesday, Pops revealed the second big homework problem of the semester, and it's a partner program! The basic problem this time around is this: each test case consists of an array of heights of a "package" and the width and height of a box. The program must be able to pick out where the box can fit (without rotating it) and return an array containing the valid starting positions. For this assignment, I'll be working with BS, my best CS buddy, and we're going to dominate it.

In the meantime, stuff I StumbledUpon!
FrozenCPU! (It's like Newegg)

Quiz 1

-Thursday, Oct. 4-
I just took the first lab quiz, and honestly it was pretty easy. My normal lab partner and I were both done within the first hour, and now we're chillin' in Fisher waiting for the lecture to start. If it were harder, maybe I would have gotten a more interesting post out of it...

-Wednesday, Oct. 10-
Well, I certainly meant to post this earlier, but I guess I got sidetracked pretty hard. More actual content to come soon!

Monday, October 1, 2012

Lab 4

Last Thursday, we didn't have a lecture. This was because during second semester, the class has a day off because of Winter Carnival, so he decided we should get one off too. So that was nice.
We did still have our lab, however, which was fine by me because I actually enjoy it. I met up with my lab partner and we sat down and started doing our stuff. The first two problems took us approximately an hour, which was mostly figuring out how to format our outputs. One of the student helper guys came up to us and said something like, "Oh, that looks nice... Now that you've made it all pretty, I'm gonna tell you something that might make you mad: the actual formatting of it doesn't really matter. It just looks to make sure there's whitespace between each number." That sucked. We burned through all but two problems during the last hour, staying slightly after to figure out our last problem of the day, but it was so very rewarding to do so. There were others still in the lab, and I noticed that they weren't able to get nearly as far as we could. This fact made me happy about my skills.
Other CS-related Activities:
These will only be loosely CS related, as they're nerdy and involve another CS major, who's becoming a good friend. I will refer to him from here out as BS, as those are actually his initials.
Borderlands 2 has been dominating my life for a while, and it's amazing. I've been playing through as the Maya half of a Maya/Zero team, and it's been working pretty well for us. If BS gets done with his homework in a timely fashion, we'll be jumping back in.
I've also been playing ping pong with BS, which has also been fun. Last night, we discovered that we play better if we're not concentrating too hard and we're just talking. Weird.
Lastly, I'll leave you with a CS-themed SMBC. I love Saturday Morning Breakfast Cereal, and you should too!

Sunday, September 23, 2012

Homework One

In CS1121, we will have five "big" programs to write for the semester as homework assignments. The first was assigned not too long ago and will be due this Friday at 10PM. I got a small start on it pretty much right away, which is a good start for the CS guy, as my OTL said that we probably wouldn't start on our stuff til last minute, which would not be good. I'm making decent progress so far; I'm pretty happy with what I've been able to do.
*edit*
I totally ended up finishing it and submitting it as of Monday night. Yay!

We didn't really have many good Pops Gems last lecture, so in lieu of that feature, I can tell you of some funny CS related stuff that's happened to me or that I've done.
I was playing Cards Against Humanity with some friends just last night. I was the Card Czar, and I was judging the card, "Instead of coal, Santa now brings the naughty children ______." I ended up choosing something because of its sheer terribleness, but a close second was "The Sun's Harsh Light," which was played by a fellow CS major.
A nice time-killer for me is making hypothetical computer builds. I go to newegg.com and put together a Wish List with all of the parts for a build. Usually make builds comparable to well-known high-end PCs. Once, not too long ago, I did a Mac build that came out to be about $1500 less, I believe, than the retail cost. Yay PC building!
Finally a link I Stumbled Upon. Oh computers, how you frustrate us.

Thursday, September 20, 2012

Lab 3

This week in the lab, I was forced to work with a partner. In lab 2, my partner for this week and I raced to get all of the problems done, and we both got done in about an hour and fifteen minutes (yes, he beat me by about ten seconds). This week, we got all but one question done in about an hour, then the last problem took us the last hour of the lab. It may have taken us til literally the last minute, but we were triumphant! As I was adding the last change, I literally said, "This is going to be the last thing we do, and it's going to work, and we are going to party." We typed in the 1121labtest command, hit lab 3, problem 28, and it was correct, and we both kind of yelled, "YES." We partied on our way to the lecture.

Monday, September 17, 2012

Lecture (Sept. 13)

This official lecture on if statements and the like was interesting and entertaining, like the other lectures by Pops so far. He prefaced the lecture with a YouTube clip (this time it was Annoying Orange) and told us to send him links to YouTube videos to begin the classes, which made me happy. I understood a lot of the topics he discussed already; they seemed pretty straightforward to me. The only thing I didn't really get, switches, he told us at the end that we don't even need to know, so that's good. Looking forward to the lecture on loops!

Gems from Pops:
"I had a very bad experience with these operators [++ and --] as a child, so I avoid them."
"You can do it your own way, but you better know what you're doing." Pops on optional curly braces
"He's dead now, by the way...so you can't complain to him..." Pops on Dennis Ritchie, creator of C

The First Actual Lab!

I had my first actual lab on Thursday, September 13. This was the first lab involving a bunch of problems that they told you and a partner to solve. Do it. This particular lab I didn't have much issue with. I sat next to a guy I knew from Perspectives and, while not actually working together officially, we collaborated and asked each other different questions as the time went by. Once we finished, a TA said that we were the fastest ones to complete the lab, clocking in at an hour and fifteen minutes.

Wednesday, September 12, 2012

Chapter 3

As I was doing the reading for chapter 3 in our Pearson Custom Computer Science book, it seemed to all make sense to me. The chapter was on Selections (if statements, not, and, or, exclusive or, switches), and I thought everything was fairly straightforward, at least to me. I started on the CodeLab problems, and everything was going quite well. I was able to easily do all of the problems except for one involving a switch statement. The problem was to display a message if a number under 10 was prime, a different one if it wasn't, and another if the number entered was 10 or higher. For some reason, I could not for the life of me figure out how to get the 10 or higher one to work, as I couldn't say something like case >= 10 (if the number was greater than or equal to two) because that only works with true/false (Boolean) statements. Eventually, I realized that there's a special case called "default," which the program looks at if none of your previous cases are satisfied. I am a proud noob programmer right now. Lab and lecture tomorrow, expect more from me!

Tuesday, September 11, 2012

Day 2 of Lecture

So today, we continued to learn the very basics of Java, such as variables, looking for input, things of that nature. I'm really enjoying using a laptop to take notes in CS1121 because any example code that Pops puts up, I can type it up as if I was actually writing a Java program, or if I felt like it, I could actually type it into Eclipse and manipulate it to see what happens. And for anyone who might be thinking, "Hey, doesn't Michigan Tech have wireless internet throughout the campus? So aren't you tempted to go do something else on the internet?" my answer is, "Well, no, not really." I can stop myself from browsing mostly because I'm actually interested in the class and want to learn the information. Most of my other classes, for one reason or another, don't really interest me, so having Intro to Java twice a week and then a lab will be a nice break from boredom.

Some gems from Pops this past lecture:
"Variables are called variables because they vary!"
"If you don't put your paper in a neat pile, you will be shot! Your names are on them; I know who you are!"

Thursday, September 6, 2012

Hello World!

Beginning CS 1121, I didn't know what to expect. My first impression of Pops was a good one, as he seemed funny in an odd, but likable way. I'm currently typing this during my scheduled lab period, as I finished the first lab assignment in about a half hour. The first actual lecture is in about fourty minutes, so I'll report back afterwards and we'll see what I think then. I'm actually quite excited to see what this class has in store for me, as I'm pretty much completely inexperienced as far as formal training goes.