Friday, October 19, 2012

For Loops

I'm so glad that we changed the deal lab from while loop to for loop. I don't like while loops that much, and having to do that lab without being able to use for loops would have been fairly frustrating. Its so much more convenient to use for loops in most situations, so being able to use them in labs from now on is going to be nice. Its like what happened with else statements when we were only using if statements. It was so tempting to just use them, but I didn't in an effort to keep with the spirit of the lab or codingbat exercise.

Thursday, October 11, 2012

If/Else Statements

Its so tempting to just nest them forever! I mean, I know there are plenty of efficient ways of doing the same thing that I'm doing in my code, but just nesting if loops until the problem goes away just feels easier to me. So long as I don't mess up with my braces or my indentation (which I don't, ever), it works out fine for me. Once we run into a genuinely complex program I'm sure that I'll be forced to snap out of it, but for now its a bit of a struggle.

Friday, October 5, 2012

Six Weeks Exam

This is my first computer science exam of the year, and I thought it worked out pretty well. I'm not sure I like writing down code, but you have to do it for the exam so it is probably for the best that we start getting ready for it. It feels so clumsy compared to typing, and I'm always worried that I've done something wrong or missed something. I didn't have any problems with the multiple choice, except that some of the questions or answers had typos or errors of some kind. Still, I liked the exam over all.

Thursday, September 27, 2012

Public class Week5 {

private String blogPost;

public Week5() {
     blogPost = "";
     }
public Week5(String a){
     blogPost=a;
     }
public setPost(String newPost){
     blogPost=newPost;
     }
public String toString() {
    return blogPost;
    }
}

In the main of another method:

Week5 post = new Week5();

post.setPost("Constructors and methods kind of annoy me. Particularly, initialization constructors and          setVariable modifier methods seem redundant to me. I mean, they'll be both really helpful once we need to    change the values of things mid program, but as it is they just take up more space. You have to input variable   values anyways, so you might as well just have a default constructor and prompt the user to input values for use in the modifier methods, though that won't help if you need a predetermined set of values. There's nothing wrong with them, its just irritating to have to use them when they aren't necessary to the program just yet. Maybe that's just me being lazy.");

System.out.println(post);

Sunday, September 23, 2012

Turtle!

Its like Jeroo, but more fun. I honestly like this a lot, though perhaps not as much as just straight programming because of all of the extra rules, but at the same time drawing shapes using turtles is fun, so I'm not going to complain. I particularly like how it gives something that I think is necessary for a lot of beginners in programming, which is context. Not much context, mind, no grand sweeping plot or memorable characters, but some ability to visualize and conceptualize how the code translates onto the screen, which helps make the program make more sense.

Friday, September 21, 2012

Math and Methods

I don't have a whole lot to say about methods, because they're basically the same as in Python, but I do have to say that I'm grateful we're learning the specific syntax. I have a tendency to over complicate my solutions to problems just for the fun of it, and methods help me to at least condense my code. The math library is also pretty much the same, though the differences in data types have been slipping me up, like how I keep trying to use the results from random like they're ints, when they're actually doubles.

Sunday, September 16, 2012

Java

Its not all that different from Python, to be honest. I was coming in to this class expecting to have to relearn a lot of things that are different between the two languages, but that doesn't seem to be the case. I've been pretty much blowing through all of these labs and worksheets, with only the basic syntax of things tripping me up but the logic of it staying the same. Maybe that's just because its only really the first week of working with it, though. Perhaps the more complex parts of the languages diverge from one another, but the basic stuff seems to be the same thing with different names attached.