Wednesday, 29 April 2015

Week 7- Arrays and loops and stuff, moving on to Netbeans


Today we started working on arrays and bubbling sorting methods. An example of one of these is this chunk of code from my files.
 
This code creates a loop within a loop, and picks the first two numbers in the array declared in the top line.
the first loop goes through the numbers, adding one to the number count every time the loop completes
the second loop checks to see if the number after the current number being checked is lower than the current number. if it is, (print out "memes") it should be a swap code, but I didn't get around to it at the time due to syntax errors everywhere.

I feel like we are going at a good pace,  and i understand what we are doing, but whenever it comes time for me to do work solo, I seem to forget all my syntax and how to word the code for it to work, and I end up spending way too much time on stuff I should know. I'm really annoyed and dissapointed  at myself and I need to step up my game on programing.

Week 6- after march break group project

March break - March 14-22
Week after march break entry yo
We continued to work on our group projects, with me and my partner getting planning work done and started working on the beginnings of our game. Unfortunately, we didn't really follow the plan I had laid out from the pre-march break, so I have a feeling we lost a lot of marks there. My partner was nice, although I was told he was a bit shy. I'm not really happy with the game we made, it feels like we just slapped the code together from older projects and attempted to pass it off as original coding. I feel like I could have kept order a bit better and followed my (not very well laid out unfortunately) plan. If I could do that project again I would work on it more over the break, and help my partner out more. I think I am the reason we did not do so well on this project.

Monday, 9 March 2015

Week 5 - presentations and test studying

Last week we worked on review mostly for the test that happened on Friday. In addition, we worked more on arrays and we started on timers a bit before somebody reminded Mr. Swaine that there was a test the next day and we had to study for it. I mostly remember Mr. Swaine talking a lot this week, and not much hands on time to work with the code myself. I find it a bit hard to remember what we are taught when there is no hands-on time to mess around with it and learn how it works. I'm glad I already know how arrays work from previous years.

People began to present their independent study projects this week, which means we all get to see really neat technology at the beginning of class. Since it's presented by our peers, it's usually presented in a way that everyone understands an is interested in. Presentations so far have included HP ZVR, raspberry pi, little satellite things that take hella HD photos of the earth from space(dove thinggie?), among other things. My favorite so far is GMAs, some of the animals and plants he showed seemed really cool, although the super salmon is kinda scary if it manages to get out in the wild.

Monday, 2 March 2015

Errors and Parameters - week 4

Last Week we learnt about parameters and arrays. Parameters are intagers/strings you assign to objects you make via the newObject command. Such things include adding a specific location for multiple items, different audio files, different image files, anything goes really. Arrays are still arrays. very similar to last year. coding hasn't changed much since then. Arrays work well with for loops. I'd post pics with this but the school drives are down, so I can't get source images. remember kids, always back up your work on a USB!

Array = |_0_|_1_|_2_|_3_|_4_|_5_|_6_|_7_|_8_|
you can store data in each "cell" thinggie. starts at 0 and goes up, so if you ask for 10 array slots, it'll go 0-9.
We also learnt the difference between runtime errors and Syntax errors.Runtime means your syntax is a-ok, but an array has 5 cells and you're asking for what's in the 6th cell. Syntax means the code doesn't make sense to the computer- maybe you put newobject instead of newObject.

note to self add photos to this after network goes back up

Tuesday, 24 February 2015

the best journal ever

hey mr swaine i bet you love this journal entry ;)

Formative one - Week 3

This week we had to make a game on our own to see how much we've learnt. It was essentially the crab game but solo coded, so not much new was added. I attempted to make a code that made the foe characters move at random increments, however the code seemed to have glitched and will not work. Hopefully next week I will be able to fix the code and get it to work. Turned in the Formative one on monday due to missing Friday for collage stuff.

Wednesday, 18 February 2015

Crab game - week 2

This week we learnt how to input key control into greenfoot, which can be used via the (Greenfoot.isKeyDown("left")); string or just move(); changing various variables can make you change the direction, and how fast/far the object you are controlling goes.

Greenfoot in general is a finicky program, and code strings are caps sensitive. simply typing iskeydown will result in a syntax error, so be careful when typing out new code.

Creating a new world/actor class is as simple as right clicking on the respective hub class and selecting new subclass. you can set a picture and name it in the pop up window. Not much else to say on this.

Other important strings
Greenfoot.getRandomNumber() - generate a random number between 0 and the number in brackets.
super(560, 560, 1); - this creates the size of the world, and how big the pixels in it are.

Personally, I'm enjoying this so far. the code is similar to VB so its relatively easy to pick up for me, so thankfully I'm not super far behind due to multiple technical difficulties and various at home problems. I'm excited for more next week.