I don't have any major commentary on the class except that some of the worksheets did seem superfluous, though I did get a fair amount of the questions wrong so I can't honestly present any criticism on the issue.
Wednesday, 22 February 2012
Vectors!
Last weekend I derived an equation to find the distance from a line to a point and implemented this into an algorithm in a vector class. In order to do this in an appealing way I taught myself about nested classes (quite simple) and Image IO. (Although I couldn't recite the code, this also proved to be fairly simple.) Currently I'm trying to figure out how to make an efficient and simply way to present a class that will run saving the vectors and generate a corresponding image to run alongside the vectors, with my goal being making a randomly generated top-down game.
Wednesday, 15 February 2012
Late late post
Last week we learned about inheritance, interfaces, and static classes. These are three things that I have wanted to have formally explained to me for a while, so these presentations were fairly interesting. However, the worksheets felt extremely repetitive; Some of them were the exact same code as another worksheet but with different variables.
Other than that, the labs seem to be getting harder, which is nice as they can serve as more than 30 seconds of quick coding. That being said, I don't see a reason that, at this point, the class can't just write the code entirely from scratch rather than using partially prewritten classes. The only thing that was necessary for the pong lab that hasn't been taught yet was graphics, and it wouldn't be hard to provide a graphics library.
Monday, 6 February 2012
Arduino
This week we reviewed oop, nothing I can comment on there.
SO I got an electret microphone with the intent to use it with my arduino, however I found that my arduino would not pick up the signal from the microphone if I hooked the mic up the same way I would a button or photoresistor. Thus, I did a little more research and purchased a 386 amp to amplify the signal, as well as capacitors and resistors to regulate the voltage. The arduino is now picking up the signal to a degree, though it still is not responding to sound. What I did notice, after reading the datasheet, is that the mic gives the raw audio waveform, with values alternating and varying 0 to 100 or so.
Monday, 30 January 2012
Reference variables
Although not immediately useful, the last week definitely contained some very important information. The use of references vs pointer is fairly intuitive in java, though I can see this being a roadblock if I were to, say, teach myself C++. I don't have a lot of commentary on the subject, and I haven't been working on many programs recently, so this blog entry is going to be fairly short.
I have, however, been working more with arduino. I am using an electret microphone to detect sound, though the resistance it provides is not significant enough for the arduino to pick up, so I ordered an LM386 amplifier to amplify the difference.
Monday, 16 January 2012
ArrayLists, JFrame, and Eclipse
Something I realized while at UIL was how insanely useful eclipse. Eclipse shows the user things that they might not be introduced to otherwise by suggesting fixes for errors. Eclipse makes it easier for a user to write without memorizing methods and also allows the user to learn new classes much easier. It seems unnecessary to memorize so much in programming and have to think about so many things when a computer could very easily do that for you.
Arraylists I had already taught myself and they're very straightforward if you understand how normal arrays work.
I've been trying to teach myself how to use PFrame and JPanel, though there is something I clearly don't understand in the classes, probably involving inheritance and the super() method. I've been procrastinating on teaching myself how to use inheritance so I'm probably going to do that soon.
I also finally realized what the difference between static and nonstatic is, and I have to say that the online sources for it make it much more complex than it is.
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.
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.
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.
Subscribe to:
Posts (Atom)