Wednesday, November 30, 2016

Day 2 Space Project

Just finished my comets and asteroid belt with its full detail. Changed the asteroids to being curvy with arcs instead of circles. Put comets in fixed places. Putting all of our code together and organizing it now.

penColor("black");
dot(2000);
penUp();
function drawComet(x, y, size, speed) {
  penRGB(238, 71, 29, 1);
  moveTo(x, y);
  penDown();
  dot(size);
  penUp();
  turnTo(45);
  moveForward(size);
  turnTo(135);
  penDown();
  moveForward(speed);
  penUp();
  moveTo(x, y);
  turnTo(180);
  moveForward(size);
  penDown();
  turnTo(135);
  moveForward(speed);
  penUp();
  moveTo(x, y);
  turnTo(130);
  moveForward(size);
  penDown();
  moveForward(speed);
  penUp();
}
drawComet(40, 383, randomNumber(5, 10), randomNumber(20, 40));
drawComet(240, 390, randomNumber(5, 10), randomNumber(20, 40));

function drawAsteroid(x, y) {
  penRGB(132, 72, 12, 1);
  penWidth(5);
  moveTo(x, y);
  penDown();
  arcRight(90, 2);
  arcRight(90, 2);
  arcLeft(90, 2);
  arcRight(90, 2);
  arcRight(90, 2);
  arcLeft(90, 2);
  arcRight(90, 2);
  arcRight(90, 2);
  arcLeft(90, 2);
  arcRight(90, 2);
  arcRight(90, 2);
  turnTo(270);
  moveForward(5);
  turnTo(180);
  moveForward(5);
  turnTo(90);
  moveForward(5);
  penUp();
}
for (var i = 0; i < 40; i++) {
  drawAsteroid(randomNumber(10, 300), randomNumber(15, 125));
}

Monday, November 28, 2016

Day 1 Space Project

It took me one class period to finish both of my project with medium depth. Next class I will work on adding more quality but now I am satisfied with a skeleton of my assignments, comets and asteroid belt.

penColor("black");
dot(2000);
penUp();
function drawComet(x, y, size, speed) {
  penRGB(238, 71, 29, 1);
  moveTo(x, y);
  penDown();
  dot(size);
  penUp();
  turnTo(45);
  moveForward(size);
  turnTo(135);
  penDown();
  moveForward(speed);
  penUp();
  moveTo(x, y);
  turnTo(180);
  moveForward(size);
  penDown();
  turnTo(135);
  moveForward(speed);
  penUp();
  moveTo(x, y);
  turnTo(130);
  moveForward(size);
  penDown();
  moveForward(speed);
  penUp();
}
for (var i = 0; i < 4; i++) {
  drawComet(randomNumber(10, 300), randomNumber(130, 440), randomNumber(5, 10), randomNumber(20, 40));
}
function drawasteroid(size) {
  penRGB(74, 52, 1, 1);
  dot(size);
}
function drawasteroidbelt(x, y) {
  moveTo(x, y);
  drawasteroid(randomNumber(4, 6));
}
for (var i = 0; i < 40; i++) {
  drawasteroidbelt(randomNumber(20, 300), randomNumber(100, 20));
}

Wednesday, November 23, 2016

Unit 3 Stage 7 Smiley Face and Extended

https://studio.code.org/projects/applab/xSrZ6VK5CK6kgh3xq5APgQ


https://studio.code.org/projects/applab/q18fgTyJnfaUVfhsewrJ9g


Monday, November 21, 2016

Functions with Parameters


  • Develop a rule for deciding when to create a function with a parameter rather than a normal function. Below your rule write a couple sentences justifying your rule.
    • If you are going to call the function back with a different value. 
  • When do you need a function with a parameter?
    • When you plan on calling back the function but with a different value for specific variables every time. 


What is Iteration

What is Iteration?

Iteration is repetition that is defined by specific actions and can be started and ended with specific commands. Otherwise known as loops. While, Do While, Conditional loops.

I have used loops to help sort things with node,js and I have used them many times before with visual basic. I have also used loops in other languages like python.

While x = 2
print "x = 2"
x + 1
Loop

Thursday, November 17, 2016

Unit 3 Stage 6

Imagine that you have two programs that drew the diamond-shaped figure. One program uses functions as we did in the previous lesson. The other doesn’t use functions; it’s just a long sequence of the turtle’s primitive commands. Which program is more efficient? Make an argument for why one is more efficient than the other.

The one with functions because it is more readable, therefore it takes less time for the programmer to read, understand, and code the program. 

Where else in your life have you seen layers of abstraction? Connect the idea of layers of abstraction to some other activity.” Provide at least 3 examples and describe the connection. Post on your blog.   Do the questions at the end of Unit 3 stage 6

Wednesday, November 16, 2016

Functions Unit 3 Stage 5

Prompt: List the benefits of being able to define and call functions in a program. Who specifically gets to enjoy those benefits?
The benefits of being able to call functions later save time, space, and a headache because the programmer does not have to re-make or copy lines from previous code over and over again. Therefore it specifically benefits the programmer.
Prompt: How is the use of a function an example of abstraction?
It makes things easier to read without writing every step out every time.

Prompt:  Explain more than one reason why programming languages have functions.
They make reading the code easier, they make creating the code faster, and they make big problems simpler.

Monday, November 14, 2016

Efficiency in Programming


  • What does it mean to be efficient in programming?
    • In programming to be efficient means to write a code that takes up less resources than a previous code did. Recourses can be time, battery power, or storage. Most often having less lines of code is an indicator of more efficient code. 
  • What are some resources that might be concerning in programming and why do they matter?
    • Some resources as I mentioned before include time, battery power, storage, bandwidth, servers, or any other form of measurable things of value basically. They matter because we do not want to waste valuable resources if we do not have to.  

Unit 3 Stage 4 efficiency

  • What surprised you about programming with such a small set of basic commands?
    • That I could still finish that assignment with time  to spare in class.
  • Were you able to be creative with such a limited set of tools?
    • No, not really especially since I was limited to one color and only straight lines. 
  • What was most frustrating about this activity? If you could add one additional simple command, what would it be, and why?
    • The fact that there was no right turn made the code a lot longer and more tedious than it should have been so I would have wanted to have a right turn command. 
  • Draw (on paper) the simplest image you can that we would be unable to create with our “building block” commands, and explain why it would be impossible to create.
    • A circle, a curvy line. 
  • Draw a second image we would be unable to create with the given simple commands, but for a different limiting reason than you cited in the first drawing
  • A rainbow because it needs colors. 

Wednesday, November 9, 2016

Minimum Card Algorithm

  • How do you know when to stop?
    • We have an end statement where if you get the lowest card possible or have gone through the entire set you stop.
  • Do your instructions state where and how to start?
    • Yes, it says to put down cards and start with two new cards. 
  • Is it clear where to put cards back down after you’ve picked them up?
    • Yes, put them back in the same position and take a new card. 
  • As we look at these algorithms you came up with, we can see they are not all the same. However, there are common things that you are all making the human machine do and commonalities in some of your instructions. Can we define a language of common Human Machine commands for moving cards around? What are the commands or actions most of these instructions have in common?
    • Yes, most of them say to start in a certain place after putting the cards in a line. All of them should define the face cards and the Ace. Pick up, put down, move left, move right, move up, move down, flip over. 

Monday, November 7, 2016

Unit 3 Day 1

    • “Were you always able to create the intended arrangement? Were your instructions as clear as you thought?”
      • No, some people (Alex) got confused by what I thought were pretty clear steps. I thought that certain points like if the wheels were inside or outside were self-explanatory from the instructions.
    • “Why do you think we are running into these miscommunications? Is it really the fault of your classmates or is something else going on?”
      • We ran into these miscommunications because I had the product in mind already and thought that my instructions were clear but for people who had never seen the product it was not as clear.
    • If we were going to change human language to improve our odds of succeeding at this activity, what types of changes would we need to make?
      • Add images with color to provide a visual, add a last step that shows or describes the product.


Friday, November 4, 2016

Data Visualization

Do you have to use a computer to create a data visualization? What are some reasons that you need to use a computer to manipulate data?

  • I think that you do not need to use a computer to represent data seeing as people have been representing information in written format for hundreds of years. However, computers make the job of representing and manipulating data simple and more efficient than it has ever been. To change things like add lines or take away data points or transfer the visual format can be done easily with computers, and was otherwise hard and time consuming. 

Unti 2 Lesson 13

In order to analyze data with a computer, we need to clean the data first. Based on your experience today, would you say that data analysis is a perfectly objective process? Why or why not?

No it is not objective because the results of the data analysis can still be manipulated by the analyzer and all people are subjective and have biases. 

Wednesday, November 2, 2016

Information, Knowledge, Data

  • What is the relationship between data, information, and knowledge? 
    • Data is proven facts based on real world occurrences. Knowledge is the thoughts and understandings of people, everyone has different level and variety of knowledge. Information is the in between, it is the commonalities of facts that all or most people share. So, information and data and knowledge are all based on facts, but they range in accuracy and commonality. 
  • What are the best ways to find, see, and extract meaningful trends and patterns from raw data?

  • Where and how does human bias affect the collection, processing, and interpretation of data?
    • Often times people say that statisticians create the results that they want to see. This is because there are so many ways to manipulate and interpret data. Human bias in this way dictates the results of data. 

Present your Data


  1. I chose to visualize the college ranking data that shows top public and private colleges. The list portrays 300 school of all different locations, tuition costs, and acceptance rates.
  2. There is a positive correlation found in the amount of need based aid school give and their retention rate. This shows how certain school have the ability to give more need based aid and therefor students attend the college for longer periods of time. This makes sense because the more expensive a school is the more certain people might have to graduate early or drop out.
  3. As I began to explain before school that offer more aid especially for students that have needs for aid have a tendency for students to stay in their college for longer. This makes sense because if students economic pressures to drop school or attend less school years of school they do not have enough aid, but with more aid comes less worries regarding finances. This leads to an overall greater attendance for longer periods of time.