Monday, 12 December 2011

This semester as a whole

I came into this class with a very basic knowledge of java and for the most part this hasn't changed. I can tell that there is still much to learn, though I definitely making progress. There are still things that I know java is capable of, I just don't know how to do, though I am slowly learning these things on a case by case basis. Just last weekend I began to teach myself how to read in the frequency of a sound file into java. In addition to file IO java.awt is full of things I do not understand. When I import third party classes I do not understand. For one, bitwise functions confused me for ages before now. The content we have been learning is mostly things that, although I have not wondered about in the past, I am going to use in the future.

Gridworld is an entirely different subject. To be perfectly honest, gridworld is insanely stupid. As far as I can tell it is meant to teach about different types of methods, though one requires a knowledge of methods in order to make programs in gridworld.

On my own I have been finding more and more how the math I have been learning applies to programming, trigonometry and vectors are proving to be ridiculously useful. I find that I have the most fun with projects oriented towards applications of math and less so projects that actually have practical use, which results in me having very convoluted and off topic labs.

The labs in Comp Sci definitely accomplish what they need to and teach one something about the application of the material we are learning. They are very clearly well put together and their bizarre nature only adds to them. The worksheets do what they are supposed to and always cover the material fully, in-case I miss something in the presentations.

Overall I am very satisfied with this class and, although it could go faster, I see no reason for it to as long as we wholly cover the material.

Sunday, 4 December 2011

String cutting and bitwise




At first I was very confused as to the applications of bitwise functions though it makes sense when one considers how little processing power it takes to execute the functions. It's not immediately useful though I want to take on some sort of project but only use a very small amount of memory, mostly to get in the habit of writing efficient code. Using scanner with Strings instead of System.in was pretty straightforward, I don't see a lot to comment on there.
On my own I made a JAR that runs a polar cosine equation using circle every 10 degrees or so. This ends up with a series of circles orbiting a point in interesting patterns. This project isn't very impressive in itself though it was fun to find the designs it could generate if I didn't clear the canvas after drawing.

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.

Sunday, 25 September 2011

New content! Fun!

I've found that, although I know most of this code, I don't know/never payed attention to all of the vocabulary. There are also some smaller things, like scope, that I never learned. A string is, obviously, a string of variables, but I am wondering how it is stored. It has an adjustable size, so it can't be an array, it would be silly to use a stack, meaning there must be a way to have a "variable" that stores multiple values with an adjustable limit to the amount of values.
I'm still waiting for the day when we learn about static vs. non-static. I keep finding things that seem insanely useful and then being incapable of using them because they are non-static. InputStream is a prime example, I was interested and wanted to mess with it, only to find that I couldn't use read() with out.print(). I understand the curriculum, though I feel like we should learn more general code (if, for, while, etc.) before learning about methods that aren't immediately useful.


Sunday, 18 September 2011

This is kinda unhelpful

We didn't do a lot last week, we only had 2 class periods and didn't do a lot during them. Some math and methods and that was about it. I didn't know about mod, nor did I ever even see a need for it, though I could definitely see using it in the future. Same with printf, I never noticed/never cared about loss of precision in the past, though I definitely see this becoming useful.

This is a bit short, but I don't really have a lot to talk about.

Monday, 12 September 2011

I ramble alot, maybe I should start a blog.

We're going over class files, methods, method types, etc. These are things I have already learned, though I still have yet to understand the difference between static and non-static and their uses. A number of times I have run into problems involving contradictions between the two, for which there is apparently no simple solution. I have tried reading online documentation but have failed to find any that explains the subject in a way that makes sense to me.

The more I learn about java the more anxious I get about actionscript. I had Flash on an old mac of mine but when I recently got a new computer (Windows) I lost the ability to run flash. Actionscript, when compared to java, almost seems like multiple programming languages. There's a huge amount of pre-made functions, from graphics to effects to even basic 3D engines. Hit tests are done for you, though the syntax is a bit lower level than java, but only a bit.

I do feel like, since there are no built in graphics libraries, that we should learn how to make graphics from the core since there already so much pre-written code in the labs. This being said, I don't know what the syntax is like and I can understand if it's hard to teach with as basic programming knowledge as we have so far.


Monday, 5 September 2011

I think I'm content.

When I signed up for this class I was basing my expectations off of whatever counselor happened to be at the elective signup. These expectations consisted of "It's harder than computer programming", "It requires prior programming experience" and "Your performance doesn't matter if you don't take the AP exam". These expectations have been met for the most part; the second doesn't seem to be true, but I'll talk about that later. For now, I have to say I'm pretty happy.
So far I have found that, as I expected, the JAVA class I took last summer was incomplete. It taught the basics and nothing but the basics; it stopped after we learned about inheritance. I remember, when I was taking the class, asking the teacher to explain variables that were not boolean, char, string, or int. I thought there was something more to doubles then "They hold decimals" and I needed to use the math class. He kept explaining other ways of doing it: using a random class, writing my own methods, etc. Eventually I gave up and just taught myself some things, though I still never got the big picture. We never learned about /t, /n, etc. either.
Despite my satisfaction of the curriculum, I do feel that certain things are not hard to understand, but rather are explained badly. For example, the different variable types and their properties are pretty straightforward, but the explanation of why to use anything besides int or double was never really given.
One last thing: although it's clear that the class is meant for those with no programming experience, it doesn't bug me because I'm learning things anyways.

-Jonas