Saturday, 26 November 2011
Late post
Last week the class worked with gridworld. Personally I find gridworld to be unnecessary, though I can see why one would need to have prior knowledge of it for the AP exam. The bugs were straightforward and, to avoid having to actually code the infamous ZBug correctly, I hard coded it with move() and setDirection(). The rest of the bugs were relatively straightforward. On my own time I have been working on a series of grid based generators for whatever reason. The first one made a series of randomly generating rooms, the second was randomly done but with a tendency towards certain areas to give the impression of a randomized gradient off of a point or line. I made a few other generators of this sort though I'm not entirely sure what I'm going to do with them. In general I'm fine with where the class is going, we pretty much just surpassed my prior knowledge with the introduction to inheritance through gridworld.
Sunday, 13 November 2011
Tests and such
We took a test last week. The biggest problem I had on the test was a question containing an unknown part <*1>. It wasn't clear to me that this represented an unknown variable, as this was not clarified in the question. I feel that I could have figured it out had I known this. Otherwise the test was fairly straightforward. I spent a lot of time on nested for loops though I got most of them right so I feel fine about that. I really liked the free response question as it wasn't a straightforward question and it actually tested that you knew how to use the code effectively rather than just the syntax.
Sunday, 6 November 2011
Finishing labs, quiz...
Not a lot happened in class, this was a double A day week and most of the time was spent finishing labs and such.
Daniel has been working on a 3D engine of sorts, using equations and ray tracing to make shapes in pseudo 3D. It seemed like an interesting project, and I wanted to try my hand at it myself, so this weekend I did. I'm not entirely sure how his works and this was partially intentional as I wanted to compare our separate approaches. My program currently does not work, which is not surprising considering the little time I have put into it. It compares parametric equations of a sphere and a 3D line to find if they intercept with the line intersecting certain points. In order to find if they intercept it checks parts of an equation in sqrts to find they come out negative, indicating a nonreal point of intersection and thus no intersection to graph. The code is actually very short, only a few hundred lines, most of which are for variable creation.
Sunday, 30 October 2011
Booleans
I already knew about booleans and didn't learn much. I did, however, get a lot of enjoyment out of a separate project during class involving pseudo-gravity in two dimensions. This weekend I rewrote the program and made a console for it. That is, I wrote a small text editor and had it separate the first word and any numbers after it. Using this, I made a series of commands to change things such as the number of bodies in this pseudo-gravity, their range of size, their pull, etc. It's very fun to mess around with though it's very finicky and I'm having a weird problem with the text flickering. In order to change a string to an integer/double I used toCharArray and converted the characters from there. It's very easy to add a command and overall I'm happy with out flexible this project ended up being.
Sunday, 23 October 2011
This, I know
For loops and while loops are both entirely review except for the for the length loop. Not much else to say, really. I realized that you can't do string.replaceAll for a blank space, you have to use for and substring...
A friend of mine might teach me some C, which would be fun 'cause I can't see doing realtime 3d in something as slow as java, which is a project I've been working on. Not sure if I've already said this, but I'd like a class that teaches how to code rather than how to use a language. I.e. teaching about various concepts in programming and how to do things like 3d and perlin noise rather than teaching syntax. I might end up learning this in later math class instead, though.
Monday, 10 October 2011
I feel good about things.
I've started to take notes, writing down things that I did not already know. I like the idea, though it is too soon to see if they work. Something I did find the other day was that I ignored the stuff I already knew and accidently skipped over some stuff I didn't know, case in point compareTo(). I looked at an outdated API, so I made mistakes with the compareTo() string method, though I really should have just plugged it into java. Generally I'm liking the material that I didn't already know. Switch cases are useful, though not immediately so. Things like the option of brackets in an if statement are useful to know, though I will probably not utilize it myself, such is a lot of the things we are learning.
Sunday, 2 October 2011
Why are my titles so irrelevant?
During the test last week's test I found that the vast majority of things I missed were not concepts, but little things that I was not originally taught last summer. I find myself skipping over the concepts I already know and lumping those i do not know together with them. Thus, I think I am going to start taking notes that are more relevant to my knowledge rather than one whom has just been introduced to java. Otherwise I'm just getting used to the conventional format for things, though I do not feel I am having problems with this.
On a completely different subject, I'm wondering about the validity of this:
and how serious he was being about this.
Either way, this class seems to be a good thing to get into.
Subscribe to:
Posts (Atom)