This is my first journal entry.

Last class we linked our folders to the Internet using Github. We went into Terminal and were able to see our desktop as a folder. We went into our website folder using code. That was what we linked to Github.

How to add things to my online website.

  1. Open my terminal and navigate to my folder by typing cd ./desktop/c27if.github.io
  2. If I want to see anything I added I can type git status and it will show me anything I changed.
  3. To add the changes I made to my website in Sublime Text I type git add .
  4. Then I commit my changes and add a message to myself using git commit -m "whatever I just did"
  5. When I want to finalize the changes, I write git push
  6. 10/6/23

    I changed around my home page quite a bit and have an idea to turn it into a female rage thing. I also changed my projects page to be a cool potions lab. I'm still trying to figure out how to do exactly what I want, but I have a lab with Molly soon and I think she'll help me figure it out.

    10/13/23

    It's Friday the 13th. We've done a lot of Molly showing us things, like the boxes project, and not giving us a lot of time to work. I truly want to make my website pop, but I feel I don't have the time. In other news, we've learned how to make animations (mine hasn't worked yet) and used the classify tool to group several divs under one category. I'm trying to make mine an alpaca vs alfalfa thing, but I may need to rethink my strategy.

    11/1/23

    I finished my jumpscare after a lab with Molly about if/then commands (kind of like Scratch). I'm very proud of it because I find it funny and a little disturbing (kind of like The Nun movie). Speaking of which, I am setting a goal for myself unrelated to comp sci to have watched Saint Maud (a movie) before the end of senior year and preferably with friends. Halloween was very fun but I think I'm getting a little too old for it. 78th street is CRAZY because they block of the street and there's loud music and tiny children trying to cut you -- all the good stuff. It was a little stressful because I had two majorly minor assessments due the next day (today), but I managed to get them done with plenty of time to spare.

    11/2/23

    3 Questions I Have about the Video:

    1. How does the "," command work in JavaScript?

    2. How do JavaScript equations work and when should you use them vs. using a function?

    3. How can you change other elements of a div other than the color?

    Bonus Question: Does Molly have a cat (I heard a meow in the video)?

    11/10/23

    What is a function (in JavaScript)? A function is a recipe that you create and can then do whatever you want with it. It's a lot more efficient than just making a series of divs, and you can use the function by saying its name. Within the function, you define things that don't already exist in JavaScript so the language understands what you're telling it to do when you do anything outside of the function. Within a function you can also create a div and then outside of the function you can add an event listener to do something to that div.

    11/20/23

    We learned how to track things in JavaScript (such as clicks) and I made a project where the viewer has to click on the screen to see the things I am grateful for. I'm pretty proud of it, especially because it uses a new concept we just learned, but I might try to edit it and make it more interactive. I also might not, just because I'm pretty happy with where it is now.

    12/2/23

    For homework this week, I went on ChatGPT and asked it questions about JavaScript coding. I specifically asked it about when to use commas in JavaScript vs not or using semicolons. I learned that commas are used to separate ideas in the same phrase, just like in English. They're used when you need to set different variables, like saying var x = random number, y = random number, etc. You can also use them to separate inputs in a function or logging things in a console.

    12/15/23

    This journal entry is just explaining the code to my project titled Pizza Remake. It is the green potion on my projects page. First of all, I created three divs (not using a for loop) that looked like humans. I created one that lookeed like a void, which I titled black hole because void is apparently already a command in JavaScript. My code for this project started off a bit tricky because I didn't want the humans going on forever since the whole point was to drag them into the void (which played Beep Beep I'm a Sheep when you clicked on it). Then I made it so the void created a random variable whose entire point was to create divs. The hardest part of this was that I had to set the background image to any random url that I plugged in (which I'll get to in a bit). Then, I added several event listeners that listened for when you click on any of the human divs. Then, it set the variable I just created to be the background of said div and turned that div's opacity to 0. That way, it looks like the div disappears when you click on it. Once you click on the void, that div seems to reappear when it is, in fact, another div that I created as part of a variable.

    2/21/24

    I haven't written a journal entry in a while... sorry about that. Happy new year (in February)! I just created an rgba project to deal with color. We used Math.random in a few variables to generate rgba values and then added an event listener to make those values change when the mouse is moved. The most complicated part was making sure that whenever the mouse was moved the numbers never exceeded 255 (the limit for RGB).

    2/23/24

    Four questions about web design/color: 1. Where do you start? How do you make web design correlate with the idea of the website? 2. How do you figure out what color scheme correlates with a website idea? 3. What are some challenges you encounter while designing a website? 4. What colors look aesthetically pleasing?

    2/28/24

    This journal entry is simply explaining the coding I've done over this quarter. I've already explained the taco/face/pizza code. For the array (haiku project), I created two variables, one of an image that would show up inside a picture frame (just a div) and the other of the actual haiku. For both of these, I created an array of possible images and haikus, and made sure the haiku was in the same spot in its array as the image in its spot (e.g numer 0 in the array or number 4 in the array). I used hard brackets so the code would know it was an array. Then I created another variable that would generate a random number, 0, 1, 2, 3, or 4 using Math.random (and then Math.round to make sure it was a whole number). Then, I added an event listener that changed the innertext of the haiku and the background image of the image div to correspond to the value associated with that number in the array. This happened on a click. For the slideshow, I coded it using the tips on reveal.js, so if you want to know how to make it yourself, I suggest going on that website. For my UFO/car project, I made the UFO move whenever an arrow key was pressed. To do this, I made two variables, x and y, which changed depending on wihch arrow key was pressed. For example, if you pressed the down key, the y value was increased by 10, which was then changed the UFO's style section and increased the "top" value by 10. Ironically, that makes the div move down on the page. Then I made an input project using if/then statements. This project will only accept one input as the "right" answer, and when anything else is inputted, it's coded to create an alert that tells the user that they're wrong. The rgba project logs event.clientX and event.clientY (the x and y coordinates of some element on the page, in this case the mouse), then divides that number by 255 (the width of a screen) to create an rgb value for that specific color. This value changes whenever the mouse is moved.