Posts

week 7

Image
 This week we talked about many concepts on the web. Some of the terms are really new to me, and still trying to figure out. HTML -  HyperText Markup Language the most basic found of building a web. <html> <head> <head/> <body> <body/> <html/> CSS-  Cascading Style Sheets   it is use to stylist the elements in HTML.  DOM-  Document Object Model   how web documents information. I practice input.text in the work sheet; during this, I am wondering is there any ways to change typing? Basically how to make a keyboard, can I change the default of typing?Also how can I put a blank space in my interface just for typing? question from worksheet I think I have the right code, I want the text same with my input value, but it just won't show up in the text when I //the button.mouse.Pressed it is also not working. so I think the problem start at text(Input.value(),10,10) Then I add  function mousePressed,...

week 6 presentation

Image
 I made a gobang game in P5. I actually did this assignment back to the class about for() loop. I used for()loop to create the checkerboard and pieces, but back then, I had many bugs like my checkerboard always draw over my pieces and hard to make every click. After learning about class and array, the demo that clicked to create multiple bubbles we did in class inspired me to remake a more practical and useable gobang game. In general, I create a class for the piece and use the array to call the piece multiple times. And also used boolean expression to make the pieces are one white one black happened in order.   I make the mouse press function. In lines 45-47, this is where I create a new piece by pressing the mouse. In line 23-24 I gives the coordinate of the x,y and my pieces also are located by this x,y.  In line 26, I provide an if statement for my click; only in an area, the click can show up the piece on the checkerboard. Start from line 28, the boolean expression c...

Week 5

 This week we learning about % on class, which means  it divides a number and returns the remainder to the integer. I have  trouble to understand % at the beginning, but then I am more understand it by Chinese, 0,1 more like just represent two states(可否被整除).   About % is it always be used with for()? I am kind hard to think in what other conditions(except  checkerboard) I can use %. for the concept of set up your own function I think it is more like a clear way to organized our code, and also have clear way to call deferent code by personalized function.  I think one of  my problem is hard code, I think this can be always for me to remind myself to get code as  clear, simple as possible.  I am also thinking if it is possible to have some simple function, that can work by it own, and I can build a library for myself to use in the future. 

week4

Image
In this week's class, we learned how to use for(). And I feel much more explicit about boolean expression and related terms.   The worksheet inspired my assignment; I am trying to make a Gobang(Five In a Row) game. So here is my thinking process: 1. build a checkerboard with a black stroke and yellow background. 2. set up a boolean expression that an ellipse would appear at the checkerboard's cross if my mouse clicked. 3. set another boolean expression to let one click make the ellipse white and the next black.  The hardest part is keeping the piece in the checkboard and changing color in a regular pattern by using Boolean expression. But in the process of making this game, I think there are more problems than I thought. 1. To let the piece stay. After using the boolean expression with the mouse is pressed, my piece only appears when I press the mouse, and it won't stay. So I am thinking of using function mouse pressed, or mouse clicked; I still don't know the differenc...

Week3

Image
     This week we learned about Boolean, if, if else, else... I think I do feel very challenging about coding now. The understanding of boolean really needs logical thinking. I watched the video repeatedly about boolean but I still feel confused by some concept of it. In my understanding I think the use of the Boolean is to create a switch. How can my var be understand as a Boolean number? In some example I saw some cod  like let x=-1 and then have if x==1 dose some thing like this be understand as boolean? Is only 0 means false and other number means true? Also I am kind confused by  is it same if I let x=1 then said x==!x with if I just said x=true? Also I feel confused by ==. I know it means is something equal to something, but is it only shows up after if? And is it always used with Boolean? In my understanding I think Boolean means define a variable is true or false. Also kind don't understand the difference between var and let. In this week's worksheet I a...

ICM Week 2

Image
In last week, the drawing exercise was hard to let me understand what coding can do. After this week's class, I feel like coding gives more ways and opportunities for users to interact with the browser, and coding is more like setting up rules for users when they are going into the browser. I strongly feel that the process of coding is very similar to math; finding patterns, geometric, and spatial imagination is required when I am trying to think about the logic of coding. When I was coding, I enjoyed using my brain, but I think when it gets more complicated and more complicated, it is going to bother me a lot.   Now I understand one of my friends said he doesn't want to do coding anymore because he thinks he is not intelligent enough. Coding is hard!  In this week's assignment, I met many problems; first of all, I want to add max to my favorite mouse X. In the beginning, I am trying to use maxValue() to my mouse X, but it doesn't work because it requires more parameter...

Week 1 Blog

Image
           This week is the first time in my life that I am learning about coding. I always know coding is a powerful tool in the internet age. If there is anything wrong with your computer or something your application can not do if you know how to code, coding can solve these problems. So I am excited to learn it, and I know it will be challenging, but I want to use this powerful skill in my future works.    I have 0 background in computation, and I don't understand the differences between different coding apps. For example, the one p5.js we are using is a codding web app; what can it do exactly? Can I use it to design my website? I am a photographer, thinking about what I can do about computation to develop a visual presentation. I know some emerging visual technics, like 3D scan, using the app reality capture, and a working friend has been coding something to make the app automatically develop the 3D module. Also, I have heard that my fri...