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.