Posts

Crashing and Stopping

Image
    Today at my internship I worked on making my little person stop when he crashed into the bird. I implemented the bird in my code last week. This was pretty difficult when I started to do it, but I soon got the hang of it.     First I needed to find the dimensions of my little character. Since my little guy isn't a perfect square, I had to make one. Instead of finding some complicated dimensions of this abstract guy, I just put the dimensions of a square that was very close to the height and width of the little guy. After I did this, I did the same thing with the bird. Since the bird is also an abstract shape, I found the dimensions of a square that was very close to the height and width of the bird.     Now came the hard part for me. I then had to find a way to say that "if this first square (the little guy) crashes into this other square (the bird) then console.log("Crashed") + stop(). The last part of the if statement might seem confusing, but it is...

Making Obstacles

Image
Making Obstacles Today at my Internship, we worked on our same project. Although, today we implemented this little bird into our code. It seemed very complicated at first, but then I looked at my code and noticed that I was basically doing the same thing with another image that was already put onto the page.         How I did this was simple. First I was able to drag the image into visual studio. Visual Studio is an app that allows one to run Javascript and HTML files. Then you have to assign where the bird is going to be on the page. Do you want it to be at the very top left? Do you want the bird to be at the bottom? Do you want the bird to be in the middle? I made it so the bird was on the top left-hand side of the screen. I am now trying to make it so that whenever the little guy runs into the bird, the stop function commences. As a review, my stop function essentially stops the little guy on the screen from walking. Instead of me typing stop(), the ...

Using the Arrow Keys

Using the Arrow Keys     Today was the third time being at my internship. Exciting right!! I continued on the same project that I have been working on from last week. Last week I worked on making a little giph walk north, east, south, and west, through the use of some functions. I would essentially call a function that I had already created. For instance, if I called walkNorth(). This is telling the console that I have called this variable, and that the computer is going to find this walkNorth() variable and run what this variable is assigned to do. In this case, I assigned this variable to walk north. How I did that is a little more complicated, so for now, all you need to know is that this giph walks north when the variable walkNorth() is called. I also made different variables called walkEast(), walkSouth(), and walkWest, and assigned them to walk in there specific direction. Calling these variables one by one is kind of inconvenient because I would h...

Learning JavaScript

Image
Learning JavaScript     Today I continued studying javascript. First I was given a task to try and understand what was going on in a code. I took one glance at this, and I thought, "Okay, what does this all mean." I started stressing, tapping the table, and bouncing my leg up and down, wondering how I was going to do this. I kept on studying this code and started to understand some of the different lines of text. At this moment I felt like a genius. So many thoughts and question were bouncing through my head that I couldn't even think straight. I was just really happy that I started to understand this code.    The whole point of the code was to make this little figurine move to the south, north, east, and west. I did this using multiple things. For example, a lot of variables were used. A variable is a storage place where one can call back the things that are in the variable. If you had something like this, `var a = "Asher Forman."` Then now...

The First Day

Image
The First Day     Today was the first day of my computer science internship. I did not know what to expect when I got there. I didn't know If I was going to enjoy it. I didn't know if I was going to be any good at coding. A bunch of thoughts were going through my head. When I got to the Flatiron School in Downtown, my stomach was churning and doing flip-flops. It was more or less a bit of nervous excitement. I arrived and went upstairs to the lounge area. There we met the person we were interning with. He took us downstairs and into the apartment floor that Flatiron was located on. He was very friendly and took us to a room to get started.      The first thing I did was to start a JavaScript course online. I had done something like this, so I was getting the hang of it pretty quickly. You might be wondering what Javascript is, and so was I when I first started to code. Javascript is a language in computer science that can help with adding effects to a web...