Monday, September 29, 2014

Monday, September 29th

Today I was at the Genius Bar, and I watched 3 and 1/2 videos ( towards the end of the last video, I fell asleep). It turns out that I am farther than I thought I was- I don't know why, I thought that I was on video 19 or something, but I was actually on 22 and after today I am up to the beginning of video 26.
I finished watching video 25 at home.

Once again today,  Tommy and I had no customers at the Genius Bar.

The first video I watched was about the animation of the image. We had the balls in our world, that moved and came in wherever we clicked the mouse. After a lot of clicking, the world would get very crowded. So what Michael Kolling wanted to do was to make the balls fade out. He wanted the balls to become more and more transparent as they went on. He taught us that the transparence of the ball ranged from 0-255, with 0 being completely transparent. We created an if statement that said, if the alpha( transparency) of the ball is greater than 0, subtract 1 from it. Else, if the alpha is not greater than 0, remove the ball from the world.  The statement looks like this:

void changeTransparency()
    {
        GreenfootImage img = getImage();
       
        int alpha = img.getTransparency();
        if (alpha > 0)
        {
            img.setTransparency(alpha-1);
        }
        else
        {
            getWorld().removeObject(this);
        }
    }


After that, I think we finished with the ball world. I am not sure what we will do next as he did not do anything new in the two following videos.

The following video was a pretty pointless one, in my opinion. He showed us a sort of brick breaker game, but without the bricks - just a paddle and a ball. He didn't teach us how to do it or anything, and that's why I was confused as to why he showed it. I didn't learn anything from it.

The video after that was a very long one. It was about dealing with errors ( a bit ironic, I thought, after being stuck for 3 classes with problems). He talked about syntax problems and about runtime problems. My problems were mostly runtime problems. The thing is, with that video he could not have helped me much because the examples of runtime problems that he solves are the ones in which a whole new screen pops up and gives what the error is. He taught how to read that language and tell what the error was. I think that this video was incredibly important and I think I didn't understand everything that he taught. I will definitely be re watching that video.

I am trying to find a final checkpoint of some sort, to wrap up and be able to present in the next 4 classes, however I have a dilemma. I am not sure if he will be completely starting on a new project, or if he will be doing more with the balls. And I don't think that I have enough time at all to start on a whole new project.

Next class I will try to organize the remaining 4 or so classes before the end of the quarter, and I will decide on a final goal for my presentation.

Thursday, September 25, 2014

Tuesday, September 23rd

Today I watched two videos.

The first one was about the manipulation of images. Like last time's video, it was also quite complicated. What we did was when creating balls, we wanted them to be created like this: they were random sizes, in random colours, and moved at random speeds. To do this, we had to import classes and actions from not the Greenfoot classes, but from the real Java ones. Near the end, we had written quite a long code, and this is what it looked like ( just for the creation of the balls like we wanted them) :
and this is what the actual program looked like when run :


We can see that the balls vary in size and color.

The second video I watched was shorter and like many previous videos talked about the organisation of the code. The photo above is a photo of the code after it was organised. Before that, all the actions from the "setImage" and "Color" classes were all in the first " public Ball" one.  Michael helped us to make the code more clear and easier to read by separating those actions into 3 different acting methods.

I am not sure if I have said this before, but especially in these two videos, Michael Kolling has done something that I don't like at all: he teaches us code, and how to write it - and then in the next video, he erases half of it or changes it. I wonder why he does that. Why doesn't he simply teach us the final form in the beginning instead of wasting time and creating lots of videos?

I am happy with my progress. I will start working on my presentation soon and next class I will as usual watch videos. 

Friday, September 19, 2014

Friday, September 19th

Today I watched two videos. It was a half-day, so I did not get a lot done.

The first one I found rather boring- it was no code, just learning about the language of code. Although I find it boring, I do realize that it's important and I will need to know it in the future if I ever write my own code. I learned a lot about class methods and instance methods. What each one is, how they are important and how they are used in code. I learned that instance methods are used a lot more than class methods. I don't understand why that video needed to be 25 minutes long...

The second one talked about image manipulation, and the main thing that we did was change the background of the world. Before watching it, I thought it would be easy and all I would have to do was click " add image" like I would with an actor subclass, but it turns out it was more complicated than that. We wanted to fill the background with one color, and for that you had to go through a process of creating multiple, complicated things in order to achieve that one color background. In the end though, I understood what we needed to do and did it without a problem.

I didn't do anything else this class. Next class my goal is to simply keep on watching videos, like always.

Wednesday, September 17, 2014

Wednesday, September 17th

Today, I finally got back to watching videos.

I only managed to watch two videos, but one of them was 30 minutes long. It was a relief to finally forget about anything that had to do with snakes and turtles, and just start a new project from the start. What we did was we put balls into a world, and made them move around. To be honest I thought it would be 2 lines of code to write that, but it took a lot more. The reason for this is that we had to inherit some actions ( such as atWorldEdge) from the animal class. Since the ball is not an animal, we had to go back to the animal class code from the old program and copy it from there. Also, it took a lot of code just to simply get the ball from the start to move to the left instead of the right.

What I am learning from this video and of course from the past problems that I had is something very important: even though some things may look easy to code, it doesn't mean that they always are. It did take a long time to watch that video. Once again, I think that Michael Kolling took way too long, and especially in that one. I like his videos better when they short and explain everything quickly.

Today, while working, a question came to me. When we are working with Greenfoot, there is a Greenfoot class documentation. Meaning some actions are inherited from the actor class, some from the world class, some from the Greenfoot class and more. I asked myself " when you code Java to make an application, where do all the actions come from?" Is there a HUGE Java class documentation? I thought this was an interesting question.

Apart from that, I was happy to get back on track and to watch videos again. I hope to watch many more videos next class and find a new game idea.

* I wrote this blog post last night, but forgot to post it. *

Monday, September 15, 2014

Monday September 15th, 2014

Today, like the past 3 classes, included no new videos, and a lot of problems.

I got to class, and compared my code with May's. After looking at a few things, I changed something in my code ( I don't remember exactly what) and it turned out that the counter worked after that ! But, of course, there came another problem. After I reset it, the number of lettuces would not reset and the game would stop after even one lettuce was eaten.

This problem brought us all the way back to one of the first problems that I had. Once again, Mr. Daly tried everything that we possibly could've tried, and still found no solution. We also tried to find a solution to the issue that I wanted the game to stop only once all the turtles in the world were eaten, and not only according to a score counter.

In general the problems were beginning to frustrate me a lot, and I could tell it was doing the same thing to Mr. Daly. I felt that I was losing a lot of valuable time of watching videos on trying to fix what seems to be these never-ending problems. He and I agreed that everything in my code did look logical, but we don't know what was causing all these problems.

So, as a final solution, Mr. Daly advised me to leave this program and keep going on, and maybe come back to trick the turtle later on in the year. This is what I plan to do.

It makes me happy to know that I will finally have a chance to catch up on some videos and learn new things. I will stick more exactly to what he says this time when  starting a new program. I will try to watch as many videos as I can, and will even watch some at home to help get back on track as fast as possible.

Thursday, September 11, 2014

Thursday, September 11th

Things for me are getting very very complicated. Today I tried to work on the continuation of a video that I had already started watching at home - how to add a counter to my game. I also tried to figure out a problem that also came up at home- whenever I would run the game, a million turtles would come and keep coming into the world.

The first problem with the turtles, I started having at home. My original intention was that every time a snake ate a baby, a new turtle would come into the world. Even if I didn't have babies in the world, the turtles would keep on coming and coming and they would fill up the screen. Turns out ( thanks to the help of Mr. Daly) that I had made the mistake of putting the action " createNewTurtle() " into the actions. When I run something, it is doing "act" over and over again. Therefore, it was doing act over and over again, and it added turtles over and over again to the world. In the end, the solution was to take out the " createNewTurtle " from the public void act.

Next, I wanted to modify something about my game. I realised that the game would stop once 9 turtles were eaten. But what about when the snake eats a baby and a new turtle comes into the world? I want the game to finish when all the turtles in the world are eaten, not only the 9 that are there in the beginning. I think that this is a problem of adding a line that makes the addition of turtles eaten be deducted by one point. I wasn't sure of how to do this, and neither was Mr. Daly, so I sent him an email with my code. I hope that he helps me to find a solution to this problem as soon as possible.

The third issue really frustrated me, and I still haven't figured out the problem. It was adding a counter to the game. Although I followed every instruction that he mentioned in the video, it didn't work. The first time that it didn't work, I realised that it was because my game was different than his! Although I follow all of what he teaches us in the Joy of Code videos, I like to change things up a bit and make the game more of my own instead of simply copying and pasting the code from the video into my Greenfoot. So after I realised I had to take his instructions and apply them differently since I have a different game, I got stuck. Once again I called Mr. Daly over to help me and we thought about it together, but we couldn't seem to find a solution. There were a lot of issues that I don't even understand well enough to explain on here. I tried to re watch some parts of the video that explained what to do, but still no luck. I will ask some people like Evan to maybe give me a hand tomorrow.

In the near future I really hope to get rid of these problems in my code. It makes me angry to think that I could be a lot farther ahead in his playlist, but I am stuck having to fix these problems. When I do finally get back on track, what I will do is try to do more exactly as he says in the videos. This is so that next time, I don't get stuck with problems that he doesn't resolve in the videos and that I don't have sufficient knowledge to fix myself.

Tuesday, September 9, 2014

Tuesday September 9th

Today, I didn't really learn many new things.

Before even starting anything, Tommy and I went upstairs to the library to man the Genius bar. However, nobody came to ask for our help during the entire block.

Sitting at the Genius Bar, I worked on the mid-quarter assessment. To be honest, I found it very long. I think that an assessment like this should be given at the end of a quarter instead of through half the quarter. In fact, it was so long that it took me the whole block to complete it! I found some of the questions confusing, as I didn't know what to put as evidence that I show up on time every day. But apart from that, most of the questions were fine.

Since I pretty much skipped a whole block and didn't watch any videos, for homework over the next 2 days I will watch a couple of videos to not fall behind and keep watching videos everyday. These videos will make up for the ones that I should've watched while working on the mid quarter report.  I will describe these next videos in the next post that I write.

Mid Quarter Report #1



Mid Quarter Report #1

Describe your learning in this course so far.

So far in this course, I have learned a lot. I started off in August with absolutely no knowledge about code.  I didn’t even know what an if-statement was, but now here I am and I have learned so much in these 3 weeks. Those videos by Michael Kolling on the Joy of Code are very effective and although he teaches slowly, he teaches well. I haven’t had one single problem by learning with Michael Kolling, and I definitely hope to finish all of his videos before the end of the first semester. I think that the code that I have learned so far is not so complicated, but it is still new for me, and I think that I understand it pretty well.

Give a summary description of what you have learned in this course so far.

In this course so far, I learned the very basics of java coding. I learned how to use an application called Greenfoot, which helps beginning coders to learn and to create small games and other things. I learned through videos on YouTube how to start coding. It was very basic things, such as how to insert an object into a world and make it do something, even as simple as just moving around. After that, I made more interesting things like controlling the character, inserting an enemy into the world and hope to achieve much more than this. I learned the basics of coding, like if-statements, how to lay out code, and organizing, add notes to it, and in general, just simply how to write code.

Typically this student makes effective use of class time by increasing his competence and confidence using software that he has chosen.

Does this statement describe your performance exactly?
Yes, it does.

Give one piece of evidence to support this.
I have reached the 13th video on Michael Kolling’s Joy of Code. Proof that I work a lot during class is my blog posts: I have plenty to write every time, and I do write a lot every blog post that I do. It reflects on how much I have worked in class and how I solve my problems or how I have worked on Greenfoot that day.



She attends all class sessions, coming and leaving on time, making sure to make up missing time by working during free periods or at home.

Does this statement describe your performance exactly?
Yes, it does.

Give one piece of evidence to support this.
One piece of evidence that proves this correct is the attendance list that you keep. If you look at it, you will see that not once have I arrived tardy to class or have missed a class.


His oral communication during class is focused on the learning tasks that he is engaged in.

Does this statement describe your performance exactly?
Yes, it does.

Give one piece of evidence to support this.
If you ask either Tommy or Yeomin what I talk about in the class, both of them will tell you that the only time I talk to them is when I need help with Greenfoot or I am asking them a question.

His written communication (blogs, e-mails, and reports) are done according to deadlines and contain enough information for the teacher to understand what he is doing, what kinds of problems he is facing and how he feels about his learning experiences.

Does this statement describe your performance exactly?
No, it does not. It almost describes it perfectly.

Give one piece of evidence to support this.
If you look at my blog posts, they are mostly all on time. They are all written on the day of the class, except for only a few of them. All of my blogs are very thorough.

If the statement does not describe you exactly rewrite the statement so that it does.
His written communication (blogs, e-mails, and reports) are almost always done according to deadlines and contain enough information for the teacher to understand what he is doing, what kinds of problems he is facing and how he feels about his learning experiences.

How can you improve your performance in this area?
I should write all of my blogs the day that I did the class. I should treat it as something that I have to do right after, and this is what I have started doing: I always leave a tab with my blog open on the days with computer applications so that when I get home and look at my computer, I see that tab open and it reminds me that I should write a blog.

During class he/she remains focused on the task at hand and generally respects the integrity of the learning environment for all students.

Does this statement describe your performance exactly?
Yes, it does.

Give one piece of evidence to support this.
If you look at the cameras that you have placed to see us work you will see that my screen is always either on a video or on Greenfoot, or on something else that is related to what I am doing. You have seen me work and I think that you know that I don’t disrupt the class in any way.


He/she has positive attitudes towards acquiring technology skills, and makes a conscious effort to acquire new skills and apply them in meaningful ways.
Does this statement describe your performance exactly?
Yes, it does.

Give one piece of evidence to support this.
In my blog posts, whenever I have new ideas I mention them and I set them as my goals to achieve using Greenfoot.

He/she is an independent learner, who tries to solve problems by himself/herself, but finds effective ways to overcome problems using a variety of other resources.

Does this statement describe your performance exactly?
Yes, it does.

Give one piece of evidence to support this.
When I had that one major problem with Greenfoot about 2 classes ago, I spent a long time (almost a whole class) trying to search myself for the solution. I then called for Tommy to try and help me, and finally since I couldn’t find someone to help me, I called Mr. Daly, who helped me resolve it because he has a lot of experience.



He/she is respectful of all members of this learning community and his/her behavior is in compliance with all school policies, in particular the RUP (Responsible Use Policy) and Academic Honesty Policy.


Does this statement describe your performance exactly?
Yes, it does.

Give one piece of evidence to support this.
If you were to ask any of my peers, they would tell you that I respect everyone in the classroom and most definitely do not copy someone else’s work. The only time I look at someone else’s work is when I need help. If you looked at the cameras, you would see that I am using my computer responsibly.


This is an appropriate course for this student and the performance of the student is such that it can be said that the student is meeting the standards well. His work, on the whole, is good.


Does this statement describe your performance exactly?
Yes, it does.

Give one piece of evidence to support this.
This class is appropriate for me since I came into it knowing nothing, and the point of this class if for everyone to improve on and learn about what they are working on. As my code shows, I am working well, and also my blog posts would show this too.

She is making good progress with her chosen module. She is learning new techniques each class and building on her previous knowledge.

Does this statement describe your performance exactly?
Yes, it does.

Give one piece of evidence to support this.

To prove that statement above correct, all you would have to do is look at my blog posts. I always explain exactly what I do and what I learn during the class and specifically what videos I have watched. If you read all of them , you will notice that I have made a lot of progress and have acquired many new skills.









What grade-in-progress do think accurately describes your overall performance in the course so far?

A-Outstanding

Does the structure of this class suite your learning style? What could be done differently?

I think that this style of learning is great for this kind of learning. I don’t feel pressured to do anything and if I feel that one class, I have to spend it working on cleaning my code or something of the sort, I know that I can do it and I will not fall behind, because there is not a general course curriculum that everybody has to follow. One thing that could be done differently is that we should more often take 10 minute or so breaks and talk to other people about what we are doing and what problems we have encountered in doing this.



Do you feel that you understand how assessments are made in this course? Do you have any questions or comments at this stage?

Yes. I think I do understand. I get graded based on how I work. Even though there is not an exact curriculum, Mr. Daly is capable of telling how much I work. If I get nothing done in the first 2 months, then I will probably get a D. However, by working constantly throughout the semester, writing good blogs, communicating with the teacher and even working out of the classroom- that is how you get a high assessment. I have no comments about this for the moment.









Friday, September 5, 2014

Friday September 5th, 2014

Today I arrived to class knowing that I would have to solve the problem from last class.
I went on greenfoot.com and tried to find a solution but I couldn't find it.

I then went on to call Mr. Daly and we worked together on it. I told him that the program only worked the first time, and then never again. He told me to put , instead of     lettuceEaten == 30, to make it >= 30, which means greater than or equal to 30. That worked at the beginning, and then without resetting it, we went on, and the game stopped after turtles ate one lettuce. We were confused... and then Mr. Daly managed to figure out what the problem was. When I first started Greenfoot, everything started from 0, including the counter. The program worked the first time, and it stopped after eating 6. But we learned that even once we resetted the game, the counter would continue from last game, meaning it didn't stop because it was always more than 30 and never actually equal to it. When we changed the == to >=, it stopped after each lettuce eaten because that lettuce counted + the lettuce from last game played, which equalled 35 ( which is more than 30) and so the game stopped.

What Mr. Daly told me to do was to add a line of code that looked like this:

 public Turtle ()
    {
        points = 0;
    }

This told the system: every time that we restart a game, reset the counter to 0. And that turned out to be the solution.

About 10 minutes later, Tommy taps me on the shoulder and says listen to this. It was a video and Michael Kolling was coding something that included variables, and he mentions for 3 seconds that the == had been a problem and that we should put >= instead. I was a bit frustrated to hear that after having spent a class and a half trying to solve that problem.

After we had found that solution to the problem, I went back to work. I started to fix a few things, such as the number of lettuces that actually had to be eaten for the game to finish, and I added a few sounds to my code as I didn't like the ones that Michael suggested we put in.

Towards the end of class, I watched a video that explained how to add another bug, and once a bug was eaten, another one would automatically be put into the world. I found that video a bit confusing, so I will re watch it over the weekend to get a better understanding. But apart from that, the video gave me an idea for my game:

I will add babies to the world. These babies do not eat anyone, and they just move randomly across the world. The point of the game is still the same: for the snake to eat all the turtles before the turtles eat all the lettuce- but now, there will be babies in the world. If a snake passes a baby, it will eat it automatically, but he must NOT do that. If a snake eats a baby, I will program for a deduction of points, and the addition of a new turtle into the world. So if by accident the snake eats the baby, then the player will lose points and the game will become harder by a new turtle coming in to the world to eat the lettuce.

Next class, I hope to be able to develop this game idea even more.

Wednesday, September 3, 2014

Wednesday September 3rd, 2014

Today was not a great day for me. I got to class opened my laptop, plugged in my earphones thinking I was going to watch many videos and learn a lot of new things, but it didn't turn out like that.

I opened Greenfoot before watching the videos like I always do, and I clicked run. And there was a problem: every time 2 turtles passed in a world with 6 lettuces, the game didn't stop. I found this weird because I had coded the game to stop only if the turtles had eaten 30 ( each lettuce is worth 5 points) of these lettuces.

I was not thinking very well and spend a good half an hour trying to figure out what the problem was, I even called Tommy to see if he could help me, and he didn't know what to do.  Eventually Mr. Daly came, and he explained to me that when I add a maximum of lettuces to be eaten, it means that ONE turtle has to eat that many lettuces. The reason for why the game didn't stop was because one of the turtles had eaten as an example 4 lettuces, and the other only 2. This means that neither of the turtles had eaten 6 to themselves.

And so I fixed it by doing what Mr. Daly told me to do: by creating one general counter for the both turtles, so that when one turtle ate 4 lettuces and the other ate 2, it would accumulate and would be counted as 6 and the game would stop.

I thought this would be the end of my problems, but I was wrong. So I added two different counters
(as shown below): one of them was called myPoints, and recorded how many lettuces turtle #1 or #2 ate, and just points, which recorded how many lettuces were eaten in total.
At first I only added the "points counter", which worked fine and told me when 6 lettuces were eaten by both turtles, but it did not tell me how many each turtle ate specifically. So then when I added the myPoints, and didn't change anything else: it stopped working.  Unfortunately at this point it was very near the end of class and so I did not have very much time to try and think for a solution to this problem.



After playing around with it at home, I've only managed to find out one thing, which is interesting: the code works and the turtles stop moving after having eaten 6 lettuces, ONLY THE FIRST TIME that the program runs. If I reset it after that, it stops to work and the turtles just keep moving forever.

I will continue to play with it at home. My goal for next class, if of course to find a solution and to get back on track as soon as I can.

Monday, September 1, 2014

Monday September 1st, 2014

Today I watched 4 videos.

Before watching them, I made a quick adjustment to my code that I said I would do by changing the point of the game: making the snakes controllable and trying to eat the turtles.

The first one was titled "Make it your own". He talked about modifying and changing the images of the objects in the world. So instead of a lettuce, he put a human. Instead of having snakes, he put asteroids/rocks. And instead of having sand as the background, he put space. This first video was not really new to me, because changing things to what I wanted them to be and changing images is something I did since the beginning, as I showed in a previous blog post.

The next video that I watched was the one that explained how to add sound to the little game we are creating. It was relatively simple. I personally don't like the sounds that he made and I think that they don't flow with the game well. I wanted to try downloading new sounds to replace his, but unfortunately the sites to download these short soundtracks were all blocked by the tech department. I will try to find out a way to get these sounds. I also learned that to put the sounds in the code, they have to be a .wav file so I need to remember to convert the file if it is not already a .wav .

Next I watched a video about organising code once again. I found this video a bit uninteresting and it did not teach me much. What he recapped was how to add notes to your code for human readers to understand what it is about, which I already knew. And he also mentioned about the whole general format of a code, which I also understood from before.

Lastly, I watched a video about adding variables to the code. I think that this was by far the most interesting video and also the most important one for me to learn out of the 4 that I saw today. It made things more interesting and a bit more complex. I realised that now thanks to this feature I can make the game more game-like. I will tell you a bit more about the game below. This was a great video to watch because once again, he explained very rapidly for about 2 minutes in the beginning, and then for the rest of the video he explained more in depth. I saved some time watching that video.

Today I made myself a goal. I want to create a small game that includes this:

It is a world where there are turtles, snakes, and lettuce. The turtles eat the lettuce, and the snakes eat the turtles. I would like to create a game where the snakes (which you control) have to eat all the turtles, before all the turtles eat the lettuce. If it's possible, I would put levels and as the levels go on, there would be less lettuce, and more turtles.