Tuesday, October 30, 2012

Files

Last week, we started learning about Files. Unfortunately, my group and I are still on Deal, which puts us behind a little bit. At first, I thought that working in a group was a good idea, but I'm starting to see some negative effects of it in that it's taking much longer as a group to finish the program. I think this is true because previously, if I didn't finish a lab in class or didn't quite understand it the first time, I could bring the lab home and work on jGRASP on my computer. That was really convenient for me because I can't always focus on my work with the distractions in class. Now that I'm working in a group, I have to coordinate with my group members on 1) When to come in during lunch or 2) When we can come in and work on it. I think we should be given the choice on whether we want to work individually or not because I think it was more successful for me. This may not be true for everyone else, of course, but I think I might be better off learning on my own. When someone else is typing, I think it's easy to stop focusing on the program as opposed to directing our full concentration on it. For example, I might be paying attention only 75% to what is going on as opposed to 100%. I was also sick yesterday and didn't come to school, so I couldn't come during lunch to work on the program with my group, and that could cause some problems. I'll try to study the material on my own and see what comes of it because I need to get back into my old habit of doing everything by myself. It's probably not a good idea to rely on other people because there could be gaps in my understanding of the material.

Tuesday, October 23, 2012

While

During the past week, we had to integrate "while" into our labs. We worked in pairs to complete the lab and switched every so often. I thought that this method was significantly more helpful than the individual lab, mostly because I wasn't lost the entire time. It's helpful to know just where to start, and unfortunately, I usually don't know where to start when I work alone. As pairs, we can help each other when we have gaps in understanding. In addition, it's better for me when I can observe someone else's code as opposed to my own, because I am always a little bit self-conscious about whether or not I'm correct. When you're helping another student on the other side of the classroom, we may have to wait a while before you come around to our side of the classroom, and unfortunately, we're not always so patient. It goes without saying, but it's nice to be able to get immediate help from other people who may actually understand the subject material a little better. The "GCD" lab wouldn't compile for a while, and I think that something may have gone wrong during the calculations portion of our lab. This presents a problem with working in pairs, because I won't always "think for myself" because 1) I might think the other person is right and 2) I might not be as cautious as I normally am because someone else is doing the work. That being said, there's a positive and negative side to this method, but I think it was positive for the majority of the lab "experiment." Overall, I think that this working method is a success.

Sunday, October 14, 2012

Boolean 2

This week, we learned more about Boolean. We had a lab involving CodingBat, which was straightforward for the most part. The hardest part of using Boolean was using nested "if" statements because I didn't exactly know how to write them myself. I realized that I can really only write code myself if I see a correct example of it the first time. Otherwise, I'm mostly going blind writing the code. The trickiest part when writing nested "if" statements is your ability to read it. Java doesn't mind it if you don't indent anything or if you don't organize your statements. However, indenting different lines actually really helps you understand the problem as as whole. This is what I discovered when I did the MakeChocolate problem in the lab. I couldn't visualize everything at once, and it was difficult doing the trial-and-error method where I wrote something and compiled it just to see if it would work. Instead, I had to take it one step at a time and start from scratch. I wrote one if statement (with or without nested ifs) and looked to see if there was perhaps another possibility that I was missing. Then I would write the next statement. I realized that if I organize my statements in this fashion, it will be much easier logically to write the entire code correctly as opposed to trial-and-error. That was probably the hardest part about writing these codes. A lot of the problems in the lab involved math that was a little more complex than I would have liked, so I wasn't able to logically think of all the possibilities in the beginning. Besides that, the other problems in the CodingBat lab were fairly straightforward. I like Boolean a little more than the the other subjects we've been studying so far.

Tuesday, October 9, 2012

Boolean

This past week, we started learning about if statements. The lab was pretty straightforward, as it was like a combination of all the lessons we had learned previously. In other words, we had to integrate our "if" knowledge into previous lessons such as the material on constructors and methods. The most confusing part was running the statements in InOrderRunner because we had to call different methods in order to get the whole thing to work. The most trouble I had was remembering to create a new MWeiInOrder, because MWeiInOrder was just the "template." After I figured that out, everything else seemed to fall into place. I think that the //comments were really helpful, and I think these should be included on future labs because it really helps us understand what to do next. I don't always remember the order of the constructors/methods so comments are really good guidelines for labs. Lastly, I had to change the instance variables from private to public because I couldn't access them from MWeiInOrder if they were private. That was kind of puzzling because I couldn't remember how I could access private instance variables. All in all, I think the labs are starting to get easier as I accumulate more knowledge on these different topics we cover in class.